repositories
Creates, updates, deletes, gets or lists a repositories
resource.
Overview
Name | repositories |
Type | Resource |
Id | google.artifactregistry.repositories |
Fields
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. |
description | string | The user-provided description of the repository. |
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 | Output only. The time when the repository was created. |
disallowUnspecifiedMode | boolean | Optional. If this is true, an unspecified repo type will be treated as error rather than defaulting to standard. |
dockerConfig | object | DockerRepositoryConfig is docker related repository details. Provides additional configuration details for repositories of the docker format type. |
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 | MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. |
mode | string | Optional. The mode of the repository. |
remoteRepositoryConfig | object | Remote repository configuration. |
satisfiesPzi | boolean | Output only. If set, the repository satisfies physical zone isolation. |
satisfiesPzs | boolean | Output only. If set, the repository satisfies physical zone separation. |
sizeBytes | string | 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 | Output only. The time when the repository was last updated. |
virtualRepositoryConfig | object | Virtual repository configuration. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | locationsId, projectsId, repositoriesId | Gets a repository. |
list | SELECT | locationsId, projectsId | Lists repositories. |
create | INSERT | locationsId, projectsId | Creates a repository. The returned Operation will finish once the repository has been created. Its response will be the created Repository. |
delete | DELETE | locationsId, projectsId, 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. |
patch | UPDATE | locationsId, projectsId, repositoriesId | Updates a repository. |
SELECT
examples
Lists repositories.
SELECT
name,
description,
cleanupPolicies,
cleanupPolicyDryRun,
createTime,
disallowUnspecifiedMode,
dockerConfig,
format,
kmsKeyName,
labels,
mavenConfig,
mode,
remoteRepositoryConfig,
satisfiesPzi,
satisfiesPzs,
sizeBytes,
updateTime,
virtualRepositoryConfig
FROM google.artifactregistry.repositories
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new repositories
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.artifactregistry.repositories (
locationsId,
projectsId,
mavenConfig,
dockerConfig,
virtualRepositoryConfig,
remoteRepositoryConfig,
name,
format,
description,
labels,
kmsKeyName,
mode,
cleanupPolicies,
cleanupPolicyDryRun,
disallowUnspecifiedMode
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ mavenConfig }}',
'{{ dockerConfig }}',
'{{ virtualRepositoryConfig }}',
'{{ remoteRepositoryConfig }}',
'{{ name }}',
'{{ format }}',
'{{ description }}',
'{{ labels }}',
'{{ kmsKeyName }}',
'{{ mode }}',
'{{ cleanupPolicies }}',
{{ cleanupPolicyDryRun }},
{{ disallowUnspecifiedMode }}
;
- name: your_resource_model_name
props:
- name: mavenConfig
value:
- name: allowSnapshotOverwrites
value: boolean
- name: versionPolicy
value: string
- name: dockerConfig
value:
- name: immutableTags
value: boolean
- name: virtualRepositoryConfig
value:
- name: upstreamPolicies
value:
- - name: id
value: string
- name: repository
value: string
- name: priority
value: integer
- name: remoteRepositoryConfig
value:
- name: dockerRepository
value:
- name: publicRepository
value: string
- name: customRepository
value:
- name: uri
value: string
- name: mavenRepository
value:
- name: publicRepository
value: string
- name: customRepository
value:
- name: uri
value: string
- name: npmRepository
value:
- name: publicRepository
value: string
- name: customRepository
value:
- name: uri
value: string
- name: pythonRepository
value:
- name: publicRepository
value: string
- name: customRepository
value:
- name: uri
value: string
- name: aptRepository
value:
- name: publicRepository
value:
- name: repositoryBase
value: string
- name: repositoryPath
value: string
- name: customRepository
value:
- name: uri
value: string
- name: yumRepository
value:
- name: publicRepository
value:
- name: repositoryBase
value: string
- name: repositoryPath
value: string
- name: customRepository
value:
- name: uri
value: string
- name: commonRepository
value:
- name: uri
value: string
- name: description
value: string
- name: upstreamCredentials
value:
- name: usernamePasswordCredentials
value:
- name: username
value: string
- name: passwordSecretVersion
value: string
- name: disableUpstreamValidation
value: boolean
- name: name
value: string
- name: format
value: string
- name: description
value: string
- name: labels
value: object
- name: createTime
value: string
- name: updateTime
value: string
- name: kmsKeyName
value: string
- name: mode
value: string
- name: cleanupPolicies
value: object
- name: sizeBytes
value: string
- name: satisfiesPzs
value: boolean
- name: cleanupPolicyDryRun
value: boolean
- name: disallowUnspecifiedMode
value: boolean
- name: satisfiesPzi
value: boolean
UPDATE
example
Updates a repositories
resource.
/*+ update */
UPDATE google.artifactregistry.repositories
SET
mavenConfig = '{{ mavenConfig }}',
dockerConfig = '{{ dockerConfig }}',
virtualRepositoryConfig = '{{ virtualRepositoryConfig }}',
remoteRepositoryConfig = '{{ remoteRepositoryConfig }}',
name = '{{ name }}',
format = '{{ format }}',
description = '{{ description }}',
labels = '{{ labels }}',
kmsKeyName = '{{ kmsKeyName }}',
mode = '{{ mode }}',
cleanupPolicies = '{{ cleanupPolicies }}',
cleanupPolicyDryRun = true|false,
disallowUnspecifiedMode = true|false
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND repositoriesId = '{{ repositoriesId }}';
DELETE
example
Deletes the specified repositories
resource.
/*+ delete */
DELETE FROM google.artifactregistry.repositories
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND repositoriesId = '{{ repositoriesId }}';