Cloud Dataplex API . projects . locations . metadataJobs

Instance Methods

cancel(name, body=None, x__xgafv=None)

Cancels a metadata job.If you cancel a metadata import job that is in progress, the changes in the job might be partially applied. We recommend that you reset the state of the entry groups in your project by running another metadata job that reverts the changes from the canceled job.

close()

Close httplib2 connections.

create(parent, body=None, metadataJobId=None, validateOnly=None, x__xgafv=None)

Creates a metadata job. For example, use a metadata job to import Dataplex Catalog entries and aspects from a third-party system into Dataplex.

get(name, x__xgafv=None)

Gets a metadata job.

list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)

Lists metadata jobs.

list_next()

Retrieves the next page of results.

Method Details

cancel(name, body=None, x__xgafv=None)
Cancels a metadata job.If you cancel a metadata import job that is in progress, the changes in the job might be partially applied. We recommend that you reset the state of the entry groups in your project by running another metadata job that reverts the changes from the canceled job.

Args:
  name: string, Required. The resource name of the job, in the format projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id} (required)
  body: object, The request body.
    The object takes the form of:

{ # Cancel metadata job request.
}

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

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
}
close()
Close httplib2 connections.
create(parent, body=None, metadataJobId=None, validateOnly=None, x__xgafv=None)
Creates a metadata job. For example, use a metadata job to import Dataplex Catalog entries and aspects from a third-party system into Dataplex.

Args:
  parent: string, Required. The resource name of the parent location, in the format projects/{project_id_or_number}/locations/{location_id} (required)
  body: object, The request body.
    The object takes the form of:

{ # A metadata job resource.
  "createTime": "A String", # Output only. The time when the metadata job was created.
  "importResult": { # Results from a metadata import job. # Output only. Import job result.
    "createdEntries": "A String", # Output only. The total number of entries that were created.
    "deletedEntries": "A String", # Output only. The total number of entries that were deleted.
    "recreatedEntries": "A String", # Output only. The total number of entries that were recreated.
    "unchangedEntries": "A String", # Output only. The total number of entries that were unchanged.
    "updateTime": "A String", # Output only. The time when the status was updated.
    "updatedEntries": "A String", # Output only. The total number of entries that were updated.
  },
  "importSpec": { # Job specification for a metadata import job # Import job specification.
    "aspectSyncMode": "A String", # Required. The sync mode for aspects. Only INCREMENTAL mode is supported for aspects. An aspect is modified only if the metadata import file includes a reference to the aspect in the update_mask field and the aspect_keys field.
    "entrySyncMode": "A String", # Required. The sync mode for entries. Only FULL mode is supported for entries. All entries in the job's scope are modified. If an entry exists in Dataplex but isn't included in the metadata import file, the entry is deleted when you run the metadata job.
    "logLevel": "A String", # Optional. The level of logs to write to Cloud Logging for this job.Debug-level logs provide highly-detailed information for troubleshooting, but their increased verbosity could incur additional costs (https://cloud.google.com/stackdriver/pricing) that might not be merited for all jobs.If unspecified, defaults to INFO.
    "scope": { # A boundary on the scope of impact that the metadata import job can have. # Required. A boundary on the scope of impact that the metadata import job can have.
      "aspectTypes": [ # Optional. The aspect types that are in scope for the import job, specified as relative resource names in the format projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_type_id}. The job modifies only the aspects that belong to these aspect types.If the metadata import file attempts to modify an aspect whose type isn't included in this list, the import job is halted before modifying any entries or aspects.The location of an aspect type must either match the location of the job, or the aspect type must be global.
        "A String",
      ],
      "entryGroups": [ # Required. The entry group that is in scope for the import job, specified as a relative resource name in the format projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_group_id}. Only entries that belong to the specified entry group are affected by the job.Must contain exactly one element. The entry group and the job must be in the same location.
        "A String",
      ],
      "entryTypes": [ # Required. The entry types that are in scope for the import job, specified as relative resource names in the format projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_type_id}. The job modifies only the entries that belong to these entry types.If the metadata import file attempts to modify an entry whose type isn't included in this list, the import job is halted before modifying any entries or aspects.The location of an entry type must either match the location of the job, or the entry type must be global.
        "A String",
      ],
    },
    "sourceCreateTime": "A String", # Optional. The time when the process that created the metadata import files began.
    "sourceStorageUri": "A String", # Optional. The URI of a Cloud Storage bucket or folder (beginning with gs:// and ending with /) that contains the metadata import files for this job.A metadata import file defines the values to set for each of the entries and aspects in a metadata job. For more information about how to create a metadata import file and the file requirements, see Metadata import file (https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file).You can provide multiple metadata import files in the same metadata job. The bucket or folder must contain at least one metadata import file, in JSON Lines format (either .json or .jsonl file extension).In FULL entry sync mode, don't save the metadata import file in a folder named SOURCE_STORAGE_URI/deletions/.Caution: If the metadata import file contains no data, all entries and aspects that belong to the job's scope are deleted.
  },
  "labels": { # Optional. User-defined labels.
    "a_key": "A String",
  },
  "name": "A String", # Output only. Identifier. The name of the resource that the configuration is applied to, in the format projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}.
  "status": { # Metadata job status. # Output only. Metadata job status.
    "completionPercent": 42, # Output only. Progress tracking.
    "message": "A String", # Output only. Message relating to the progression of a metadata job.
    "state": "A String", # Output only. State of the metadata job.
    "updateTime": "A String", # Output only. The time when the status was updated.
  },
  "type": "A String", # Required. Metadata job type.
  "uid": "A String", # Output only. A system-generated, globally unique ID for the metadata job. If the metadata job is deleted and then re-created with the same name, this ID is different.
  "updateTime": "A String", # Output only. The time when the metadata job was updated.
}

  metadataJobId: string, Optional. The metadata job ID. If not provided, a unique ID is generated with the prefix metadata-job-.
  validateOnly: boolean, Optional. The service validates the request without performing any mutations. The default is false.
  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 a metadata job.

Args:
  name: string, Required. The resource name of the metadata job, in the format projects/{project_id_or_number}/locations/{location_id}/metadataJobs/{metadata_job_id}. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A metadata job resource.
  "createTime": "A String", # Output only. The time when the metadata job was created.
  "importResult": { # Results from a metadata import job. # Output only. Import job result.
    "createdEntries": "A String", # Output only. The total number of entries that were created.
    "deletedEntries": "A String", # Output only. The total number of entries that were deleted.
    "recreatedEntries": "A String", # Output only. The total number of entries that were recreated.
    "unchangedEntries": "A String", # Output only. The total number of entries that were unchanged.
    "updateTime": "A String", # Output only. The time when the status was updated.
    "updatedEntries": "A String", # Output only. The total number of entries that were updated.
  },
  "importSpec": { # Job specification for a metadata import job # Import job specification.
    "aspectSyncMode": "A String", # Required. The sync mode for aspects. Only INCREMENTAL mode is supported for aspects. An aspect is modified only if the metadata import file includes a reference to the aspect in the update_mask field and the aspect_keys field.
    "entrySyncMode": "A String", # Required. The sync mode for entries. Only FULL mode is supported for entries. All entries in the job's scope are modified. If an entry exists in Dataplex but isn't included in the metadata import file, the entry is deleted when you run the metadata job.
    "logLevel": "A String", # Optional. The level of logs to write to Cloud Logging for this job.Debug-level logs provide highly-detailed information for troubleshooting, but their increased verbosity could incur additional costs (https://cloud.google.com/stackdriver/pricing) that might not be merited for all jobs.If unspecified, defaults to INFO.
    "scope": { # A boundary on the scope of impact that the metadata import job can have. # Required. A boundary on the scope of impact that the metadata import job can have.
      "aspectTypes": [ # Optional. The aspect types that are in scope for the import job, specified as relative resource names in the format projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_type_id}. The job modifies only the aspects that belong to these aspect types.If the metadata import file attempts to modify an aspect whose type isn't included in this list, the import job is halted before modifying any entries or aspects.The location of an aspect type must either match the location of the job, or the aspect type must be global.
        "A String",
      ],
      "entryGroups": [ # Required. The entry group that is in scope for the import job, specified as a relative resource name in the format projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_group_id}. Only entries that belong to the specified entry group are affected by the job.Must contain exactly one element. The entry group and the job must be in the same location.
        "A String",
      ],
      "entryTypes": [ # Required. The entry types that are in scope for the import job, specified as relative resource names in the format projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_type_id}. The job modifies only the entries that belong to these entry types.If the metadata import file attempts to modify an entry whose type isn't included in this list, the import job is halted before modifying any entries or aspects.The location of an entry type must either match the location of the job, or the entry type must be global.
        "A String",
      ],
    },
    "sourceCreateTime": "A String", # Optional. The time when the process that created the metadata import files began.
    "sourceStorageUri": "A String", # Optional. The URI of a Cloud Storage bucket or folder (beginning with gs:// and ending with /) that contains the metadata import files for this job.A metadata import file defines the values to set for each of the entries and aspects in a metadata job. For more information about how to create a metadata import file and the file requirements, see Metadata import file (https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file).You can provide multiple metadata import files in the same metadata job. The bucket or folder must contain at least one metadata import file, in JSON Lines format (either .json or .jsonl file extension).In FULL entry sync mode, don't save the metadata import file in a folder named SOURCE_STORAGE_URI/deletions/.Caution: If the metadata import file contains no data, all entries and aspects that belong to the job's scope are deleted.
  },
  "labels": { # Optional. User-defined labels.
    "a_key": "A String",
  },
  "name": "A String", # Output only. Identifier. The name of the resource that the configuration is applied to, in the format projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}.
  "status": { # Metadata job status. # Output only. Metadata job status.
    "completionPercent": 42, # Output only. Progress tracking.
    "message": "A String", # Output only. Message relating to the progression of a metadata job.
    "state": "A String", # Output only. State of the metadata job.
    "updateTime": "A String", # Output only. The time when the status was updated.
  },
  "type": "A String", # Required. Metadata job type.
  "uid": "A String", # Output only. A system-generated, globally unique ID for the metadata job. If the metadata job is deleted and then re-created with the same name, this ID is different.
  "updateTime": "A String", # Output only. The time when the metadata job was updated.
}
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists metadata jobs.

Args:
  parent: string, Required. The resource name of the parent location, in the format projects/{project_id_or_number}/locations/{location_id} (required)
  filter: string, Optional. Filter request. Filters are case-sensitive. The service supports the following formats: labels.key1 = "value1" labels:key1 name = "value"You can combine filters with AND, OR, and NOT operators.
  orderBy: string, Optional. The field to sort the results by, either name or create_time. If not specified, the ordering is undefined.
  pageSize: integer, Optional. The maximum number of metadata jobs to return. The service might return fewer jobs than this value. If unspecified, at most 10 jobs are returned. The maximum value is 1,000.
  pageToken: string, Optional. The page token received from a previous ListMetadataJobs call. Provide this token to retrieve the subsequent page of results. When paginating, all other parameters that are provided to the ListMetadataJobs request must match the call that provided the page token.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # List metadata jobs response.
  "metadataJobs": [ # Metadata jobs under the specified parent location.
    { # A metadata job resource.
      "createTime": "A String", # Output only. The time when the metadata job was created.
      "importResult": { # Results from a metadata import job. # Output only. Import job result.
        "createdEntries": "A String", # Output only. The total number of entries that were created.
        "deletedEntries": "A String", # Output only. The total number of entries that were deleted.
        "recreatedEntries": "A String", # Output only. The total number of entries that were recreated.
        "unchangedEntries": "A String", # Output only. The total number of entries that were unchanged.
        "updateTime": "A String", # Output only. The time when the status was updated.
        "updatedEntries": "A String", # Output only. The total number of entries that were updated.
      },
      "importSpec": { # Job specification for a metadata import job # Import job specification.
        "aspectSyncMode": "A String", # Required. The sync mode for aspects. Only INCREMENTAL mode is supported for aspects. An aspect is modified only if the metadata import file includes a reference to the aspect in the update_mask field and the aspect_keys field.
        "entrySyncMode": "A String", # Required. The sync mode for entries. Only FULL mode is supported for entries. All entries in the job's scope are modified. If an entry exists in Dataplex but isn't included in the metadata import file, the entry is deleted when you run the metadata job.
        "logLevel": "A String", # Optional. The level of logs to write to Cloud Logging for this job.Debug-level logs provide highly-detailed information for troubleshooting, but their increased verbosity could incur additional costs (https://cloud.google.com/stackdriver/pricing) that might not be merited for all jobs.If unspecified, defaults to INFO.
        "scope": { # A boundary on the scope of impact that the metadata import job can have. # Required. A boundary on the scope of impact that the metadata import job can have.
          "aspectTypes": [ # Optional. The aspect types that are in scope for the import job, specified as relative resource names in the format projects/{project_number_or_id}/locations/{location_id}/aspectTypes/{aspect_type_id}. The job modifies only the aspects that belong to these aspect types.If the metadata import file attempts to modify an aspect whose type isn't included in this list, the import job is halted before modifying any entries or aspects.The location of an aspect type must either match the location of the job, or the aspect type must be global.
            "A String",
          ],
          "entryGroups": [ # Required. The entry group that is in scope for the import job, specified as a relative resource name in the format projects/{project_number_or_id}/locations/{location_id}/entryGroups/{entry_group_id}. Only entries that belong to the specified entry group are affected by the job.Must contain exactly one element. The entry group and the job must be in the same location.
            "A String",
          ],
          "entryTypes": [ # Required. The entry types that are in scope for the import job, specified as relative resource names in the format projects/{project_number_or_id}/locations/{location_id}/entryTypes/{entry_type_id}. The job modifies only the entries that belong to these entry types.If the metadata import file attempts to modify an entry whose type isn't included in this list, the import job is halted before modifying any entries or aspects.The location of an entry type must either match the location of the job, or the entry type must be global.
            "A String",
          ],
        },
        "sourceCreateTime": "A String", # Optional. The time when the process that created the metadata import files began.
        "sourceStorageUri": "A String", # Optional. The URI of a Cloud Storage bucket or folder (beginning with gs:// and ending with /) that contains the metadata import files for this job.A metadata import file defines the values to set for each of the entries and aspects in a metadata job. For more information about how to create a metadata import file and the file requirements, see Metadata import file (https://cloud.google.com/dataplex/docs/import-metadata#metadata-import-file).You can provide multiple metadata import files in the same metadata job. The bucket or folder must contain at least one metadata import file, in JSON Lines format (either .json or .jsonl file extension).In FULL entry sync mode, don't save the metadata import file in a folder named SOURCE_STORAGE_URI/deletions/.Caution: If the metadata import file contains no data, all entries and aspects that belong to the job's scope are deleted.
      },
      "labels": { # Optional. User-defined labels.
        "a_key": "A String",
      },
      "name": "A String", # Output only. Identifier. The name of the resource that the configuration is applied to, in the format projects/{project_number}/locations/{location_id}/metadataJobs/{metadata_job_id}.
      "status": { # Metadata job status. # Output only. Metadata job status.
        "completionPercent": 42, # Output only. Progress tracking.
        "message": "A String", # Output only. Message relating to the progression of a metadata job.
        "state": "A String", # Output only. State of the metadata job.
        "updateTime": "A String", # Output only. The time when the status was updated.
      },
      "type": "A String", # Required. Metadata job type.
      "uid": "A String", # Output only. A system-generated, globally unique ID for the metadata job. If the metadata job is deleted and then re-created with the same name, this ID is different.
      "updateTime": "A String", # Output only. The time when the metadata job was updated.
    },
  ],
  "nextPageToken": "A String", # A token to retrieve the next page of results. If there are no more results in the list, the value is empty.
  "unreachableLocations": [ # Locations that the service couldn't reach.
    "A String",
  ],
}
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.