Skip to main content

artifacts

Creates, updates, deletes, gets or lists an artifacts resource.

Overview

Nameartifacts
TypeResource
Idgoogle.aiplatform.artifacts

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The resource name of the Artifact.
createTimestring (google-datetime)Output only. Timestamp when this Artifact was created.
descriptionstringDescription of the Artifact
displayNamestringUser provided display name of the Artifact. May be up to 128 Unicode characters.
etagstringAn eTag used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
labelsobjectThe labels with user-defined metadata to organize your Artifacts. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one Artifact (System labels are excluded).
metadataobjectProperties of the Artifact. Top level metadata keys' heading and trailing spaces will be trimmed. The size of this field should not exceed 200KB.
schemaTitlestringThe title of the schema describing the metadata. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store.
schemaVersionstringThe version of the schema in schema_name to use. Schema title and version is expected to be registered in earlier Create Schema calls. And both are used together as unique identifiers to identify schemas within the local metadata store.
statestringThe state of this Artifact. This is a property of the Artifact, and does not imply or capture any ongoing process. This property is managed by clients (such as Vertex AI Pipelines), and the system does not prescribe or check the validity of state transitions.
updateTimestring (google-datetime)Output only. Timestamp when this Artifact was last updated.
uristringThe uniform resource identifier of the artifact file. May be empty if there is no actual artifact file.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, metadataStoresId, artifactsIdRetrieves a specific Artifact.
query_artifact_lineage_subgraphselectprojectsId, locationsId, metadataStoresId, artifactsIdmaxHops, filterRetrieves lineage of an Artifact represented through Artifacts and Executions connected by Event edges and returned as a LineageSubgraph.
listselectprojectsId, locationsId, metadataStoresIdpageSize, pageToken, filter, orderByLists Artifacts in the MetadataStore.
createinsertprojectsId, locationsId, metadataStoresIdartifactIdCreates an Artifact associated with a MetadataStore.
patchupdateprojectsId, locationsId, metadataStoresId, artifactsIdupdateMask, allowMissingUpdates a stored Artifact.
deletedeleteprojectsId, locationsId, metadataStoresId, artifactsIdetagDeletes an Artifact.
purgeexecprojectsId, locationsId, metadataStoresIdPurges Artifacts.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
artifactsIdstring
locationsIdstring
metadataStoresIdstring
projectsIdstring
allowMissingboolean
artifactIdstring
etagstring
filterstring
maxHopsinteger (int32)
orderBystring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Retrieves a specific Artifact.

SELECT
name,
createTime,
description,
displayName,
etag,
labels,
metadata,
schemaTitle,
schemaVersion,
state,
updateTime,
uri
FROM google.aiplatform.artifacts
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND metadataStoresId = '{{ metadataStoresId }}' -- required
AND artifactsId = '{{ artifactsId }}' -- required;

INSERT examples

Creates an Artifact associated with a MetadataStore.

INSERT INTO google.aiplatform.artifacts (
data__displayName,
data__uri,
data__etag,
data__labels,
data__state,
data__schemaTitle,
data__schemaVersion,
data__metadata,
data__description,
projectsId,
locationsId,
metadataStoresId,
artifactId
)
SELECT
'{{ displayName }}',
'{{ uri }}',
'{{ etag }}',
'{{ labels }}',
'{{ state }}',
'{{ schemaTitle }}',
'{{ schemaVersion }}',
'{{ metadata }}',
'{{ description }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ metadataStoresId }}',
'{{ artifactId }}'
RETURNING
name,
createTime,
description,
displayName,
etag,
labels,
metadata,
schemaTitle,
schemaVersion,
state,
updateTime,
uri
;

UPDATE examples

Updates a stored Artifact.

UPDATE google.aiplatform.artifacts
SET
data__displayName = '{{ displayName }}',
data__uri = '{{ uri }}',
data__etag = '{{ etag }}',
data__labels = '{{ labels }}',
data__state = '{{ state }}',
data__schemaTitle = '{{ schemaTitle }}',
data__schemaVersion = '{{ schemaVersion }}',
data__metadata = '{{ metadata }}',
data__description = '{{ description }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND metadataStoresId = '{{ metadataStoresId }}' --required
AND artifactsId = '{{ artifactsId }}' --required
AND updateMask = '{{ updateMask}}'
AND allowMissing = {{ allowMissing}}
RETURNING
name,
createTime,
description,
displayName,
etag,
labels,
metadata,
schemaTitle,
schemaVersion,
state,
updateTime,
uri;

DELETE examples

Deletes an Artifact.

DELETE FROM google.aiplatform.artifacts
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND metadataStoresId = '{{ metadataStoresId }}' --required
AND artifactsId = '{{ artifactsId }}' --required
AND etag = '{{ etag }}';

Lifecycle Methods

Purges Artifacts.

EXEC google.aiplatform.artifacts.purge 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@metadataStoresId='{{ metadataStoresId }}' --required
@@json=
'{
"filter": "{{ filter }}",
"force": {{ force }}
}';