repositories
Creates, updates, deletes, gets or lists a repositories
resource.
Overview
Name | repositories |
Type | Resource |
Id | google.artifactregistry.repositories |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The name of the repository, for example: projects/p1/locations/us-central1/repositories/repo1 . For each location in a project, repository names must be unique. |
cleanupPolicies | object | Optional. Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. |
cleanupPolicyDryRun | boolean | Optional. If true, the cleanup pipeline is prevented from deleting versions in this repository. |
createTime | string (google-datetime) | Output only. The time when the repository was created. |
description | string | The user-provided description of the repository. |
disallowUnspecifiedMode | boolean | Optional. If this is true, an unspecified repo type will be treated as error rather than defaulting to standard. |
dockerConfig | object | Docker repository config contains repository level configuration for the repositories of docker type. (id: DockerRepositoryConfig) |
format | string | Optional. The format of packages that are stored in the repository. |
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. |
labels | object | 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. |
mavenConfig | object | Maven repository config contains repository level configuration for the repositories of maven type. (id: MavenRepositoryConfig) |
mode | string | Optional. The mode of the repository. |
registryUri | string | Output only. The repository endpoint, for example: us-docker.pkg.dev/my-proj/my-repo . |
remoteRepositoryConfig | object | Configuration specific for a Remote Repository. (id: RemoteRepositoryConfig) |
satisfiesPzi | boolean | Output only. Whether or not this repository satisfies PZI. |
satisfiesPzs | boolean | Output only. Whether or not this repository satisfies PZS. |
sizeBytes | string (int64) | 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. |
updateTime | string (google-datetime) | Output only. The time when the repository was last updated. |
virtualRepositoryConfig | object | Configuration specific for a Virtual Repository. (id: VirtualRepositoryConfig) |
vulnerabilityScanningConfig | object | Optional. Config and state for vulnerability scanning of resources within this Repository. (id: VulnerabilityScanningConfig) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The name of the repository, for example: projects/p1/locations/us-central1/repositories/repo1 . For each location in a project, repository names must be unique. |
cleanupPolicies | object | Optional. Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. |
cleanupPolicyDryRun | boolean | Optional. If true, the cleanup pipeline is prevented from deleting versions in this repository. |
createTime | string (google-datetime) | Output only. The time when the repository was created. |
description | string | The user-provided description of the repository. |
disallowUnspecifiedMode | boolean | Optional. If this is true, an unspecified repo type will be treated as error rather than defaulting to standard. |
dockerConfig | object | Docker repository config contains repository level configuration for the repositories of docker type. (id: DockerRepositoryConfig) |
format | string | Optional. The format of packages that are stored in the repository. |
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. |
labels | object | 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. |
mavenConfig | object | Maven repository config contains repository level configuration for the repositories of maven type. (id: MavenRepositoryConfig) |
mode | string | Optional. The mode of the repository. |
registryUri | string | Output only. The repository endpoint, for example: us-docker.pkg.dev/my-proj/my-repo . |
remoteRepositoryConfig | object | Configuration specific for a Remote Repository. (id: RemoteRepositoryConfig) |
satisfiesPzi | boolean | Output only. Whether or not this repository satisfies PZI. |
satisfiesPzs | boolean | Output only. Whether or not this repository satisfies PZS. |
sizeBytes | string (int64) | 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. |
updateTime | string (google-datetime) | Output only. The time when the repository was last updated. |
virtualRepositoryConfig | object | Configuration specific for a Virtual Repository. (id: VirtualRepositoryConfig) |
vulnerabilityScanningConfig | object | Optional. Config and state for vulnerability scanning of resources within this Repository. (id: VulnerabilityScanningConfig) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , repositoriesId | Gets a repository. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter , orderBy | Lists repositories. |
create | insert | projectsId , locationsId | repositoryId | Creates a repository. The returned Operation will finish once the repository has been created. Its response will be the created Repository. |
patch | update | projectsId , locationsId , repositoriesId | updateMask | Updates a repository. |
delete | delete | projectsId , locationsId , repositoriesId | Deletes a repository and all of its contents. The returned Operation will finish once the repository has been deleted. It will not have any Operation metadata and will return a google.protobuf.Empty response. |
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.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
repositoriesId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
repositoryId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets a repository.
SELECT
name,
cleanupPolicies,
cleanupPolicyDryRun,
createTime,
description,
disallowUnspecifiedMode,
dockerConfig,
format,
kmsKeyName,
labels,
mavenConfig,
mode,
registryUri,
remoteRepositoryConfig,
satisfiesPzi,
satisfiesPzs,
sizeBytes,
updateTime,
virtualRepositoryConfig,
vulnerabilityScanningConfig
FROM google.artifactregistry.repositories
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND repositoriesId = '{{ repositoriesId }}' -- required;
Lists repositories.
SELECT
name,
cleanupPolicies,
cleanupPolicyDryRun,
createTime,
description,
disallowUnspecifiedMode,
dockerConfig,
format,
kmsKeyName,
labels,
mavenConfig,
mode,
registryUri,
remoteRepositoryConfig,
satisfiesPzi,
satisfiesPzs,
sizeBytes,
updateTime,
virtualRepositoryConfig,
vulnerabilityScanningConfig
FROM google.artifactregistry.repositories
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a repository. The returned Operation will finish once the repository has been created. Its response will be the created Repository.
INSERT INTO google.artifactregistry.repositories (
data__mavenConfig,
data__dockerConfig,
data__virtualRepositoryConfig,
data__remoteRepositoryConfig,
data__name,
data__format,
data__description,
data__labels,
data__kmsKeyName,
data__mode,
data__cleanupPolicies,
data__cleanupPolicyDryRun,
data__vulnerabilityScanningConfig,
data__disallowUnspecifiedMode,
projectsId,
locationsId,
repositoryId
)
SELECT
'{{ mavenConfig }}',
'{{ dockerConfig }}',
'{{ virtualRepositoryConfig }}',
'{{ remoteRepositoryConfig }}',
'{{ name }}',
'{{ format }}',
'{{ description }}',
'{{ labels }}',
'{{ kmsKeyName }}',
'{{ mode }}',
'{{ cleanupPolicies }}',
{{ cleanupPolicyDryRun }},
'{{ vulnerabilityScanningConfig }}',
{{ disallowUnspecifiedMode }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ repositoryId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: repositories
props:
- name: projectsId
value: string
description: Required parameter for the repositories resource.
- name: locationsId
value: string
description: Required parameter for the repositories resource.
- name: mavenConfig
value: object
description: >
Maven repository config contains repository level configuration for the repositories of maven type.
- name: dockerConfig
value: object
description: >
Docker repository config contains repository level configuration for the repositories of docker type.
- name: virtualRepositoryConfig
value: object
description: >
Configuration specific for a Virtual Repository.
- name: remoteRepositoryConfig
value: object
description: >
Configuration specific for a Remote Repository.
- name: name
value: string
description: >
The name of the repository, for example: `projects/p1/locations/us-central1/repositories/repo1`. For each location in a project, repository names must be unique.
- name: format
value: string
description: >
Optional. The format of packages that are stored in the repository.
valid_values: ['FORMAT_UNSPECIFIED', 'DOCKER', 'MAVEN', 'NPM', 'APT', 'YUM', 'GOOGET', 'PYTHON', 'KFP', 'GO', 'GENERIC']
- name: description
value: string
description: >
The user-provided description of the repository.
- name: labels
value: object
description: >
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.
- name: kmsKeyName
value: string
description: >
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.
- name: mode
value: string
description: >
Optional. The mode of the repository.
valid_values: ['MODE_UNSPECIFIED', 'STANDARD_REPOSITORY', 'VIRTUAL_REPOSITORY', 'REMOTE_REPOSITORY', 'AOSS_REPOSITORY', 'ASSURED_OSS_REPOSITORY']
- name: cleanupPolicies
value: object
description: >
Optional. Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length.
- name: cleanupPolicyDryRun
value: boolean
description: >
Optional. If true, the cleanup pipeline is prevented from deleting versions in this repository.
- name: vulnerabilityScanningConfig
value: object
description: >
Optional. Config and state for vulnerability scanning of resources within this Repository.
- name: disallowUnspecifiedMode
value: boolean
description: >
Optional. If this is true, an unspecified repo type will be treated as error rather than defaulting to standard.
- name: repositoryId
value: string
UPDATE
examples
- patch
Updates a repository.
UPDATE google.artifactregistry.repositories
SET
data__mavenConfig = '{{ mavenConfig }}',
data__dockerConfig = '{{ dockerConfig }}',
data__virtualRepositoryConfig = '{{ virtualRepositoryConfig }}',
data__remoteRepositoryConfig = '{{ remoteRepositoryConfig }}',
data__name = '{{ name }}',
data__format = '{{ format }}',
data__description = '{{ description }}',
data__labels = '{{ labels }}',
data__kmsKeyName = '{{ kmsKeyName }}',
data__mode = '{{ mode }}',
data__cleanupPolicies = '{{ cleanupPolicies }}',
data__cleanupPolicyDryRun = {{ cleanupPolicyDryRun }},
data__vulnerabilityScanningConfig = '{{ vulnerabilityScanningConfig }}',
data__disallowUnspecifiedMode = {{ disallowUnspecifiedMode }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND repositoriesId = '{{ repositoriesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
cleanupPolicies,
cleanupPolicyDryRun,
createTime,
description,
disallowUnspecifiedMode,
dockerConfig,
format,
kmsKeyName,
labels,
mavenConfig,
mode,
registryUri,
remoteRepositoryConfig,
satisfiesPzi,
satisfiesPzs,
sizeBytes,
updateTime,
virtualRepositoryConfig,
vulnerabilityScanningConfig;
DELETE
examples
- delete
Deletes a repository and all of its contents. The returned Operation will finish once the repository has been deleted. It will not have any Operation metadata and will return a google.protobuf.Empty response.
DELETE FROM google.artifactregistry.repositories
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND repositoriesId = '{{ repositoriesId }}' --required;