• 沒有找到結果。

AWS CodeArtifact

N/A
N/A
Protected

Academic year: 2022

Share "AWS CodeArtifact"

Copied!
158
0
0

加載中.... (立即查看全文)

全文

(1)

AWS CodeArtifact

Welcome

API Version 2018-09-22

(2)

AWS CodeArtifact: Welcome

Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon.

(3)

Table of Contents

Welcome ... 1

Actions ... 4

AssociateExternalConnection ... 5

Request Syntax ... 5

URI Request Parameters ... 5

Request Body ... 6

Response Syntax ... 6

Response Elements ... 6

Errors ... 6

See Also ... 7

CopyPackageVersions ... 8

Request Syntax ... 8

URI Request Parameters ... 8

Request Body ... 9

Response Syntax ... 10

Response Elements ... 11

Errors ... 11

See Also ... 12

CreateDomain ... 13

Request Syntax ... 13

URI Request Parameters ... 13

Request Body ... 13

Response Syntax ... 14

Response Elements ... 14

Errors ... 14

See Also ... 15

CreateRepository ... 16

Request Syntax ... 16

URI Request Parameters ... 16

Request Body ... 16

Response Syntax ... 17

Response Elements ... 17

Errors ... 18

See Also ... 18

DeleteDomain ... 20

Request Syntax ... 20

URI Request Parameters ... 20

Request Body ... 20

Response Syntax ... 20

Response Elements ... 21

Errors ... 21

See Also ... 21

DeleteDomainPermissionsPolicy ... 23

Request Syntax ... 23

URI Request Parameters ... 23

Request Body ... 23

Response Syntax ... 23

Response Elements ... 24

Errors ... 24

See Also ... 24

DeletePackageVersions ... 26

Request Syntax ... 26

URI Request Parameters ... 26

Request Body ... 27

(4)

Response Syntax ... 28

Response Elements ... 28

Errors ... 28

See Also ... 29

DeleteRepository ... 30

Request Syntax ... 30

URI Request Parameters ... 30

Request Body ... 30

Response Syntax ... 30

Response Elements ... 31

Errors ... 31

See Also ... 32

DeleteRepositoryPermissionsPolicy ... 33

Request Syntax ... 33

URI Request Parameters ... 33

Request Body ... 34

Response Syntax ... 34

Response Elements ... 34

Errors ... 34

See Also ... 35

DescribeDomain ... 36

Request Syntax ... 36

URI Request Parameters ... 36

Request Body ... 36

Response Syntax ... 36

Response Elements ... 37

Errors ... 37

See Also ... 37

DescribePackageVersion ... 39

Request Syntax ... 39

URI Request Parameters ... 39

Request Body ... 40

Response Syntax ... 40

Response Elements ... 41

Errors ... 41

See Also ... 41

DescribeRepository ... 43

Request Syntax ... 43

URI Request Parameters ... 43

Request Body ... 43

Response Syntax ... 43

Response Elements ... 44

Errors ... 44

See Also ... 45

DisassociateExternalConnection ... 46

Request Syntax ... 46

URI Request Parameters ... 46

Request Body ... 46

Response Syntax ... 46

Response Elements ... 47

Errors ... 47

See Also ... 48

DisposePackageVersions ... 49

Request Syntax ... 49

URI Request Parameters ... 49

Request Body ... 50

Response Syntax ... 51

(5)

Response Elements ... 51

Errors ... 52

See Also ... 52

GetAuthorizationToken ... 54

Request Syntax ... 54

URI Request Parameters ... 54

Request Body ... 54

Response Syntax ... 55

Response Elements ... 55

Errors ... 55

See Also ... 56

GetDomainPermissionsPolicy ... 57

Request Syntax ... 57

URI Request Parameters ... 57

Request Body ... 57

Response Syntax ... 57

Response Elements ... 57

Errors ... 58

See Also ... 58

GetPackageVersionAsset ... 59

Request Syntax ... 59

URI Request Parameters ... 59

Request Body ... 60

Response Syntax ... 60

Response Elements ... 61

Errors ... 61

See Also ... 62

GetPackageVersionReadme ... 63

Request Syntax ... 63

URI Request Parameters ... 63

Request Body ... 64

Response Syntax ... 64

Response Elements ... 64

Errors ... 66

See Also ... 66

GetRepositoryEndpoint ... 67

Request Syntax ... 67

URI Request Parameters ... 67

Request Body ... 68

Response Syntax ... 68

Response Elements ... 68

Errors ... 68

See Also ... 69

GetRepositoryPermissionsPolicy ... 70

Request Syntax ... 70

URI Request Parameters ... 70

Request Body ... 70

Response Syntax ... 70

Response Elements ... 71

Errors ... 71

See Also ... 71

ListDomains ... 73

Request Syntax ... 73

URI Request Parameters ... 73

Request Body ... 73

Response Syntax ... 73

Response Elements ... 74

(6)

Errors ... 74

See Also ... 75

ListPackages ... 76

Request Syntax ... 76

URI Request Parameters ... 76

Request Body ... 77

Response Syntax ... 77

Response Elements ... 77

Errors ... 78

See Also ... 78

ListPackageVersionAssets ... 80

Request Syntax ... 80

URI Request Parameters ... 80

Request Body ... 81

Response Syntax ... 81

Response Elements ... 82

Errors ... 83

See Also ... 83

ListPackageVersionDependencies ... 85

Request Syntax ... 85

URI Request Parameters ... 85

Request Body ... 86

Response Syntax ... 86

Response Elements ... 87

Errors ... 88

See Also ... 89

ListPackageVersions ... 90

Request Syntax ... 90

URI Request Parameters ... 90

Request Body ... 91

Response Syntax ... 91

Response Elements ... 92

Errors ... 93

See Also ... 94

ListRepositories ... 95

Request Syntax ... 95

URI Request Parameters ... 95

Request Body ... 95

Response Syntax ... 95

Response Elements ... 96

Errors ... 96

See Also ... 96

ListRepositoriesInDomain ... 98

Request Syntax ... 98

URI Request Parameters ... 98

Request Body ... 99

Response Syntax ... 99

Response Elements ... 99

Errors ... 99

See Also ... 100

ListTagsForResource ... 101

Request Syntax ... 101

URI Request Parameters ... 101

Request Body ... 101

Response Syntax ... 101

Response Elements ... 101

Errors ... 102

(7)

See Also ... 102

PutDomainPermissionsPolicy ... 103

Request Syntax ... 103

URI Request Parameters ... 103

Request Body ... 103

Response Syntax ... 104

Response Elements ... 104

Errors ... 104

See Also ... 105

PutRepositoryPermissionsPolicy ... 106

Request Syntax ... 106

URI Request Parameters ... 106

Request Body ... 106

Response Syntax ... 107

Response Elements ... 107

Errors ... 107

See Also ... 108

TagResource ... 109

Request Syntax ... 109

URI Request Parameters ... 109

Request Body ... 109

Response Syntax ... 109

Response Elements ... 109

Errors ... 110

See Also ... 110

UntagResource ... 111

Request Syntax ... 111

URI Request Parameters ... 111

Request Body ... 111

Response Syntax ... 111

Response Elements ... 111

Errors ... 112

See Also ... 112

UpdatePackageVersionsStatus ... 113

Request Syntax ... 113

URI Request Parameters ... 113

Request Body ... 114

Response Syntax ... 115

Response Elements ... 115

Errors ... 116

See Also ... 116

UpdateRepository ... 118

Request Syntax ... 118

URI Request Parameters ... 118

Request Body ... 118

Response Syntax ... 119

Response Elements ... 119

Errors ... 119

See Also ... 120

Data Types ... 121

AssetSummary ... 122

Contents ... 122

See Also ... 122

DomainDescription ... 123

Contents ... 123

See Also ... 124

DomainSummary ... 125

(8)

Contents ... 125

See Also ... 126

LicenseInfo ... 127

Contents ... 127

See Also ... 127

PackageDependency ... 128

Contents ... 128

See Also ... 128

PackageSummary ... 130

Contents ... 130

See Also ... 130

PackageVersionDescription ... 132

Contents ... 132

See Also ... 134

PackageVersionError ... 135

Contents ... 135

See Also ... 135

PackageVersionSummary ... 136

Contents ... 136

See Also ... 136

RepositoryDescription ... 137

Contents ... 137

See Also ... 138

RepositoryExternalConnectionInfo ... 139

Contents ... 139

See Also ... 139

RepositorySummary ... 140

Contents ... 140

See Also ... 141

ResourcePolicy ... 142

Contents ... 142

See Also ... 142

SuccessfulPackageVersionInfo ... 143

Contents ... 143

See Also ... 143

Tag ... 144

Contents ... 144

See Also ... 144

UpstreamRepository ... 145

Contents ... 145

See Also ... 145

UpstreamRepositoryInfo ... 146

Contents ... 146

See Also ... 146

Common Parameters ... 147

Common Errors ... 149

(9)

Welcome

AWS CodeArtifact is a fully managed artifact repository compatible with language-native package managers and build tools such as npm, Apache Maven, pip, and dotnet. You can use CodeArtifact to share packages with development teams and pull packages. Packages can be pulled from both public and CodeArtifact repositories. You can also create an upstream relationship between a CodeArtifact repository and another repository, which effectively merges their contents from the point of view of a package manager client.

AWS CodeArtifact Components

Use the information in this guide to help you work with the following CodeArtifact components:

Repository: A CodeArtifact repository contains a set of package versions, each of which maps to a set of assets, or files. Repositories are polyglot, so a single repository can contain packages of any supported type. Each repository exposes endpoints for fetching and publishing packages using tools like the npm CLI, the Maven CLI ( mvn ), Python CLIs ( pip and twine), and NuGet CLIs (nuget and dotnet).

Domain: Repositories are aggregated into a higher-level entity known as a domain. All package assets and metadata are stored in the domain, but are consumed through repositories. A given package asset, such as a Maven JAR file, is stored once per domain, no matter how many repositories it's present in.

All of the assets and metadata in a domain are encrypted with the same customer master key (CMK) stored in AWS Key Management Service (AWS KMS).

Each repository is a member of a single domain and can't be moved to a different domain.

The domain allows organizational policy to be applied across multiple repositories, such as which accounts can access repositories in the domain, and which public repositories can be used as sources of packages.

Although an organization can have multiple domains, we recommend a single production domain that contains all published artifacts so that teams can find and share packages across their organization.

Package: A package is a bundle of software and the metadata required to resolve dependencies and install the software. CodeArtifact supports npm, PyPI, Maven, and NuGet package formats.

In CodeArtifact, a package consists of:

• A name (for example, webpack is the name of a popular npm package)

• An optional namespace (for example, @types in @types/node)

• A set of versions (for example, 1.0.0, 1.0.1, 1.0.2, etc.)

• Package-level metadata (for example, npm tags)

Package version: A version of a package, such as @types/node 12.6.9. The version number format and semantics vary for different package formats. For example, npm package versions must conform to the Semantic Versioning specification. In CodeArtifact, a package version consists of the version identifier, metadata at the package version level, and a set of assets.

Upstream repository: One repository is upstream of another when the package versions in it can be accessed from the repository endpoint of the downstream repository, effectively merging the contents of the two repositories from the point of view of a client. CodeArtifact allows creating an upstream relationship between two repositories.

Asset: An individual file stored in CodeArtifact associated with a package version, such as an npm .tgz file or Maven POM and JAR files.

CodeArtifact supports these operations:

(10)

• AssociateExternalConnection: Adds an existing external connection to a repository.

• CopyPackageVersions: Copies package versions from one repository to another repository in the same domain.

• CreateDomain: Creates a domain

• CreateRepository: Creates a CodeArtifact repository in a domain.

• DeleteDomain: Deletes a domain. You cannot delete a domain that contains repositories.

• DeleteDomainPermissionsPolicy: Deletes the resource policy that is set on a domain.

• DeletePackageVersions: Deletes versions of a package. After a package has been deleted, it can be republished, but its assets and metadata cannot be restored because they have been permanently removed from storage.

• DeleteRepository: Deletes a repository.

• DeleteRepositoryPermissionsPolicy: Deletes the resource policy that is set on a repository.

• DescribeDomain: Returns a DomainDescription object that contains information about the requested domain.

• DescribePackageVersion: Returns a PackageVersionDescription object that contains details about a package version.

• DescribeRepository: Returns a RepositoryDescription object that contains detailed information about the requested repository.

• DisposePackageVersions: Disposes versions of a package. A package version with the status Disposed cannot be restored because they have been permanently removed from storage.

• DisassociateExternalConnection: Removes an existing external connection from a repository.

• GetAuthorizationToken: Generates a temporary authorization token for accessing repositories in the domain. The token expires the authorization period has passed. The default authorization period is 12 hours and can be customized to any length with a maximum of 12 hours.

• GetDomainPermissionsPolicy: Returns the policy of a resource that is attached to the specified domain.

• GetPackageVersionAsset: Returns the contents of an asset that is in a package version.

• GetPackageVersionReadme: Gets the readme file or descriptive text for a package version.

• GetRepositoryEndpoint: Returns the endpoint of a repository for a specific package format. A repository has one endpoint for each package format:

• maven

• npm

• nuget

• pypi

• GetRepositoryPermissionsPolicy: Returns the resource policy that is set on a repository.

• ListDomains: Returns a list of DomainSummary objects. Each returned DomainSummary object contains information about a domain.

• ListPackages: Lists the packages in a repository.

• ListPackageVersionAssets: Lists the assets for a given package version.

• ListPackageVersionDependencies: Returns a list of the direct dependencies for a package version.

• ListPackageVersions: Returns a list of package versions for a specified package in a repository.

• ListRepositories: Returns a list of repositories owned by the AWS account that called this method.

• ListRepositoriesInDomain: Returns a list of the repositories in a domain.

• PutDomainPermissionsPolicy: Attaches a resource policy to a domain.

• PutRepositoryPermissionsPolicy: Sets the resource policy on a repository that specifies permissions to access it.

• UpdatePackageVersionsStatus: Updates the status of one or more versions of a package.

(11)

• UpdateRepository: Updates the properties of a repository.

This document was last published on March 6, 2022.

(12)

Actions

The following actions are supported:

• AssociateExternalConnection (p. 5)

• CopyPackageVersions (p. 8)

• CreateDomain (p. 13)

• CreateRepository (p. 16)

• DeleteDomain (p. 20)

• DeleteDomainPermissionsPolicy (p. 23)

• DeletePackageVersions (p. 26)

• DeleteRepository (p. 30)

• DeleteRepositoryPermissionsPolicy (p. 33)

• DescribeDomain (p. 36)

• DescribePackageVersion (p. 39)

• DescribeRepository (p. 43)

• DisassociateExternalConnection (p. 46)

• DisposePackageVersions (p. 49)

• GetAuthorizationToken (p. 54)

• GetDomainPermissionsPolicy (p. 57)

• GetPackageVersionAsset (p. 59)

• GetPackageVersionReadme (p. 63)

• GetRepositoryEndpoint (p. 67)

• GetRepositoryPermissionsPolicy (p. 70)

• ListDomains (p. 73)

• ListPackages (p. 76)

• ListPackageVersionAssets (p. 80)

• ListPackageVersionDependencies (p. 85)

• ListPackageVersions (p. 90)

• ListRepositories (p. 95)

• ListRepositoriesInDomain (p. 98)

• ListTagsForResource (p. 101)

• PutDomainPermissionsPolicy (p. 103)

• PutRepositoryPermissionsPolicy (p. 106)

• TagResource (p. 109)

• UntagResource (p. 111)

• UpdatePackageVersionsStatus (p. 113)

• UpdateRepository (p. 118)

(13)

AssociateExternalConnection

AssociateExternalConnection

Adds an existing external connection to a repository. One external connection is allowed per repository.

NoteA repository can have one or more upstream repositories, or an external connection.

Request Syntax

POST /v1/repository/external-connection?domain=domain&domain-owner=domainOwner&external- connection=externalConnection&repository=repository HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

domain (p. 5)

The name of the domain that contains the repository.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: [a-z][a-z0-9\-]{0,48}[a-z0-9]

Required: Yes domainOwner (p. 5)

The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.

Length Constraints: Fixed length of 12.

Pattern: [0-9]{12}

externalConnection (p. 5)

The name of the external connection to add to the repository. The following values are supported:

• public:npmjs - for the npm public repository.

• 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.

Pattern: [A-Za-z0-9][A-Za-z0-9._\-:]{1,99}

Required: Yes repository (p. 5)

The name of the repository to which the external connection is added.

Length Constraints: Minimum length of 2. Maximum length of 100.

Pattern: [A-Za-z0-9][A-Za-z0-9._\-]{1,99}

Required: Yes

(14)

Request Body

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json { "repository": {

"administratorAccount": "string", "arn": "string",

"description": "string", "domainName": "string", "domainOwner": "string", "externalConnections": [ {

"externalConnectionName": "string", "packageFormat": "string",

"status": "string"

} ],

"name": "string", "upstreams": [ {

"repositoryName": "string"

} ] }}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

repository (p. 6)

Information about the connected repository after processing the request.

Type: RepositoryDescription (p. 137) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 149).

AccessDeniedException

The operation did not succeed because of an unauthorized access attempt.

HTTP Status Code: 403 ConflictException

The operation did not succeed because prerequisites are not met.

HTTP Status Code: 409

(15)

See Also

InternalServerException

The operation did not succeed because of an error that occurred inside AWS CodeArtifact.

HTTP Status Code: 500 ResourceNotFoundException

The operation did not succeed because the resource requested is not found in the service.

HTTP Status Code: 404 ServiceQuotaExceededException

The operation did not succeed because it would have exceeded a service limit for your account.

HTTP Status Code: 402 ThrottlingException

The operation did not succeed because too many requests are sent to the service.

HTTP Status Code: 429 ValidationException

The operation did not succeed because a parameter in the request was sent with an invalid value.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(16)

CopyPackageVersions

CopyPackageVersions

Copies package versions from one repository to another repository in the same domain.

NoteYou must specify versions or versionRevisions. You cannot specify both.

Request Syntax

POST /v1/package/versions/copy?destination-

repository=destinationRepository&domain=domain&domain-

owner=domainOwner&format=format&namespace=namespace&package=package&source- repository=sourceRepository HTTP/1.1

Content-type: application/json {

"allowOverwrite": boolean, "includeFromUpstream": boolean, "versionRevisions": {

"string" : "string"

},

"versions": [ "string" ] }

URI Request Parameters

The request uses the following URI parameters.

destinationRepository (p. 8)

The name of the repository into which package versions are copied.

Length Constraints: Minimum length of 2. Maximum length of 100.

Pattern: [A-Za-z0-9][A-Za-z0-9._\-]{1,99}

Required: Yes domain (p. 8)

The name of the domain that contains the source and destination repositories.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: [a-z][a-z0-9\-]{0,48}[a-z0-9]

Required: Yes domainOwner (p. 8)

The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.

Length Constraints: Fixed length of 12.

Pattern: [0-9]{12}

format (p. 8)

The format of the package that is copied. The valid package types are:

• npm: A Node Package Manager (npm) package.

(17)

Request Body

• 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.

Valid Values: npm | pypi | maven | nuget Required: Yes

namespace (p. 8)

The namespace of the package. The package component that specifies its namespace depends on its type. For example:

• The namespace of a Maven package is its groupId.

• The namespace of an npm package is its scope.

• A Python package does not contain a corresponding component, so Python packages do not have a namespace.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [^!#/\s]+

package (p. 8)

The name of the package that is copied.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [^!#/\s]+

Required: Yes sourceRepository (p. 8)

The name of the repository that contains the package versions to copy.

Length Constraints: Minimum length of 2. Maximum length of 100.

Pattern: [A-Za-z0-9][A-Za-z0-9._\-]{1,99}

Required: Yes

Request Body

The request accepts the following data in JSON format.

allowOverwrite (p. 8)

Set to true to overwrite a package version that already exists in the destination repository. If set to false and the package version already exists in the destination repository, the package version is returned in the failedVersions field of the response with an ALREADY_EXISTS error code.

Type: Boolean Required: No

includeFromUpstream (p. 8)

Set to true to copy packages from repositories that are upstream from the source repository to the destination repository. The default setting is false. For more information, see Working with upstream repositories.

(18)

Response Syntax

Type: Boolean Required: No versionRevisions (p. 8)

A list of key-value pairs. The keys are package versions and the values are package version revisions.

A CopyPackageVersion operation succeeds if the specified versions in the source repository match the specified package version revision.

NoteYou must specify versions or versionRevisions. You cannot specify both.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 255.

Key Pattern: [^!#/\s]+

Value Length Constraints: Minimum length of 1. Maximum length of 50.

Value Pattern: \S+

Required: No versions (p. 8)

The versions of the package to copy.

NoteYou must specify versions or versionRevisions. You cannot specify both.

Type: Array of strings

Array Members: Maximum number of 100 items.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [^!#/\s]+

Required: No

Response Syntax

HTTP/1.1 200

Content-type: application/json {

"failedVersions": { "string" : {

"errorCode": "string", "errorMessage": "string"

} },

"successfulVersions": { "string" : {

"revision": "string", "status": "string"

} }}

(19)

Response Elements

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

failedVersions (p. 10)

A map of package versions that failed to copy and their error codes. The possible error codes are in the PackageVersionError data type. They are:

• ALREADY_EXISTS

• MISMATCHED_REVISION

• MISMATCHED_STATUS

• NOT_ALLOWED

• NOT_FOUND

• SKIPPED

Type: String to PackageVersionError (p. 135) object map

Key Length Constraints: Minimum length of 1. Maximum length of 255.

Key Pattern: [^!#/\s]+

successfulVersions (p. 10)

A list of the package versions that were successfully copied to your repository.

Type: String to SuccessfulPackageVersionInfo (p. 143) object map Key Length Constraints: Minimum length of 1. Maximum length of 255.

Key Pattern: [^!#/\s]+

Errors

For information about the errors that are common to all actions, see Common Errors (p. 149).

AccessDeniedException

The operation did not succeed because of an unauthorized access attempt.

HTTP Status Code: 403 ConflictException

The operation did not succeed because prerequisites are not met.

HTTP Status Code: 409 InternalServerException

The operation did not succeed because of an error that occurred inside AWS CodeArtifact.

HTTP Status Code: 500 ResourceNotFoundException

The operation did not succeed because the resource requested is not found in the service.

HTTP Status Code: 404

(20)

See Also

ServiceQuotaExceededException

The operation did not succeed because it would have exceeded a service limit for your account.

HTTP Status Code: 402 ThrottlingException

The operation did not succeed because too many requests are sent to the service.

HTTP Status Code: 429 ValidationException

The operation did not succeed because a parameter in the request was sent with an invalid value.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(21)

CreateDomain

CreateDomain

Creates a domain. CodeArtifact domains make it easier to manage multiple repositories across an organization. You can use a domain to apply permissions across many repositories owned by different AWS accounts. An asset is stored only once in a domain, even if it's in multiple repositories.

Although you can have multiple domains, we recommend a single production domain that contains all published artifacts so that your development teams can find and share packages. You can use a second pre-production domain to test changes to the production domain configuration.

Request Syntax

POST /v1/domain?domain=domain HTTP/1.1 Content-type: application/json

{ "encryptionKey": "string", "tags": [

{

"key": "string", "value": "string"

} ] }

URI Request Parameters

The request uses the following URI parameters.

domain (p. 13)

The name of the domain to create. All domain names in an AWS Region that are in the same AWS account must be unique. The domain name is used as the prefix in DNS hostnames. Do not use sensitive information in a domain name because it is publicly discoverable.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: [a-z][a-z0-9\-]{0,48}[a-z0-9]

Required: Yes

Request Body

The request accepts the following data in JSON format.

encryptionKey (p. 13)

The encryption key for the domain. This is used to encrypt content stored in a domain. An encryption key can be a key ID, a key Amazon Resource Name (ARN), a key alias, or a key alias ARN. To specify an encryptionKey, your IAM role must have kms:DescribeKey and kms:CreateGrant permissions on the encryption key that is used. For more information, see DescribeKey in the AWS Key Management Service API Reference and AWS Key Management Service API Permissions Reference in the AWS Key Management Service Developer Guide.

Important

CodeArtifact supports only symmetric CMKs. Do not associate an asymmetric CMK with your domain. For more information, see Using symmetric and asymmetric keys in the AWS Key Management Service Developer Guide.

(22)

Response Syntax

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1011.

Pattern: \S+

Required: No tags (p. 13)

One or more tag key-value pairs for the domain.

Type: Array of Tag (p. 144) objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Required: No

Response Syntax

HTTP/1.1 200

Content-type: application/json { "domain": {

"arn": "string",

"assetSizeBytes": number, "createdTime": number, "encryptionKey": "string", "name": "string",

"owner": "string",

"repositoryCount": number, "s3BucketArn": "string", "status": "string"

}}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

domain (p. 14)

Contains information about the created domain after processing the request.

Type: DomainDescription (p. 123) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 149).

AccessDeniedException

The operation did not succeed because of an unauthorized access attempt.

HTTP Status Code: 403

(23)

See Also

ConflictException

The operation did not succeed because prerequisites are not met.

HTTP Status Code: 409 InternalServerException

The operation did not succeed because of an error that occurred inside AWS CodeArtifact.

HTTP Status Code: 500 ResourceNotFoundException

The operation did not succeed because the resource requested is not found in the service.

HTTP Status Code: 404 ServiceQuotaExceededException

The operation did not succeed because it would have exceeded a service limit for your account.

HTTP Status Code: 402 ThrottlingException

The operation did not succeed because too many requests are sent to the service.

HTTP Status Code: 429 ValidationException

The operation did not succeed because a parameter in the request was sent with an invalid value.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(24)

CreateRepository

CreateRepository

Creates a repository.

Request Syntax

POST /v1/repository?domain=domain&domain-owner=domainOwner&repository=repository HTTP/1.1 Content-type: application/json

{

"description": "string", "tags": [

{

"key": "string", "value": "string"

} ],

"upstreams": [ {

"repositoryName": "string"

} ] }

URI Request Parameters

The request uses the following URI parameters.

domain (p. 16)

The name of the domain that contains the created repository.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: [a-z][a-z0-9\-]{0,48}[a-z0-9]

Required: Yes domainOwner (p. 16)

The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.

Length Constraints: Fixed length of 12.

Pattern: [0-9]{12}

repository (p. 16)

The name of the repository to create.

Length Constraints: Minimum length of 2. Maximum length of 100.

Pattern: [A-Za-z0-9][A-Za-z0-9._\-]{1,99}

Required: Yes

Request Body

The request accepts the following data in JSON format.

(25)

Response Syntax

description (p. 16)

A description of the created repository.

Type: String

Length Constraints: Maximum length of 1000.

Pattern: \P{C}*

Required: No tags (p. 16)

One or more tag key-value pairs for the repository.

Type: Array of Tag (p. 144) objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Required: No upstreams (p. 16)

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.

Type: Array of UpstreamRepository (p. 145) objects Required: No

Response Syntax

HTTP/1.1 200

Content-type: application/json { "repository": {

"administratorAccount": "string", "arn": "string",

"description": "string", "domainName": "string", "domainOwner": "string", "externalConnections": [ {

"externalConnectionName": "string", "packageFormat": "string",

"status": "string"

} ],

"name": "string", "upstreams": [ {

"repositoryName": "string"

} ] }}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

(26)

Errors

The following data is returned in JSON format by the service.

repository (p. 17)

Information about the created repository after processing the request.

Type: RepositoryDescription (p. 137) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 149).

AccessDeniedException

The operation did not succeed because of an unauthorized access attempt.

HTTP Status Code: 403 ConflictException

The operation did not succeed because prerequisites are not met.

HTTP Status Code: 409 InternalServerException

The operation did not succeed because of an error that occurred inside AWS CodeArtifact.

HTTP Status Code: 500 ResourceNotFoundException

The operation did not succeed because the resource requested is not found in the service.

HTTP Status Code: 404 ServiceQuotaExceededException

The operation did not succeed because it would have exceeded a service limit for your account.

HTTP Status Code: 402 ThrottlingException

The operation did not succeed because too many requests are sent to the service.

HTTP Status Code: 429 ValidationException

The operation did not succeed because a parameter in the request was sent with an invalid value.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

(27)

See Also

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(28)

DeleteDomain

DeleteDomain

Deletes a domain. You cannot delete a domain that contains repositories. If you want to delete a domain with repositories, first delete its repositories.

Request Syntax

DELETE /v1/domain?domain=domain&domain-owner=domainOwner HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

domain (p. 20)

The name of the domain to delete.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: [a-z][a-z0-9\-]{0,48}[a-z0-9]

Required: Yes domainOwner (p. 20)

The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.

Length Constraints: Fixed length of 12.

Pattern: [0-9]{12}

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json { "domain": {

"arn": "string",

"assetSizeBytes": number, "createdTime": number, "encryptionKey": "string", "name": "string",

"owner": "string",

"repositoryCount": number, "s3BucketArn": "string", "status": "string"

}}

(29)

Response Elements

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

domain (p. 20)

Contains information about the deleted domain after processing the request.

Type: DomainDescription (p. 123) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 149).

AccessDeniedException

The operation did not succeed because of an unauthorized access attempt.

HTTP Status Code: 403 ConflictException

The operation did not succeed because prerequisites are not met.

HTTP Status Code: 409 InternalServerException

The operation did not succeed because of an error that occurred inside AWS CodeArtifact.

HTTP Status Code: 500 ThrottlingException

The operation did not succeed because too many requests are sent to the service.

HTTP Status Code: 429 ValidationException

The operation did not succeed because a parameter in the request was sent with an invalid value.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

(30)

See Also

• AWS SDK for Ruby V3

(31)

DeleteDomainPermissionsPolicy

DeleteDomainPermissionsPolicy

Deletes the resource policy set on a domain.

Request Syntax

DELETE /v1/domain/permissions/policy?domain=domain&domain-owner=domainOwner&policy- revision=policyRevision HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

domain (p. 23)

The name of the domain associated with the resource policy to be deleted.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: [a-z][a-z0-9\-]{0,48}[a-z0-9]

Required: Yes domainOwner (p. 23)

The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.

Length Constraints: Fixed length of 12.

Pattern: [0-9]{12}

policyRevision (p. 23)

The current revision of the resource policy to be deleted. This revision is used for optimistic locking, which prevents others from overwriting your changes to the domain's resource policy.

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: \S+

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json {

"policy": {

"document": "string", "resourceArn": "string", "revision": "string"

}

(32)

Response Elements

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

policy (p. 23)

Information about the deleted resource policy after processing the request.

Type: ResourcePolicy (p. 142) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 149).

AccessDeniedException

The operation did not succeed because of an unauthorized access attempt.

HTTP Status Code: 403 ConflictException

The operation did not succeed because prerequisites are not met.

HTTP Status Code: 409 InternalServerException

The operation did not succeed because of an error that occurred inside AWS CodeArtifact.

HTTP Status Code: 500 ResourceNotFoundException

The operation did not succeed because the resource requested is not found in the service.

HTTP Status Code: 404 ThrottlingException

The operation did not succeed because too many requests are sent to the service.

HTTP Status Code: 429 ValidationException

The operation did not succeed because a parameter in the request was sent with an invalid value.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

(33)

See Also

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(34)

DeletePackageVersions

DeletePackageVersions

Deletes one or more versions of a package. A deleted package version cannot be restored in your repository. If you want to remove a package version from your repository and be able to restore it later, set its status to Archived. Archived packages cannot be downloaded from a repository and don't show up with list package APIs (for example, ListackageVersions), but you can restore them using UpdatePackageVersionsStatus.

Request Syntax

POST /v1/package/versions/delete?domain=domain&domain-

owner=domainOwner&format=format&namespace=namespace&package=package&repository=repository HTTP/1.1

Content-type: application/json { "expectedStatus": "string", "versions": [ "string" ] }

URI Request Parameters

The request uses the following URI parameters.

domain (p. 26)

The name of the domain that contains the package to delete.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: [a-z][a-z0-9\-]{0,48}[a-z0-9]

Required: Yes domainOwner (p. 26)

The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.

Length Constraints: Fixed length of 12.

Pattern: [0-9]{12}

format (p. 26)

The format of the package versions to delete. The valid values are:

• maven

• npm

• nuget

• pypi

Valid Values: npm | pypi | maven | nuget Required: Yes

namespace (p. 26)

The namespace of the package. The package component that specifies its namespace depends on its type. For example:

(35)

Request Body

• The namespace of a Maven package is its groupId.

• The namespace of an npm package is its scope.

• A Python package does not contain a corresponding component, so Python packages do not have a namespace.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [^!#/\s]+

package (p. 26)

The name of the package with the versions to delete.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [^!#/\s]+

Required: Yes repository (p. 26)

The name of the repository that contains the package versions to delete.

Length Constraints: Minimum length of 2. Maximum length of 100.

Pattern: [A-Za-z0-9][A-Za-z0-9._\-]{1,99}

Required: Yes

Request Body

The request accepts the following data in JSON format.

expectedStatus (p. 26)

The expected status of the package version to delete. Valid values are:

• Published

• Unfinished

• Unlisted

• Archived

• Disposed Type: String

Valid Values: Published | Unfinished | Unlisted | Archived | Disposed | Deleted Required: No

versions (p. 26)

An array of strings that specify the versions of the package to delete.

Type: Array of strings

Array Members: Maximum number of 100 items.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [^!#/\s]+

Required: Yes

(36)

Response Syntax

Response Syntax

HTTP/1.1 200

Content-type: application/json { "failedVersions": {

"string" : {

"errorCode": "string", "errorMessage": "string"

} },

"successfulVersions": { "string" : {

"revision": "string", "status": "string"

} }}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

failedVersions (p. 28)

A PackageVersionError object that contains a map of errors codes for the deleted package that failed. The possible error codes are:

• ALREADY_EXISTS

• MISMATCHED_REVISION

• MISMATCHED_STATUS

• NOT_ALLOWED

• NOT_FOUND

• SKIPPED

Type: String to PackageVersionError (p. 135) object map

Key Length Constraints: Minimum length of 1. Maximum length of 255.

Key Pattern: [^!#/\s]+

successfulVersions (p. 28)

A list of the package versions that were successfully deleted.

Type: String to SuccessfulPackageVersionInfo (p. 143) object map Key Length Constraints: Minimum length of 1. Maximum length of 255.

Key Pattern: [^!#/\s]+

Errors

For information about the errors that are common to all actions, see Common Errors (p. 149).

(37)

See Also

AccessDeniedException

The operation did not succeed because of an unauthorized access attempt.

HTTP Status Code: 403 ConflictException

The operation did not succeed because prerequisites are not met.

HTTP Status Code: 409 InternalServerException

The operation did not succeed because of an error that occurred inside AWS CodeArtifact.

HTTP Status Code: 500 ResourceNotFoundException

The operation did not succeed because the resource requested is not found in the service.

HTTP Status Code: 404 ThrottlingException

The operation did not succeed because too many requests are sent to the service.

HTTP Status Code: 429 ValidationException

The operation did not succeed because a parameter in the request was sent with an invalid value.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(38)

DeleteRepository

DeleteRepository

Deletes a repository.

Request Syntax

DELETE /v1/repository?domain=domain&domain-owner=domainOwner&repository=repository HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

domain (p. 30)

The name of the domain that contains the repository to delete.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: [a-z][a-z0-9\-]{0,48}[a-z0-9]

Required: Yes domainOwner (p. 30)

The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.

Length Constraints: Fixed length of 12.

Pattern: [0-9]{12}

repository (p. 30)

The name of the repository to delete.

Length Constraints: Minimum length of 2. Maximum length of 100.

Pattern: [A-Za-z0-9][A-Za-z0-9._\-]{1,99}

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json {

"repository": {

"administratorAccount": "string", "arn": "string",

"description": "string", "domainName": "string",

(39)

Response Elements

"domainOwner": "string", "externalConnections": [ {

"externalConnectionName": "string", "packageFormat": "string",

"status": "string"

} ],

"name": "string", "upstreams": [ {

"repositoryName": "string"

} ] }}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

repository (p. 30)

Information about the deleted repository after processing the request.

Type: RepositoryDescription (p. 137) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 149).

AccessDeniedException

The operation did not succeed because of an unauthorized access attempt.

HTTP Status Code: 403 ConflictException

The operation did not succeed because prerequisites are not met.

HTTP Status Code: 409 InternalServerException

The operation did not succeed because of an error that occurred inside AWS CodeArtifact.

HTTP Status Code: 500 ResourceNotFoundException

The operation did not succeed because the resource requested is not found in the service.

HTTP Status Code: 404 ThrottlingException

The operation did not succeed because too many requests are sent to the service.

HTTP Status Code: 429

(40)

See Also

ValidationException

The operation did not succeed because a parameter in the request was sent with an invalid value.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(41)

DeleteRepositoryPermissionsPolicy

DeleteRepositoryPermissionsPolicy

Deletes the resource policy that is set on a repository. After a resource policy is deleted, the permissions allowed and denied by the deleted policy are removed. The effect of deleting a resource policy might not be immediate.

Important

Use DeleteRepositoryPermissionsPolicy with caution. After a policy is deleted, AWS users, roles, and accounts lose permissions to perform the repository actions granted by the deleted policy.

Request Syntax

DELETE /v1/repository/permissions/policies?domain=domain&domain-owner=domainOwner&policy- revision=policyRevision&repository=repository HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

domain (p. 33)

The name of the domain that contains the repository associated with the resource policy to be deleted.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: [a-z][a-z0-9\-]{0,48}[a-z0-9]

Required: Yes domainOwner (p. 33)

The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.

Length Constraints: Fixed length of 12.

Pattern: [0-9]{12}

policyRevision (p. 33)

The revision of the repository's resource policy to be deleted. This revision is used for optimistic locking, which prevents others from accidentally overwriting your changes to the repository's resource policy.

Length Constraints: Minimum length of 1. Maximum length of 100.

Pattern: \S+

repository (p. 33)

The name of the repository that is associated with the resource policy to be deleted Length Constraints: Minimum length of 2. Maximum length of 100.

Pattern: [A-Za-z0-9][A-Za-z0-9._\-]{1,99}

Required: Yes

(42)

Request Body

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json { "policy": {

"document": "string", "resourceArn": "string", "revision": "string"

}}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

policy (p. 34)

Information about the deleted policy after processing the request.

Type: ResourcePolicy (p. 142) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 149).

AccessDeniedException

The operation did not succeed because of an unauthorized access attempt.

HTTP Status Code: 403 ConflictException

The operation did not succeed because prerequisites are not met.

HTTP Status Code: 409 InternalServerException

The operation did not succeed because of an error that occurred inside AWS CodeArtifact.

HTTP Status Code: 500 ResourceNotFoundException

The operation did not succeed because the resource requested is not found in the service.

HTTP Status Code: 404 ThrottlingException

The operation did not succeed because too many requests are sent to the service.

(43)

See Also

HTTP Status Code: 429 ValidationException

The operation did not succeed because a parameter in the request was sent with an invalid value.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(44)

DescribeDomain

DescribeDomain

Returns a DomainDescription object that contains information about the requested domain.

Request Syntax

GET /v1/domain?domain=domain&domain-owner=domainOwner HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

domain (p. 36)

A string that specifies the name of the requested domain.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: [a-z][a-z0-9\-]{0,48}[a-z0-9]

Required: Yes domainOwner (p. 36)

The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.

Length Constraints: Fixed length of 12.

Pattern: [0-9]{12}

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json { "domain": {

"arn": "string",

"assetSizeBytes": number, "createdTime": number, "encryptionKey": "string", "name": "string",

"owner": "string",

"repositoryCount": number, "s3BucketArn": "string", "status": "string"

}}

(45)

Response Elements

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

domain (p. 36)

Information about a domain. A domain is a container for repositories. When you create a domain, it is empty until you add one or more repositories.

Type: DomainDescription (p. 123) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 149).

AccessDeniedException

The operation did not succeed because of an unauthorized access attempt.

HTTP Status Code: 403 InternalServerException

The operation did not succeed because of an error that occurred inside AWS CodeArtifact.

HTTP Status Code: 500 ResourceNotFoundException

The operation did not succeed because the resource requested is not found in the service.

HTTP Status Code: 404 ThrottlingException

The operation did not succeed because too many requests are sent to the service.

HTTP Status Code: 429 ValidationException

The operation did not succeed because a parameter in the request was sent with an invalid value.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

(46)

See Also

• AWS SDK for Python

• AWS SDK for Ruby V3

(47)

DescribePackageVersion

DescribePackageVersion

Returns a PackageVersionDescription object that contains information about the requested package version.

Request Syntax

GET /v1/package/version?domain=domain&domain-

owner=domainOwner&format=format&namespace=namespace&package=package&repository=repository&version=packageVersion HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

domain (p. 39)

The name of the domain that contains the repository that contains the package version.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: [a-z][a-z0-9\-]{0,48}[a-z0-9]

Required: Yes domainOwner (p. 39)

The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.

Length Constraints: Fixed length of 12.

Pattern: [0-9]{12}

format (p. 39)

A format that specifies the type of the requested package version. The valid values are:

• maven

• npm

• nuget

• pypi

Valid Values: npm | pypi | maven | nuget Required: Yes

namespace (p. 39)

The namespace of the package. The package component that specifies its namespace depends on its type. For example:

• The namespace of a Maven package is its groupId.

• The namespace of an npm package is its scope.

• A Python package does not contain a corresponding component, so Python packages do not have a namespace.

Length Constraints: Minimum length of 1. Maximum length of 255.

(48)

Request Body

Pattern: [^!#/\s]+

package (p. 39)

The name of the requested package version.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [^!#/\s]+

Required: Yes packageVersion (p. 39)

A string that contains the package version (for example, 3.5.2).

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [^!#/\s]+

Required: Yes repository (p. 39)

The name of the repository that contains the package version.

Length Constraints: Minimum length of 2. Maximum length of 100.

Pattern: [A-Za-z0-9][A-Za-z0-9._\-]{1,99}

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json {

"packageVersion": { "displayName": "string", "format": "string", "homePage": "string", "licenses": [ {

"name": "string", "url": "string"

} ],

"namespace": "string", "packageName": "string", "publishedTime": number, "revision": "string",

"sourceCodeRepository": "string", "status": "string",

"summary": "string", "version": "string"

}}

(49)

Response Elements

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

packageVersion (p. 40)

A PackageVersionDescription object that contains information about the requested package version.

Type: PackageVersionDescription (p. 132) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 149).

AccessDeniedException

The operation did not succeed because of an unauthorized access attempt.

HTTP Status Code: 403 ConflictException

The operation did not succeed because prerequisites are not met.

HTTP Status Code: 409 InternalServerException

The operation did not succeed because of an error that occurred inside AWS CodeArtifact.

HTTP Status Code: 500 ResourceNotFoundException

The operation did not succeed because the resource requested is not found in the service.

HTTP Status Code: 404 ThrottlingException

The operation did not succeed because too many requests are sent to the service.

HTTP Status Code: 429 ValidationException

The operation did not succeed because a parameter in the request was sent with an invalid value.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

(50)

See Also

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(51)

DescribeRepository

DescribeRepository

Returns a RepositoryDescription object that contains detailed information about the requested repository.

Request Syntax

GET /v1/repository?domain=domain&domain-owner=domainOwner&repository=repository HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

domain (p. 43)

The name of the domain that contains the repository to describe.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: [a-z][a-z0-9\-]{0,48}[a-z0-9]

Required: Yes domainOwner (p. 43)

The 12-digit account number of the AWS account that owns the domain. It does not include dashes or spaces.

Length Constraints: Fixed length of 12.

Pattern: [0-9]{12}

repository (p. 43)

A string that specifies the name of the requested repository.

Length Constraints: Minimum length of 2. Maximum length of 100.

Pattern: [A-Za-z0-9][A-Za-z0-9._\-]{1,99}

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json { "repository": {

"administratorAccount": "string", "arn": "string",

"description": "string",

參考文獻

相關文件

Now, nearly all of the current flows through wire S since it has a much lower resistance than the light bulb. The light bulb does not glow because the current flowing through it

We point out that extending the concepts of r-convex and quasi-convex functions to the setting associated with second-order cone, which be- longs to symmetric cones, is not easy

volume suppressed mass: (TeV) 2 /M P ∼ 10 −4 eV → mm range can be experimentally tested for any number of extra dimensions - Light U(1) gauge bosons: no derivative couplings. =>

incapable to extract any quantities from QCD, nor to tackle the most interesting physics, namely, the spontaneously chiral symmetry breaking and the color confinement.. 

• Formation of massive primordial stars as origin of objects in the early universe. • Supernova explosions might be visible to the most

Let us suppose that the source information is in the form of strings of length k, over the input alphabet I of size r and that the r-ary block code C consist of codewords of

The algorithms have potential applications in several ar- eas of biomolecular sequence analysis including locating GC-rich regions in a genomic DNA sequence, post-processing

(Another example of close harmony is the four-bar unaccompanied vocal introduction to “Paperback Writer”, a somewhat later Beatles song.) Overall, Lennon’s and McCartney’s