---
title: "POST /v1/{+parent}/repositories"
method: POST
path: "/v1/{+parent}/repositories"
tags: ["projects"]
---

# POST /v1/{+parent}/repositories

`POST /v1/{+parent}/repositories`

Creates a repository. The returned Operation will finish once the repository has been created. Its response will be the created Repository.

## Path parameters

- `parent` string, required

## Query parameters

- `repositoryId` string

## Request body

- Repository — A Repository for storing artifacts with a specific format.
  - `mavenConfig` MavenRepositoryConfig — MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type.
    - `allowSnapshotOverwrites` boolean — The repository with this flag will allow publishing the same snapshot versions.
    - `versionPolicy` 'VERSION_POLICY_UNSPECIFIED' | 'RELEASE' | 'SNAPSHOT' — Version policy defines the versions that the registry will accept.
  - `description` string — The user-provided description of the repository.
  - `mode` 'MODE_UNSPECIFIED' | 'STANDARD_REPOSITORY' | 'VIRTUAL_REPOSITORY' | 'REMOTE_REPOSITORY' | 'AOSS_REPOSITORY' | 'ASSURED_OSS_REPOSITORY' — Optional. The mode of the repository.
  - `platformLogsConfig` PlatformLogsConfig — The platform logs config for a project or a repository.
    - `loggingState` 'LOGGING_STATE_UNSPECIFIED' | 'ENABLED' | 'DISABLED' — Optional. The state of the platform logs: enabled or disabled.
    - `severityLevel` 'SEVERITY_LEVEL_UNSPECIFIED' | 'DEBUG' | 'INFO' | 'NOTICE' | 'WARNING' | 'ERROR' | 'CRITICAL' | 'ALERT' | 'EMERGENCY' — Optional. The severity level for the logs. Logs will be generated if their severity level is >= than the value of the severity level mentioned here.
  - `dockerConfig` DockerRepositoryConfig — DockerRepositoryConfig is docker related repository details. Provides additional configuration details for repositories of the docker format type.
    - `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.
  - `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.
  - `disallowUnspecifiedMode` boolean — Optional. If this is true, an unspecified repo type will be treated as error rather than defaulting to standard.
  - `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.
  - `format` 'FORMAT_UNSPECIFIED' | 'DOCKER' | 'MAVEN' | 'NPM' | 'APT' | 'YUM' | 'GOOGET' | 'PYTHON' | 'KFP' | 'GO' | 'GENERIC' | 'RUBY' — Optional. The format of packages that are stored in 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.
  - `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.
  - `createTime` string, google-datetime — Output only. The time when the repository was created.
  - `virtualRepositoryConfig` VirtualRepositoryConfig — Virtual repository configuration.
    - `upstreamPolicies` UpstreamPolicy[] — Policies that configure the upstream artifacts distributed by the Virtual Repository. Upstream policies cannot be set on a standard repository.
      - `id` string — The user-provided ID of the upstream policy.
      - `priority` integer — Entries with a greater priority value take precedence in the pull order.
      - `repository` string — A reference to the repository resource, for example: `projects/p1/locations/us-central1/repositories/repo1`.
  - `registryUri` string — Output only. The repository endpoint, for example: `us-docker.pkg.dev/my-proj/my-repo`.
  - `satisfiesPzi` boolean — Output only. Whether or not this repository satisfies PZI.
  - `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.
  - `remoteRepositoryConfig` RemoteRepositoryConfig — Remote repository configuration.
    - `commonRepository` CommonRemoteRepository — Common remote repository settings type.
      - `uri` string — Required. A common public repository base for remote repository.
    - `description` string — The description of the remote source.
    - `aptRepository` AptRepository — Configuration for an Apt remote repository.
      - `customRepository` GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryCustomRepository — Customer-specified publicly available remote repository.
        - `uri` string — An http/https uri reference to the upstream remote repository, for ex: "https://my.apt.registry/".
      - `publicRepository` GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigAptRepositoryPublicRepository — Publicly available Apt repositories constructed from a common repository base and a custom repository path.
        - `repositoryBase` 'REPOSITORY_BASE_UNSPECIFIED' | 'DEBIAN' | 'UBUNTU' | 'DEBIAN_SNAPSHOT' — A common public repository base for Apt.
        - `repositoryPath` string — A custom field to define a path to a specific repository from the base.
    - `disableUpstreamValidation` boolean — Input only. A create/update remote repo option to avoid making a HEAD/GET request to validate a remote repo and any supplied upstream credentials.
    - `mavenRepository` MavenRepository — Configuration for a Maven remote repository.
      - `customRepository` GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigMavenRepositoryCustomRepository — Customer-specified publicly available remote repository.
        - `uri` string — An http/https uri reference to the upstream remote repository, for ex: "https://my.maven.registry/".
      - `publicRepository` 'PUBLIC_REPOSITORY_UNSPECIFIED' | 'MAVEN_CENTRAL' — One of the publicly available Maven repositories supported by Artifact Registry.
    - `pythonRepository` PythonRepository — Configuration for a Python remote repository.
      - `publicRepository` 'PUBLIC_REPOSITORY_UNSPECIFIED' | 'PYPI' — One of the publicly available Python repositories supported by Artifact Registry.
      - `customRepository` GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigPythonRepositoryCustomRepository — Customer-specified publicly available remote repository.
        - `uri` string — An http/https uri reference to the upstream remote repository, for ex: "https://my.python.registry/".
    - `yumRepository` YumRepository — Configuration for a Yum remote repository.
      - `customRepository` GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryCustomRepository — Customer-specified publicly available remote repository.
        - `uri` string — An http/https uri reference to the upstream remote repository, for ex: "https://my.yum.registry/".
      - `publicRepository` GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigYumRepositoryPublicRepository — Publicly available Yum repositories constructed from a common repository base and a custom repository path.
        - `repositoryBase` 'REPOSITORY_BASE_UNSPECIFIED' | 'CENTOS' | 'CENTOS_DEBUG' | 'CENTOS_VAULT' | 'CENTOS_STREAM' | 'ROCKY' | 'EPEL' — A common public repository base for Yum.
        - `repositoryPath` string — A custom field to define a path to a specific repository from the base.
    - `dockerRepository` DockerRepository — Configuration for a Docker remote repository.
      - `publicRepository` 'PUBLIC_REPOSITORY_UNSPECIFIED' | 'DOCKER_HUB' — One of the publicly available Docker repositories supported by Artifact Registry.
      - `customRepository` GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigDockerRepositoryCustomRepository — Customer-specified publicly available remote repository.
        - `uri` string — An http/https uri reference to the custom remote repository, for ex: "https://registry-1.docker.io".
    - `upstreamCredentials` UpstreamCredentials — The credentials to access the remote repository.
      - `usernamePasswordCredentials` UsernamePasswordCredentials — Username and password credentials.
        - `username` string — The username to access the remote repository.
        - `passwordSecretVersion` string — The Secret Manager key version that holds the password to access the remote repository. Must be in the format of `projects/{project}/secrets/{secret}/versions/{version}`.
    - `npmRepository` NpmRepository — Configuration for a Npm remote repository.
      - `publicRepository` 'PUBLIC_REPOSITORY_UNSPECIFIED' | 'NPMJS' — One of the publicly available Npm repositories supported by Artifact Registry.
      - `customRepository` GoogleDevtoolsArtifactregistryV1RemoteRepositoryConfigNpmRepositoryCustomRepository — Customer-specified publicly available remote repository.
        - `uri` string — An http/https uri reference to the upstream remote repository, for ex: "https://my.npm.registry/".
  - `updateTime` string, google-datetime — Output only. The time when the repository was last updated.
  - `cleanupPolicyDryRun` boolean — Optional. If true, the cleanup pipeline is prevented from deleting versions in this repository.
  - `satisfiesPzs` boolean — Output only. Whether or not this repository satisfies PZS.
  - `vulnerabilityScanningConfig` VulnerabilityScanningConfig — Config on whether to perform vulnerability scanning for resources in this repository, as well as output fields describing current state.
    - `lastEnableTime` string, google-datetime — Output only. The last time this repository config was enabled.
    - `enablementConfig` 'ENABLEMENT_CONFIG_UNSPECIFIED' | 'INHERITED' | 'DISABLED' — Optional. Config for whether this repository has vulnerability scanning disabled.
    - `enablementState` 'ENABLEMENT_STATE_UNSPECIFIED' | 'SCANNING_UNSUPPORTED' | 'SCANNING_DISABLED' | 'SCANNING_ACTIVE' — Output only. State of feature enablement, combining repository enablement config and API enablement state.
    - `enablementStateReason` string — Output only. Reason for the repository state.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/artifactregistry.md) · [All operations](https://skmtc.net/google/apis/artifactregistry/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/artifactregistry/revisions/ab5639c979b9/schema)
