2023/03/23 - CodeArtifact - 8 updated api methods
Changes Repository CreationTime is added to the CreateRepository and ListRepositories API responses.
{'repository': {'createdTime': 'timestamp'}}
Adds an existing external connection to a repository. One external connection is allowed per repository.
Note
A repository can have one or more upstream repositories, or an external connection.
See also: AWS API Documentation
Request Syntax
client.associate_external_connection( domain='string', domainOwner='string', repository='string', externalConnection='string' )
string
[REQUIRED]
The name of the domain that contains the repository.
string
The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
string
[REQUIRED]
The name of the repository to which the external connection is added.
string
[REQUIRED]
The name of the external connection to add to the repository. The following values are supported:
public:npmjs - for the npm public repository.
public:nuget-org - for the NuGet Gallery.
public:pypi - for the Python Package Index.
public:maven-central - for Maven Central.
public:maven-googleandroid - for the Google Android repository.
public:maven-gradleplugins - for the Gradle plugins repository.
public:maven-commonsware - for the CommonsWare Android repository.
public:maven-clojars - for the Clojars repository.
dict
Response Syntax
{ 'repository': { 'name': 'string', 'administratorAccount': 'string', 'domainName': 'string', 'domainOwner': 'string', 'arn': 'string', 'description': 'string', 'upstreams': [ { 'repositoryName': 'string' }, ], 'externalConnections': [ { 'externalConnectionName': 'string', 'packageFormat': 'npm'|'pypi'|'maven'|'nuget'|'generic', 'status': 'Available' }, ], 'createdTime': datetime(2015, 1, 1) } }
Response Structure
(dict) --
repository (dict) --
Information about the connected repository after processing the request.
name (string) --
The name of the repository.
administratorAccount (string) --
The 12-digit account number of the Amazon Web Services account that manages the repository.
domainName (string) --
The name of the domain that contains the repository.
domainOwner (string) --
The 12-digit account number of the Amazon Web Services account that owns the domain that contains the repository. It does not include dashes or spaces.
arn (string) --
The Amazon Resource Name (ARN) of the repository.
description (string) --
A text description of the repository.
upstreams (list) --
A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories .
(dict) --
Information about an upstream repository.
repositoryName (string) --
The name of an upstream repository.
externalConnections (list) --
An array of external connections associated with the repository.
(dict) --
Contains information about the external connection of a repository.
externalConnectionName (string) --
The name of the external connection associated with a repository.
packageFormat (string) --
The package format associated with a repository's external connection. The valid package formats are:
npm : A Node Package Manager (npm) package.
pypi : A Python Package Index (PyPI) package.
maven : A Maven package that contains compiled code in a distributable format, such as a JAR file.
nuget : A NuGet package.
status (string) --
The status of the external connection of a repository. There is one valid value, Available .
createdTime (datetime) --
A timestamp that represents the date and time the repository was created.
{'repository': {'createdTime': 'timestamp'}}
Creates a repository.
See also: AWS API Documentation
Request Syntax
client.create_repository( domain='string', domainOwner='string', repository='string', description='string', upstreams=[ { 'repositoryName': 'string' }, ], tags=[ { 'key': 'string', 'value': 'string' }, ] )
string
[REQUIRED]
The name of the domain that contains the created repository.
string
The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
string
[REQUIRED]
The name of the repository to create.
string
A description of the created repository.
list
A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories .
(dict) --
Information about an upstream repository. A list of UpstreamRepository objects is an input parameter to CreateRepository and UpdateRepository .
repositoryName (string) -- [REQUIRED]
The name of an upstream repository.
list
One or more tag key-value pairs for the repository.
(dict) --
A tag is a key-value pair that can be used to manage, search for, or filter resources in CodeArtifact.
key (string) -- [REQUIRED]
The tag key.
value (string) -- [REQUIRED]
The tag value.
dict
Response Syntax
{ 'repository': { 'name': 'string', 'administratorAccount': 'string', 'domainName': 'string', 'domainOwner': 'string', 'arn': 'string', 'description': 'string', 'upstreams': [ { 'repositoryName': 'string' }, ], 'externalConnections': [ { 'externalConnectionName': 'string', 'packageFormat': 'npm'|'pypi'|'maven'|'nuget'|'generic', 'status': 'Available' }, ], 'createdTime': datetime(2015, 1, 1) } }
Response Structure
(dict) --
repository (dict) --
Information about the created repository after processing the request.
name (string) --
The name of the repository.
administratorAccount (string) --
The 12-digit account number of the Amazon Web Services account that manages the repository.
domainName (string) --
The name of the domain that contains the repository.
domainOwner (string) --
The 12-digit account number of the Amazon Web Services account that owns the domain that contains the repository. It does not include dashes or spaces.
arn (string) --
The Amazon Resource Name (ARN) of the repository.
description (string) --
A text description of the repository.
upstreams (list) --
A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories .
(dict) --
Information about an upstream repository.
repositoryName (string) --
The name of an upstream repository.
externalConnections (list) --
An array of external connections associated with the repository.
(dict) --
Contains information about the external connection of a repository.
externalConnectionName (string) --
The name of the external connection associated with a repository.
packageFormat (string) --
The package format associated with a repository's external connection. The valid package formats are:
npm : A Node Package Manager (npm) package.
pypi : A Python Package Index (PyPI) package.
maven : A Maven package that contains compiled code in a distributable format, such as a JAR file.
nuget : A NuGet package.
status (string) --
The status of the external connection of a repository. There is one valid value, Available .
createdTime (datetime) --
A timestamp that represents the date and time the repository was created.
{'repository': {'createdTime': 'timestamp'}}
Deletes a repository.
See also: AWS API Documentation
Request Syntax
client.delete_repository( domain='string', domainOwner='string', repository='string' )
string
[REQUIRED]
The name of the domain that contains the repository to delete.
string
The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
string
[REQUIRED]
The name of the repository to delete.
dict
Response Syntax
{ 'repository': { 'name': 'string', 'administratorAccount': 'string', 'domainName': 'string', 'domainOwner': 'string', 'arn': 'string', 'description': 'string', 'upstreams': [ { 'repositoryName': 'string' }, ], 'externalConnections': [ { 'externalConnectionName': 'string', 'packageFormat': 'npm'|'pypi'|'maven'|'nuget'|'generic', 'status': 'Available' }, ], 'createdTime': datetime(2015, 1, 1) } }
Response Structure
(dict) --
repository (dict) --
Information about the deleted repository after processing the request.
name (string) --
The name of the repository.
administratorAccount (string) --
The 12-digit account number of the Amazon Web Services account that manages the repository.
domainName (string) --
The name of the domain that contains the repository.
domainOwner (string) --
The 12-digit account number of the Amazon Web Services account that owns the domain that contains the repository. It does not include dashes or spaces.
arn (string) --
The Amazon Resource Name (ARN) of the repository.
description (string) --
A text description of the repository.
upstreams (list) --
A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories .
(dict) --
Information about an upstream repository.
repositoryName (string) --
The name of an upstream repository.
externalConnections (list) --
An array of external connections associated with the repository.
(dict) --
Contains information about the external connection of a repository.
externalConnectionName (string) --
The name of the external connection associated with a repository.
packageFormat (string) --
The package format associated with a repository's external connection. The valid package formats are:
npm : A Node Package Manager (npm) package.
pypi : A Python Package Index (PyPI) package.
maven : A Maven package that contains compiled code in a distributable format, such as a JAR file.
nuget : A NuGet package.
status (string) --
The status of the external connection of a repository. There is one valid value, Available .
createdTime (datetime) --
A timestamp that represents the date and time the repository was created.
{'repository': {'createdTime': 'timestamp'}}
Returns a RepositoryDescription object that contains detailed information about the requested repository.
See also: AWS API Documentation
Request Syntax
client.describe_repository( domain='string', domainOwner='string', repository='string' )
string
[REQUIRED]
The name of the domain that contains the repository to describe.
string
The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
string
[REQUIRED]
A string that specifies the name of the requested repository.
dict
Response Syntax
{ 'repository': { 'name': 'string', 'administratorAccount': 'string', 'domainName': 'string', 'domainOwner': 'string', 'arn': 'string', 'description': 'string', 'upstreams': [ { 'repositoryName': 'string' }, ], 'externalConnections': [ { 'externalConnectionName': 'string', 'packageFormat': 'npm'|'pypi'|'maven'|'nuget'|'generic', 'status': 'Available' }, ], 'createdTime': datetime(2015, 1, 1) } }
Response Structure
(dict) --
repository (dict) --
A RepositoryDescription object that contains the requested repository information.
name (string) --
The name of the repository.
administratorAccount (string) --
The 12-digit account number of the Amazon Web Services account that manages the repository.
domainName (string) --
The name of the domain that contains the repository.
domainOwner (string) --
The 12-digit account number of the Amazon Web Services account that owns the domain that contains the repository. It does not include dashes or spaces.
arn (string) --
The Amazon Resource Name (ARN) of the repository.
description (string) --
A text description of the repository.
upstreams (list) --
A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories .
(dict) --
Information about an upstream repository.
repositoryName (string) --
The name of an upstream repository.
externalConnections (list) --
An array of external connections associated with the repository.
(dict) --
Contains information about the external connection of a repository.
externalConnectionName (string) --
The name of the external connection associated with a repository.
packageFormat (string) --
The package format associated with a repository's external connection. The valid package formats are:
npm : A Node Package Manager (npm) package.
pypi : A Python Package Index (PyPI) package.
maven : A Maven package that contains compiled code in a distributable format, such as a JAR file.
nuget : A NuGet package.
status (string) --
The status of the external connection of a repository. There is one valid value, Available .
createdTime (datetime) --
A timestamp that represents the date and time the repository was created.
{'repository': {'createdTime': 'timestamp'}}
Removes an existing external connection from a repository.
See also: AWS API Documentation
Request Syntax
client.disassociate_external_connection( domain='string', domainOwner='string', repository='string', externalConnection='string' )
string
[REQUIRED]
The name of the domain that contains the repository from which to remove the external repository.
string
The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
string
[REQUIRED]
The name of the repository from which the external connection will be removed.
string
[REQUIRED]
The name of the external connection to be removed from the repository.
dict
Response Syntax
{ 'repository': { 'name': 'string', 'administratorAccount': 'string', 'domainName': 'string', 'domainOwner': 'string', 'arn': 'string', 'description': 'string', 'upstreams': [ { 'repositoryName': 'string' }, ], 'externalConnections': [ { 'externalConnectionName': 'string', 'packageFormat': 'npm'|'pypi'|'maven'|'nuget'|'generic', 'status': 'Available' }, ], 'createdTime': datetime(2015, 1, 1) } }
Response Structure
(dict) --
repository (dict) --
The repository associated with the removed external connection.
name (string) --
The name of the repository.
administratorAccount (string) --
The 12-digit account number of the Amazon Web Services account that manages the repository.
domainName (string) --
The name of the domain that contains the repository.
domainOwner (string) --
The 12-digit account number of the Amazon Web Services account that owns the domain that contains the repository. It does not include dashes or spaces.
arn (string) --
The Amazon Resource Name (ARN) of the repository.
description (string) --
A text description of the repository.
upstreams (list) --
A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories .
(dict) --
Information about an upstream repository.
repositoryName (string) --
The name of an upstream repository.
externalConnections (list) --
An array of external connections associated with the repository.
(dict) --
Contains information about the external connection of a repository.
externalConnectionName (string) --
The name of the external connection associated with a repository.
packageFormat (string) --
The package format associated with a repository's external connection. The valid package formats are:
npm : A Node Package Manager (npm) package.
pypi : A Python Package Index (PyPI) package.
maven : A Maven package that contains compiled code in a distributable format, such as a JAR file.
nuget : A NuGet package.
status (string) --
The status of the external connection of a repository. There is one valid value, Available .
createdTime (datetime) --
A timestamp that represents the date and time the repository was created.
{'repositories': {'createdTime': 'timestamp'}}
Returns a list of RepositorySummary objects. Each RepositorySummary contains information about a repository in the specified Amazon Web Services account and that matches the input parameters.
See also: AWS API Documentation
Request Syntax
client.list_repositories( repositoryPrefix='string', maxResults=123, nextToken='string' )
string
A prefix used to filter returned repositories. Only repositories with names that start with repositoryPrefix are returned.
integer
The maximum number of results to return per page.
string
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
dict
Response Syntax
{ 'repositories': [ { 'name': 'string', 'administratorAccount': 'string', 'domainName': 'string', 'domainOwner': 'string', 'arn': 'string', 'description': 'string', 'createdTime': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
repositories (list) --
The returned list of RepositorySummary objects.
(dict) --
Details about a repository, including its Amazon Resource Name (ARN), description, and domain information. The ListRepositories operation returns a list of RepositorySummary objects.
name (string) --
The name of the repository.
administratorAccount (string) --
The Amazon Web Services account ID that manages the repository.
domainName (string) --
The name of the domain that contains the repository.
domainOwner (string) --
The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
arn (string) --
The ARN of the repository.
description (string) --
The description of the repository.
createdTime (datetime) --
A timestamp that represents the date and time the repository was created.
nextToken (string) --
If there are additional results, this is the token for the next set of results.
{'repositories': {'createdTime': 'timestamp'}}
Returns a list of RepositorySummary objects. Each RepositorySummary contains information about a repository in the specified domain and that matches the input parameters.
See also: AWS API Documentation
Request Syntax
client.list_repositories_in_domain( domain='string', domainOwner='string', administratorAccount='string', repositoryPrefix='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The name of the domain that contains the returned list of repositories.
string
The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
string
Filter the list of repositories to only include those that are managed by the Amazon Web Services account ID.
string
A prefix used to filter returned repositories. Only repositories with names that start with repositoryPrefix are returned.
integer
The maximum number of results to return per page.
string
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
dict
Response Syntax
{ 'repositories': [ { 'name': 'string', 'administratorAccount': 'string', 'domainName': 'string', 'domainOwner': 'string', 'arn': 'string', 'description': 'string', 'createdTime': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
repositories (list) --
The returned list of repositories.
(dict) --
Details about a repository, including its Amazon Resource Name (ARN), description, and domain information. The ListRepositories operation returns a list of RepositorySummary objects.
name (string) --
The name of the repository.
administratorAccount (string) --
The Amazon Web Services account ID that manages the repository.
domainName (string) --
The name of the domain that contains the repository.
domainOwner (string) --
The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
arn (string) --
The ARN of the repository.
description (string) --
The description of the repository.
createdTime (datetime) --
A timestamp that represents the date and time the repository was created.
nextToken (string) --
If there are additional results, this is the token for the next set of results.
{'repository': {'createdTime': 'timestamp'}}
Update the properties of a repository.
See also: AWS API Documentation
Request Syntax
client.update_repository( domain='string', domainOwner='string', repository='string', description='string', upstreams=[ { 'repositoryName': 'string' }, ] )
string
[REQUIRED]
The name of the domain associated with the repository to update.
string
The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.
string
[REQUIRED]
The name of the repository to update.
string
An updated repository description.
list
A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories .
(dict) --
Information about an upstream repository. A list of UpstreamRepository objects is an input parameter to CreateRepository and UpdateRepository .
repositoryName (string) -- [REQUIRED]
The name of an upstream repository.
dict
Response Syntax
{ 'repository': { 'name': 'string', 'administratorAccount': 'string', 'domainName': 'string', 'domainOwner': 'string', 'arn': 'string', 'description': 'string', 'upstreams': [ { 'repositoryName': 'string' }, ], 'externalConnections': [ { 'externalConnectionName': 'string', 'packageFormat': 'npm'|'pypi'|'maven'|'nuget'|'generic', 'status': 'Available' }, ], 'createdTime': datetime(2015, 1, 1) } }
Response Structure
(dict) --
repository (dict) --
The updated repository.
name (string) --
The name of the repository.
administratorAccount (string) --
The 12-digit account number of the Amazon Web Services account that manages the repository.
domainName (string) --
The name of the domain that contains the repository.
domainOwner (string) --
The 12-digit account number of the Amazon Web Services account that owns the domain that contains the repository. It does not include dashes or spaces.
arn (string) --
The Amazon Resource Name (ARN) of the repository.
description (string) --
A text description of the repository.
upstreams (list) --
A list of upstream repositories to associate with the repository. The order of the upstream repositories in the list determines their priority order when CodeArtifact looks for a requested package version. For more information, see Working with upstream repositories .
(dict) --
Information about an upstream repository.
repositoryName (string) --
The name of an upstream repository.
externalConnections (list) --
An array of external connections associated with the repository.
(dict) --
Contains information about the external connection of a repository.
externalConnectionName (string) --
The name of the external connection associated with a repository.
packageFormat (string) --
The package format associated with a repository's external connection. The valid package formats are:
npm : A Node Package Manager (npm) package.
pypi : A Python Package Index (PyPI) package.
maven : A Maven package that contains compiled code in a distributable format, such as a JAR file.
nuget : A NuGet package.
status (string) --
The status of the external connection of a repository. There is one valid value, Available .
createdTime (datetime) --
A timestamp that represents the date and time the repository was created.