# CfnRepositoryProps

Properties for defining a `CfnRepository`.

Used as props by: [CfnRepository](/cdk/api/v2/docs/aws-cdk-lib.aws_codeartifact.CfnRepository.html)

- Source: Generated at build time

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codeartifact as codeartifact } from 'aws-cdk-lib';

declare const permissionsPolicyDocument: any;
const cfnRepositoryProps: codeartifact.CfnRepositoryProps = {
  domainName: 'domainName',
  repositoryName: 'repositoryName',

  // the properties below are optional
  description: 'description',
  domainOwner: 'domainOwner',
  externalConnections: ['externalConnections'],
  permissionsPolicyDocument: permissionsPolicyDocument,
  tags: [{
    key: 'key',
    value: 'value',
  }],
  upstreams: ['upstreams'],
};
```

Python:

```python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codeartifact as codeartifact

# permissions_policy_document: Any

cfn_repository_props = codeartifact.CfnRepositoryProps(
    domain_name="domainName",
    repository_name="repositoryName",

    # the properties below are optional
    description="description",
    domain_owner="domainOwner",
    external_connections=["externalConnections"],
    permissions_policy_document=permissions_policy_document,
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    upstreams=["upstreams"]
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.codeartifact.*;

Object permissionsPolicyDocument;

CfnRepositoryProps cfnRepositoryProps = CfnRepositoryProps.builder()
        .domainName("domainName")
        .repositoryName("repositoryName")

        // the properties below are optional
        .description("description")
        .domainOwner("domainOwner")
        .externalConnections(List.of("externalConnections"))
        .permissionsPolicyDocument(permissionsPolicyDocument)
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .upstreams(List.of("upstreams"))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeArtifact;

var permissionsPolicyDocument;

var cfnRepositoryProps = new CfnRepositoryProps {
    DomainName = "domainName",
    RepositoryName = "repositoryName",

    // the properties below are optional
    Description = "description",
    DomainOwner = "domainOwner",
    ExternalConnections = new [] { "externalConnections" },
    PermissionsPolicyDocument = permissionsPolicyDocument,
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    Upstreams = new [] { "upstreams" }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var permissionsPolicyDocument interface{}

cfnRepositoryProps := &CfnRepositoryProps{
	DomainName: jsii.String("domainName"),
	RepositoryName: jsii.String("repositoryName"),

	// the properties below are optional
	Description: jsii.String("description"),
	DomainOwner: jsii.String("domainOwner"),
	ExternalConnections: []*string{
		jsii.String("externalConnections"),
	},
	PermissionsPolicyDocument: permissionsPolicyDocument,
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	Upstreams: []*string{
		jsii.String("upstreams"),
	},
}
```

## Properties

- `description`: string — A text description of the repository.

- `domainName`: string (required) — The name of the domain that contains the repository.

- `domainOwner`: string — The 12-digit account number of the AWS account that owns the domain that contains the repository.

  It does not include dashes or spaces.

- `externalConnections`: string[] — An array of external connections associated with the repository.

  For more information, see [Supported external connection repositories](https://docs.aws.amazon.com/codeartifact/latest/ug/external-connection.html#supported-public-repositories) in the *CodeArtifact user guide* .

- `permissionsPolicyDocument`: any — The document that defines the resource policy that is set on a repository.

- `repositoryName`: string (required) — The name of an upstream repository.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A list of tags to be applied to the repository.

- `upstreams`: string[] — A list of upstream repositories to associate with the repository.

  The order of the upstream repositories in the list determines their priority order when AWS CodeArtifact looks for a requested package version. For more information, see [Working with upstream repositories](https://docs.aws.amazon.com/codeartifact/latest/ug/repos-upstream.html) .
