An Attachment refers to additional metadata that can be
attached to artifacts in Artifact Registry. An attachment
consists of one or more files.
Attributes
Name
Description
name
str
The name of the attachment. E.g.
projects/p1/locations/us/repositories/repo/attachments/sbom.
target
str
Required. The target the attachment is for, can be a
Version, Package or Repository. E.g.
projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1.
type_
str
Type of attachment. E.g. application/vnd.spdx+json
attachment_namespace
str
The namespace this attachment belongs to. E.g. If an
attachment is created by artifact analysis, namespace is set
to artifactanalysis.googleapis.com.
annotations
MutableMapping[str, str]
Optional. User annotations. These attributes
can only be set and used by the user, and not by
Artifact Registry. See
https://google.aip.dev/128#annotations for more
details such as format and size limitations.
create_time
google.protobuf.timestamp_pb2.Timestamp
Output only. The time when the attachment was
created.
update_time
google.protobuf.timestamp_pb2.Timestamp
Output only. The time when the attachment was
last updated.
files
MutableSequence[str]
Required. The files that belong to this attachment. If the
file ID part contains slashes, they are escaped. E.g.
projects/p1/locations/us-central1/repositories/repo1/files/sha:.
oci_version_name
str
Output only. The name of the OCI version that this
attachment created. Only populated for Docker attachments.
E.g.
projects/p1/locations/us-central1/repositories/repo1/packages/p1/versions/v1.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Class Attachment (1.16.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.16.1 (latest)](/python/docs/reference/artifactregistry/latest/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.16.0](/python/docs/reference/artifactregistry/1.16.0/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.15.2](/python/docs/reference/artifactregistry/1.15.2/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.14.0](/python/docs/reference/artifactregistry/1.14.0/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.13.1](/python/docs/reference/artifactregistry/1.13.1/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.12.0](/python/docs/reference/artifactregistry/1.12.0/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.11.5](/python/docs/reference/artifactregistry/1.11.5/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.10.0](/python/docs/reference/artifactregistry/1.10.0/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.9.0](/python/docs/reference/artifactregistry/1.9.0/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.8.4](/python/docs/reference/artifactregistry/1.8.4/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.7.0](/python/docs/reference/artifactregistry/1.7.0/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.6.1](/python/docs/reference/artifactregistry/1.6.1/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.5.0](/python/docs/reference/artifactregistry/1.5.0/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.4.1](/python/docs/reference/artifactregistry/1.4.1/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.3.3](/python/docs/reference/artifactregistry/1.3.3/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.2.1](/python/docs/reference/artifactregistry/1.2.1/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.1.2](/python/docs/reference/artifactregistry/1.1.2/google.cloud.artifactregistry_v1.types.Attachment)\n- [1.0.2](/python/docs/reference/artifactregistry/1.0.2/google.cloud.artifactregistry_v1.types.Attachment)\n- [0.5.0](/python/docs/reference/artifactregistry/0.5.0/google.cloud.artifactregistry_v1.types.Attachment)\n- [0.4.1](/python/docs/reference/artifactregistry/0.4.1/google.cloud.artifactregistry_v1.types.Attachment)\n- [0.3.3](/python/docs/reference/artifactregistry/0.3.3/google.cloud.artifactregistry_v1.types.Attachment)\n- [0.2.2](/python/docs/reference/artifactregistry/0.2.2/google.cloud.artifactregistry_v1.types.Attachment)\n- [0.1.0](/python/docs/reference/artifactregistry/0.1.0/google.cloud.artifactregistry_v1.types.Attachment) \n\n Attachment(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nAn Attachment refers to additional metadata that can be\nattached to artifacts in Artifact Registry. An attachment\nconsists of one or more files.\n\nClasses\n-------\n\n### AnnotationsEntry\n\n AnnotationsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nThe abstract base class for a message."]]