REST Resource: projects.locations.apis.versions.specs.artifacts

Resource: Artifact

Artifacts of resources. Artifacts are unique (single-value) per resource and are used to store metadata that is too large or numerous to be stored directly on the resource. Since artifacts are stored separately from parent resources, they should generally be used for metadata that is needed infrequently, i.e., not for display in primary views of the resource but perhaps displayed or downloaded upon request. The artifacts.list method allows artifacts to be quickly enumerated and checked for presence without downloading their (potentially-large) contents.

JSON representation
{
  "name": string,
  "createTime": string,
  "updateTime": string,
  "mimeType": string,
  "sizeBytes": integer,
  "hash": string,
  "contents": string,
  "labels": {
    string: string,
    ...
  },
  "annotations": {
    string: string,
    ...
  }
}
Fields
name

string

Resource name.

createTime

string (Timestamp format)

Output only. Creation timestamp.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. Last update timestamp.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

mimeType

string

A content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip").

sizeBytes

integer

Output only. The size of the artifact in bytes. If the artifact is gzipped, this is the size of the uncompressed artifact.

hash

string

Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact.

contents

string (bytes format)

Input only. The contents of the artifact. Provided by API callers when artifacts are created or replaced. To access the contents of an artifact, use artifacts.getContents.

A base64-encoded string.

labels

map (key: string, value: string)

Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations.

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 resource (System labels are excluded).

See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with "registry.googleapis.com/" and cannot be changed.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

annotations

map (key: string, value: string)

Annotations attach non-identifying metadata to resources.

Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Methods

create

Creates a specified artifact.

delete

Removes a specified artifact.

get

Returns a specified artifact.

getContents

Returns the contents of a specified artifact.

getIamPolicy

Gets the access control policy for a resource.

list

Returns matching artifacts.

replaceArtifact

Used to replace a specified artifact.

setIamPolicy

Sets the access control policy on the specified resource.

testIamPermissions

Returns permissions that a caller has on the specified resource.