1. Packages
  2. Google Cloud Native
  3. API Docs
  4. artifactregistry
  5. artifactregistry/v1beta2
  6. Repository

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.artifactregistry/v1beta2.Repository

Explore with Pulumi AI

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

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

Create Repository Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Repository(name: string, args: RepositoryArgs, opts?: CustomResourceOptions);
@overload
def Repository(resource_name: str,
               args: RepositoryArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def Repository(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               repository_id: Optional[str] = None,
               description: Optional[str] = None,
               format: Optional[RepositoryFormat] = None,
               kms_key_name: Optional[str] = None,
               labels: Optional[Mapping[str, str]] = None,
               location: Optional[str] = None,
               maven_config: Optional[MavenRepositoryConfigArgs] = None,
               name: Optional[str] = None,
               project: Optional[str] = None)
func NewRepository(ctx *Context, name string, args RepositoryArgs, opts ...ResourceOption) (*Repository, error)
public Repository(string name, RepositoryArgs args, CustomResourceOptions? opts = null)
public Repository(String name, RepositoryArgs args)
public Repository(String name, RepositoryArgs args, CustomResourceOptions options)
type: google-native:artifactregistry/v1beta2:Repository
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RepositoryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RepositoryArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RepositoryArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RepositoryArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RepositoryArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var examplerepositoryResourceResourceFromArtifactregistryv1beta2 = new GoogleNative.ArtifactRegistry.V1Beta2.Repository("examplerepositoryResourceResourceFromArtifactregistryv1beta2", new()
{
    RepositoryId = "string",
    Description = "string",
    Format = GoogleNative.ArtifactRegistry.V1Beta2.RepositoryFormat.FormatUnspecified,
    KmsKeyName = "string",
    Labels = 
    {
        { "string", "string" },
    },
    Location = "string",
    MavenConfig = new GoogleNative.ArtifactRegistry.V1Beta2.Inputs.MavenRepositoryConfigArgs
    {
        AllowSnapshotOverwrites = false,
        VersionPolicy = GoogleNative.ArtifactRegistry.V1Beta2.MavenRepositoryConfigVersionPolicy.VersionPolicyUnspecified,
    },
    Name = "string",
    Project = "string",
});
Copy
example, err := artifactregistryv1beta2.NewRepository(ctx, "examplerepositoryResourceResourceFromArtifactregistryv1beta2", &artifactregistryv1beta2.RepositoryArgs{
	RepositoryId: pulumi.String("string"),
	Description:  pulumi.String("string"),
	Format:       artifactregistryv1beta2.RepositoryFormatFormatUnspecified,
	KmsKeyName:   pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Location: pulumi.String("string"),
	MavenConfig: &artifactregistry.MavenRepositoryConfigArgs{
		AllowSnapshotOverwrites: pulumi.Bool(false),
		VersionPolicy:           artifactregistryv1beta2.MavenRepositoryConfigVersionPolicyVersionPolicyUnspecified,
	},
	Name:    pulumi.String("string"),
	Project: pulumi.String("string"),
})
Copy
var examplerepositoryResourceResourceFromArtifactregistryv1beta2 = new Repository("examplerepositoryResourceResourceFromArtifactregistryv1beta2", RepositoryArgs.builder()
    .repositoryId("string")
    .description("string")
    .format("FORMAT_UNSPECIFIED")
    .kmsKeyName("string")
    .labels(Map.of("string", "string"))
    .location("string")
    .mavenConfig(MavenRepositoryConfigArgs.builder()
        .allowSnapshotOverwrites(false)
        .versionPolicy("VERSION_POLICY_UNSPECIFIED")
        .build())
    .name("string")
    .project("string")
    .build());
Copy
examplerepository_resource_resource_from_artifactregistryv1beta2 = google_native.artifactregistry.v1beta2.Repository("examplerepositoryResourceResourceFromArtifactregistryv1beta2",
    repository_id="string",
    description="string",
    format=google_native.artifactregistry.v1beta2.RepositoryFormat.FORMAT_UNSPECIFIED,
    kms_key_name="string",
    labels={
        "string": "string",
    },
    location="string",
    maven_config={
        "allow_snapshot_overwrites": False,
        "version_policy": google_native.artifactregistry.v1beta2.MavenRepositoryConfigVersionPolicy.VERSION_POLICY_UNSPECIFIED,
    },
    name="string",
    project="string")
Copy
const examplerepositoryResourceResourceFromArtifactregistryv1beta2 = new google_native.artifactregistry.v1beta2.Repository("examplerepositoryResourceResourceFromArtifactregistryv1beta2", {
    repositoryId: "string",
    description: "string",
    format: google_native.artifactregistry.v1beta2.RepositoryFormat.FormatUnspecified,
    kmsKeyName: "string",
    labels: {
        string: "string",
    },
    location: "string",
    mavenConfig: {
        allowSnapshotOverwrites: false,
        versionPolicy: google_native.artifactregistry.v1beta2.MavenRepositoryConfigVersionPolicy.VersionPolicyUnspecified,
    },
    name: "string",
    project: "string",
});
Copy
type: google-native:artifactregistry/v1beta2:Repository
properties:
    description: string
    format: FORMAT_UNSPECIFIED
    kmsKeyName: string
    labels:
        string: string
    location: string
    mavenConfig:
        allowSnapshotOverwrites: false
        versionPolicy: VERSION_POLICY_UNSPECIFIED
    name: string
    project: string
    repositoryId: string
Copy

Repository Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Repository resource accepts the following input properties:

RepositoryId
This property is required.
Changes to this property will trigger replacement.
string
Required. The repository id to use for this repository.
Description string
The user-provided description of the repository.
Format Pulumi.GoogleNative.ArtifactRegistry.V1Beta2.RepositoryFormat
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 Dictionary<string, 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.
Location Changes to this property will trigger replacement. string
MavenConfig Pulumi.GoogleNative.ArtifactRegistry.V1Beta2.Inputs.MavenRepositoryConfig
Maven repository config contains repository level configuration for the repositories of maven type.
Name string
The name of the repository, for example: projects/p1/locations/us-central1/repositories/repo1.
Project Changes to this property will trigger replacement. string
RepositoryId
This property is required.
Changes to this property will trigger replacement.
string
Required. The repository id to use for this repository.
Description string
The user-provided description of the repository.
Format RepositoryFormat
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 map[string]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.
Location Changes to this property will trigger replacement. string
MavenConfig MavenRepositoryConfigArgs
Maven repository config contains repository level configuration for the repositories of maven type.
Name string
The name of the repository, for example: projects/p1/locations/us-central1/repositories/repo1.
Project Changes to this property will trigger replacement. string
repositoryId
This property is required.
Changes to this property will trigger replacement.
String
Required. The repository id to use for this repository.
description String
The user-provided description of the repository.
format RepositoryFormat
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 Map<String,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.
location Changes to this property will trigger replacement. String
mavenConfig MavenRepositoryConfig
Maven repository config contains repository level configuration for the repositories of maven type.
name String
The name of the repository, for example: projects/p1/locations/us-central1/repositories/repo1.
project Changes to this property will trigger replacement. String
repositoryId
This property is required.
Changes to this property will trigger replacement.
string
Required. The repository id to use for this repository.
description string
The user-provided description of the repository.
format RepositoryFormat
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 {[key: string]: 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.
location Changes to this property will trigger replacement. string
mavenConfig MavenRepositoryConfig
Maven repository config contains repository level configuration for the repositories of maven type.
name string
The name of the repository, for example: projects/p1/locations/us-central1/repositories/repo1.
project Changes to this property will trigger replacement. string
repository_id
This property is required.
Changes to this property will trigger replacement.
str
Required. The repository id to use for this repository.
description str
The user-provided description of the repository.
format RepositoryFormat
Optional. The format of packages that are stored in the repository.
kms_key_name str
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 Mapping[str, str]
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.
location Changes to this property will trigger replacement. str
maven_config MavenRepositoryConfigArgs
Maven repository config contains repository level configuration for the repositories of maven type.
name str
The name of the repository, for example: projects/p1/locations/us-central1/repositories/repo1.
project Changes to this property will trigger replacement. str
repositoryId
This property is required.
Changes to this property will trigger replacement.
String
Required. The repository id to use for this repository.
description String
The user-provided description of the repository.
format "FORMAT_UNSPECIFIED" | "DOCKER" | "MAVEN" | "NPM" | "APT" | "YUM" | "GOOGET" | "PYTHON"
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 Map<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.
location Changes to this property will trigger replacement. String
mavenConfig Property Map
Maven repository config contains repository level configuration for the repositories of maven type.
name String
The name of the repository, for example: projects/p1/locations/us-central1/repositories/repo1.
project Changes to this property will trigger replacement. String

Outputs

All input properties are implicitly available as output properties. Additionally, the Repository resource produces the following output properties:

CreateTime string
The time when the repository was created.
Id string
The provider-assigned unique ID for this managed resource.
SatisfiesPzs bool
If set, the repository satisfies physical zone separation.
SizeBytes string
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
The time when the repository was last updated.
CreateTime string
The time when the repository was created.
Id string
The provider-assigned unique ID for this managed resource.
SatisfiesPzs bool
If set, the repository satisfies physical zone separation.
SizeBytes string
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
The time when the repository was last updated.
createTime String
The time when the repository was created.
id String
The provider-assigned unique ID for this managed resource.
satisfiesPzs Boolean
If set, the repository satisfies physical zone separation.
sizeBytes String
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
The time when the repository was last updated.
createTime string
The time when the repository was created.
id string
The provider-assigned unique ID for this managed resource.
satisfiesPzs boolean
If set, the repository satisfies physical zone separation.
sizeBytes string
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
The time when the repository was last updated.
create_time str
The time when the repository was created.
id str
The provider-assigned unique ID for this managed resource.
satisfies_pzs bool
If set, the repository satisfies physical zone separation.
size_bytes str
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.
update_time str
The time when the repository was last updated.
createTime String
The time when the repository was created.
id String
The provider-assigned unique ID for this managed resource.
satisfiesPzs Boolean
If set, the repository satisfies physical zone separation.
sizeBytes String
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
The time when the repository was last updated.

Supporting Types

MavenRepositoryConfig
, MavenRepositoryConfigArgs

AllowSnapshotOverwrites bool
The repository with this flag will allow publishing the same snapshot versions.
VersionPolicy Pulumi.GoogleNative.ArtifactRegistry.V1Beta2.MavenRepositoryConfigVersionPolicy
Version policy defines the versions that the registry will accept.
AllowSnapshotOverwrites bool
The repository with this flag will allow publishing the same snapshot versions.
VersionPolicy MavenRepositoryConfigVersionPolicy
Version policy defines the versions that the registry will accept.
allowSnapshotOverwrites Boolean
The repository with this flag will allow publishing the same snapshot versions.
versionPolicy MavenRepositoryConfigVersionPolicy
Version policy defines the versions that the registry will accept.
allowSnapshotOverwrites boolean
The repository with this flag will allow publishing the same snapshot versions.
versionPolicy MavenRepositoryConfigVersionPolicy
Version policy defines the versions that the registry will accept.
allow_snapshot_overwrites bool
The repository with this flag will allow publishing the same snapshot versions.
version_policy MavenRepositoryConfigVersionPolicy
Version policy defines the versions that the registry will accept.
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.

MavenRepositoryConfigResponse
, MavenRepositoryConfigResponseArgs

AllowSnapshotOverwrites This property is required. bool
The repository with this flag will allow publishing the same snapshot versions.
VersionPolicy This property is required. string
Version policy defines the versions that the registry will accept.
AllowSnapshotOverwrites This property is required. bool
The repository with this flag will allow publishing the same snapshot versions.
VersionPolicy This property is required. string
Version policy defines the versions that the registry will accept.
allowSnapshotOverwrites This property is required. Boolean
The repository with this flag will allow publishing the same snapshot versions.
versionPolicy This property is required. String
Version policy defines the versions that the registry will accept.
allowSnapshotOverwrites This property is required. boolean
The repository with this flag will allow publishing the same snapshot versions.
versionPolicy This property is required. string
Version policy defines the versions that the registry will accept.
allow_snapshot_overwrites This property is required. bool
The repository with this flag will allow publishing the same snapshot versions.
version_policy This property is required. str
Version policy defines the versions that the registry will accept.
allowSnapshotOverwrites This property is required. Boolean
The repository with this flag will allow publishing the same snapshot versions.
versionPolicy This property is required. String
Version policy defines the versions that the registry will accept.

MavenRepositoryConfigVersionPolicy
, MavenRepositoryConfigVersionPolicyArgs

VersionPolicyUnspecified
VERSION_POLICY_UNSPECIFIEDVERSION_POLICY_UNSPECIFIED - the version policy is not defined. When the version policy is not defined, no validation is performed for the versions.
Release
RELEASERELEASE - repository will accept only Release versions.
Snapshot
SNAPSHOTSNAPSHOT - repository will accept only Snapshot versions.
MavenRepositoryConfigVersionPolicyVersionPolicyUnspecified
VERSION_POLICY_UNSPECIFIEDVERSION_POLICY_UNSPECIFIED - the version policy is not defined. When the version policy is not defined, no validation is performed for the versions.
MavenRepositoryConfigVersionPolicyRelease
RELEASERELEASE - repository will accept only Release versions.
MavenRepositoryConfigVersionPolicySnapshot
SNAPSHOTSNAPSHOT - repository will accept only Snapshot versions.
VersionPolicyUnspecified
VERSION_POLICY_UNSPECIFIEDVERSION_POLICY_UNSPECIFIED - the version policy is not defined. When the version policy is not defined, no validation is performed for the versions.
Release
RELEASERELEASE - repository will accept only Release versions.
Snapshot
SNAPSHOTSNAPSHOT - repository will accept only Snapshot versions.
VersionPolicyUnspecified
VERSION_POLICY_UNSPECIFIEDVERSION_POLICY_UNSPECIFIED - the version policy is not defined. When the version policy is not defined, no validation is performed for the versions.
Release
RELEASERELEASE - repository will accept only Release versions.
Snapshot
SNAPSHOTSNAPSHOT - repository will accept only Snapshot versions.
VERSION_POLICY_UNSPECIFIED
VERSION_POLICY_UNSPECIFIEDVERSION_POLICY_UNSPECIFIED - the version policy is not defined. When the version policy is not defined, no validation is performed for the versions.
RELEASE
RELEASERELEASE - repository will accept only Release versions.
SNAPSHOT
SNAPSHOTSNAPSHOT - repository will accept only Snapshot versions.
"VERSION_POLICY_UNSPECIFIED"
VERSION_POLICY_UNSPECIFIEDVERSION_POLICY_UNSPECIFIED - the version policy is not defined. When the version policy is not defined, no validation is performed for the versions.
"RELEASE"
RELEASERELEASE - repository will accept only Release versions.
"SNAPSHOT"
SNAPSHOTSNAPSHOT - repository will accept only Snapshot versions.

RepositoryFormat
, RepositoryFormatArgs

FormatUnspecified
FORMAT_UNSPECIFIEDUnspecified package format.
Docker
DOCKERDocker package format.
Maven
MAVENMaven package format.
Npm
NPMNPM package format.
Apt
APTAPT package format.
Yum
YUMYUM package format.
Googet
GOOGETGooGet package format.
Python
PYTHONPython package format.
RepositoryFormatFormatUnspecified
FORMAT_UNSPECIFIEDUnspecified package format.
RepositoryFormatDocker
DOCKERDocker package format.
RepositoryFormatMaven
MAVENMaven package format.
RepositoryFormatNpm
NPMNPM package format.
RepositoryFormatApt
APTAPT package format.
RepositoryFormatYum
YUMYUM package format.
RepositoryFormatGooget
GOOGETGooGet package format.
RepositoryFormatPython
PYTHONPython package format.
FormatUnspecified
FORMAT_UNSPECIFIEDUnspecified package format.
Docker
DOCKERDocker package format.
Maven
MAVENMaven package format.
Npm
NPMNPM package format.
Apt
APTAPT package format.
Yum
YUMYUM package format.
Googet
GOOGETGooGet package format.
Python
PYTHONPython package format.
FormatUnspecified
FORMAT_UNSPECIFIEDUnspecified package format.
Docker
DOCKERDocker package format.
Maven
MAVENMaven package format.
Npm
NPMNPM package format.
Apt
APTAPT package format.
Yum
YUMYUM package format.
Googet
GOOGETGooGet package format.
Python
PYTHONPython package format.
FORMAT_UNSPECIFIED
FORMAT_UNSPECIFIEDUnspecified package format.
DOCKER
DOCKERDocker package format.
MAVEN
MAVENMaven package format.
NPM
NPMNPM package format.
APT
APTAPT package format.
YUM
YUMYUM package format.
GOOGET
GOOGETGooGet package format.
PYTHON
PYTHONPython package format.
"FORMAT_UNSPECIFIED"
FORMAT_UNSPECIFIEDUnspecified package format.
"DOCKER"
DOCKERDocker package format.
"MAVEN"
MAVENMaven package format.
"NPM"
NPMNPM package format.
"APT"
APTAPT package format.
"YUM"
YUMYUM package format.
"GOOGET"
GOOGETGooGet package format.
"PYTHON"
PYTHONPython package format.

Package Details

Repository
Google Cloud Native pulumi/pulumi-google-native
License
Apache-2.0

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi