REST Resource: projects.locations.repositories

Resource: Repository

A Repository for storing artifacts with a specific format.

JSON representation
{
  "name": string,
  "format": enum (Format),
  "description": string,
  "labels": {
    string: string,
    ...
  },
  "createTime": string,
  "updateTime": string,
  "kmsKeyName": string,
  "mode": enum (Mode),
  "sizeBytes": string,
  "satisfiesPzs": boolean,

  // Union field format_config can be only one of the following:
  "mavenConfig": {
    object (MavenRepositoryConfig)
  },
  "dockerConfig": {
    object (DockerRepositoryConfig)
  }
  // End of list of possible types for union field format_config.

  // Union field mode_config can be only one of the following:
  "virtualRepositoryConfig": {
    object (VirtualRepositoryConfig)
  },
  "remoteRepositoryConfig": {
    object (RemoteRepositoryConfig)
  }
  // End of list of possible types for union field mode_config.
}
Fields
name

string

The name of the repository, for example: "projects/p1/locations/us-central1/repositories/repo1".

format

enum (Format)

The format of packages that are stored in the repository.

description

string

The user-provided description of the repository.

labels

map (key: string, value: string)

Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.

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

createTime

string (Timestamp format)

Output only. The time when the repository was created.

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. The time when the repository was last updated.

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".

kmsKeyName

string

The Cloud KMS resource name of the customer managed encryption key that's used to encrypt the contents of the Repository. Has the form: projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key. This value may not be changed after the Repository has been created.

mode

enum (Mode)

The mode of the repository.

sizeBytes

string (int64 format)

Output only. The size, in bytes, of all artifact storage in this repository. Repositories that are generally available or in public preview use this to calculate storage costs.

satisfiesPzs

boolean

Output only. If set, the repository satisfies physical zone separation.

Union field format_config. Repository-specific configurations. format_config can be only one of the following:
mavenConfig

object (MavenRepositoryConfig)

Maven repository config contains repository level configuration for the repositories of maven type.

dockerConfig

object (DockerRepositoryConfig)

Docker repository config contains repository level configuration for the repositories of docker type.

Union field mode_config. Repository configuration specific to the Mode value being selected (Remote or Virtual) mode_config can be only one of the following:
virtualRepositoryConfig

object (VirtualRepositoryConfig)

Configuration specific for a Virtual Repository.

remoteRepositoryConfig

object (RemoteRepositoryConfig)

Configuration specific for a Remote Repository.

MavenRepositoryConfig

MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type.

JSON representation
{
  "allowSnapshotOverwrites": boolean,
  "versionPolicy": enum (VersionPolicy)
}
Fields
allowSnapshotOverwrites

boolean

The repository with this flag will allow publishing the same snapshot versions.

versionPolicy

enum (VersionPolicy)

Version policy defines the versions that the registry will accept.

VersionPolicy

VersionPolicy is the version policy for the repository.

Enums
VERSION_POLICY_UNSPECIFIED VERSION_POLICY_UNSPECIFIED - the version policy is not defined. When the version policy is not defined, no validation is performed for the versions.
RELEASE RELEASE - repository will accept only Release versions.
SNAPSHOT SNAPSHOT - repository will accept only Snapshot versions.

DockerRepositoryConfig

DockerRepositoryConfig is docker related repository details. Provides additional configuration details for repositories of the docker format type.

JSON representation
{
  "immutableTags": boolean
}
Fields
immutableTags

boolean

The repository which enabled this flag prevents all tags from being modified, moved or deleted. This does not prevent tags from being created.

VirtualRepositoryConfig

Virtual repository configuration.

JSON representation
{
  "upstreamPolicies": [
    {
      object (UpstreamPolicy)
    }
  ]
}
Fields
upstreamPolicies[]

object (UpstreamPolicy)

Policies that configure the upstream artifacts distributed by the Virtual Repository. Upstream policies cannot be set on a standard repository.

UpstreamPolicy

Artifact policy configuration for the repository contents.

JSON representation
{
  "id": string,
  "repository": string,
  "priority": integer
}
Fields
id

string

The user-provided ID of the upstream policy.

repository

string

A reference to the repository resource, for example: "projects/p1/locations/us-central1/repositories/repo1".

priority

integer

Entries with a greater priority value take precedence in the pull order.

RemoteRepositoryConfig

Remote repository configuration.

JSON representation
{
  "description": string,

  // Union field remote_source can be only one of the following:
  "dockerRepository": {
    object (DockerRepository)
  },
  "mavenRepository": {
    object (MavenRepository)
  },
  "npmRepository": {
    object (NpmRepository)
  },
  "pythonRepository": {
    object (PythonRepository)
  }
  // End of list of possible types for union field remote_source.
}
Fields
description

string

The description of the remote source.

Union field remote_source. Settings specific to the remote repository. remote_source can be only one of the following:
dockerRepository

object (DockerRepository)

Specific settings for a Docker remote repository.

mavenRepository

object (MavenRepository)

Specific settings for a Maven remote repository.

npmRepository

object (NpmRepository)

Specific settings for an Npm remote repository.

pythonRepository

object (PythonRepository)

Specific settings for a Python remote repository.

DockerRepository

Configuration for a Docker remote repository.

JSON representation
{

  // Union field upstream can be only one of the following:
  "publicRepository": enum (PublicRepository)
  // End of list of possible types for union field upstream.
}
Fields
Union field upstream. Address of the remote repository. upstream can be only one of the following:
publicRepository

enum (PublicRepository)

One of the publicly available Docker repositories supported by Artifact Registry.

PublicRepository

Predefined list of publicly available Docker repositories like Docker Hub.

Enums
PUBLIC_REPOSITORY_UNSPECIFIED Unspecified repository.
DOCKER_HUB Docker Hub.

MavenRepository

Configuration for a Maven remote repository.

JSON representation
{

  // Union field upstream can be only one of the following:
  "publicRepository": enum (PublicRepository)
  // End of list of possible types for union field upstream.
}
Fields
Union field upstream. Address of the remote repository. upstream can be only one of the following:
publicRepository

enum (PublicRepository)

One of the publicly available Maven repositories supported by Artifact Registry.

PublicRepository

Predefined list of publicly available Maven repositories like Maven Central.

Enums
PUBLIC_REPOSITORY_UNSPECIFIED Unspecified repository.
MAVEN_CENTRAL Maven Central.

NpmRepository

Configuration for a Npm remote repository.

JSON representation
{

  // Union field upstream can be only one of the following:
  "publicRepository": enum (PublicRepository)
  // End of list of possible types for union field upstream.
}
Fields
Union field upstream. Address of the remote repository upstream can be only one of the following:
publicRepository

enum (PublicRepository)

One of the publicly available Npm repositories supported by Artifact Registry.

PublicRepository

Predefined list of publicly available NPM repositories like npmjs.

Enums
PUBLIC_REPOSITORY_UNSPECIFIED Unspecified repository.
NPMJS npmjs.

PythonRepository

Configuration for a Python remote repository.

JSON representation
{

  // Union field upstream can be only one of the following:
  "publicRepository": enum (PublicRepository)
  // End of list of possible types for union field upstream.
}
Fields
Union field upstream. Address of the remote repository. upstream can be only one of the following:
publicRepository

enum (PublicRepository)

One of the publicly available Python repositories supported by Artifact Registry.

PublicRepository

Predefined list of publicly available Python repositories like PyPI.org.

Enums
PUBLIC_REPOSITORY_UNSPECIFIED Unspecified repository.
PYPI PyPI.

Format

A package format.

Enums
FORMAT_UNSPECIFIED Unspecified package format.
DOCKER Docker package format.
MAVEN Maven package format.
NPM NPM package format.
APT APT package format.
YUM YUM package format.
PYTHON Python package format.
KFP Kubeflow Pipelines package format.

Mode

The mode configures the repository to serve artifacts from different sources.

Enums
MODE_UNSPECIFIED Unspecified mode.
STANDARD_REPOSITORY A standard repository storing artifacts.
VIRTUAL_REPOSITORY A virtual repository to serve artifacts from one or more sources.
REMOTE_REPOSITORY A remote repository to serve artifacts from a remote source.

Methods

create

Creates a repository.

delete

Deletes a repository and all of its contents.

get

Gets a repository.

getIamPolicy

Gets the IAM policy for a given resource.

list

Lists repositories.

patch

Updates a repository.

setIamPolicy

Updates the IAM policy for a given resource.

testIamPermissions

Tests if the caller has a list of permissions on a resource.