- 1.35.0 (latest)
- 1.34.0
- 1.33.0
- 1.32.1
- 1.31.0
- 1.30.0
- 1.26.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.1
- 1.12.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.0
- 0.39.0
- 0.38.0
- 0.37.1
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.2
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.13.0
- 0.12.0
- 0.11.1
- 0.10.0
Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class MetadataServiceClient.
Service Description: Service for reading and writing metadata entries.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedContext = $metadataServiceClient->contextName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[CONTEXT]');
$response = $metadataServiceClient->addContextArtifactsAndExecutions($formattedContext);
} finally {
$metadataServiceClient->close();
}
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parseName method to extract the individual identifiers contained within formatted names that are returned by the API.
Methods
artifactName
Formats a string containing the fully-qualified path to represent a artifact resource.
project
string
location
string
metadataStore
string
artifact
string
string
contextName
Formats a string containing the fully-qualified path to represent a context resource.
project
string
location
string
metadataStore
string
context
string
string
executionName
Formats a string containing the fully-qualified path to represent a execution resource.
project
string
location
string
metadataStore
string
execution
string
string
locationName
Formats a string containing the fully-qualified path to represent a location resource.
project
string
location
string
string
metadataSchemaName
Formats a string containing the fully-qualified path to represent a metadata_schema resource.
project
string
location
string
metadataStore
string
metadataSchema
string
string
metadataStoreName
Formats a string containing the fully-qualified path to represent a metadata_store resource.
project
string
location
string
metadataStore
string
string
parseName
Parses a formatted name string and returns an associative array of the components in the name.
The following name formats are supported: Template: Pattern
- artifact: projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}
- context: projects/{project}/locations/{location}/metadataStores/{metadata_store}/contexts/{context}
- execution: projects/{project}/locations/{location}/metadataStores/{metadata_store}/executions/{execution}
- location: projects/{project}/locations/{location}
- metadataSchema: projects/{project}/locations/{location}/metadataStores/{metadata_store}/metadataSchemas/{metadata_schema}
- metadataStore: projects/{project}/locations/{location}/metadataStores/{metadata_store}
The optional $template argument can be supplied to specify a particular pattern, and must match one of the templates listed above. If no $template argument is provided, or if the $template argument does not match one of the templates listed, then parseName will check each of the supported templates, and return the first match.
formattedName
string
The formatted name string
template
string
Optional name of template to match
array
getOperationsClient
Return an OperationsClient object with the same endpoint as $this.
resumeOperation
Resume an existing long running operation that was previously started by a long running API method. If $methodName is not provided, or does not match a long running API method, then the operation can still be resumed, but the OperationResponse object will not deserialize the final response.
operationName
string
The name of the long running operation
methodName
string
The name of the method used to start the operation
__construct
Constructor.
options
array
Optional. Options for configuring the service API wrapper.
↳ apiEndpoint
string
The address of the API remote host. May optionally include the port, formatted as "
↳ credentials
string|array|FetchAuthTokenInterface|CredentialsWrapper
The credentials to be used by the client to authorize API calls. This option accepts either a path to a credentials file, or a decoded credentials file as a PHP array. Advanced usage : In addition, this option can also accept a pre-constructed {@see} object or {@see} object. Note that when one of these objects are provided, any settings in $credentialsConfig will be ignored.
↳ credentialsConfig
array
Options used to configure credentials, including auth token caching, for the client. For a full list of supporting configuration options, see {@see} .
↳ disableRetries
bool
Determines whether or not retries defined by the client configuration should be disabled. Defaults to false
.
↳ clientConfig
string|array
Client method configuration, including retry settings. This option can be either a path to a JSON file, or a PHP array containing the decoded JSON data. By default this settings points to the default client config file, which is provided in the resources folder.
↳ transport
string|TransportInterface
The transport used for executing network requests. May be either the string rest
or grpc
. Defaults to grpc
if gRPC support is detected on the system. Advanced usage
: Additionally, it is possible to pass in an already instantiated {@see} object. Note that when this object is provided, any settings in $transportConfig, and any $apiEndpoint setting, will be ignored.
↳ transportConfig
array
Configuration options that will be used to construct the transport. Options for each supported transport type should be passed in a key for that transport. For example: $transportConfig = [ 'grpc' => [...], 'rest' => [...], ]; See the {@see} and {@see} methods for the supported options.
↳ clientCertSource
callable
A callable which returns the client cert as a string. This can be used to provide a certificate and private key to the transport layer for mTLS.
addContextArtifactsAndExecutions
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.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedContext = $metadataServiceClient->contextName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[CONTEXT]');
$response = $metadataServiceClient->addContextArtifactsAndExecutions($formattedContext);
} finally {
$metadataServiceClient->close();
}
context
string
Required. The resource name of the Context that the Artifacts and Executions belong to. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}
optionalArgs
array
Optional.
↳ artifacts
string[]
The resource names of the Artifacts to attribute to the Context. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}
↳ executions
string[]
The resource names of the Executions to associate with the Context. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
addContextChildren
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.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedContext = $metadataServiceClient->contextName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[CONTEXT]');
$response = $metadataServiceClient->addContextChildren($formattedContext);
} finally {
$metadataServiceClient->close();
}
context
string
Required. The resource name of the parent Context. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}
optionalArgs
array
Optional.
↳ childContexts
string[]
The resource names of the child Contexts.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
addExecutionEvents
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.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedExecution = $metadataServiceClient->executionName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[EXECUTION]');
$response = $metadataServiceClient->addExecutionEvents($formattedExecution);
} finally {
$metadataServiceClient->close();
}
execution
string
Required. The resource name of the Execution that the Events connect Artifacts with. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}
optionalArgs
array
Optional.
↳ events
Event[]
The Events to create and add.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
createArtifact
Creates an Artifact associated with a MetadataStore.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedParent = $metadataServiceClient->metadataStoreName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]');
$artifact = new Artifact();
$response = $metadataServiceClient->createArtifact($formattedParent, $artifact);
} finally {
$metadataServiceClient->close();
}
parent
string
Required. The resource name of the MetadataStore where the Artifact should be created. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}
artifact
optionalArgs
array
Optional.
↳ artifactId
string
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.)
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
createContext
Creates a Context associated with a MetadataStore.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedParent = $metadataServiceClient->metadataStoreName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]');
$context = new Context();
$response = $metadataServiceClient->createContext($formattedParent, $context);
} finally {
$metadataServiceClient->close();
}
parent
string
Required. The resource name of the MetadataStore where the Context should be created. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}
context
optionalArgs
array
Optional.
↳ contextId
string
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.)
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
createExecution
Creates an Execution associated with a MetadataStore.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedParent = $metadataServiceClient->metadataStoreName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]');
$execution = new Execution();
$response = $metadataServiceClient->createExecution($formattedParent, $execution);
} finally {
$metadataServiceClient->close();
}
parent
string
Required. The resource name of the MetadataStore where the Execution should be created. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}
execution
optionalArgs
array
Optional.
↳ executionId
string
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.)
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
createMetadataSchema
Creates a MetadataSchema.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedParent = $metadataServiceClient->metadataStoreName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]');
$metadataSchema = new MetadataSchema();
$response = $metadataServiceClient->createMetadataSchema($formattedParent, $metadataSchema);
} finally {
$metadataServiceClient->close();
}
parent
string
Required. The resource name of the MetadataStore where the MetadataSchema should be created. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}
metadataSchema
optionalArgs
array
Optional.
↳ metadataSchemaId
string
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.)
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
createMetadataStore
Initializes a MetadataStore, including allocation of resources.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedParent = $metadataServiceClient->locationName('[PROJECT]', '[LOCATION]');
$metadataStore = new MetadataStore();
$operationResponse = $metadataServiceClient->createMetadataStore($formattedParent, $metadataStore);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $metadataServiceClient->createMetadataStore($formattedParent, $metadataStore);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $metadataServiceClient->resumeOperation($operationName, 'createMetadataStore');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$metadataServiceClient->close();
}
parent
string
Required. The resource name of the Location where the MetadataStore should be created. Format: projects/{project}/locations/{location}/
metadataStore
optionalArgs
array
Optional.
↳ metadataStoreId
string
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.)
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
deleteArtifact
Deletes an Artifact.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedName = $metadataServiceClient->artifactName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[ARTIFACT]');
$operationResponse = $metadataServiceClient->deleteArtifact($formattedName);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $metadataServiceClient->deleteArtifact($formattedName);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $metadataServiceClient->resumeOperation($operationName, 'deleteArtifact');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$metadataServiceClient->close();
}
name
string
Required. The resource name of the Artifact to delete. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}
optionalArgs
array
Optional.
↳ etag
string
Optional. The etag of the Artifact to delete. If this is provided, it must match the server's etag. Otherwise, the request will fail with a FAILED_PRECONDITION.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
deleteContext
Deletes a stored Context.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedName = $metadataServiceClient->contextName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[CONTEXT]');
$operationResponse = $metadataServiceClient->deleteContext($formattedName);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $metadataServiceClient->deleteContext($formattedName);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $metadataServiceClient->resumeOperation($operationName, 'deleteContext');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$metadataServiceClient->close();
}
name
string
Required. The resource name of the Context to delete. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}
optionalArgs
array
Optional.
↳ force
bool
The force deletion semantics is still undefined. Users should not use this field.
↳ etag
string
Optional. The etag of the Context to delete. If this is provided, it must match the server's etag. Otherwise, the request will fail with a FAILED_PRECONDITION.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
deleteExecution
Deletes an Execution.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedName = $metadataServiceClient->executionName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[EXECUTION]');
$operationResponse = $metadataServiceClient->deleteExecution($formattedName);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $metadataServiceClient->deleteExecution($formattedName);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $metadataServiceClient->resumeOperation($operationName, 'deleteExecution');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$metadataServiceClient->close();
}
name
string
Required. The resource name of the Execution to delete. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}
optionalArgs
array
Optional.
↳ etag
string
Optional. The etag of the Execution to delete. If this is provided, it must match the server's etag. Otherwise, the request will fail with a FAILED_PRECONDITION.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
deleteMetadataStore
Deletes a single MetadataStore and all its child resources (Artifacts, Executions, and Contexts).
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedName = $metadataServiceClient->metadataStoreName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]');
$operationResponse = $metadataServiceClient->deleteMetadataStore($formattedName);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $metadataServiceClient->deleteMetadataStore($formattedName);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $metadataServiceClient->resumeOperation($operationName, 'deleteMetadataStore');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
// operation succeeded and returns no value
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$metadataServiceClient->close();
}
name
string
Required. The resource name of the MetadataStore to delete. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}
optionalArgs
array
Optional.
↳ force
bool
Deprecated: Field is no longer supported.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getArtifact
Retrieves a specific Artifact.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedName = $metadataServiceClient->artifactName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[ARTIFACT]');
$response = $metadataServiceClient->getArtifact($formattedName);
} finally {
$metadataServiceClient->close();
}
name
string
Required. The resource name of the Artifact to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getContext
Retrieves a specific Context.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedName = $metadataServiceClient->contextName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[CONTEXT]');
$response = $metadataServiceClient->getContext($formattedName);
} finally {
$metadataServiceClient->close();
}
name
string
Required. The resource name of the Context to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getExecution
Retrieves a specific Execution.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedName = $metadataServiceClient->executionName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[EXECUTION]');
$response = $metadataServiceClient->getExecution($formattedName);
} finally {
$metadataServiceClient->close();
}
name
string
Required. The resource name of the Execution to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getMetadataSchema
Retrieves a specific MetadataSchema.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedName = $metadataServiceClient->metadataSchemaName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[METADATA_SCHEMA]');
$response = $metadataServiceClient->getMetadataSchema($formattedName);
} finally {
$metadataServiceClient->close();
}
name
string
Required. The resource name of the MetadataSchema to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getMetadataStore
Retrieves a specific MetadataStore.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedName = $metadataServiceClient->metadataStoreName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]');
$response = $metadataServiceClient->getMetadataStore($formattedName);
} finally {
$metadataServiceClient->close();
}
name
string
Required. The resource name of the MetadataStore to retrieve. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
listArtifacts
Lists Artifacts in the MetadataStore.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedParent = $metadataServiceClient->metadataStoreName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]');
// Iterate over pages of elements
$pagedResponse = $metadataServiceClient->listArtifacts($formattedParent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $metadataServiceClient->listArtifacts($formattedParent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$metadataServiceClient->close();
}
parent
string
Required. The MetadataStore whose Artifacts should be listed. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}
optionalArgs
array
Optional.
↳ pageSize
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.
↳ pageToken
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.
↳ filter
string
Filter specifying the boolean condition for the Artifacts to satisfy in order to be part of the result set. The syntax to define filter query is based on https://google.aip.dev/160
. The supported set of filters include the following: * Attribute filtering: For example: display_name = "test"
. Supported fields include: name
, display_name
, uri
, state
, schema_title
, create_time
, and update_time
. Time fields, such as create_time
and update_time
, require values specified in RFC-3339 format. For example: create_time = "2020-11-19T11:30:00-04:00"
* Metadata field: To filter on metadata fields use traversal operation as follows: metadata.<field_name>.<type_value>
. For example: metadata.field_1.number_value = 10.0
* Context based filtering: To filter Artifacts based on the contexts to which they belong, use the function operator with the full resource name in_context(<context-name>)
. For example: in_context("projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context-id>")
Each of the above supported filter types can be combined together using logical operators ( AND
& OR
). Maximum nested expression depth allowed is 5. For example: display_name = "test" AND metadata.field1.bool_value = true
.
↳ orderBy
string
How the list of messages is ordered. Specify the values to order by and an ordering operation. The default sorting order is ascending. To specify descending order for a field, users append a " desc" suffix; for example: "foo desc, bar". Subfields are specified with a .
character, such as foo.bar. see https://google.aip.dev/132#ordering
for more details.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
listContexts
Lists Contexts on the MetadataStore.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedParent = $metadataServiceClient->metadataStoreName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]');
// Iterate over pages of elements
$pagedResponse = $metadataServiceClient->listContexts($formattedParent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $metadataServiceClient->listContexts($formattedParent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$metadataServiceClient->close();
}
parent
string
Required. The MetadataStore whose Contexts should be listed. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}
optionalArgs
array
Optional.
↳ pageSize
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.
↳ pageToken
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.
↳ filter
string
Filter specifying the boolean condition for the Contexts to satisfy in order to be part of the result set. The syntax to define filter query is based on https://google.aip.dev/160
. Following are the supported set of filters: * Attribute filtering: For example: display_name = "test"
. Supported fields include: name
, display_name
, schema_title
, create_time
, and update_time
. Time fields, such as create_time
and update_time
, require values specified in RFC-3339 format. For example: create_time = "2020-11-19T11:30:00-04:00"
. * Metadata field: To filter on metadata fields use traversal operation as follows: metadata.<field_name>.<type_value>
. For example: metadata.field_1.number_value = 10.0
. * Parent Child filtering: To filter Contexts based on parent-child relationship use the HAS operator as follows: parent_contexts: "projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context_id>" child_contexts: "projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context_id>"
Each of the above supported filters can be combined together using logical operators ( AND
& OR
). Maximum nested expression depth allowed is 5. For example: display_name = "test" AND metadata.field1.bool_value = true
.
↳ orderBy
string
How the list of messages is ordered. Specify the values to order by and an ordering operation. The default sorting order is ascending. To specify descending order for a field, users append a " desc" suffix; for example: "foo desc, bar". Subfields are specified with a .
character, such as foo.bar. see https://google.aip.dev/132#ordering
for more details.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
listExecutions
Lists Executions in the MetadataStore.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedParent = $metadataServiceClient->metadataStoreName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]');
// Iterate over pages of elements
$pagedResponse = $metadataServiceClient->listExecutions($formattedParent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $metadataServiceClient->listExecutions($formattedParent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$metadataServiceClient->close();
}
parent
string
Required. The MetadataStore whose Executions should be listed. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}
optionalArgs
array
Optional.
↳ pageSize
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.
↳ pageToken
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.
↳ filter
string
Filter specifying the boolean condition for the Executions to satisfy in order to be part of the result set. The syntax to define filter query is based on https://google.aip.dev/160
. Following are the supported set of filters: * Attribute filtering: For example: display_name = "test"
. Supported fields include: name
, display_name
, state
, schema_title
, create_time
, and update_time
. Time fields, such as create_time
and update_time
, require values specified in RFC-3339 format. For example: create_time = "2020-11-19T11:30:00-04:00"
. * Metadata field: To filter on metadata fields use traversal operation as follows: metadata.<field_name>.<type_value>
For example: metadata.field_1.number_value = 10.0
* Context based filtering: To filter Executions based on the contexts to which they belong use the function operator with the full resource name: in_context(<context-name>)
. For example: in_context("projects/<project_number>/locations/<location>/metadataStores/<metadatastore_name>/contexts/<context-id>")
Each of the above supported filters can be combined together using logical operators ( AND
& OR
). Maximum nested expression depth allowed is 5. For example: display_name = "test" AND metadata.field1.bool_value = true
.
↳ orderBy
string
How the list of messages is ordered. Specify the values to order by and an ordering operation. The default sorting order is ascending. To specify descending order for a field, users append a " desc" suffix; for example: "foo desc, bar". Subfields are specified with a .
character, such as foo.bar. see https://google.aip.dev/132#ordering
for more details.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
listMetadataSchemas
Lists MetadataSchemas.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedParent = $metadataServiceClient->metadataStoreName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]');
// Iterate over pages of elements
$pagedResponse = $metadataServiceClient->listMetadataSchemas($formattedParent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $metadataServiceClient->listMetadataSchemas($formattedParent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$metadataServiceClient->close();
}
parent
string
Required. The MetadataStore whose MetadataSchemas should be listed. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}
optionalArgs
array
Optional.
↳ pageSize
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.
↳ pageToken
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.
↳ filter
string
A query to filter available MetadataSchemas for matching results.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
listMetadataStores
Lists MetadataStores for a Location.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedParent = $metadataServiceClient->locationName('[PROJECT]', '[LOCATION]');
// Iterate over pages of elements
$pagedResponse = $metadataServiceClient->listMetadataStores($formattedParent);
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $metadataServiceClient->listMetadataStores($formattedParent);
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$metadataServiceClient->close();
}
parent
string
Required. The Location whose MetadataStores should be listed. Format: projects/{project}/locations/{location}
optionalArgs
array
Optional.
↳ pageSize
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.
↳ pageToken
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
purgeArtifacts
Purges Artifacts.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedParent = $metadataServiceClient->metadataStoreName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]');
$filter = 'filter';
$operationResponse = $metadataServiceClient->purgeArtifacts($formattedParent, $filter);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $metadataServiceClient->purgeArtifacts($formattedParent, $filter);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $metadataServiceClient->resumeOperation($operationName, 'purgeArtifacts');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$metadataServiceClient->close();
}
parent
string
Required. The metadata store to purge Artifacts from. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}
filter
string
Required. A required filter matching the Artifacts to be purged. E.g., update_time <= 2020-11-19T11:30:00-04:00
.
optionalArgs
array
Optional.
↳ force
bool
Optional. Flag to indicate to actually perform the purge. If force
is set to false, the method will return a sample of Artifact names that would be deleted.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
purgeContexts
Purges Contexts.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedParent = $metadataServiceClient->metadataStoreName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]');
$filter = 'filter';
$operationResponse = $metadataServiceClient->purgeContexts($formattedParent, $filter);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $metadataServiceClient->purgeContexts($formattedParent, $filter);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $metadataServiceClient->resumeOperation($operationName, 'purgeContexts');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$metadataServiceClient->close();
}
parent
string
Required. The metadata store to purge Contexts from. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}
filter
string
Required. A required filter matching the Contexts to be purged. E.g., update_time <= 2020-11-19T11:30:00-04:00
.
optionalArgs
array
Optional.
↳ force
bool
Optional. Flag to indicate to actually perform the purge. If force
is set to false, the method will return a sample of Context names that would be deleted.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
purgeExecutions
Purges Executions.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedParent = $metadataServiceClient->metadataStoreName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]');
$filter = 'filter';
$operationResponse = $metadataServiceClient->purgeExecutions($formattedParent, $filter);
$operationResponse->pollUntilComplete();
if ($operationResponse->operationSucceeded()) {
$result = $operationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $operationResponse->getError();
// handleError($error)
}
// Alternatively:
// start the operation, keep the operation name, and resume later
$operationResponse = $metadataServiceClient->purgeExecutions($formattedParent, $filter);
$operationName = $operationResponse->getName();
// ... do other work
$newOperationResponse = $metadataServiceClient->resumeOperation($operationName, 'purgeExecutions');
while (!$newOperationResponse->isDone()) {
// ... do other work
$newOperationResponse->reload();
}
if ($newOperationResponse->operationSucceeded()) {
$result = $newOperationResponse->getResult();
// doSomethingWith($result)
} else {
$error = $newOperationResponse->getError();
// handleError($error)
}
} finally {
$metadataServiceClient->close();
}
parent
string
Required. The metadata store to purge Executions from. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}
filter
string
Required. A required filter matching the Executions to be purged. E.g., update_time <= 2020-11-19T11:30:00-04:00
.
optionalArgs
array
Optional.
↳ force
bool
Optional. Flag to indicate to actually perform the purge. If force
is set to false, the method will return a sample of Execution names that would be deleted.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
queryArtifactLineageSubgraph
Retrieves lineage of an Artifact represented through Artifacts and Executions connected by Event edges and returned as a LineageSubgraph.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedArtifact = $metadataServiceClient->artifactName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[ARTIFACT]');
$response = $metadataServiceClient->queryArtifactLineageSubgraph($formattedArtifact);
} finally {
$metadataServiceClient->close();
}
artifact
string
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.
optionalArgs
array
Optional.
↳ maxHops
int
Specifies the size of the lineage graph in terms of number of hops from the specified artifact. Negative Value: INVALID_ARGUMENT error is returned 0: Only input artifact is returned. No value: Transitive closure is performed to return the complete graph.
↳ filter
string
Filter specifying the boolean condition for the Artifacts to satisfy in order to be part of the Lineage Subgraph. The syntax to define filter query is based on https://google.aip.dev/160
. The supported set of filters include the following: * Attribute filtering: For example: display_name = "test"
Supported fields include: name
, display_name
, uri
, state
, schema_title
, create_time
, and update_time
. Time fields, such as create_time
and update_time
, require values specified in RFC-3339 format. For example: create_time = "2020-11-19T11:30:00-04:00"
* Metadata field: To filter on metadata fields use traversal operation as follows: metadata.<field_name>.<type_value>
. For example: metadata.field_1.number_value = 10.0
Each of the above supported filter types can be combined together using logical operators ( AND
& OR
). Maximum nested expression depth allowed is 5. For example: display_name = "test" AND metadata.field1.bool_value = true
.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
queryContextLineageSubgraph
Retrieves Artifacts and Executions within the specified Context, connected by Event edges and returned as a LineageSubgraph.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedContext = $metadataServiceClient->contextName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[CONTEXT]');
$response = $metadataServiceClient->queryContextLineageSubgraph($formattedContext);
} finally {
$metadataServiceClient->close();
}
context
string
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.
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
queryExecutionInputsAndOutputs
Obtains the set of input and output Artifacts for this Execution, in the form of LineageSubgraph that also contains the Execution and connecting Events.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedExecution = $metadataServiceClient->executionName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[EXECUTION]');
$response = $metadataServiceClient->queryExecutionInputsAndOutputs($formattedExecution);
} finally {
$metadataServiceClient->close();
}
execution
string
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}
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
removeContextChildren
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.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$formattedContext = $metadataServiceClient->contextName('[PROJECT]', '[LOCATION]', '[METADATA_STORE]', '[CONTEXT]');
$response = $metadataServiceClient->removeContextChildren($formattedContext);
} finally {
$metadataServiceClient->close();
}
context
string
Required. The resource name of the parent Context. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}
optionalArgs
array
Optional.
↳ childContexts
string[]
The resource names of the child Contexts.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
updateArtifact
Updates a stored Artifact.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$artifact = new Artifact();
$response = $metadataServiceClient->updateArtifact($artifact);
} finally {
$metadataServiceClient->close();
}
artifact
Google\Cloud\AIPlatform\V1\Artifact
Required. The Artifact containing updates. The Artifact's Artifact.name
field is used to identify the Artifact to be updated. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}
optionalArgs
array
Optional.
↳ updateMask
FieldMask
Optional. A FieldMask indicating which fields should be updated. Functionality of this field is not yet supported.
↳ allowMissing
bool
If set to true, and the Artifact is not found, a new Artifact is created.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
updateContext
Updates a stored Context.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$context = new Context();
$response = $metadataServiceClient->updateContext($context);
} finally {
$metadataServiceClient->close();
}
context
Google\Cloud\AIPlatform\V1\Context
Required. The Context containing updates. The Context's Context.name
field is used to identify the Context to be updated. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}
optionalArgs
array
Optional.
↳ updateMask
FieldMask
Optional. A FieldMask indicating which fields should be updated. Functionality of this field is not yet supported.
↳ allowMissing
bool
If set to true, and the Context is not found, a new Context is created.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
updateExecution
Updates a stored Execution.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$execution = new Execution();
$response = $metadataServiceClient->updateExecution($execution);
} finally {
$metadataServiceClient->close();
}
execution
Google\Cloud\AIPlatform\V1\Execution
Required. The Execution containing updates. The Execution's Execution.name
field is used to identify the Execution to be updated. Format: projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}
optionalArgs
array
Optional.
↳ updateMask
FieldMask
Optional. A FieldMask indicating which fields should be updated. Functionality of this field is not yet supported.
↳ allowMissing
bool
If set to true, and the Execution is not found, a new Execution is created.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getLocation
Gets information about a location.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$response = $metadataServiceClient->getLocation();
} finally {
$metadataServiceClient->close();
}
optionalArgs
array
Optional.
↳ name
string
Resource name for the location.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
listLocations
Lists information about the supported locations for this service.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
// Iterate over pages of elements
$pagedResponse = $metadataServiceClient->listLocations();
foreach ($pagedResponse->iteratePages() as $page) {
foreach ($page as $element) {
// doSomethingWith($element);
}
}
// Alternatively:
// Iterate through all elements
$pagedResponse = $metadataServiceClient->listLocations();
foreach ($pagedResponse->iterateAllElements() as $element) {
// doSomethingWith($element);
}
} finally {
$metadataServiceClient->close();
}
optionalArgs
array
Optional.
↳ name
string
The resource that owns the locations collection, if applicable.
↳ filter
string
The standard list filter.
↳ pageSize
int
The maximum number of resources contained in the underlying API response. The API may return fewer values in a page, even if there are additional values to be retrieved.
↳ pageToken
string
A page token is used to specify a page of values to be returned. If no page token is specified (the default), the first page of values will be returned. Any page token used here must have been generated by a previous call to the API.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
getIamPolicy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$resource = 'resource';
$response = $metadataServiceClient->getIamPolicy($resource);
} finally {
$metadataServiceClient->close();
}
resource
string
REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.
optionalArgs
array
Optional.
↳ options
GetPolicyOptions
OPTIONAL: A GetPolicyOptions
object for specifying options to GetIamPolicy
.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
setIamPolicy
Sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND
, INVALID_ARGUMENT
, and PERMISSION_DENIED
errors.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$resource = 'resource';
$policy = new Policy();
$response = $metadataServiceClient->setIamPolicy($resource, $policy);
} finally {
$metadataServiceClient->close();
}
resource
string
REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.
policy
Google\Cloud\Iam\V1\Policy
REQUIRED: The complete policy to be applied to the resource
. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects) might reject them.
optionalArgs
array
Optional.
↳ updateMask
FieldMask
OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: paths: "bindings, etag"
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
testIamPermissions
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of
permissions, not a NOT_FOUND
error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
Sample code:
$metadataServiceClient = new MetadataServiceClient();
try {
$resource = 'resource';
$permissions = [];
$response = $metadataServiceClient->testIamPermissions($resource, $permissions);
} finally {
$metadataServiceClient->close();
}
resource
string
REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.
permissions
string[]
The set of permissions to check for the resource
. Permissions with wildcards (such as ' ' or 'storage.
') are not allowed. For more information see IAM Overview
.
optionalArgs
array
Optional.
↳ retrySettings
RetrySettings|array
Retry settings to use for this call. Can be a {@see} object, or an associative array of retry settings parameters. See the documentation on {@see} for example usage.
Constants
SERVICE_NAME
Value: 'google.cloud.aiplatform.v1.MetadataService'
The name of the service.
SERVICE_ADDRESS
Value: 'aiplatform.googleapis.com'
The default address of the service.
DEFAULT_SERVICE_PORT
Value: 443
The default port of the service.
CODEGEN_NAME
Value: 'gapic'
The name of the code generator, to be included in the agent header.