# Migration Center API . projects . locations . assetsExportJobs

## Instance Methods

Close httplib2 connections.

Creates a new assets export job.

Deletes an assets export job.

Gets the details of an assets export job.

Lists all the assets export jobs in a given project and location.

Retrieves the next page of results.

Runs an assets export job, returning an AssetsExportJobExecution.

### Method Details

`close()`

    Close httplib2 connections.

`create(parent, assetsExportJobId=None, body=None, requestId=None, x__xgafv=None)`

    Creates a new assets export job.

    Args:
      parent: string, Required. The parent resource where the assts export job will be created. (required)
      body: object, The request body.
        The object takes the form of:

    { # Assets export job message.
      "condition": { # Conditions for selecting assets to export. # Optional. Conditions for selecting assets to export.
        "filter": "A String", # Optional. Assets filter, supports the same syntax as asset listing.
      },
      "createTime": "A String", # Output only. Resource creation time.
      "inventory": { # Configuration for asset inventory details exports. # Export asset inventory details.
      },
      "labels": { # Optional. Labels as key value pairs. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
        "a_key": "A String",
      },
      "name": "A String", # Output only. Identifier. Resource name.
      "networkDependencies": { # Configuration for network dependencies exports. # Export data regarding asset network dependencies.
      },
      "performanceData": { # Configuration for performance data exports. # Export asset with performance data.
        "maxDays": 42, # Optional. When this value is set to a positive integer, performance data will be returned for the most recent days for which data is available. When this value is unset (or set to zero), all available data is returned. The maximum value is 420; values above 420 will be coerced to 420. If unset (0 value) a default value of 40 will be used.
      },
      "recentExecutions": [ # Output only. Recent non expired executions of the job.
        { # Execution status of assets export job.
          "endTime": "A String", # Output only. Completion time of the export.
          "executionId": "A String", # Output only. Globally unique identifier of the execution.
          "expireTime": "A String", # Output only. Expiration time for the export and artifacts.
          "requestedAssetCount": 42, # Output only. Number of assets requested for export after resolving the requested filters.
          "result": { # Contains the result of the assets export. # Output only. Result of the export execution.
            "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Error encountered during export.
              "code": 42, # The status code, which should be an enum value of google.rpc.Code.
              "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
                {
                  "a_key": "", # Properties of the object. Contains field @type with type URL.
                },
              ],
              "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
            },
            "outputFiles": { # Contains a list of output files. # Output only. List of output files.
              "entries": [ # List of output files.
                { # Contains a single output file.
                  "csvOutputFile": { # Contains a single output file of type CSV. # Output only. CSV output file.
                    "columnsCount": 42, # Output only. Number of columns in the file.
                    "rowCount": 42, # Output only. Number of rows in the file.
                    "signedUri": { # Contains a signed URI. # Output only. Signed URI destination.
                      "file": "A String", # Output only. Name of the file the Signed URI references.
                      "uri": "A String", # Output only. Download URI for the file.
                    },
                  },
                  "fileSizeBytes": "A String", # Output only. File size in bytes.
                  "xlsxOutputFile": { # Contains a single output file of type XLSX. # Output only. XLSX output file.
                    "signedUri": { # Contains a signed URI. # Output only. Signed URI destination.
                      "file": "A String", # Output only. Name of the file the Signed URI references.
                      "uri": "A String", # Output only. Download URI for the file.
                    },
                  },
                },
              ],
            },
            "signedUris": { # Contains a list of Signed URIs. # Output only. Signed URLs for downloading export artifacts.
              "signedUris": [ # Output only. List of signed URIs.
                { # Contains a signed URI.
                  "file": "A String", # Output only. Name of the file the Signed URI references.
                  "uri": "A String", # Output only. Download URI for the file.
                },
              ],
            },
          },
          "startTime": "A String", # Output only. Execution timestamp.
        },
      ],
      "showHidden": True or False, # Optional. When this value is set to 'true' the response will include all assets, including those that are hidden.
      "signedUriDestination": { # Signed URI destination configuration. # Export to Cloud Storage files downloadable using signed URIs.
        "fileFormat": "A String", # Required. The file format to export.
      },
      "updateTime": "A String", # Output only. Resource update time.
    }

      assetsExportJobId: string, Required. The ID to use for the asset export job.
      requestId: string, Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # This resource represents a long-running operation that is the result of a network API call.
      "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
      "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
        "code": 42, # The status code, which should be an enum value of google.rpc.Code.
        "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
          {
            "a_key": "", # Properties of the object. Contains field @type with type URL.
          },
        ],
        "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
      },
      "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
      "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
      "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    }

`delete(name, x__xgafv=None)`

    Deletes an assets export job.

    Args:
      name: string, Required. The name of the assets export job to delete. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # This resource represents a long-running operation that is the result of a network API call.
      "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
      "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
        "code": 42, # The status code, which should be an enum value of google.rpc.Code.
        "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
          {
            "a_key": "", # Properties of the object. Contains field @type with type URL.
          },
        ],
        "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
      },
      "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
      "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
      "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    }

`get(name, x__xgafv=None)`

    Gets the details of an assets export job.

    Args:
      name: string, Required. Name of the resource. (required)
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Assets export job message.
      "condition": { # Conditions for selecting assets to export. # Optional. Conditions for selecting assets to export.
        "filter": "A String", # Optional. Assets filter, supports the same syntax as asset listing.
      },
      "createTime": "A String", # Output only. Resource creation time.
      "inventory": { # Configuration for asset inventory details exports. # Export asset inventory details.
      },
      "labels": { # Optional. Labels as key value pairs. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
        "a_key": "A String",
      },
      "name": "A String", # Output only. Identifier. Resource name.
      "networkDependencies": { # Configuration for network dependencies exports. # Export data regarding asset network dependencies.
      },
      "performanceData": { # Configuration for performance data exports. # Export asset with performance data.
        "maxDays": 42, # Optional. When this value is set to a positive integer, performance data will be returned for the most recent days for which data is available. When this value is unset (or set to zero), all available data is returned. The maximum value is 420; values above 420 will be coerced to 420. If unset (0 value) a default value of 40 will be used.
      },
      "recentExecutions": [ # Output only. Recent non expired executions of the job.
        { # Execution status of assets export job.
          "endTime": "A String", # Output only. Completion time of the export.
          "executionId": "A String", # Output only. Globally unique identifier of the execution.
          "expireTime": "A String", # Output only. Expiration time for the export and artifacts.
          "requestedAssetCount": 42, # Output only. Number of assets requested for export after resolving the requested filters.
          "result": { # Contains the result of the assets export. # Output only. Result of the export execution.
            "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Error encountered during export.
              "code": 42, # The status code, which should be an enum value of google.rpc.Code.
              "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
                {
                  "a_key": "", # Properties of the object. Contains field @type with type URL.
                },
              ],
              "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
            },
            "outputFiles": { # Contains a list of output files. # Output only. List of output files.
              "entries": [ # List of output files.
                { # Contains a single output file.
                  "csvOutputFile": { # Contains a single output file of type CSV. # Output only. CSV output file.
                    "columnsCount": 42, # Output only. Number of columns in the file.
                    "rowCount": 42, # Output only. Number of rows in the file.
                    "signedUri": { # Contains a signed URI. # Output only. Signed URI destination.
                      "file": "A String", # Output only. Name of the file the Signed URI references.
                      "uri": "A String", # Output only. Download URI for the file.
                    },
                  },
                  "fileSizeBytes": "A String", # Output only. File size in bytes.
                  "xlsxOutputFile": { # Contains a single output file of type XLSX. # Output only. XLSX output file.
                    "signedUri": { # Contains a signed URI. # Output only. Signed URI destination.
                      "file": "A String", # Output only. Name of the file the Signed URI references.
                      "uri": "A String", # Output only. Download URI for the file.
                    },
                  },
                },
              ],
            },
            "signedUris": { # Contains a list of Signed URIs. # Output only. Signed URLs for downloading export artifacts.
              "signedUris": [ # Output only. List of signed URIs.
                { # Contains a signed URI.
                  "file": "A String", # Output only. Name of the file the Signed URI references.
                  "uri": "A String", # Output only. Download URI for the file.
                },
              ],
            },
          },
          "startTime": "A String", # Output only. Execution timestamp.
        },
      ],
      "showHidden": True or False, # Optional. When this value is set to 'true' the response will include all assets, including those that are hidden.
      "signedUriDestination": { # Signed URI destination configuration. # Export to Cloud Storage files downloadable using signed URIs.
        "fileFormat": "A String", # Required. The file format to export.
      },
      "updateTime": "A String", # Output only. Resource update time.
    }

`list(parent, pageSize=None, pageToken=None, x__xgafv=None)`

    Lists all the assets export jobs in a given project and location.

    Args:
      parent: string, Required. Parent resource. (required)
      pageSize: integer, Optional. Requested page size. The server may return fewer items than requested. If unspecified, the server will pick an appropriate default value.
      pageToken: string, Optional. A token identifying a page of results that the server should return.
      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # Response message for listing assets export jobs.
      "assetsExportJobs": [ # Output only. The list of assets export jobs.
        { # Assets export job message.
          "condition": { # Conditions for selecting assets to export. # Optional. Conditions for selecting assets to export.
            "filter": "A String", # Optional. Assets filter, supports the same syntax as asset listing.
          },
          "createTime": "A String", # Output only. Resource creation time.
          "inventory": { # Configuration for asset inventory details exports. # Export asset inventory details.
          },
          "labels": { # Optional. Labels as key value pairs. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes.
            "a_key": "A String",
          },
          "name": "A String", # Output only. Identifier. Resource name.
          "networkDependencies": { # Configuration for network dependencies exports. # Export data regarding asset network dependencies.
          },
          "performanceData": { # Configuration for performance data exports. # Export asset with performance data.
            "maxDays": 42, # Optional. When this value is set to a positive integer, performance data will be returned for the most recent days for which data is available. When this value is unset (or set to zero), all available data is returned. The maximum value is 420; values above 420 will be coerced to 420. If unset (0 value) a default value of 40 will be used.
          },
          "recentExecutions": [ # Output only. Recent non expired executions of the job.
            { # Execution status of assets export job.
              "endTime": "A String", # Output only. Completion time of the export.
              "executionId": "A String", # Output only. Globally unique identifier of the execution.
              "expireTime": "A String", # Output only. Expiration time for the export and artifacts.
              "requestedAssetCount": 42, # Output only. Number of assets requested for export after resolving the requested filters.
              "result": { # Contains the result of the assets export. # Output only. Result of the export execution.
                "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Error encountered during export.
                  "code": 42, # The status code, which should be an enum value of google.rpc.Code.
                  "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
                    {
                      "a_key": "", # Properties of the object. Contains field @type with type URL.
                    },
                  ],
                  "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
                },
                "outputFiles": { # Contains a list of output files. # Output only. List of output files.
                  "entries": [ # List of output files.
                    { # Contains a single output file.
                      "csvOutputFile": { # Contains a single output file of type CSV. # Output only. CSV output file.
                        "columnsCount": 42, # Output only. Number of columns in the file.
                        "rowCount": 42, # Output only. Number of rows in the file.
                        "signedUri": { # Contains a signed URI. # Output only. Signed URI destination.
                          "file": "A String", # Output only. Name of the file the Signed URI references.
                          "uri": "A String", # Output only. Download URI for the file.
                        },
                      },
                      "fileSizeBytes": "A String", # Output only. File size in bytes.
                      "xlsxOutputFile": { # Contains a single output file of type XLSX. # Output only. XLSX output file.
                        "signedUri": { # Contains a signed URI. # Output only. Signed URI destination.
                          "file": "A String", # Output only. Name of the file the Signed URI references.
                          "uri": "A String", # Output only. Download URI for the file.
                        },
                      },
                    },
                  ],
                },
                "signedUris": { # Contains a list of Signed URIs. # Output only. Signed URLs for downloading export artifacts.
                  "signedUris": [ # Output only. List of signed URIs.
                    { # Contains a signed URI.
                      "file": "A String", # Output only. Name of the file the Signed URI references.
                      "uri": "A String", # Output only. Download URI for the file.
                    },
                  ],
                },
              },
              "startTime": "A String", # Output only. Execution timestamp.
            },
          ],
          "showHidden": True or False, # Optional. When this value is set to 'true' the response will include all assets, including those that are hidden.
          "signedUriDestination": { # Signed URI destination configuration. # Export to Cloud Storage files downloadable using signed URIs.
            "fileFormat": "A String", # Required. The file format to export.
          },
          "updateTime": "A String", # Output only. Resource update time.
        },
      ],
      "nextPageToken": "A String", # Output only. A token identifying a page of results the server should return.
    }

`list_next()`

    Retrieves the next page of results.

            Args:
              previous_request: The request for the previous page. (required)
              previous_response: The response from the request for the previous page. (required)

            Returns:
              A request object that you can call 'execute()' on to request the next
              page. Returns None if there are no more items in the collection.

`run(name, body=None, x__xgafv=None)`

    Runs an assets export job, returning an AssetsExportJobExecution.

    Args:
      name: string, Required. Name of the resource. (required)
      body: object, The request body.
        The object takes the form of:

    { # A request to run an assets export job.
      "requestId": "A String", # Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
    }

      x__xgafv: string, V1 error format.
        Allowed values
          1 - v1 error format
          2 - v2 error format

    Returns:
      An object of the form:

        { # This resource represents a long-running operation that is the result of a network API call.
      "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
      "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
        "code": 42, # The status code, which should be an enum value of google.rpc.Code.
        "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
          {
            "a_key": "", # Properties of the object. Contains field @type with type URL.
          },
        ],
        "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
      },
      "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
      "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
      "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
        "a_key": "", # Properties of the object. Contains field @type with type URL.
      },
    }