As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

MetadataService

class google.cloud.aiplatform_v1.services.metadata_service.MetadataServiceAsyncClient(*, credentials: ~typing.Optional[~google.auth.credentials.Credentials] = None, transport: ~typing.Optional[~typing.Union[str, ~google.cloud.aiplatform_v1.services.metadata_service.transports.base.MetadataServiceTransport, ~typing.Callable[[...], ~google.cloud.aiplatform_v1.services.metadata_service.transports.base.MetadataServiceTransport]]] = 'grpc_asyncio', client_options: ~typing.Optional[~google.api_core.client_options.ClientOptions] = None, client_info: ~google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

Service for reading and writing metadata entries.

Instantiates the metadata service async client.

Parameters:
  • credentials (Optional[google.auth.credentials.Credentials]) – The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

  • transport (Optional[Union[str,MetadataServiceTransport,Callable[..., MetadataServiceTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport to use. If a Callable is given, it will be called with the same set of initialization arguments as used in the MetadataServiceTransport constructor. If set to None, a transport is chosen automatically.

  • client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]) –

    Custom options for the client.

    1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value).

    2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be used.

    3. The universe_domain property can be used to override the default “googleapis.com” universe. Note that api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

  • client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you’re developing your own client library.

Raises:

google.auth.exceptions.MutualTlsChannelError – If mutual TLS transport creation failed for any reason.

async add_context_artifacts_and_executions(request: Optional[Union[AddContextArtifactsAndExecutionsRequest, dict]] = None, *, context: Optional[str] = None, artifacts: Optional[MutableSequence[str]] = None, executions: Optional[MutableSequence[str]] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AddContextArtifactsAndExecutionsResponse[source]

Adds a set of Artifacts and Executions to a Context. If any of the Artifacts or Executions have already been added to a Context, they are simply skipped.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_add_context_artifacts_and_executions():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.AddContextArtifactsAndExecutionsRequest(
        context="context_value",
    )

    # Make the request
    response = await client.add_context_artifacts_and_executions(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.AddContextArtifactsAndExecutionsRequest, dict]]) – The request object. Request message for [MetadataService.AddContextArtifactsAndExecutions][google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions].

  • context (str) –

    Required. The resource name of the Context that the Artifacts and Executions belong to. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    This corresponds to the context field on the request instance; if request is provided, this should not be set.

  • artifacts (MutableSequence[str]) –

    The resource names of the Artifacts to attribute to the Context.

    Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}

    This corresponds to the artifacts field on the request instance; if request is provided, this should not be set.

  • executions (MutableSequence[str]) –

    The resource names of the Executions to associate with the Context.

    Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}

    This corresponds to the executions field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.AddContextArtifactsAndExecutions][google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions].

Return type:

google.cloud.aiplatform_v1.types.AddContextArtifactsAndExecutionsResponse

async add_context_children(request: Optional[Union[AddContextChildrenRequest, dict]] = None, *, context: Optional[str] = None, child_contexts: Optional[MutableSequence[str]] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AddContextChildrenResponse[source]

Adds a set of Contexts as children to a parent Context. If any of the child Contexts have already been added to the parent Context, they are simply skipped. If this call would create a cycle or cause any Context to have more than 10 parents, the request will fail with an INVALID_ARGUMENT error.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_add_context_children():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.AddContextChildrenRequest(
        context="context_value",
    )

    # Make the request
    response = await client.add_context_children(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.AddContextChildrenRequest, dict]]) – The request object. Request message for [MetadataService.AddContextChildren][google.cloud.aiplatform.v1.MetadataService.AddContextChildren].

  • context (str) –

    Required. The resource name of the parent Context.

    Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    This corresponds to the context field on the request instance; if request is provided, this should not be set.

  • child_contexts (MutableSequence[str]) –

    The resource names of the child Contexts.

    This corresponds to the child_contexts field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.AddContextChildren][google.cloud.aiplatform.v1.MetadataService.AddContextChildren].

Return type:

google.cloud.aiplatform_v1.types.AddContextChildrenResponse

async add_execution_events(request: Optional[Union[AddExecutionEventsRequest, dict]] = None, *, execution: Optional[str] = None, events: Optional[MutableSequence[Event]] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AddExecutionEventsResponse[source]

Adds Events to the specified Execution. An Event indicates whether an Artifact was used as an input or output for an Execution. If an Event already exists between the Execution and the Artifact, the Event is skipped.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_add_execution_events():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.AddExecutionEventsRequest(
        execution="execution_value",
    )

    # Make the request
    response = await client.add_execution_events(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.AddExecutionEventsRequest, dict]]) – The request object. Request message for [MetadataService.AddExecutionEvents][google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents].

  • execution (str) –

    Required. The resource name of the Execution that the Events connect Artifacts with. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}

    This corresponds to the execution field on the request instance; if request is provided, this should not be set.

  • events (MutableSequence[google.cloud.aiplatform_v1.types.Event]) – The Events to create and add. This corresponds to the events field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.AddExecutionEvents][google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents].

Return type:

google.cloud.aiplatform_v1.types.AddExecutionEventsResponse

property api_endpoint

Return the API endpoint used by the client instance.

Returns:

The API endpoint used by the client instance.

Return type:

str

static artifact_path(project: str, location: str, metadata_store: str, artifact: str) str

Returns a fully-qualified artifact string.

async cancel_operation(request: Optional[CancelOperationRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Starts asynchronous cancellation on a long-running operation.

The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters:
  • request (CancelOperationRequest) – The request object. Request message for CancelOperation method.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

None

static common_billing_account_path(billing_account: str) str

Returns a fully-qualified billing_account string.

static common_folder_path(folder: str) str

Returns a fully-qualified folder string.

static common_location_path(project: str, location: str) str

Returns a fully-qualified location string.

static common_organization_path(organization: str) str

Returns a fully-qualified organization string.

static common_project_path(project: str) str

Returns a fully-qualified project string.

static context_path(project: str, location: str, metadata_store: str, context: str) str

Returns a fully-qualified context string.

async create_artifact(request: Optional[Union[CreateArtifactRequest, dict]] = None, *, parent: Optional[str] = None, artifact: Optional[Artifact] = None, artifact_id: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Artifact[source]

Creates an Artifact associated with a MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_create_artifact():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CreateArtifactRequest(
        parent="parent_value",
    )

    # Make the request
    response = await client.create_artifact(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CreateArtifactRequest, dict]]) – The request object. Request message for [MetadataService.CreateArtifact][google.cloud.aiplatform.v1.MetadataService.CreateArtifact].

  • parent (str) –

    Required. The resource name of the MetadataStore where the Artifact should be created. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • artifact (google.cloud.aiplatform_v1.types.Artifact) – Required. The Artifact to create. This corresponds to the artifact field on the request instance; if request is provided, this should not be set.

  • artifact_id (str) –

    The {artifact} portion of the resource name with the format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact} If not provided, the Artifact’s ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are /[a-z][0-9]-/. Must be unique across all Artifacts in the parent MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can’t view the preexisting Artifact.)

    This corresponds to the artifact_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general artifact.

Return type:

google.cloud.aiplatform_v1.types.Artifact

async create_context(request: Optional[Union[CreateContextRequest, dict]] = None, *, parent: Optional[str] = None, context: Optional[Context] = None, context_id: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Context[source]

Creates a Context associated with a MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_create_context():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CreateContextRequest(
        parent="parent_value",
    )

    # Make the request
    response = await client.create_context(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CreateContextRequest, dict]]) – The request object. Request message for [MetadataService.CreateContext][google.cloud.aiplatform.v1.MetadataService.CreateContext].

  • parent (str) –

    Required. The resource name of the MetadataStore where the Context should be created. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • context (google.cloud.aiplatform_v1.types.Context) – Required. The Context to create. This corresponds to the context field on the request instance; if request is provided, this should not be set.

  • context_id (str) –

    The {context} portion of the resource name with the format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}. If not provided, the Context’s ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are /[a-z][0-9]-/. Must be unique across all Contexts in the parent MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can’t view the preexisting Context.)

    This corresponds to the context_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general context.

Return type:

google.cloud.aiplatform_v1.types.Context

async create_execution(request: Optional[Union[CreateExecutionRequest, dict]] = None, *, parent: Optional[str] = None, execution: Optional[Execution] = None, execution_id: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Execution[source]

Creates an Execution associated with a MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_create_execution():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CreateExecutionRequest(
        parent="parent_value",
    )

    # Make the request
    response = await client.create_execution(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CreateExecutionRequest, dict]]) – The request object. Request message for [MetadataService.CreateExecution][google.cloud.aiplatform.v1.MetadataService.CreateExecution].

  • parent (str) –

    Required. The resource name of the MetadataStore where the Execution should be created. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • execution (google.cloud.aiplatform_v1.types.Execution) – Required. The Execution to create. This corresponds to the execution field on the request instance; if request is provided, this should not be set.

  • execution_id (str) –

    The {execution} portion of the resource name with the format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution} If not provided, the Execution’s ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are /[a-z][0-9]-/. Must be unique across all Executions in the parent MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can’t view the preexisting Execution.)

    This corresponds to the execution_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general execution.

Return type:

google.cloud.aiplatform_v1.types.Execution

async create_metadata_schema(request: Optional[Union[CreateMetadataSchemaRequest, dict]] = None, *, parent: Optional[str] = None, metadata_schema: Optional[MetadataSchema] = None, metadata_schema_id: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) MetadataSchema[source]

Creates a MetadataSchema.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_create_metadata_schema():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    metadata_schema = aiplatform_v1.MetadataSchema()
    metadata_schema.schema = "schema_value"

    request = aiplatform_v1.CreateMetadataSchemaRequest(
        parent="parent_value",
        metadata_schema=metadata_schema,
    )

    # Make the request
    response = await client.create_metadata_schema(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CreateMetadataSchemaRequest, dict]]) – The request object. Request message for [MetadataService.CreateMetadataSchema][google.cloud.aiplatform.v1.MetadataService.CreateMetadataSchema].

  • parent (str) –

    Required. The resource name of the MetadataStore where the MetadataSchema should be created. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • metadata_schema (google.cloud.aiplatform_v1.types.MetadataSchema) –

    Required. The MetadataSchema to create.

    This corresponds to the metadata_schema field on the request instance; if request is provided, this should not be set.

  • metadata_schema_id (str) –

    The {metadata_schema} portion of the resource name with the format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema} If not provided, the MetadataStore’s ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are /[a-z][0-9]-/. Must be unique across all MetadataSchemas in the parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can’t view the preexisting MetadataSchema.)

    This corresponds to the metadata_schema_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general MetadataSchema.

Return type:

google.cloud.aiplatform_v1.types.MetadataSchema

async create_metadata_store(request: Optional[Union[CreateMetadataStoreRequest, dict]] = None, *, parent: Optional[str] = None, metadata_store: Optional[MetadataStore] = None, metadata_store_id: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Initializes a MetadataStore, including allocation of resources.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_create_metadata_store():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CreateMetadataStoreRequest(
        parent="parent_value",
    )

    # Make the request
    operation = client.create_metadata_store(request=request)

    print("Waiting for operation to complete...")

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.CreateMetadataStoreRequest, dict]]) – The request object. Request message for [MetadataService.CreateMetadataStore][google.cloud.aiplatform.v1.MetadataService.CreateMetadataStore].

  • parent (str) –

    Required. The resource name of the Location where the MetadataStore should be created. Format: projects/{project}/locations/{location}/

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • metadata_store (google.cloud.aiplatform_v1.types.MetadataStore) –

    Required. The MetadataStore to create.

    This corresponds to the metadata_store field on the request instance; if request is provided, this should not be set.

  • metadata_store_id (str) –

    The {metadatastore} portion of the resource name with the format: projects/{project}/locations/{location}/metadataStores/{metadatastore} If not provided, the MetadataStore’s ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are /[a-z][0-9]-/. Must be unique across all MetadataStores in the parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can’t view the preexisting MetadataStore.)

    This corresponds to the metadata_store_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.cloud.aiplatform_v1.types.MetadataStore Instance of a metadata store. Contains a set of metadata that can be

queried.

Return type:

google.api_core.operation_async.AsyncOperation

async delete_artifact(request: Optional[Union[DeleteArtifactRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Deletes an Artifact.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_delete_artifact():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteArtifactRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_artifact(request=request)

    print("Waiting for operation to complete...")

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.DeleteArtifactRequest, dict]]) – The request object. Request message for [MetadataService.DeleteArtifact][google.cloud.aiplatform.v1.MetadataService.DeleteArtifact].

  • name (str) –

    Required. The resource name of the Artifact to delete. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.protobuf.empty_pb2.Empty 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);

}

Return type:

google.api_core.operation_async.AsyncOperation

async delete_context(request: Optional[Union[DeleteContextRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Deletes a stored Context.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_delete_context():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteContextRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_context(request=request)

    print("Waiting for operation to complete...")

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.DeleteContextRequest, dict]]) – The request object. Request message for [MetadataService.DeleteContext][google.cloud.aiplatform.v1.MetadataService.DeleteContext].

  • name (str) –

    Required. The resource name of the Context to delete. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.protobuf.empty_pb2.Empty 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);

}

Return type:

google.api_core.operation_async.AsyncOperation

async delete_execution(request: Optional[Union[DeleteExecutionRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Deletes an Execution.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_delete_execution():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteExecutionRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_execution(request=request)

    print("Waiting for operation to complete...")

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.DeleteExecutionRequest, dict]]) – The request object. Request message for [MetadataService.DeleteExecution][google.cloud.aiplatform.v1.MetadataService.DeleteExecution].

  • name (str) –

    Required. The resource name of the Execution to delete. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.protobuf.empty_pb2.Empty 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);

}

Return type:

google.api_core.operation_async.AsyncOperation

async delete_metadata_store(request: Optional[Union[DeleteMetadataStoreRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Deletes a single MetadataStore and all its child resources (Artifacts, Executions, and Contexts).

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_delete_metadata_store():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteMetadataStoreRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_metadata_store(request=request)

    print("Waiting for operation to complete...")

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.DeleteMetadataStoreRequest, dict]]) – The request object. Request message for [MetadataService.DeleteMetadataStore][google.cloud.aiplatform.v1.MetadataService.DeleteMetadataStore].

  • name (str) –

    Required. The resource name of the MetadataStore to delete. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.protobuf.empty_pb2.Empty 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);

}

Return type:

google.api_core.operation_async.AsyncOperation

async delete_operation(request: Optional[DeleteOperationRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes a long-running operation.

This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters:
  • request (DeleteOperationRequest) – The request object. Request message for DeleteOperation method.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

None

static execution_path(project: str, location: str, metadata_store: str, execution: str) str

Returns a fully-qualified execution string.

classmethod from_service_account_file(filename: str, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

file.

Parameters:
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns:

The constructed client.

Return type:

MetadataServiceAsyncClient

classmethod from_service_account_info(info: dict, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

info.

Parameters:
  • info (dict) – The service account private key info.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns:

The constructed client.

Return type:

MetadataServiceAsyncClient

classmethod from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials

file.

Parameters:
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns:

The constructed client.

Return type:

MetadataServiceAsyncClient

async get_artifact(request: Optional[Union[GetArtifactRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Artifact[source]

Retrieves a specific Artifact.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_get_artifact():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetArtifactRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_artifact(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.GetArtifactRequest, dict]]) – The request object. Request message for [MetadataService.GetArtifact][google.cloud.aiplatform.v1.MetadataService.GetArtifact].

  • name (str) –

    Required. The resource name of the Artifact to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general artifact.

Return type:

google.cloud.aiplatform_v1.types.Artifact

async get_context(request: Optional[Union[GetContextRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Context[source]

Retrieves a specific Context.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_get_context():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetContextRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_context(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.GetContextRequest, dict]]) – The request object. Request message for [MetadataService.GetContext][google.cloud.aiplatform.v1.MetadataService.GetContext].

  • name (str) –

    Required. The resource name of the Context to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general context.

Return type:

google.cloud.aiplatform_v1.types.Context

async get_execution(request: Optional[Union[GetExecutionRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Execution[source]

Retrieves a specific Execution.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_get_execution():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetExecutionRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_execution(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.GetExecutionRequest, dict]]) – The request object. Request message for [MetadataService.GetExecution][google.cloud.aiplatform.v1.MetadataService.GetExecution].

  • name (str) –

    Required. The resource name of the Execution to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general execution.

Return type:

google.cloud.aiplatform_v1.types.Execution

async get_iam_policy(request: Optional[GetIamPolicyRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Policy[source]

Gets the IAM access control policy for a function.

Returns an empty policy if the function exists and does not have a policy set.

Parameters:
  • request (GetIamPolicyRequest) – The request object. Request message for GetIamPolicy method.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.

JSON Example

{
  "bindings": [
    {
      "role": "roles/resourcemanager.organizationAdmin",
      "members": [
        "user:mike@example.com",
        "group:admins@example.com",
        "domain:google.com",
        "serviceAccount:my-project-id@appspot.gserviceaccount.com"
      ]
    },
    {
      "role": "roles/resourcemanager.organizationViewer",
      "members": ["user:eve@example.com"],
      "condition": {
        "title": "expirable access",
        "description": "Does not grant access after Sep 2020",
        "expression": "request.time <
        timestamp('2020-10-01T00:00:00.000Z')",
      }
    }
  ]
}

YAML Example

bindings:
- members:
  - user:mike@example.com
  - group:admins@example.com
  - domain:google.com
  - serviceAccount:my-project-id@appspot.gserviceaccount.com
  role: roles/resourcemanager.organizationAdmin
- members:
  - user:eve@example.com
  role: roles/resourcemanager.organizationViewer
  condition:
    title: expirable access
    description: Does not grant access after Sep 2020
    expression: request.time < timestamp('2020-10-01T00:00:00.000Z')

For a description of IAM and its features, see the IAM developer’s guide.

Return type:

Policy

async get_location(request: Optional[GetLocationRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Location[source]

Gets information about a location.

Parameters:
  • request (GetLocationRequest) – The request object. Request message for GetLocation method.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Location object.

Return type:

Location

async get_metadata_schema(request: Optional[Union[GetMetadataSchemaRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) MetadataSchema[source]

Retrieves a specific MetadataSchema.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_get_metadata_schema():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetMetadataSchemaRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_metadata_schema(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.GetMetadataSchemaRequest, dict]]) – The request object. Request message for [MetadataService.GetMetadataSchema][google.cloud.aiplatform.v1.MetadataService.GetMetadataSchema].

  • name (str) –

    Required. The resource name of the MetadataSchema to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general MetadataSchema.

Return type:

google.cloud.aiplatform_v1.types.MetadataSchema

async get_metadata_store(request: Optional[Union[GetMetadataStoreRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) MetadataStore[source]

Retrieves a specific MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_get_metadata_store():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetMetadataStoreRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_metadata_store(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.GetMetadataStoreRequest, dict]]) – The request object. Request message for [MetadataService.GetMetadataStore][google.cloud.aiplatform.v1.MetadataService.GetMetadataStore].

  • name (str) –

    Required. The resource name of the MetadataStore to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a metadata store. Contains a set of metadata that can be queried.

Return type:

google.cloud.aiplatform_v1.types.MetadataStore

classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[ClientOptions] = None)[source]

Return the API endpoint and client cert source for mutual TLS.

The client cert source is determined in the following order: (1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not “true”, the client cert source is None. (2) if client_options.client_cert_source is provided, use the provided one; if the default client cert source exists, use the default one; otherwise the client cert source is None.

The API endpoint is determined in the following order: (1) if client_options.api_endpoint if provided, use the provided one. (2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “always”, use the default mTLS endpoint; if the environment variable is “never”, use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint.

More details can be found at https://google.aip.dev/auth/4114.

Parameters:

client_options (google.api_core.client_options.ClientOptions) – Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Returns:

returns the API endpoint and the

client cert source to use.

Return type:

Tuple[str, Callable[[], Tuple[bytes, bytes]]]

Raises:

google.auth.exceptions.MutualTLSChannelError – If any errors happen.

async get_operation(request: Optional[GetOperationRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Gets the latest state of a long-running operation.

Parameters:
  • request (GetOperationRequest) – The request object. Request message for GetOperation method.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An Operation object.

Return type:

Operation

classmethod get_transport_class(label: Optional[str] = None) Type[MetadataServiceTransport]

Returns an appropriate transport class.

Parameters:

label – The name of the desired transport. If none is provided, then the first transport in the registry is used.

Returns:

The transport class to use.

async list_artifacts(request: Optional[Union[ListArtifactsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListArtifactsAsyncPager[source]

Lists Artifacts in the MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_list_artifacts():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListArtifactsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_artifacts(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.ListArtifactsRequest, dict]]) – The request object. Request message for [MetadataService.ListArtifacts][google.cloud.aiplatform.v1.MetadataService.ListArtifacts].

  • parent (str) –

    Required. The MetadataStore whose Artifacts should be listed. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.ListArtifacts][google.cloud.aiplatform.v1.MetadataService.ListArtifacts].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.metadata_service.pagers.ListArtifactsAsyncPager

async list_contexts(request: Optional[Union[ListContextsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListContextsAsyncPager[source]

Lists Contexts on the MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_list_contexts():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListContextsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_contexts(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.ListContextsRequest, dict]]) – The request object. Request message for [MetadataService.ListContexts][google.cloud.aiplatform.v1.MetadataService.ListContexts]

  • parent (str) –

    Required. The MetadataStore whose Contexts should be listed. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.ListContexts][google.cloud.aiplatform.v1.MetadataService.ListContexts].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.metadata_service.pagers.ListContextsAsyncPager

async list_executions(request: Optional[Union[ListExecutionsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListExecutionsAsyncPager[source]

Lists Executions in the MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_list_executions():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListExecutionsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_executions(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.ListExecutionsRequest, dict]]) – The request object. Request message for [MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions].

  • parent (str) –

    Required. The MetadataStore whose Executions should be listed. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.metadata_service.pagers.ListExecutionsAsyncPager

async list_locations(request: Optional[ListLocationsRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListLocationsResponse[source]

Lists information about the supported locations for this service.

Parameters:
  • request (ListLocationsRequest) – The request object. Request message for ListLocations method.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for ListLocations method.

Return type:

ListLocationsResponse

async list_metadata_schemas(request: Optional[Union[ListMetadataSchemasRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListMetadataSchemasAsyncPager[source]

Lists MetadataSchemas.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_list_metadata_schemas():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListMetadataSchemasRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_metadata_schemas(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.ListMetadataSchemasRequest, dict]]) – The request object. Request message for [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas].

  • parent (str) –

    Required. The MetadataStore whose MetadataSchemas should be listed. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.metadata_service.pagers.ListMetadataSchemasAsyncPager

async list_metadata_stores(request: Optional[Union[ListMetadataStoresRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListMetadataStoresAsyncPager[source]

Lists MetadataStores for a Location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_list_metadata_stores():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListMetadataStoresRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_metadata_stores(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.ListMetadataStoresRequest, dict]]) – The request object. Request message for [MetadataService.ListMetadataStores][google.cloud.aiplatform.v1.MetadataService.ListMetadataStores].

  • parent (str) –

    Required. The Location whose MetadataStores should be listed. Format: projects/{project}/locations/{location}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.ListMetadataStores][google.cloud.aiplatform.v1.MetadataService.ListMetadataStores].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.metadata_service.pagers.ListMetadataStoresAsyncPager

async list_operations(request: Optional[ListOperationsRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListOperationsResponse[source]

Lists operations that match the specified filter in the request.

Parameters:
  • request (ListOperationsRequest) – The request object. Request message for ListOperations method.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for ListOperations method.

Return type:

ListOperationsResponse

static metadata_schema_path(project: str, location: str, metadata_store: str, metadata_schema: str) str

Returns a fully-qualified metadata_schema string.

static metadata_store_path(project: str, location: str, metadata_store: str) str

Returns a fully-qualified metadata_store string.

static parse_artifact_path(path: str) Dict[str, str]

Parses a artifact path into its component segments.

static parse_common_billing_account_path(path: str) Dict[str, str]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) Dict[str, str]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) Dict[str, str]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) Dict[str, str]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) Dict[str, str]

Parse a project path into its component segments.

static parse_context_path(path: str) Dict[str, str]

Parses a context path into its component segments.

static parse_execution_path(path: str) Dict[str, str]

Parses a execution path into its component segments.

static parse_metadata_schema_path(path: str) Dict[str, str]

Parses a metadata_schema path into its component segments.

static parse_metadata_store_path(path: str) Dict[str, str]

Parses a metadata_store path into its component segments.

async purge_artifacts(request: Optional[Union[PurgeArtifactsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Purges Artifacts.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_purge_artifacts():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.PurgeArtifactsRequest(
        parent="parent_value",
        filter="filter_value",
    )

    # Make the request
    operation = client.purge_artifacts(request=request)

    print("Waiting for operation to complete...")

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.PurgeArtifactsRequest, dict]]) – The request object. Request message for [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts].

  • parent (str) –

    Required. The metadata store to purge Artifacts from. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.cloud.aiplatform_v1.types.PurgeArtifactsResponse Response message for

[MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts].

Return type:

google.api_core.operation_async.AsyncOperation

async purge_contexts(request: Optional[Union[PurgeContextsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Purges Contexts.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_purge_contexts():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.PurgeContextsRequest(
        parent="parent_value",
        filter="filter_value",
    )

    # Make the request
    operation = client.purge_contexts(request=request)

    print("Waiting for operation to complete...")

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.PurgeContextsRequest, dict]]) – The request object. Request message for [MetadataService.PurgeContexts][google.cloud.aiplatform.v1.MetadataService.PurgeContexts].

  • parent (str) –

    Required. The metadata store to purge Contexts from. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.cloud.aiplatform_v1.types.PurgeContextsResponse Response message for

[MetadataService.PurgeContexts][google.cloud.aiplatform.v1.MetadataService.PurgeContexts].

Return type:

google.api_core.operation_async.AsyncOperation

async purge_executions(request: Optional[Union[PurgeExecutionsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AsyncOperation[source]

Purges Executions.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_purge_executions():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.PurgeExecutionsRequest(
        parent="parent_value",
        filter="filter_value",
    )

    # Make the request
    operation = client.purge_executions(request=request)

    print("Waiting for operation to complete...")

    response = (await operation).result()

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.PurgeExecutionsRequest, dict]]) – The request object. Request message for [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1.MetadataService.PurgeExecutions].

  • parent (str) –

    Required. The metadata store to purge Executions from. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.cloud.aiplatform_v1.types.PurgeExecutionsResponse Response message for

[MetadataService.PurgeExecutions][google.cloud.aiplatform.v1.MetadataService.PurgeExecutions].

Return type:

google.api_core.operation_async.AsyncOperation

async query_artifact_lineage_subgraph(request: Optional[Union[QueryArtifactLineageSubgraphRequest, dict]] = None, *, artifact: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) LineageSubgraph[source]

Retrieves lineage of an Artifact represented through Artifacts and Executions connected by Event edges and returned as a LineageSubgraph.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_query_artifact_lineage_subgraph():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.QueryArtifactLineageSubgraphRequest(
        artifact="artifact_value",
    )

    # Make the request
    response = await client.query_artifact_lineage_subgraph(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.QueryArtifactLineageSubgraphRequest, dict]]) – The request object. Request message for [MetadataService.QueryArtifactLineageSubgraph][google.cloud.aiplatform.v1.MetadataService.QueryArtifactLineageSubgraph].

  • artifact (str) –

    Required. The resource name of the Artifact whose Lineage needs to be retrieved as a LineageSubgraph. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}

    The request may error with FAILED_PRECONDITION if the number of Artifacts, the number of Executions, or the number of Events that would be returned for the Context exceeds 1000.

    This corresponds to the artifact field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

A subgraph of the overall lineage graph. Event edges connect Artifact and Execution nodes.

Return type:

google.cloud.aiplatform_v1.types.LineageSubgraph

async query_context_lineage_subgraph(request: Optional[Union[QueryContextLineageSubgraphRequest, dict]] = None, *, context: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) LineageSubgraph[source]

Retrieves Artifacts and Executions within the specified Context, connected by Event edges and returned as a LineageSubgraph.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_query_context_lineage_subgraph():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.QueryContextLineageSubgraphRequest(
        context="context_value",
    )

    # Make the request
    response = await client.query_context_lineage_subgraph(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.QueryContextLineageSubgraphRequest, dict]]) – The request object. Request message for [MetadataService.QueryContextLineageSubgraph][google.cloud.aiplatform.v1.MetadataService.QueryContextLineageSubgraph].

  • context (str) –

    Required. The resource name of the Context whose Artifacts and Executions should be retrieved as a LineageSubgraph. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    The request may error with FAILED_PRECONDITION if the number of Artifacts, the number of Executions, or the number of Events that would be returned for the Context exceeds 1000.

    This corresponds to the context field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

A subgraph of the overall lineage graph. Event edges connect Artifact and Execution nodes.

Return type:

google.cloud.aiplatform_v1.types.LineageSubgraph

async query_execution_inputs_and_outputs(request: Optional[Union[QueryExecutionInputsAndOutputsRequest, dict]] = None, *, execution: Optional[str] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) LineageSubgraph[source]

Obtains the set of input and output Artifacts for this Execution, in the form of LineageSubgraph that also contains the Execution and connecting Events.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_query_execution_inputs_and_outputs():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.QueryExecutionInputsAndOutputsRequest(
        execution="execution_value",
    )

    # Make the request
    response = await client.query_execution_inputs_and_outputs(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.QueryExecutionInputsAndOutputsRequest, dict]]) – The request object. Request message for [MetadataService.QueryExecutionInputsAndOutputs][google.cloud.aiplatform.v1.MetadataService.QueryExecutionInputsAndOutputs].

  • execution (str) –

    Required. The resource name of the Execution whose input and output Artifacts should be retrieved as a LineageSubgraph. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}

    This corresponds to the execution field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

A subgraph of the overall lineage graph. Event edges connect Artifact and Execution nodes.

Return type:

google.cloud.aiplatform_v1.types.LineageSubgraph

async remove_context_children(request: Optional[Union[RemoveContextChildrenRequest, dict]] = None, *, context: Optional[str] = None, child_contexts: Optional[MutableSequence[str]] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) RemoveContextChildrenResponse[source]

Remove a set of children contexts from a parent Context. If any of the child Contexts were NOT added to the parent Context, they are simply skipped.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_remove_context_children():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.RemoveContextChildrenRequest(
        context="context_value",
    )

    # Make the request
    response = await client.remove_context_children(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.RemoveContextChildrenRequest, dict]]) – The request object. Request message for [MetadataService.DeleteContextChildrenRequest][].

  • context (str) –

    Required. The resource name of the parent Context.

    Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    This corresponds to the context field on the request instance; if request is provided, this should not be set.

  • child_contexts (MutableSequence[str]) –

    The resource names of the child Contexts.

    This corresponds to the child_contexts field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.RemoveContextChildren][google.cloud.aiplatform.v1.MetadataService.RemoveContextChildren].

Return type:

google.cloud.aiplatform_v1.types.RemoveContextChildrenResponse

async set_iam_policy(request: Optional[SetIamPolicyRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Policy[source]

Sets the IAM access control policy on the specified function.

Replaces any existing policy.

Parameters:
  • request (SetIamPolicyRequest) – The request object. Request message for SetIamPolicy method.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.

JSON Example

{
  "bindings": [
    {
      "role": "roles/resourcemanager.organizationAdmin",
      "members": [
        "user:mike@example.com",
        "group:admins@example.com",
        "domain:google.com",
        "serviceAccount:my-project-id@appspot.gserviceaccount.com"
      ]
    },
    {
      "role": "roles/resourcemanager.organizationViewer",
      "members": ["user:eve@example.com"],
      "condition": {
        "title": "expirable access",
        "description": "Does not grant access after Sep 2020",
        "expression": "request.time <
        timestamp('2020-10-01T00:00:00.000Z')",
      }
    }
  ]
}

YAML Example

bindings:
- members:
  - user:mike@example.com
  - group:admins@example.com
  - domain:google.com
  - serviceAccount:my-project-id@appspot.gserviceaccount.com
  role: roles/resourcemanager.organizationAdmin
- members:
  - user:eve@example.com
  role: roles/resourcemanager.organizationViewer
  condition:
    title: expirable access
    description: Does not grant access after Sep 2020
    expression: request.time < timestamp('2020-10-01T00:00:00.000Z')

For a description of IAM and its features, see the IAM developer’s guide.

Return type:

Policy

async test_iam_permissions(request: Optional[TestIamPermissionsRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) TestIamPermissionsResponse[source]
Tests the specified IAM permissions against the IAM access control

policy for a function.

If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Parameters:
  • request (TestIamPermissionsRequest) – The request object. Request message for TestIamPermissions method.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for TestIamPermissions method.

Return type:

TestIamPermissionsResponse

property transport: MetadataServiceTransport

Returns the transport used by the client instance.

Returns:

The transport used by the client instance.

Return type:

MetadataServiceTransport

property universe_domain: str

Return the universe domain used by the client instance.

Returns:

The universe domain used

by the client instance.

Return type:

str

async update_artifact(request: Optional[Union[UpdateArtifactRequest, dict]] = None, *, artifact: Optional[Artifact] = None, update_mask: Optional[FieldMask] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Artifact[source]

Updates a stored Artifact.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_update_artifact():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.UpdateArtifactRequest(
    )

    # Make the request
    response = await client.update_artifact(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.UpdateArtifactRequest, dict]]) – The request object. Request message for [MetadataService.UpdateArtifact][google.cloud.aiplatform.v1.MetadataService.UpdateArtifact].

  • artifact (google.cloud.aiplatform_v1.types.Artifact) –

    Required. The Artifact containing updates. The Artifact’s [Artifact.name][google.cloud.aiplatform.v1.Artifact.name] field is used to identify the Artifact to be updated. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}

    This corresponds to the artifact field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Optional. A FieldMask indicating which fields should be updated.

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general artifact.

Return type:

google.cloud.aiplatform_v1.types.Artifact

async update_context(request: Optional[Union[UpdateContextRequest, dict]] = None, *, context: Optional[Context] = None, update_mask: Optional[FieldMask] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Context[source]

Updates a stored Context.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_update_context():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.UpdateContextRequest(
    )

    # Make the request
    response = await client.update_context(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.UpdateContextRequest, dict]]) – The request object. Request message for [MetadataService.UpdateContext][google.cloud.aiplatform.v1.MetadataService.UpdateContext].

  • context (google.cloud.aiplatform_v1.types.Context) –

    Required. The Context containing updates. The Context’s [Context.name][google.cloud.aiplatform.v1.Context.name] field is used to identify the Context to be updated. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    This corresponds to the context field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Optional. A FieldMask indicating which fields should be updated.

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general context.

Return type:

google.cloud.aiplatform_v1.types.Context

async update_execution(request: Optional[Union[UpdateExecutionRequest, dict]] = None, *, execution: Optional[Execution] = None, update_mask: Optional[FieldMask] = None, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Execution[source]

Updates a stored Execution.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

async def sample_update_execution():
    # Create a client
    client = aiplatform_v1.MetadataServiceAsyncClient()

    # Initialize request argument(s)
    request = aiplatform_v1.UpdateExecutionRequest(
    )

    # Make the request
    response = await client.update_execution(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Optional[Union[google.cloud.aiplatform_v1.types.UpdateExecutionRequest, dict]]) – The request object. Request message for [MetadataService.UpdateExecution][google.cloud.aiplatform.v1.MetadataService.UpdateExecution].

  • execution (google.cloud.aiplatform_v1.types.Execution) –

    Required. The Execution containing updates. The Execution’s [Execution.name][google.cloud.aiplatform.v1.Execution.name] field is used to identify the Execution to be updated. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}

    This corresponds to the execution field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Optional. A FieldMask indicating which fields should be updated.

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general execution.

Return type:

google.cloud.aiplatform_v1.types.Execution

async wait_operation(request: Optional[WaitOperationRequest] = None, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state.

If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters:
  • request (WaitOperationRequest) – The request object. Request message for WaitOperation method.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An Operation object.

Return type:

Operation

class google.cloud.aiplatform_v1.services.metadata_service.MetadataServiceClient(*, credentials: ~typing.Optional[~google.auth.credentials.Credentials] = None, transport: ~typing.Optional[~typing.Union[str, ~google.cloud.aiplatform_v1.services.metadata_service.transports.base.MetadataServiceTransport, ~typing.Callable[[...], ~google.cloud.aiplatform_v1.services.metadata_service.transports.base.MetadataServiceTransport]]] = None, client_options: ~typing.Optional[~typing.Union[~google.api_core.client_options.ClientOptions, dict]] = None, client_info: ~google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

Service for reading and writing metadata entries.

Instantiates the metadata service client.

Parameters:
  • credentials (Optional[google.auth.credentials.Credentials]) – The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

  • transport (Optional[Union[str,MetadataServiceTransport,Callable[..., MetadataServiceTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the MetadataServiceTransport constructor. If set to None, a transport is chosen automatically.

  • client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]) –

    Custom options for the client.

    1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value).

    2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be used.

    3. The universe_domain property can be used to override the default “googleapis.com” universe. Note that the api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

  • client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you’re developing your own client library.

Raises:

google.auth.exceptions.MutualTLSChannelError – If mutual TLS transport creation failed for any reason.

__exit__(type, value, traceback)[source]

Releases underlying transport’s resources.

Warning

ONLY use as a context manager if the transport is NOT shared with other clients! Exiting the with block will CLOSE the transport and may cause errors in other clients!

add_context_artifacts_and_executions(request: Optional[Union[AddContextArtifactsAndExecutionsRequest, dict]] = None, *, context: Optional[str] = None, artifacts: Optional[MutableSequence[str]] = None, executions: Optional[MutableSequence[str]] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AddContextArtifactsAndExecutionsResponse[source]

Adds a set of Artifacts and Executions to a Context. If any of the Artifacts or Executions have already been added to a Context, they are simply skipped.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_add_context_artifacts_and_executions():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.AddContextArtifactsAndExecutionsRequest(
        context="context_value",
    )

    # Make the request
    response = client.add_context_artifacts_and_executions(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.AddContextArtifactsAndExecutionsRequest, dict]) – The request object. Request message for [MetadataService.AddContextArtifactsAndExecutions][google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions].

  • context (str) –

    Required. The resource name of the Context that the Artifacts and Executions belong to. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    This corresponds to the context field on the request instance; if request is provided, this should not be set.

  • artifacts (MutableSequence[str]) –

    The resource names of the Artifacts to attribute to the Context.

    Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}

    This corresponds to the artifacts field on the request instance; if request is provided, this should not be set.

  • executions (MutableSequence[str]) –

    The resource names of the Executions to associate with the Context.

    Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}

    This corresponds to the executions field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.AddContextArtifactsAndExecutions][google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions].

Return type:

google.cloud.aiplatform_v1.types.AddContextArtifactsAndExecutionsResponse

add_context_children(request: Optional[Union[AddContextChildrenRequest, dict]] = None, *, context: Optional[str] = None, child_contexts: Optional[MutableSequence[str]] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AddContextChildrenResponse[source]

Adds a set of Contexts as children to a parent Context. If any of the child Contexts have already been added to the parent Context, they are simply skipped. If this call would create a cycle or cause any Context to have more than 10 parents, the request will fail with an INVALID_ARGUMENT error.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_add_context_children():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.AddContextChildrenRequest(
        context="context_value",
    )

    # Make the request
    response = client.add_context_children(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.AddContextChildrenRequest, dict]) – The request object. Request message for [MetadataService.AddContextChildren][google.cloud.aiplatform.v1.MetadataService.AddContextChildren].

  • context (str) –

    Required. The resource name of the parent Context.

    Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    This corresponds to the context field on the request instance; if request is provided, this should not be set.

  • child_contexts (MutableSequence[str]) –

    The resource names of the child Contexts.

    This corresponds to the child_contexts field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.AddContextChildren][google.cloud.aiplatform.v1.MetadataService.AddContextChildren].

Return type:

google.cloud.aiplatform_v1.types.AddContextChildrenResponse

add_execution_events(request: Optional[Union[AddExecutionEventsRequest, dict]] = None, *, execution: Optional[str] = None, events: Optional[MutableSequence[Event]] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) AddExecutionEventsResponse[source]

Adds Events to the specified Execution. An Event indicates whether an Artifact was used as an input or output for an Execution. If an Event already exists between the Execution and the Artifact, the Event is skipped.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_add_execution_events():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.AddExecutionEventsRequest(
        execution="execution_value",
    )

    # Make the request
    response = client.add_execution_events(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.AddExecutionEventsRequest, dict]) – The request object. Request message for [MetadataService.AddExecutionEvents][google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents].

  • execution (str) –

    Required. The resource name of the Execution that the Events connect Artifacts with. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}

    This corresponds to the execution field on the request instance; if request is provided, this should not be set.

  • events (MutableSequence[google.cloud.aiplatform_v1.types.Event]) – The Events to create and add. This corresponds to the events field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.AddExecutionEvents][google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents].

Return type:

google.cloud.aiplatform_v1.types.AddExecutionEventsResponse

property api_endpoint

Return the API endpoint used by the client instance.

Returns:

The API endpoint used by the client instance.

Return type:

str

static artifact_path(project: str, location: str, metadata_store: str, artifact: str) str[source]

Returns a fully-qualified artifact string.

cancel_operation(request: Optional[CancelOperationRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Starts asynchronous cancellation on a long-running operation.

The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters:
  • request (CancelOperationRequest) – The request object. Request message for CancelOperation method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

None

static common_billing_account_path(billing_account: str) str[source]

Returns a fully-qualified billing_account string.

static common_folder_path(folder: str) str[source]

Returns a fully-qualified folder string.

static common_location_path(project: str, location: str) str[source]

Returns a fully-qualified location string.

static common_organization_path(organization: str) str[source]

Returns a fully-qualified organization string.

static common_project_path(project: str) str[source]

Returns a fully-qualified project string.

static context_path(project: str, location: str, metadata_store: str, context: str) str[source]

Returns a fully-qualified context string.

create_artifact(request: Optional[Union[CreateArtifactRequest, dict]] = None, *, parent: Optional[str] = None, artifact: Optional[Artifact] = None, artifact_id: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Artifact[source]

Creates an Artifact associated with a MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_create_artifact():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CreateArtifactRequest(
        parent="parent_value",
    )

    # Make the request
    response = client.create_artifact(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CreateArtifactRequest, dict]) – The request object. Request message for [MetadataService.CreateArtifact][google.cloud.aiplatform.v1.MetadataService.CreateArtifact].

  • parent (str) –

    Required. The resource name of the MetadataStore where the Artifact should be created. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • artifact (google.cloud.aiplatform_v1.types.Artifact) – Required. The Artifact to create. This corresponds to the artifact field on the request instance; if request is provided, this should not be set.

  • artifact_id (str) –

    The {artifact} portion of the resource name with the format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact} If not provided, the Artifact’s ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are /[a-z][0-9]-/. Must be unique across all Artifacts in the parent MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can’t view the preexisting Artifact.)

    This corresponds to the artifact_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general artifact.

Return type:

google.cloud.aiplatform_v1.types.Artifact

create_context(request: Optional[Union[CreateContextRequest, dict]] = None, *, parent: Optional[str] = None, context: Optional[Context] = None, context_id: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Context[source]

Creates a Context associated with a MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_create_context():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CreateContextRequest(
        parent="parent_value",
    )

    # Make the request
    response = client.create_context(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CreateContextRequest, dict]) – The request object. Request message for [MetadataService.CreateContext][google.cloud.aiplatform.v1.MetadataService.CreateContext].

  • parent (str) –

    Required. The resource name of the MetadataStore where the Context should be created. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • context (google.cloud.aiplatform_v1.types.Context) – Required. The Context to create. This corresponds to the context field on the request instance; if request is provided, this should not be set.

  • context_id (str) –

    The {context} portion of the resource name with the format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}. If not provided, the Context’s ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are /[a-z][0-9]-/. Must be unique across all Contexts in the parent MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can’t view the preexisting Context.)

    This corresponds to the context_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general context.

Return type:

google.cloud.aiplatform_v1.types.Context

create_execution(request: Optional[Union[CreateExecutionRequest, dict]] = None, *, parent: Optional[str] = None, execution: Optional[Execution] = None, execution_id: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Execution[source]

Creates an Execution associated with a MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_create_execution():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CreateExecutionRequest(
        parent="parent_value",
    )

    # Make the request
    response = client.create_execution(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CreateExecutionRequest, dict]) – The request object. Request message for [MetadataService.CreateExecution][google.cloud.aiplatform.v1.MetadataService.CreateExecution].

  • parent (str) –

    Required. The resource name of the MetadataStore where the Execution should be created. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • execution (google.cloud.aiplatform_v1.types.Execution) – Required. The Execution to create. This corresponds to the execution field on the request instance; if request is provided, this should not be set.

  • execution_id (str) –

    The {execution} portion of the resource name with the format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution} If not provided, the Execution’s ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are /[a-z][0-9]-/. Must be unique across all Executions in the parent MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can’t view the preexisting Execution.)

    This corresponds to the execution_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general execution.

Return type:

google.cloud.aiplatform_v1.types.Execution

create_metadata_schema(request: Optional[Union[CreateMetadataSchemaRequest, dict]] = None, *, parent: Optional[str] = None, metadata_schema: Optional[MetadataSchema] = None, metadata_schema_id: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) MetadataSchema[source]

Creates a MetadataSchema.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_create_metadata_schema():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    metadata_schema = aiplatform_v1.MetadataSchema()
    metadata_schema.schema = "schema_value"

    request = aiplatform_v1.CreateMetadataSchemaRequest(
        parent="parent_value",
        metadata_schema=metadata_schema,
    )

    # Make the request
    response = client.create_metadata_schema(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CreateMetadataSchemaRequest, dict]) – The request object. Request message for [MetadataService.CreateMetadataSchema][google.cloud.aiplatform.v1.MetadataService.CreateMetadataSchema].

  • parent (str) –

    Required. The resource name of the MetadataStore where the MetadataSchema should be created. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • metadata_schema (google.cloud.aiplatform_v1.types.MetadataSchema) –

    Required. The MetadataSchema to create.

    This corresponds to the metadata_schema field on the request instance; if request is provided, this should not be set.

  • metadata_schema_id (str) –

    The {metadata_schema} portion of the resource name with the format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema} If not provided, the MetadataStore’s ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are /[a-z][0-9]-/. Must be unique across all MetadataSchemas in the parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can’t view the preexisting MetadataSchema.)

    This corresponds to the metadata_schema_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general MetadataSchema.

Return type:

google.cloud.aiplatform_v1.types.MetadataSchema

create_metadata_store(request: Optional[Union[CreateMetadataStoreRequest, dict]] = None, *, parent: Optional[str] = None, metadata_store: Optional[MetadataStore] = None, metadata_store_id: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Initializes a MetadataStore, including allocation of resources.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_create_metadata_store():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.CreateMetadataStoreRequest(
        parent="parent_value",
    )

    # Make the request
    operation = client.create_metadata_store(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.CreateMetadataStoreRequest, dict]) – The request object. Request message for [MetadataService.CreateMetadataStore][google.cloud.aiplatform.v1.MetadataService.CreateMetadataStore].

  • parent (str) –

    Required. The resource name of the Location where the MetadataStore should be created. Format: projects/{project}/locations/{location}/

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • metadata_store (google.cloud.aiplatform_v1.types.MetadataStore) –

    Required. The MetadataStore to create.

    This corresponds to the metadata_store field on the request instance; if request is provided, this should not be set.

  • metadata_store_id (str) –

    The {metadatastore} portion of the resource name with the format: projects/{project}/locations/{location}/metadataStores/{metadatastore} If not provided, the MetadataStore’s ID will be a UUID generated by the service. Must be 4-128 characters in length. Valid characters are /[a-z][0-9]-/. Must be unique across all MetadataStores in the parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the caller can’t view the preexisting MetadataStore.)

    This corresponds to the metadata_store_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.cloud.aiplatform_v1.types.MetadataStore Instance of a metadata store. Contains a set of metadata that can be

queried.

Return type:

google.api_core.operation.Operation

delete_artifact(request: Optional[Union[DeleteArtifactRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Deletes an Artifact.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_delete_artifact():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteArtifactRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_artifact(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.DeleteArtifactRequest, dict]) – The request object. Request message for [MetadataService.DeleteArtifact][google.cloud.aiplatform.v1.MetadataService.DeleteArtifact].

  • name (str) –

    Required. The resource name of the Artifact to delete. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.protobuf.empty_pb2.Empty 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);

}

Return type:

google.api_core.operation.Operation

delete_context(request: Optional[Union[DeleteContextRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Deletes a stored Context.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_delete_context():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteContextRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_context(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.DeleteContextRequest, dict]) – The request object. Request message for [MetadataService.DeleteContext][google.cloud.aiplatform.v1.MetadataService.DeleteContext].

  • name (str) –

    Required. The resource name of the Context to delete. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.protobuf.empty_pb2.Empty 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);

}

Return type:

google.api_core.operation.Operation

delete_execution(request: Optional[Union[DeleteExecutionRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Deletes an Execution.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_delete_execution():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteExecutionRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_execution(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.DeleteExecutionRequest, dict]) – The request object. Request message for [MetadataService.DeleteExecution][google.cloud.aiplatform.v1.MetadataService.DeleteExecution].

  • name (str) –

    Required. The resource name of the Execution to delete. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.protobuf.empty_pb2.Empty 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);

}

Return type:

google.api_core.operation.Operation

delete_metadata_store(request: Optional[Union[DeleteMetadataStoreRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Deletes a single MetadataStore and all its child resources (Artifacts, Executions, and Contexts).

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_delete_metadata_store():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.DeleteMetadataStoreRequest(
        name="name_value",
    )

    # Make the request
    operation = client.delete_metadata_store(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.DeleteMetadataStoreRequest, dict]) – The request object. Request message for [MetadataService.DeleteMetadataStore][google.cloud.aiplatform.v1.MetadataService.DeleteMetadataStore].

  • name (str) –

    Required. The resource name of the MetadataStore to delete. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.protobuf.empty_pb2.Empty 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);

}

Return type:

google.api_core.operation.Operation

delete_operation(request: Optional[DeleteOperationRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) None[source]

Deletes a long-running operation.

This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn’t support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters:
  • request (DeleteOperationRequest) – The request object. Request message for DeleteOperation method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

None

static execution_path(project: str, location: str, metadata_store: str, execution: str) str[source]

Returns a fully-qualified execution string.

classmethod from_service_account_file(filename: str, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

file.

Parameters:
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns:

The constructed client.

Return type:

MetadataServiceClient

classmethod from_service_account_info(info: dict, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

info.

Parameters:
  • info (dict) – The service account private key info.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns:

The constructed client.

Return type:

MetadataServiceClient

classmethod from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials

file.

Parameters:
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns:

The constructed client.

Return type:

MetadataServiceClient

get_artifact(request: Optional[Union[GetArtifactRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Artifact[source]

Retrieves a specific Artifact.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_get_artifact():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetArtifactRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_artifact(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.GetArtifactRequest, dict]) – The request object. Request message for [MetadataService.GetArtifact][google.cloud.aiplatform.v1.MetadataService.GetArtifact].

  • name (str) –

    Required. The resource name of the Artifact to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general artifact.

Return type:

google.cloud.aiplatform_v1.types.Artifact

get_context(request: Optional[Union[GetContextRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Context[source]

Retrieves a specific Context.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_get_context():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetContextRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_context(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.GetContextRequest, dict]) – The request object. Request message for [MetadataService.GetContext][google.cloud.aiplatform.v1.MetadataService.GetContext].

  • name (str) –

    Required. The resource name of the Context to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general context.

Return type:

google.cloud.aiplatform_v1.types.Context

get_execution(request: Optional[Union[GetExecutionRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Execution[source]

Retrieves a specific Execution.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_get_execution():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetExecutionRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_execution(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.GetExecutionRequest, dict]) – The request object. Request message for [MetadataService.GetExecution][google.cloud.aiplatform.v1.MetadataService.GetExecution].

  • name (str) –

    Required. The resource name of the Execution to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general execution.

Return type:

google.cloud.aiplatform_v1.types.Execution

get_iam_policy(request: Optional[GetIamPolicyRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Policy[source]

Gets the IAM access control policy for a function.

Returns an empty policy if the function exists and does not have a policy set.

Parameters:
  • request (GetIamPolicyRequest) – The request object. Request message for GetIamPolicy method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.

JSON Example

{
  "bindings": [
    {
      "role": "roles/resourcemanager.organizationAdmin",
      "members": [
        "user:mike@example.com",
        "group:admins@example.com",
        "domain:google.com",
        "serviceAccount:my-project-id@appspot.gserviceaccount.com"
      ]
    },
    {
      "role": "roles/resourcemanager.organizationViewer",
      "members": ["user:eve@example.com"],
      "condition": {
        "title": "expirable access",
        "description": "Does not grant access after Sep 2020",
        "expression": "request.time <
        timestamp('2020-10-01T00:00:00.000Z')",
      }
    }
  ]
}

YAML Example

bindings:
- members:
  - user:mike@example.com
  - group:admins@example.com
  - domain:google.com
  - serviceAccount:my-project-id@appspot.gserviceaccount.com
  role: roles/resourcemanager.organizationAdmin
- members:
  - user:eve@example.com
  role: roles/resourcemanager.organizationViewer
  condition:
    title: expirable access
    description: Does not grant access after Sep 2020
    expression: request.time < timestamp('2020-10-01T00:00:00.000Z')

For a description of IAM and its features, see the IAM developer’s guide.

Return type:

Policy

get_location(request: Optional[GetLocationRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Location[source]

Gets information about a location.

Parameters:
  • request (GetLocationRequest) – The request object. Request message for GetLocation method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Location object.

Return type:

Location

get_metadata_schema(request: Optional[Union[GetMetadataSchemaRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) MetadataSchema[source]

Retrieves a specific MetadataSchema.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_get_metadata_schema():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetMetadataSchemaRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_metadata_schema(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.GetMetadataSchemaRequest, dict]) – The request object. Request message for [MetadataService.GetMetadataSchema][google.cloud.aiplatform.v1.MetadataService.GetMetadataSchema].

  • name (str) –

    Required. The resource name of the MetadataSchema to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general MetadataSchema.

Return type:

google.cloud.aiplatform_v1.types.MetadataSchema

get_metadata_store(request: Optional[Union[GetMetadataStoreRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) MetadataStore[source]

Retrieves a specific MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_get_metadata_store():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.GetMetadataStoreRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_metadata_store(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.GetMetadataStoreRequest, dict]) – The request object. Request message for [MetadataService.GetMetadataStore][google.cloud.aiplatform.v1.MetadataService.GetMetadataStore].

  • name (str) –

    Required. The resource name of the MetadataStore to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a metadata store. Contains a set of metadata that can be queried.

Return type:

google.cloud.aiplatform_v1.types.MetadataStore

classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[ClientOptions] = None)[source]

Deprecated. Return the API endpoint and client cert source for mutual TLS.

The client cert source is determined in the following order: (1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not “true”, the client cert source is None. (2) if client_options.client_cert_source is provided, use the provided one; if the default client cert source exists, use the default one; otherwise the client cert source is None.

The API endpoint is determined in the following order: (1) if client_options.api_endpoint if provided, use the provided one. (2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “always”, use the default mTLS endpoint; if the environment variable is “never”, use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint.

More details can be found at https://google.aip.dev/auth/4114.

Parameters:

client_options (google.api_core.client_options.ClientOptions) – Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Returns:

returns the API endpoint and the

client cert source to use.

Return type:

Tuple[str, Callable[[], Tuple[bytes, bytes]]]

Raises:

google.auth.exceptions.MutualTLSChannelError – If any errors happen.

get_operation(request: Optional[GetOperationRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Gets the latest state of a long-running operation.

Parameters:
  • request (GetOperationRequest) – The request object. Request message for GetOperation method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An Operation object.

Return type:

Operation

list_artifacts(request: Optional[Union[ListArtifactsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListArtifactsPager[source]

Lists Artifacts in the MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_list_artifacts():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListArtifactsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_artifacts(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.ListArtifactsRequest, dict]) – The request object. Request message for [MetadataService.ListArtifacts][google.cloud.aiplatform.v1.MetadataService.ListArtifacts].

  • parent (str) –

    Required. The MetadataStore whose Artifacts should be listed. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.ListArtifacts][google.cloud.aiplatform.v1.MetadataService.ListArtifacts].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.metadata_service.pagers.ListArtifactsPager

list_contexts(request: Optional[Union[ListContextsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListContextsPager[source]

Lists Contexts on the MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_list_contexts():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListContextsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_contexts(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.ListContextsRequest, dict]) – The request object. Request message for [MetadataService.ListContexts][google.cloud.aiplatform.v1.MetadataService.ListContexts]

  • parent (str) –

    Required. The MetadataStore whose Contexts should be listed. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.ListContexts][google.cloud.aiplatform.v1.MetadataService.ListContexts].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.metadata_service.pagers.ListContextsPager

list_executions(request: Optional[Union[ListExecutionsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListExecutionsPager[source]

Lists Executions in the MetadataStore.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_list_executions():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListExecutionsRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_executions(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.ListExecutionsRequest, dict]) – The request object. Request message for [MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions].

  • parent (str) –

    Required. The MetadataStore whose Executions should be listed. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.metadata_service.pagers.ListExecutionsPager

list_locations(request: Optional[ListLocationsRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListLocationsResponse[source]

Lists information about the supported locations for this service.

Parameters:
  • request (ListLocationsRequest) – The request object. Request message for ListLocations method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for ListLocations method.

Return type:

ListLocationsResponse

list_metadata_schemas(request: Optional[Union[ListMetadataSchemasRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListMetadataSchemasPager[source]

Lists MetadataSchemas.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_list_metadata_schemas():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListMetadataSchemasRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_metadata_schemas(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.ListMetadataSchemasRequest, dict]) – The request object. Request message for [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas].

  • parent (str) –

    Required. The MetadataStore whose MetadataSchemas should be listed. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.metadata_service.pagers.ListMetadataSchemasPager

list_metadata_stores(request: Optional[Union[ListMetadataStoresRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListMetadataStoresPager[source]

Lists MetadataStores for a Location.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_list_metadata_stores():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.ListMetadataStoresRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_metadata_stores(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.ListMetadataStoresRequest, dict]) – The request object. Request message for [MetadataService.ListMetadataStores][google.cloud.aiplatform.v1.MetadataService.ListMetadataStores].

  • parent (str) –

    Required. The Location whose MetadataStores should be listed. Format: projects/{project}/locations/{location}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.ListMetadataStores][google.cloud.aiplatform.v1.MetadataService.ListMetadataStores].

Iterating over this object will yield results and resolve additional pages automatically.

Return type:

google.cloud.aiplatform_v1.services.metadata_service.pagers.ListMetadataStoresPager

list_operations(request: Optional[ListOperationsRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) ListOperationsResponse[source]

Lists operations that match the specified filter in the request.

Parameters:
  • request (ListOperationsRequest) – The request object. Request message for ListOperations method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for ListOperations method.

Return type:

ListOperationsResponse

static metadata_schema_path(project: str, location: str, metadata_store: str, metadata_schema: str) str[source]

Returns a fully-qualified metadata_schema string.

static metadata_store_path(project: str, location: str, metadata_store: str) str[source]

Returns a fully-qualified metadata_store string.

static parse_artifact_path(path: str) Dict[str, str][source]

Parses a artifact path into its component segments.

static parse_common_billing_account_path(path: str) Dict[str, str][source]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) Dict[str, str][source]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) Dict[str, str][source]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) Dict[str, str][source]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) Dict[str, str][source]

Parse a project path into its component segments.

static parse_context_path(path: str) Dict[str, str][source]

Parses a context path into its component segments.

static parse_execution_path(path: str) Dict[str, str][source]

Parses a execution path into its component segments.

static parse_metadata_schema_path(path: str) Dict[str, str][source]

Parses a metadata_schema path into its component segments.

static parse_metadata_store_path(path: str) Dict[str, str][source]

Parses a metadata_store path into its component segments.

purge_artifacts(request: Optional[Union[PurgeArtifactsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Purges Artifacts.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_purge_artifacts():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.PurgeArtifactsRequest(
        parent="parent_value",
        filter="filter_value",
    )

    # Make the request
    operation = client.purge_artifacts(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.PurgeArtifactsRequest, dict]) – The request object. Request message for [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts].

  • parent (str) –

    Required. The metadata store to purge Artifacts from. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.cloud.aiplatform_v1.types.PurgeArtifactsResponse Response message for

[MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts].

Return type:

google.api_core.operation.Operation

purge_contexts(request: Optional[Union[PurgeContextsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Purges Contexts.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_purge_contexts():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.PurgeContextsRequest(
        parent="parent_value",
        filter="filter_value",
    )

    # Make the request
    operation = client.purge_contexts(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.PurgeContextsRequest, dict]) – The request object. Request message for [MetadataService.PurgeContexts][google.cloud.aiplatform.v1.MetadataService.PurgeContexts].

  • parent (str) –

    Required. The metadata store to purge Contexts from. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.cloud.aiplatform_v1.types.PurgeContextsResponse Response message for

[MetadataService.PurgeContexts][google.cloud.aiplatform.v1.MetadataService.PurgeContexts].

Return type:

google.api_core.operation.Operation

purge_executions(request: Optional[Union[PurgeExecutionsRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Purges Executions.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_purge_executions():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.PurgeExecutionsRequest(
        parent="parent_value",
        filter="filter_value",
    )

    # Make the request
    operation = client.purge_executions(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.PurgeExecutionsRequest, dict]) – The request object. Request message for [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1.MetadataService.PurgeExecutions].

  • parent (str) –

    Required. The metadata store to purge Executions from. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An object representing a long-running operation.

The result type for the operation will be google.cloud.aiplatform_v1.types.PurgeExecutionsResponse Response message for

[MetadataService.PurgeExecutions][google.cloud.aiplatform.v1.MetadataService.PurgeExecutions].

Return type:

google.api_core.operation.Operation

query_artifact_lineage_subgraph(request: Optional[Union[QueryArtifactLineageSubgraphRequest, dict]] = None, *, artifact: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) LineageSubgraph[source]

Retrieves lineage of an Artifact represented through Artifacts and Executions connected by Event edges and returned as a LineageSubgraph.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_query_artifact_lineage_subgraph():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.QueryArtifactLineageSubgraphRequest(
        artifact="artifact_value",
    )

    # Make the request
    response = client.query_artifact_lineage_subgraph(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.QueryArtifactLineageSubgraphRequest, dict]) – The request object. Request message for [MetadataService.QueryArtifactLineageSubgraph][google.cloud.aiplatform.v1.MetadataService.QueryArtifactLineageSubgraph].

  • artifact (str) –

    Required. The resource name of the Artifact whose Lineage needs to be retrieved as a LineageSubgraph. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}

    The request may error with FAILED_PRECONDITION if the number of Artifacts, the number of Executions, or the number of Events that would be returned for the Context exceeds 1000.

    This corresponds to the artifact field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

A subgraph of the overall lineage graph. Event edges connect Artifact and Execution nodes.

Return type:

google.cloud.aiplatform_v1.types.LineageSubgraph

query_context_lineage_subgraph(request: Optional[Union[QueryContextLineageSubgraphRequest, dict]] = None, *, context: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) LineageSubgraph[source]

Retrieves Artifacts and Executions within the specified Context, connected by Event edges and returned as a LineageSubgraph.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_query_context_lineage_subgraph():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.QueryContextLineageSubgraphRequest(
        context="context_value",
    )

    # Make the request
    response = client.query_context_lineage_subgraph(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.QueryContextLineageSubgraphRequest, dict]) – The request object. Request message for [MetadataService.QueryContextLineageSubgraph][google.cloud.aiplatform.v1.MetadataService.QueryContextLineageSubgraph].

  • context (str) –

    Required. The resource name of the Context whose Artifacts and Executions should be retrieved as a LineageSubgraph. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    The request may error with FAILED_PRECONDITION if the number of Artifacts, the number of Executions, or the number of Events that would be returned for the Context exceeds 1000.

    This corresponds to the context field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

A subgraph of the overall lineage graph. Event edges connect Artifact and Execution nodes.

Return type:

google.cloud.aiplatform_v1.types.LineageSubgraph

query_execution_inputs_and_outputs(request: Optional[Union[QueryExecutionInputsAndOutputsRequest, dict]] = None, *, execution: Optional[str] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) LineageSubgraph[source]

Obtains the set of input and output Artifacts for this Execution, in the form of LineageSubgraph that also contains the Execution and connecting Events.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_query_execution_inputs_and_outputs():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.QueryExecutionInputsAndOutputsRequest(
        execution="execution_value",
    )

    # Make the request
    response = client.query_execution_inputs_and_outputs(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.QueryExecutionInputsAndOutputsRequest, dict]) – The request object. Request message for [MetadataService.QueryExecutionInputsAndOutputs][google.cloud.aiplatform.v1.MetadataService.QueryExecutionInputsAndOutputs].

  • execution (str) –

    Required. The resource name of the Execution whose input and output Artifacts should be retrieved as a LineageSubgraph. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}

    This corresponds to the execution field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

A subgraph of the overall lineage graph. Event edges connect Artifact and Execution nodes.

Return type:

google.cloud.aiplatform_v1.types.LineageSubgraph

remove_context_children(request: Optional[Union[RemoveContextChildrenRequest, dict]] = None, *, context: Optional[str] = None, child_contexts: Optional[MutableSequence[str]] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) RemoveContextChildrenResponse[source]

Remove a set of children contexts from a parent Context. If any of the child Contexts were NOT added to the parent Context, they are simply skipped.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_remove_context_children():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.RemoveContextChildrenRequest(
        context="context_value",
    )

    # Make the request
    response = client.remove_context_children(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.RemoveContextChildrenRequest, dict]) – The request object. Request message for [MetadataService.DeleteContextChildrenRequest][].

  • context (str) –

    Required. The resource name of the parent Context.

    Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    This corresponds to the context field on the request instance; if request is provided, this should not be set.

  • child_contexts (MutableSequence[str]) –

    The resource names of the child Contexts.

    This corresponds to the child_contexts field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for

[MetadataService.RemoveContextChildren][google.cloud.aiplatform.v1.MetadataService.RemoveContextChildren].

Return type:

google.cloud.aiplatform_v1.types.RemoveContextChildrenResponse

set_iam_policy(request: Optional[SetIamPolicyRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Policy[source]

Sets the IAM access control policy on the specified function.

Replaces any existing policy.

Parameters:
  • request (SetIamPolicyRequest) – The request object. Request message for SetIamPolicy method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies for Cloud Platform resources. A Policy is a collection of bindings. A binding binds one or more members to a single role. Members can be user accounts, service accounts, Google groups, and domains (such as G Suite). A role is a named list of permissions (defined by IAM or configured by users). A binding can optionally specify a condition, which is a logic expression that further constrains the role binding based on attributes about the request and/or target resource.

JSON Example

{
  "bindings": [
    {
      "role": "roles/resourcemanager.organizationAdmin",
      "members": [
        "user:mike@example.com",
        "group:admins@example.com",
        "domain:google.com",
        "serviceAccount:my-project-id@appspot.gserviceaccount.com"
      ]
    },
    {
      "role": "roles/resourcemanager.organizationViewer",
      "members": ["user:eve@example.com"],
      "condition": {
        "title": "expirable access",
        "description": "Does not grant access after Sep 2020",
        "expression": "request.time <
        timestamp('2020-10-01T00:00:00.000Z')",
      }
    }
  ]
}

YAML Example

bindings:
- members:
  - user:mike@example.com
  - group:admins@example.com
  - domain:google.com
  - serviceAccount:my-project-id@appspot.gserviceaccount.com
  role: roles/resourcemanager.organizationAdmin
- members:
  - user:eve@example.com
  role: roles/resourcemanager.organizationViewer
  condition:
    title: expirable access
    description: Does not grant access after Sep 2020
    expression: request.time < timestamp('2020-10-01T00:00:00.000Z')

For a description of IAM and its features, see the IAM developer’s guide.

Return type:

Policy

test_iam_permissions(request: Optional[TestIamPermissionsRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) TestIamPermissionsResponse[source]
Tests the specified IAM permissions against the IAM access control

policy for a function.

If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Parameters:
  • request (TestIamPermissionsRequest) – The request object. Request message for TestIamPermissions method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Response message for TestIamPermissions method.

Return type:

TestIamPermissionsResponse

property transport: MetadataServiceTransport

Returns the transport used by the client instance.

Returns:

The transport used by the client

instance.

Return type:

MetadataServiceTransport

property universe_domain: str

Return the universe domain used by the client instance.

Returns:

The universe domain used by the client instance.

Return type:

str

update_artifact(request: Optional[Union[UpdateArtifactRequest, dict]] = None, *, artifact: Optional[Artifact] = None, update_mask: Optional[FieldMask] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Artifact[source]

Updates a stored Artifact.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_update_artifact():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.UpdateArtifactRequest(
    )

    # Make the request
    response = client.update_artifact(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.UpdateArtifactRequest, dict]) – The request object. Request message for [MetadataService.UpdateArtifact][google.cloud.aiplatform.v1.MetadataService.UpdateArtifact].

  • artifact (google.cloud.aiplatform_v1.types.Artifact) –

    Required. The Artifact containing updates. The Artifact’s [Artifact.name][google.cloud.aiplatform.v1.Artifact.name] field is used to identify the Artifact to be updated. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}

    This corresponds to the artifact field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Optional. A FieldMask indicating which fields should be updated.

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general artifact.

Return type:

google.cloud.aiplatform_v1.types.Artifact

update_context(request: Optional[Union[UpdateContextRequest, dict]] = None, *, context: Optional[Context] = None, update_mask: Optional[FieldMask] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Context[source]

Updates a stored Context.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_update_context():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.UpdateContextRequest(
    )

    # Make the request
    response = client.update_context(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.UpdateContextRequest, dict]) – The request object. Request message for [MetadataService.UpdateContext][google.cloud.aiplatform.v1.MetadataService.UpdateContext].

  • context (google.cloud.aiplatform_v1.types.Context) –

    Required. The Context containing updates. The Context’s [Context.name][google.cloud.aiplatform.v1.Context.name] field is used to identify the Context to be updated. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}

    This corresponds to the context field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Optional. A FieldMask indicating which fields should be updated.

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general context.

Return type:

google.cloud.aiplatform_v1.types.Context

update_execution(request: Optional[Union[UpdateExecutionRequest, dict]] = None, *, execution: Optional[Execution] = None, update_mask: Optional[FieldMask] = None, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Execution[source]

Updates a stored Execution.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import aiplatform_v1

def sample_update_execution():
    # Create a client
    client = aiplatform_v1.MetadataServiceClient()

    # Initialize request argument(s)
    request = aiplatform_v1.UpdateExecutionRequest(
    )

    # Make the request
    response = client.update_execution(request=request)

    # Handle the response
    print(response)
Parameters:
  • request (Union[google.cloud.aiplatform_v1.types.UpdateExecutionRequest, dict]) – The request object. Request message for [MetadataService.UpdateExecution][google.cloud.aiplatform.v1.MetadataService.UpdateExecution].

  • execution (google.cloud.aiplatform_v1.types.Execution) –

    Required. The Execution containing updates. The Execution’s [Execution.name][google.cloud.aiplatform.v1.Execution.name] field is used to identify the Execution to be updated. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}

    This corresponds to the execution field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Optional. A FieldMask indicating which fields should be updated.

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

Instance of a general execution.

Return type:

google.cloud.aiplatform_v1.types.Execution

wait_operation(request: Optional[WaitOperationRequest] = None, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) Operation[source]

Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state.

If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters:
  • request (WaitOperationRequest) – The request object. Request message for WaitOperation method.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns:

An Operation object.

Return type:

Operation

class google.cloud.aiplatform_v1.services.metadata_service.pagers.ListArtifactsAsyncPager(method: Callable[[...], Awaitable[ListArtifactsResponse]], request: ListArtifactsRequest, response: ListArtifactsResponse, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_artifacts requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListArtifactsResponse object, and provides an __aiter__ method to iterate through its artifacts field.

If there are more pages, the __aiter__ method will make additional ListArtifacts requests and continue to iterate through the artifacts field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListArtifactsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters:
class google.cloud.aiplatform_v1.services.metadata_service.pagers.ListArtifactsPager(method: Callable[[...], ListArtifactsResponse], request: ListArtifactsRequest, response: ListArtifactsResponse, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_artifacts requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListArtifactsResponse object, and provides an __iter__ method to iterate through its artifacts field.

If there are more pages, the __iter__ method will make additional ListArtifacts requests and continue to iterate through the artifacts field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListArtifactsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters:
class google.cloud.aiplatform_v1.services.metadata_service.pagers.ListContextsAsyncPager(method: Callable[[...], Awaitable[ListContextsResponse]], request: ListContextsRequest, response: ListContextsResponse, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_contexts requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListContextsResponse object, and provides an __aiter__ method to iterate through its contexts field.

If there are more pages, the __aiter__ method will make additional ListContexts requests and continue to iterate through the contexts field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListContextsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters:
class google.cloud.aiplatform_v1.services.metadata_service.pagers.ListContextsPager(method: Callable[[...], ListContextsResponse], request: ListContextsRequest, response: ListContextsResponse, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_contexts requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListContextsResponse object, and provides an __iter__ method to iterate through its contexts field.

If there are more pages, the __iter__ method will make additional ListContexts requests and continue to iterate through the contexts field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListContextsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters:
class google.cloud.aiplatform_v1.services.metadata_service.pagers.ListExecutionsAsyncPager(method: Callable[[...], Awaitable[ListExecutionsResponse]], request: ListExecutionsRequest, response: ListExecutionsResponse, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_executions requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListExecutionsResponse object, and provides an __aiter__ method to iterate through its executions field.

If there are more pages, the __aiter__ method will make additional ListExecutions requests and continue to iterate through the executions field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListExecutionsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters:
class google.cloud.aiplatform_v1.services.metadata_service.pagers.ListExecutionsPager(method: Callable[[...], ListExecutionsResponse], request: ListExecutionsRequest, response: ListExecutionsResponse, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_executions requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListExecutionsResponse object, and provides an __iter__ method to iterate through its executions field.

If there are more pages, the __iter__ method will make additional ListExecutions requests and continue to iterate through the executions field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListExecutionsResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters:
class google.cloud.aiplatform_v1.services.metadata_service.pagers.ListMetadataSchemasAsyncPager(method: Callable[[...], Awaitable[ListMetadataSchemasResponse]], request: ListMetadataSchemasRequest, response: ListMetadataSchemasResponse, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_metadata_schemas requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListMetadataSchemasResponse object, and provides an __aiter__ method to iterate through its metadata_schemas field.

If there are more pages, the __aiter__ method will make additional ListMetadataSchemas requests and continue to iterate through the metadata_schemas field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListMetadataSchemasResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters:
class google.cloud.aiplatform_v1.services.metadata_service.pagers.ListMetadataSchemasPager(method: Callable[[...], ListMetadataSchemasResponse], request: ListMetadataSchemasRequest, response: ListMetadataSchemasResponse, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_metadata_schemas requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListMetadataSchemasResponse object, and provides an __iter__ method to iterate through its metadata_schemas field.

If there are more pages, the __iter__ method will make additional ListMetadataSchemas requests and continue to iterate through the metadata_schemas field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListMetadataSchemasResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters:
class google.cloud.aiplatform_v1.services.metadata_service.pagers.ListMetadataStoresAsyncPager(method: Callable[[...], Awaitable[ListMetadataStoresResponse]], request: ListMetadataStoresRequest, response: ListMetadataStoresResponse, *, retry: Optional[Union[AsyncRetry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_metadata_stores requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListMetadataStoresResponse object, and provides an __aiter__ method to iterate through its metadata_stores field.

If there are more pages, the __aiter__ method will make additional ListMetadataStores requests and continue to iterate through the metadata_stores field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListMetadataStoresResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters:
class google.cloud.aiplatform_v1.services.metadata_service.pagers.ListMetadataStoresPager(method: Callable[[...], ListMetadataStoresResponse], request: ListMetadataStoresRequest, response: ListMetadataStoresResponse, *, retry: Optional[Union[Retry, _MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_metadata_stores requests.

This class thinly wraps an initial google.cloud.aiplatform_v1.types.ListMetadataStoresResponse object, and provides an __iter__ method to iterate through its metadata_stores field.

If there are more pages, the __iter__ method will make additional ListMetadataStores requests and continue to iterate through the metadata_stores field on the corresponding responses.

All the usual google.cloud.aiplatform_v1.types.ListMetadataStoresResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters: