• 沒有找到結果。

See Also

在文檔中 AWS CodeArtifact (頁 23-129)

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

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": [

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.

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": [

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

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++

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

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"

}}

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

See Also

• AWS SDK for Ruby V3

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"

}

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

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

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. { "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:

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

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

Response Syntax

"successfulVersions": { "string" : {

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

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

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

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",

Response Elements

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

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

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

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

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.

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

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"

}}

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

See Also

• AWS SDK for Python

• AWS SDK for Ruby V3

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.

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

在文檔中 AWS CodeArtifact (頁 23-129)

相關文件