Cloud AI Platform v1 API - Class MetadataServiceClient (2.13.0)

public abstract class MetadataServiceClient

Reference documentation and code samples for the Cloud AI Platform v1 API class MetadataServiceClient.

MetadataService client wrapper, for convenient use.

Inheritance

object > MetadataServiceClient

Namespace

GoogleCloudGoogle.Cloud.AIPlatformV1

Assembly

Google.Cloud.AIPlatform.V1.dll

Remarks

Service for reading and writing metadata entries.

Properties

CreateMetadataStoreOperationsClient

public virtual OperationsClient CreateMetadataStoreOperationsClient { get; }

The long-running operations client for CreateMetadataStore.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the MetadataService service, which is a host of "aiplatform.googleapis.com" and a port of 443.

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default MetadataService scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default MetadataService scopes are:

DeleteArtifactOperationsClient

public virtual OperationsClient DeleteArtifactOperationsClient { get; }

The long-running operations client for DeleteArtifact.

Property Value
TypeDescription
OperationsClient

DeleteContextOperationsClient

public virtual OperationsClient DeleteContextOperationsClient { get; }

The long-running operations client for DeleteContext.

Property Value
TypeDescription
OperationsClient

DeleteExecutionOperationsClient

public virtual OperationsClient DeleteExecutionOperationsClient { get; }

The long-running operations client for DeleteExecution.

Property Value
TypeDescription
OperationsClient

DeleteMetadataStoreOperationsClient

public virtual OperationsClient DeleteMetadataStoreOperationsClient { get; }

The long-running operations client for DeleteMetadataStore.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual MetadataService.MetadataServiceClient GrpcClient { get; }

The underlying gRPC MetadataService client

Property Value
TypeDescription
MetadataServiceMetadataServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

PurgeArtifactsOperationsClient

public virtual OperationsClient PurgeArtifactsOperationsClient { get; }

The long-running operations client for PurgeArtifacts.

Property Value
TypeDescription
OperationsClient

PurgeContextsOperationsClient

public virtual OperationsClient PurgeContextsOperationsClient { get; }

The long-running operations client for PurgeContexts.

Property Value
TypeDescription
OperationsClient

PurgeExecutionsOperationsClient

public virtual OperationsClient PurgeExecutionsOperationsClient { get; }

The long-running operations client for PurgeExecutions.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

AddContextArtifactsAndExecutions(AddContextArtifactsAndExecutionsRequest, CallSettings)

public virtual AddContextArtifactsAndExecutionsResponse AddContextArtifactsAndExecutions(AddContextArtifactsAndExecutionsRequest request, CallSettings callSettings = null)

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.

Parameters
NameDescription
requestAddContextArtifactsAndExecutionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AddContextArtifactsAndExecutionsResponse

The RPC response.

Example
// Create client
MetadataServiceClient metadataServiceClient = MetadataServiceClient.Create();
// Initialize request argument(s)
AddContextArtifactsAndExecutionsRequest request = new AddContextArtifactsAndExecutionsRequest
{
    ContextAsContextName = ContextName.FromProjectLocationMetadataStoreContext("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]"),
    ArtifactsAsArtifactNames =
    {
        ArtifactName.FromProjectLocationMetadataStoreArtifact("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]"),
    },
    ExecutionsAsExecutionNames =
    {
        ExecutionName.FromProjectLocationMetadataStoreExecution("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]"),
    },
};
// Make the request
AddContextArtifactsAndExecutionsResponse response = metadataServiceClient.AddContextArtifactsAndExecutions(request);

AddContextArtifactsAndExecutions(ContextName, IEnumerable<ArtifactName>, IEnumerable<ExecutionName>, CallSettings)

public virtual AddContextArtifactsAndExecutionsResponse AddContextArtifactsAndExecutions(ContextName context, IEnumerable<ArtifactName> artifacts, IEnumerable<ExecutionName> executions, CallSettings callSettings = null)

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.

Parameters
NameDescription
contextContextName

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

artifactsIEnumerableArtifactName

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

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

executionsIEnumerableExecutionName

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AddContextArtifactsAndExecutionsResponse

The RPC response.

Example
// Create client
MetadataServiceClient metadataServiceClient = MetadataServiceClient.Create();
// Initialize request argument(s)
ContextName context = ContextName.FromProjectLocationMetadataStoreContext("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
IEnumerable<ArtifactName> artifacts = new ArtifactName[]
{
    ArtifactName.FromProjectLocationMetadataStoreArtifact("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]"),
};
IEnumerable<ExecutionName> executions = new ExecutionName[]
{
    ExecutionName.FromProjectLocationMetadataStoreExecution("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]"),
};
// Make the request
AddContextArtifactsAndExecutionsResponse response = metadataServiceClient.AddContextArtifactsAndExecutions(context, artifacts, executions);

AddContextArtifactsAndExecutions(string, IEnumerable<string>, IEnumerable<string>, CallSettings)

public virtual AddContextArtifactsAndExecutionsResponse AddContextArtifactsAndExecutions(string context, IEnumerable<string> artifacts, IEnumerable<string> executions, CallSettings callSettings = null)

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.

Parameters
NameDescription
contextstring

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

artifactsIEnumerablestring

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

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

executionsIEnumerablestring

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AddContextArtifactsAndExecutionsResponse

The RPC response.

Example
// Create client
MetadataServiceClient metadataServiceClient = MetadataServiceClient.Create();
// Initialize request argument(s)
string context = "projects/[PROJECT]/locations/[LOCATION]/metadataStores/[METADATA_STORE]/contexts/[CONTEXT]";
IEnumerable<string> artifacts = new string[]
{
    "projects/[PROJECT]/locations/[LOCATION]/metadataStores/[METADATA_STORE]/artifacts/[ARTIFACT]",
};
IEnumerable<string> executions = new string[]
{
    "projects/[PROJECT]/locations/[LOCATION]/metadataStores/[METADATA_STORE]/executions/[EXECUTION]",
};
// Make the request
AddContextArtifactsAndExecutionsResponse response = metadataServiceClient.AddContextArtifactsAndExecutions(context, artifacts, executions);

AddContextArtifactsAndExecutionsAsync(AddContextArtifactsAndExecutionsRequest, CallSettings)

public virtual Task<AddContextArtifactsAndExecutionsResponse> AddContextArtifactsAndExecutionsAsync(AddContextArtifactsAndExecutionsRequest request, CallSettings callSettings = null)

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.

Parameters
NameDescription
requestAddContextArtifactsAndExecutionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskAddContextArtifactsAndExecutionsResponse

A Task containing the RPC response.

Example
// Create client
MetadataServiceClient metadataServiceClient = await MetadataServiceClient.CreateAsync();
// Initialize request argument(s)
AddContextArtifactsAndExecutionsRequest request = new AddContextArtifactsAndExecutionsRequest
{
    ContextAsContextName = ContextName.FromProjectLocationMetadataStoreContext("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]"),
    ArtifactsAsArtifactNames =
    {
        ArtifactName.FromProjectLocationMetadataStoreArtifact("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]"),
    },
    ExecutionsAsExecutionNames =
    {
        ExecutionName.FromProjectLocationMetadataStoreExecution("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]"),
    },
};
// Make the request
AddContextArtifactsAndExecutionsResponse response = await metadataServiceClient.AddContextArtifactsAndExecutionsAsync(request);

AddContextArtifactsAndExecutionsAsync(AddContextArtifactsAndExecutionsRequest, CancellationToken)

public virtual Task<AddContextArtifactsAndExecutionsResponse> AddContextArtifactsAndExecutionsAsync(AddContextArtifactsAndExecutionsRequest request, CancellationToken cancellationToken)

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.

Parameters
NameDescription
requestAddContextArtifactsAndExecutionsRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskAddContextArtifactsAndExecutionsResponse

A Task containing the RPC response.

Example
// Create client
MetadataServiceClient metadataServiceClient = await MetadataServiceClient.CreateAsync();
// Initialize request argument(s)
AddContextArtifactsAndExecutionsRequest request = new AddContextArtifactsAndExecutionsRequest
{
    ContextAsContextName = ContextName.FromProjectLocationMetadataStoreContext("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]"),
    ArtifactsAsArtifactNames =
    {
        ArtifactName.FromProjectLocationMetadataStoreArtifact("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]"),
    },
    ExecutionsAsExecutionNames =
    {
        ExecutionName.FromProjectLocationMetadataStoreExecution("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]"),
    },
};
// Make the request
AddContextArtifactsAndExecutionsResponse response = await metadataServiceClient.AddContextArtifactsAndExecutionsAsync(request);

AddContextArtifactsAndExecutionsAsync(ContextName, IEnumerable<ArtifactName>, IEnumerable<ExecutionName>, CallSettings)

public virtual Task<AddContextArtifactsAndExecutionsResponse> AddContextArtifactsAndExecutionsAsync(ContextName context, IEnumerable<ArtifactName> artifacts, IEnumerable<ExecutionName> executions, CallSettings callSettings = null)

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.

Parameters
NameDescription
contextContextName

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

artifactsIEnumerableArtifactName

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

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

executionsIEnumerableExecutionName

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskAddContextArtifactsAndExecutionsResponse

A Task containing the RPC response.

Example
// Create client
MetadataServiceClient metadataServiceClient = await MetadataServiceClient.CreateAsync();
// Initialize request argument(s)
ContextName context = ContextName.FromProjectLocationMetadataStoreContext("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
IEnumerable<ArtifactName> artifacts = new ArtifactName[]
{
    ArtifactName.FromProjectLocationMetadataStoreArtifact("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]"),
};
IEnumerable<ExecutionName> executions = new ExecutionName[]
{
    ExecutionName.FromProjectLocationMetadataStoreExecution("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]"),
};
// Make the request
AddContextArtifactsAndExecutionsResponse response = await metadataServiceClient.AddContextArtifactsAndExecutionsAsync(context, artifacts, executions);

AddContextArtifactsAndExecutionsAsync(ContextName, IEnumerable<ArtifactName>, IEnumerable<ExecutionName>, CancellationToken)

public virtual Task<AddContextArtifactsAndExecutionsResponse> AddContextArtifactsAndExecutionsAsync(ContextName context, IEnumerable<ArtifactName> artifacts, IEnumerable<ExecutionName> executions, CancellationToken cancellationToken)

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.

Parameters
NameDescription
contextContextName

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

artifactsIEnumerableArtifactName

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

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

executionsIEnumerableExecutionName

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

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskAddContextArtifactsAndExecutionsResponse

A Task containing the RPC response.

Example
// Create client
MetadataServiceClient metadataServiceClient = await MetadataServiceClient.CreateAsync();
// Initialize request argument(s)
ContextName context = ContextName.FromProjectLocationMetadataStoreContext("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
IEnumerable<ArtifactName> artifacts = new ArtifactName[]
{
    ArtifactName.FromProjectLocationMetadataStoreArtifact("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[ARTIFACT]"),
};
IEnumerable<ExecutionName> executions = new ExecutionName[]
{
    ExecutionName.FromProjectLocationMetadataStoreExecution("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[EXECUTION]"),
};
// Make the request
AddContextArtifactsAndExecutionsResponse response = await metadataServiceClient.AddContextArtifactsAndExecutionsAsync(context, artifacts, executions);

AddContextArtifactsAndExecutionsAsync(string, IEnumerable<string>, IEnumerable<string>, CallSettings)

public virtual Task<AddContextArtifactsAndExecutionsResponse> AddContextArtifactsAndExecutionsAsync(string context, IEnumerable<string> artifacts, IEnumerable<string> executions, CallSettings callSettings = null)

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.

Parameters
NameDescription
contextstring

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

artifactsIEnumerablestring

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

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

executionsIEnumerablestring

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

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskAddContextArtifactsAndExecutionsResponse

A Task containing the RPC response.

Example
// Create client
MetadataServiceClient metadataServiceClient = await MetadataServiceClient.CreateAsync();
// Initialize request argument(s)
string context = "projects/[PROJECT]/locations/[LOCATION]/metadataStores/[METADATA_STORE]/contexts/[CONTEXT]";
IEnumerable<string> artifacts = new string[]
{
    "projects/[PROJECT]/locations/[LOCATION]/metadataStores/[METADATA_STORE]/artifacts/[ARTIFACT]",
};
IEnumerable<string> executions = new string[]
{
    "projects/[PROJECT]/locations/[LOCATION]/metadataStores/[METADATA_STORE]/executions/[EXECUTION]",
};
// Make the request
AddContextArtifactsAndExecutionsResponse response = await metadataServiceClient.AddContextArtifactsAndExecutionsAsync(context, artifacts, executions);

AddContextArtifactsAndExecutionsAsync(string, IEnumerable<string>, IEnumerable<string>, CancellationToken)

public virtual Task<AddContextArtifactsAndExecutionsResponse> AddContextArtifactsAndExecutionsAsync(string context, IEnumerable<string> artifacts, IEnumerable<string> executions, CancellationToken cancellationToken)

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.

Parameters
NameDescription
contextstring

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

artifactsIEnumerablestring

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

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

executionsIEnumerablestring

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

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskAddContextArtifactsAndExecutionsResponse

A Task containing the RPC response.

Example
// Create client
MetadataServiceClient metadataServiceClient = await MetadataServiceClient.CreateAsync();
// Initialize request argument(s)
string context = "projects/[PROJECT]/locations/[LOCATION]/metadataStores/[METADATA_STORE]/contexts/[CONTEXT]";
IEnumerable<string> artifacts = new string[]
{
    "projects/[PROJECT]/locations/[LOCATION]/metadataStores/[METADATA_STORE]/artifacts/[ARTIFACT]",
};
IEnumerable<string> executions = new string[]
{
    "projects/[PROJECT]/locations/[LOCATION]/metadataStores/[METADATA_STORE]/executions/[EXECUTION]",
};
// Make the request
AddContextArtifactsAndExecutionsResponse response = await metadataServiceClient.AddContextArtifactsAndExecutionsAsync(context, artifacts, executions);

AddContextChildren(AddContextChildrenRequest, CallSettings)

public virtual AddContextChildrenResponse AddContextChildren(AddContextChildrenRequest request, CallSettings callSettings = null)

Adds a set of Contexts as children to a parent Con