CmdID / aws / aws codeartifact
aws codeartifact associate-external-connection
Adds an existing external connection to a repository. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To add an external connection to a repository
The following associate-external-connection example adds an external connection to npmjs.com to a repository named test-repo.
aws codeartifact associate-external-connection --repository test-repo --domain test-domain --external-connection public:npmjsIdentify--repositoryThe name of the repository to which the external connection is added.--domainThe name of the domain that contains the repository.--external-connectionThe name of the external connection to add to the repository.Its output
{
"repository": {
"name": "test-repo",
"administratorAccount": "123456789012",
"domainName": "test-domain",
"domainOwner": "123456789012",
"arn": "arn:aws:codeartifact:us-west-2:123456789012:repository/test-domain/test-repo",
"upstreams": [],
"externalConnections": [
{
"externalConnectionName": "public:npmjs",
"packageFormat": "npm",
"status": "AVAILABLE"
}
]
}
}For more information, see Add an external connection in the AWS CodeArtifact User Guide.
Options
--domain-ownerThe 12-digit account number of the Amazon Web Services account that owns the domain.--domainThe name of the domain that contains the repository.--external-connectionThe name of the external connection to add to the repository.--repositoryThe name of the repository to which the external connection is added.