We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Class: AWS.CodeArtifact

Inherits:
AWS.Service show all
Identifier:
codeartifact
API Version:
2018-09-22
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

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.

CodeArtifact concepts

  • 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), NuGet CLIs (nuget and dotnet), and the Swift package manager ( swift ).

  • 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 Key Management Service (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, NuGet, Swift, and generic 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 group: A group of packages that match a specified definition. Package groups can be used to apply configuration to multiple packages that match a defined pattern using package format, package namespace, and package name. You can use package groups to more conveniently configure package origin controls for multiple packages. Package origin controls are used to block or allow ingestion or publishing of new package versions, which protects users from malicious actions known as dependency substitution attacks.

  • 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 supported API operations

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

  • CreatePackageGroup: Creates a package group.

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

  • DeletePackage: Deletes a package and all associated package versions.

  • DeletePackageGroup: Deletes a package group. Does not delete packages or package versions that are associated with a package group.

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

  • DescribePackage: Returns a PackageDescription object that contains details about a package.

  • DescribePackageGroup: Returns a PackageGroup object that contains details about a package group.

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

  • GetAssociatedPackageGroup: Returns the most closely associated package group to the specified package.

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

    • generic

    • maven

    • npm

    • nuget

    • pypi

    • swift

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

  • ListAllowedRepositoriesForGroup: Lists the allowed repositories for a package group that has origin configuration set to ALLOW_SPECIFIC_REPOSITORIES.

  • ListAssociatedPackages: Returns a list of packages associated with the requested package group.

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

  • ListPackages: Lists the packages in a repository.

  • ListPackageGroups: Returns a list of package groups in the requested domain.

  • 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 Amazon Web Services account that called this method.

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

  • ListSubPackageGroups: Returns a list of direct children of the specified package group.

  • PublishPackageVersion: Creates a new package version containing one or more assets.

  • PutDomainPermissionsPolicy: Attaches a resource policy to a domain.

  • PutPackageOriginConfiguration: Sets the package origin configuration for a package, which determine how new versions of the package can be added to a specific repository.

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

  • UpdatePackageGroup: Updates a package group. This API cannot be used to update a package group's origin configuration or pattern.

  • UpdatePackageGroupOriginConfiguration: Updates the package origin configuration for a package group.

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

  • UpdateRepository: Updates the properties of a repository.

Sending a Request Using CodeArtifact

var codeartifact = new AWS.CodeArtifact();
codeartifact.associateExternalConnection(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the CodeArtifact object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var codeartifact = new AWS.CodeArtifact({apiVersion: '2018-09-22'});

You can also set the API version globally in AWS.config.apiVersions using the codeartifact service identifier:

AWS.config.apiVersions = {
  codeartifact: '2018-09-22',
  // other service API versions
};

var codeartifact = new AWS.CodeArtifact();

Version:

  • 2018-09-22

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.CodeArtifact(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a CodeArtifact object

var codeartifact = new AWS.CodeArtifact({apiVersion: '2018-09-22'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.CodeArtifact.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.CodeArtifact.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.CodeArtifact.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

associateExternalConnection(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the associateExternalConnection operation

var params = {
  domain: 'STRING_VALUE', /* required */
  externalConnection: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE'
};
codeartifact.associateExternalConnection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (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.

    • repository — (String)

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

    • externalConnection — (String)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repository — (map)

        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 — (Array<map>)

          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.

          • repositoryName — (String)

            The name of an upstream repository.

        • externalConnections — (Array<map>)

          An array of external connections associated with the 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.

            Possible values include:
            • "npm"
            • "pypi"
            • "maven"
            • "nuget"
            • "generic"
            • "swift"
          • status — (String)

            The status of the external connection of a repository. There is one valid value, Available.

            Possible values include:
            • "Available"
        • createdTime — (Date)

          A timestamp that represents the date and time the repository was created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

copyPackageVersions(params = {}, callback) ⇒ AWS.Request

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

Note: You must specify versions or versionRevisions. You cannot specify both.

Service Reference:

Examples:

Calling the copyPackageVersions operation

var params = {
  destinationRepository: 'STRING_VALUE', /* required */
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  sourceRepository: 'STRING_VALUE', /* required */
  allowOverwrite: true || false,
  domainOwner: 'STRING_VALUE',
  includeFromUpstream: true || false,
  namespace: 'STRING_VALUE',
  versionRevisions: {
    '<PackageVersion>': 'STRING_VALUE',
    /* '<PackageVersion>': ... */
  },
  versions: [
    'STRING_VALUE',
    /* more items */
  ]
};
codeartifact.copyPackageVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

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

    • domainOwner — (String)

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

    • sourceRepository — (String)

      The name of the repository that contains the package versions to be copied.

    • destinationRepository — (String)

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

    • format — (String)

      The format of the package versions to be copied.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

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

      Note: The namespace is required when copying package versions of the following formats:
      • Maven
      • Swift
      • generic
      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The name of the package that contains the versions to be copied.

    • versions — (Array<String>)

      The versions of the package to be copied.

      Note: You must specify versions or versionRevisions. You cannot specify both.
    • versionRevisions — (map<String>)

      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.

      Note: You must specify versions or versionRevisions. You cannot specify both.
    • allowOverwrite — (Boolean)

      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.

    • includeFromUpstream — (Boolean)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • successfulVersions — (map<map>)

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

        • revision — (String)

          The revision of a package version.

        • status — (String)

          The status of a package version.

          Possible values include:
          • "Published"
          • "Unfinished"
          • "Unlisted"
          • "Archived"
          • "Disposed"
          • "Deleted"
      • failedVersions — (map<map>)

        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

        • errorCode — (String)

          The error code associated with the error. Valid error codes are:

          • ALREADY_EXISTS

          • MISMATCHED_REVISION

          • MISMATCHED_STATUS

          • NOT_ALLOWED

          • NOT_FOUND

          • SKIPPED

          Possible values include:
          • "ALREADY_EXISTS"
          • "MISMATCHED_REVISION"
          • "MISMATCHED_STATUS"
          • "NOT_ALLOWED"
          • "NOT_FOUND"
          • "SKIPPED"
        • errorMessage — (String)

          The error message associated with the error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createDomain(params = {}, callback) ⇒ AWS.Request

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 Amazon Web Services 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.

Service Reference:

Examples:

Calling the createDomain operation

var params = {
  domain: 'STRING_VALUE', /* required */
  encryptionKey: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
codeartifact.createDomain(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain to create. All domain names in an Amazon Web Services Region that are in the same Amazon Web Services 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.

    • encryptionKey — (String)

      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 Key Management Service API Reference and Key Management Service API Permissions Reference in the Key Management Service Developer Guide.

      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 Key Management Service Developer Guide.

    • tags — (Array<map>)

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

      • keyrequired — (String)

        The tag key.

      • valuerequired — (String)

        The tag value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • domain — (map)

        Contains information about the created domain after processing the request.

        • name — (String)

          The name of the domain.

        • owner — (String)

          The Amazon Web Services account ID that owns the domain.

        • arn — (String)

          The Amazon Resource Name (ARN) of the domain.

        • status — (String)

          The current status of a domain.

          Possible values include:
          • "Active"
          • "Deleted"
        • createdTime — (Date)

          A timestamp that represents the date and time the domain was created.

        • encryptionKey — (String)

          The ARN of an Key Management Service (KMS) key associated with a domain.

        • repositoryCount — (Integer)

          The number of repositories in the domain.

        • assetSizeBytes — (Integer)

          The total size of all assets in the domain.

        • s3BucketArn — (String)

          The Amazon Resource Name (ARN) of the Amazon S3 bucket that is used to store package assets in the domain.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createPackageGroup(params = {}, callback) ⇒ AWS.Request

Creates a package group. For more information about creating package groups, including example CLI commands, see Create a package group in the CodeArtifact User Guide.

Service Reference:

Examples:

Calling the createPackageGroup operation

var params = {
  domain: 'STRING_VALUE', /* required */
  packageGroup: 'STRING_VALUE', /* required */
  contactInfo: 'STRING_VALUE',
  description: 'STRING_VALUE',
  domainOwner: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
codeartifact.createPackageGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain in which you want to create a package group.

    • domainOwner — (String)

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

    • packageGroup — (String)

      The pattern of the package group to create. The pattern is also the identifier of the package group.

    • contactInfo — (String)

      The contact information for the created package group.

    • description — (String)

      A description of the package group.

    • tags — (Array<map>)

      One or more tag key-value pairs for the package group.

      • keyrequired — (String)

        The tag key.

      • valuerequired — (String)

        The tag value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • packageGroup — (map)

        Information about the created package group after processing the request.

        • arn — (String)

          The ARN of the package group.

        • pattern — (String)

          The pattern of the package group. The pattern determines which packages are associated with the package group.

        • domainName — (String)

          The name of the domain that contains the package group.

        • domainOwner — (String)

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

        • createdTime — (Date)

          A timestamp that represents the date and time the package group was created.

        • contactInfo — (String)

          The contact information of the package group.

        • description — (String)

          The description of the package group.

        • originConfiguration — (map)

          The package group origin configuration that determines how package versions can enter repositories.

          • restrictions — (map<map>)

            The origin configuration settings that determine how package versions can enter repositories.

            • mode — (String)

              The package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • effectiveMode — (String)

              The effective package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • inheritedFrom — (map)

              The parent package group that the package group origin restrictions are inherited from.

              • arn — (String)

                The ARN of the package group.

              • pattern — (String)

                The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

            • repositoriesCount — (Integer)

              The number of repositories in the allowed repository list.

        • parent — (map)

          The direct parent package group of the package group.

          • arn — (String)

            The ARN of the package group.

          • pattern — (String)

            The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createRepository(params = {}, callback) ⇒ AWS.Request

Creates a repository.

Service Reference:

Examples:

Calling the createRepository operation

var params = {
  domain: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  domainOwner: 'STRING_VALUE',
  tags: [
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ],
  upstreams: [
    {
      repositoryName: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
codeartifact.createRepository(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the created 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.

    • repository — (String)

      The name of the repository to create.

    • description — (String)

      A description of the created repository.

    • upstreams — (Array<map>)

      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.

      • repositoryNamerequired — (String)

        The name of an upstream repository.

    • tags — (Array<map>)

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

      • keyrequired — (String)

        The tag key.

      • valuerequired — (String)

        The tag value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repository — (map)

        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 — (Array<map>)

          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.

          • repositoryName — (String)

            The name of an upstream repository.

        • externalConnections — (Array<map>)

          An array of external connections associated with the 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.

            Possible values include:
            • "npm"
            • "pypi"
            • "maven"
            • "nuget"
            • "generic"
            • "swift"
          • status — (String)

            The status of the external connection of a repository. There is one valid value, Available.

            Possible values include:
            • "Available"
        • createdTime — (Date)

          A timestamp that represents the date and time the repository was created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDomain(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the deleteDomain operation

var params = {
  domain: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE'
};
codeartifact.deleteDomain(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain to delete.

    • domainOwner — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • domain — (map)

        Contains information about the deleted domain after processing the request.

        • name — (String)

          The name of the domain.

        • owner — (String)

          The Amazon Web Services account ID that owns the domain.

        • arn — (String)

          The Amazon Resource Name (ARN) of the domain.

        • status — (String)

          The current status of a domain.

          Possible values include:
          • "Active"
          • "Deleted"
        • createdTime — (Date)

          A timestamp that represents the date and time the domain was created.

        • encryptionKey — (String)

          The ARN of an Key Management Service (KMS) key associated with a domain.

        • repositoryCount — (Integer)

          The number of repositories in the domain.

        • assetSizeBytes — (Integer)

          The total size of all assets in the domain.

        • s3BucketArn — (String)

          The Amazon Resource Name (ARN) of the Amazon S3 bucket that is used to store package assets in the domain.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteDomainPermissionsPolicy(params = {}, callback) ⇒ AWS.Request

Deletes the resource policy set on a domain.

Service Reference:

Examples:

Calling the deleteDomainPermissionsPolicy operation

var params = {
  domain: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  policyRevision: 'STRING_VALUE'
};
codeartifact.deleteDomainPermissionsPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

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

    • domainOwner — (String)

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

    • policyRevision — (String)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policy — (map)

        Information about the deleted resource policy after processing the request.

        • resourceArn — (String)

          The ARN of the resource associated with the resource policy

        • revision — (String)

          The current revision of the resource policy.

        • document — (String)

          The resource policy formatted in JSON.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deletePackage(params = {}, callback) ⇒ AWS.Request

Deletes a package and all associated package versions. A deleted package cannot be restored. To delete one or more package versions, use the DeletePackageVersions API.

Service Reference:

Examples:

Calling the deletePackage operation

var params = {
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  namespace: 'STRING_VALUE'
};
codeartifact.deletePackage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

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

    • domainOwner — (String)

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

    • repository — (String)

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

    • format — (String)

      The format of the requested package to delete.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

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

      Note: The namespace is required when deleting packages of the following formats:
      • Maven
      • Swift
      • generic
      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The name of the package to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • deletedPackage — (map)

        Details about a package, including its format, namespace, and name.

        • format — (String)

          The format of the package.

          Possible values include:
          • "npm"
          • "pypi"
          • "maven"
          • "nuget"
          • "generic"
          • "swift"
        • namespace — (String)

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

          • The namespace of a Maven package version is its groupId.

          • The namespace of an npm or Swift package version is its scope.

          • The namespace of a generic package is its namespace.

          • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

        • package — (String)

          The name of the package.

        • originConfiguration — (map)

          A PackageOriginConfiguration object that contains a PackageOriginRestrictions object that contains information about the upstream and publish package origin restrictions.

          • restrictions — (map)

            A PackageOriginRestrictions object that contains information about the upstream and publish package origin configuration for the package.

            • publishrequired — (String)

              The package origin configuration that determines if new versions of the package can be published directly to the repository.

              Possible values include:
              • "ALLOW"
              • "BLOCK"
            • upstreamrequired — (String)

              The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

              Possible values include:
              • "ALLOW"
              • "BLOCK"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deletePackageGroup(params = {}, callback) ⇒ AWS.Request

Deletes a package group. Deleting a package group does not delete packages or package versions associated with the package group. When a package group is deleted, the direct child package groups will become children of the package group's direct parent package group. Therefore, if any of the child groups are inheriting any settings from the parent, those settings could change.

Service Reference:

Examples:

Calling the deletePackageGroup operation

var params = {
  domain: 'STRING_VALUE', /* required */
  packageGroup: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE'
};
codeartifact.deletePackageGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The domain that contains the package group to be deleted.

    • domainOwner — (String)

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

    • packageGroup — (String)

      The pattern of the package group to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • packageGroup — (map)

        Information about the deleted package group after processing the request.

        • arn — (String)

          The ARN of the package group.

        • pattern — (String)

          The pattern of the package group. The pattern determines which packages are associated with the package group.

        • domainName — (String)

          The name of the domain that contains the package group.

        • domainOwner — (String)

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

        • createdTime — (Date)

          A timestamp that represents the date and time the package group was created.

        • contactInfo — (String)

          The contact information of the package group.

        • description — (String)

          The description of the package group.

        • originConfiguration — (map)

          The package group origin configuration that determines how package versions can enter repositories.

          • restrictions — (map<map>)

            The origin configuration settings that determine how package versions can enter repositories.

            • mode — (String)

              The package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • effectiveMode — (String)

              The effective package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • inheritedFrom — (map)

              The parent package group that the package group origin restrictions are inherited from.

              • arn — (String)

                The ARN of the package group.

              • pattern — (String)

                The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

            • repositoriesCount — (Integer)

              The number of repositories in the allowed repository list.

        • parent — (map)

          The direct parent package group of the package group.

          • arn — (String)

            The ARN of the package group.

          • pattern — (String)

            The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deletePackageVersions(params = {}, callback) ⇒ AWS.Request

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, ListPackageVersions), but you can restore them using UpdatePackageVersionsStatus.

Service Reference:

Examples:

Calling the deletePackageVersions operation

var params = {
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  versions: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  domainOwner: 'STRING_VALUE',
  expectedStatus: Published | Unfinished | Unlisted | Archived | Disposed | Deleted,
  namespace: 'STRING_VALUE'
};
codeartifact.deletePackageVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

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

    • domainOwner — (String)

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

    • repository — (String)

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

    • format — (String)

      The format of the package versions to delete.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

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

      Note: The namespace is required when deleting package versions of the following formats:
      • Maven
      • Swift
      • generic
      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The name of the package with the versions to delete.

    • versions — (Array<String>)

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

    • expectedStatus — (String)

      The expected status of the package version to delete.

      Possible values include:
      • "Published"
      • "Unfinished"
      • "Unlisted"
      • "Archived"
      • "Disposed"
      • "Deleted"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • successfulVersions — (map<map>)

        A list of the package versions that were successfully deleted. The status of every successful version will be Deleted.

        • revision — (String)

          The revision of a package version.

        • status — (String)

          The status of a package version.

          Possible values include:
          • "Published"
          • "Unfinished"
          • "Unlisted"
          • "Archived"
          • "Disposed"
          • "Deleted"
      • failedVersions — (map<map>)

        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

        • errorCode — (String)

          The error code associated with the error. Valid error codes are:

          • ALREADY_EXISTS

          • MISMATCHED_REVISION

          • MISMATCHED_STATUS

          • NOT_ALLOWED

          • NOT_FOUND

          • SKIPPED

          Possible values include:
          • "ALREADY_EXISTS"
          • "MISMATCHED_REVISION"
          • "MISMATCHED_STATUS"
          • "NOT_ALLOWED"
          • "NOT_FOUND"
          • "SKIPPED"
        • errorMessage — (String)

          The error message associated with the error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteRepository(params = {}, callback) ⇒ AWS.Request

Deletes a repository.

Service Reference:

Examples:

Calling the deleteRepository operation

var params = {
  domain: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE'
};
codeartifact.deleteRepository(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

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

    • domainOwner — (String)

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

    • repository — (String)

      The name of the repository to delete.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repository — (map)

        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 — (Array<map>)

          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.

          • repositoryName — (String)

            The name of an upstream repository.

        • externalConnections — (Array<map>)

          An array of external connections associated with the 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.

            Possible values include:
            • "npm"
            • "pypi"
            • "maven"
            • "nuget"
            • "generic"
            • "swift"
          • status — (String)

            The status of the external connection of a repository. There is one valid value, Available.

            Possible values include:
            • "Available"
        • createdTime — (Date)

          A timestamp that represents the date and time the repository was created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteRepositoryPermissionsPolicy(params = {}, callback) ⇒ AWS.Request

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.

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

Examples:

Calling the deleteRepositoryPermissionsPolicy operation

var params = {
  domain: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  policyRevision: 'STRING_VALUE'
};
codeartifact.deleteRepositoryPermissionsPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

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

    • domainOwner — (String)

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

    • repository — (String)

      The name of the repository that is associated with the resource policy to be deleted

    • policyRevision — (String)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policy — (map)

        Information about the deleted policy after processing the request.

        • resourceArn — (String)

          The ARN of the resource associated with the resource policy

        • revision — (String)

          The current revision of the resource policy.

        • document — (String)

          The resource policy formatted in JSON.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeDomain(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the describeDomain operation

var params = {
  domain: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE'
};
codeartifact.describeDomain(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      A string that specifies the name of the requested domain.

    • domainOwner — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • domain — (map)

        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.

        • name — (String)

          The name of the domain.

        • owner — (String)

          The Amazon Web Services account ID that owns the domain.

        • arn — (String)

          The Amazon Resource Name (ARN) of the domain.

        • status — (String)

          The current status of a domain.

          Possible values include:
          • "Active"
          • "Deleted"
        • createdTime — (Date)

          A timestamp that represents the date and time the domain was created.

        • encryptionKey — (String)

          The ARN of an Key Management Service (KMS) key associated with a domain.

        • repositoryCount — (Integer)

          The number of repositories in the domain.

        • assetSizeBytes — (Integer)

          The total size of all assets in the domain.

        • s3BucketArn — (String)

          The Amazon Resource Name (ARN) of the Amazon S3 bucket that is used to store package assets in the domain.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describePackage(params = {}, callback) ⇒ AWS.Request

Returns a PackageDescription object that contains information about the requested package.

Service Reference:

Examples:

Calling the describePackage operation

var params = {
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  namespace: 'STRING_VALUE'
};
codeartifact.describePackage(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

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

    • domainOwner — (String)

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

    • repository — (String)

      The name of the repository that contains the requested package.

    • format — (String)

      A format that specifies the type of the requested package.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

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

      Note: The namespace is required when requesting packages of the following formats:
      • Maven
      • Swift
      • generic
      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The name of the requested package.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • package — (map)

        A PackageDescription object that contains information about the requested package.

        • format — (String)

          A format that specifies the type of the package.

          Possible values include:
          • "npm"
          • "pypi"
          • "maven"
          • "nuget"
          • "generic"
          • "swift"
        • namespace — (String)

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

          • The namespace of a Maven package version is its groupId.

          • The namespace of an npm or Swift package version is its scope.

          • The namespace of a generic package is its namespace.

          • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

        • name — (String)

          The name of the package.

        • originConfiguration — (map)

          The package origin configuration for the package.

          • restrictions — (map)

            A PackageOriginRestrictions object that contains information about the upstream and publish package origin configuration for the package.

            • publishrequired — (String)

              The package origin configuration that determines if new versions of the package can be published directly to the repository.

              Possible values include:
              • "ALLOW"
              • "BLOCK"
            • upstreamrequired — (String)

              The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

              Possible values include:
              • "ALLOW"
              • "BLOCK"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describePackageGroup(params = {}, callback) ⇒ AWS.Request

Returns a PackageGroupDescription object that contains information about the requested package group.

Service Reference:

Examples:

Calling the describePackageGroup operation

var params = {
  domain: 'STRING_VALUE', /* required */
  packageGroup: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE'
};
codeartifact.describePackageGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the package group.

    • domainOwner — (String)

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

    • packageGroup — (String)

      The pattern of the requested package group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • packageGroup — (map)

        A PackageGroupDescription object that contains information about the requested package group.

        • arn — (String)

          The ARN of the package group.

        • pattern — (String)

          The pattern of the package group. The pattern determines which packages are associated with the package group.

        • domainName — (String)

          The name of the domain that contains the package group.

        • domainOwner — (String)

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

        • createdTime — (Date)

          A timestamp that represents the date and time the package group was created.

        • contactInfo — (String)

          The contact information of the package group.

        • description — (String)

          The description of the package group.

        • originConfiguration — (map)

          The package group origin configuration that determines how package versions can enter repositories.

          • restrictions — (map<map>)

            The origin configuration settings that determine how package versions can enter repositories.

            • mode — (String)

              The package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • effectiveMode — (String)

              The effective package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • inheritedFrom — (map)

              The parent package group that the package group origin restrictions are inherited from.

              • arn — (String)

                The ARN of the package group.

              • pattern — (String)

                The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

            • repositoriesCount — (Integer)

              The number of repositories in the allowed repository list.

        • parent — (map)

          The direct parent package group of the package group.

          • arn — (String)

            The ARN of the package group.

          • pattern — (String)

            The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describePackageVersion(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the describePackageVersion operation

var params = {
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  packageVersion: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  namespace: 'STRING_VALUE'
};
codeartifact.describePackageVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

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

    • domainOwner — (String)

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

    • repository — (String)

      The name of the repository that contains the package version.

    • format — (String)

      A format that specifies the type of the requested package version.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

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

      Note: The namespace is required when requesting package versions of the following formats:
      • Maven
      • Swift
      • generic
      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The name of the requested package version.

    • packageVersion — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • packageVersion — (map)

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

        • format — (String)

          The format of the package version.

          Possible values include:
          • "npm"
          • "pypi"
          • "maven"
          • "nuget"
          • "generic"
          • "swift"
        • namespace — (String)

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

          • The namespace of a Maven package version is its groupId.

          • The namespace of an npm or Swift package version is its scope.

          • The namespace of a generic package is its namespace.

          • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

        • packageName — (String)

          The name of the requested package.

        • displayName — (String)

          The name of the package that is displayed. The displayName varies depending on the package version's format. For example, if an npm package is named ui, is in the namespace vue, and has the format npm, then the displayName is @vue/ui.

        • version — (String)

          The version of the package.

        • summary — (String)

          A summary of the package version. The summary is extracted from the package. The information in and detail level of the summary depends on the package version's format.

        • homePage — (String)

          The homepage associated with the package.

        • sourceCodeRepository — (String)

          The repository for the source code in the package version, or the source code used to build it.

        • publishedTime — (Date)

          A timestamp that contains the date and time the package version was published.

        • licenses — (Array<map>)

          Information about licenses associated with the package version.

          • name — (String)

            Name of the license.

          • url — (String)

            The URL for license data.

        • revision — (String)

          The revision of the package version.

        • status — (String)

          A string that contains the status of the package version.

          Possible values include:
          • "Published"
          • "Unfinished"
          • "Unlisted"
          • "Archived"
          • "Disposed"
          • "Deleted"
        • origin — (map)

          A PackageVersionOrigin object that contains information about how the package version was added to the repository.

          • domainEntryPoint — (map)

            A DomainEntryPoint object that contains information about from which repository or external connection the package version was added to the domain.

            • repositoryName — (String)

              The name of the repository that a package was originally published to.

            • externalConnectionName — (String)

              The name of the external connection that a package was ingested from.

          • originType — (String)

            Describes how the package version was originally added to the domain. An INTERNAL origin type means the package version was published directly to a repository in the domain. An EXTERNAL origin type means the package version was ingested from an external connection.

            Possible values include:
            • "INTERNAL"
            • "EXTERNAL"
            • "UNKNOWN"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeRepository(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the describeRepository operation

var params = {
  domain: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE'
};
codeartifact.describeRepository(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

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

    • domainOwner — (String)

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

    • repository — (String)

      A string that specifies the name of the requested repository.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repository — (map)

        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 — (Array<map>)

          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.

          • repositoryName — (String)

            The name of an upstream repository.

        • externalConnections — (Array<map>)

          An array of external connections associated with the 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.

            Possible values include:
            • "npm"
            • "pypi"
            • "maven"
            • "nuget"
            • "generic"
            • "swift"
          • status — (String)

            The status of the external connection of a repository. There is one valid value, Available.

            Possible values include:
            • "Available"
        • createdTime — (Date)

          A timestamp that represents the date and time the repository was created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateExternalConnection(params = {}, callback) ⇒ AWS.Request

Removes an existing external connection from a repository.

Service Reference:

Examples:

Calling the disassociateExternalConnection operation

var params = {
  domain: 'STRING_VALUE', /* required */
  externalConnection: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE'
};
codeartifact.disassociateExternalConnection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the repository from which to remove the external 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.

    • repository — (String)

      The name of the repository from which the external connection will be removed.

    • externalConnection — (String)

      The name of the external connection to be removed from the repository.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repository — (map)

        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 — (Array<map>)

          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.

          • repositoryName — (String)

            The name of an upstream repository.

        • externalConnections — (Array<map>)

          An array of external connections associated with the 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.

            Possible values include:
            • "npm"
            • "pypi"
            • "maven"
            • "nuget"
            • "generic"
            • "swift"
          • status — (String)

            The status of the external connection of a repository. There is one valid value, Available.

            Possible values include:
            • "Available"
        • createdTime — (Date)

          A timestamp that represents the date and time the repository was created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disposePackageVersions(params = {}, callback) ⇒ AWS.Request

Deletes the assets in package versions and sets the package versions' status to Disposed. A disposed package version cannot be restored in your repository because its assets are deleted.

To view all disposed package versions in a repository, use ListPackageVersions and set the status parameter to Disposed.

To view information about a disposed package version, use DescribePackageVersion.

Service Reference:

Examples:

Calling the disposePackageVersions operation

var params = {
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  versions: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  domainOwner: 'STRING_VALUE',
  expectedStatus: Published | Unfinished | Unlisted | Archived | Disposed | Deleted,
  namespace: 'STRING_VALUE',
  versionRevisions: {
    '<PackageVersion>': 'STRING_VALUE',
    /* '<PackageVersion>': ... */
  }
};
codeartifact.disposePackageVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the repository you want to dispose.

    • domainOwner — (String)

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

    • repository — (String)

      The name of the repository that contains the package versions you want to dispose.

    • format — (String)

      A format that specifies the type of package versions you want to dispose.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

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

      Note: The namespace is required when disposing package versions of the following formats:
      • Maven
      • Swift
      • generic
      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The name of the package with the versions you want to dispose.

    • versions — (Array<String>)

      The versions of the package you want to dispose.

    • versionRevisions — (map<String>)

      The revisions of the package versions you want to dispose.

    • expectedStatus — (String)

      The expected status of the package version to dispose.

      Possible values include:
      • "Published"
      • "Unfinished"
      • "Unlisted"
      • "Archived"
      • "Disposed"
      • "Deleted"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • successfulVersions — (map<map>)

        A list of the package versions that were successfully disposed.

        • revision — (String)

          The revision of a package version.

        • status — (String)

          The status of a package version.

          Possible values include:
          • "Published"
          • "Unfinished"
          • "Unlisted"
          • "Archived"
          • "Disposed"
          • "Deleted"
      • failedVersions — (map<map>)

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

        • ALREADY_EXISTS

        • MISMATCHED_REVISION

        • MISMATCHED_STATUS

        • NOT_ALLOWED

        • NOT_FOUND

        • SKIPPED

        • errorCode — (String)

          The error code associated with the error. Valid error codes are:

          • ALREADY_EXISTS

          • MISMATCHED_REVISION

          • MISMATCHED_STATUS

          • NOT_ALLOWED

          • NOT_FOUND

          • SKIPPED

          Possible values include:
          • "ALREADY_EXISTS"
          • "MISMATCHED_REVISION"
          • "MISMATCHED_STATUS"
          • "NOT_ALLOWED"
          • "NOT_FOUND"
          • "SKIPPED"
        • errorMessage — (String)

          The error message associated with the error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getAssociatedPackageGroup(params = {}, callback) ⇒ AWS.Request

Returns the most closely associated package group to the specified package. This API does not require that the package exist in any repository in the domain. As such, GetAssociatedPackageGroup can be used to see which package group's origin configuration applies to a package before that package is in a repository. This can be helpful to check if public packages are blocked without ingesting them.

For information package group association and matching, see Package group definition syntax and matching behavior in the CodeArtifact User Guide.

Service Reference:

Examples:

Calling the getAssociatedPackageGroup operation

var params = {
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  namespace: 'STRING_VALUE'
};
codeartifact.getAssociatedPackageGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the package from which to get the associated package group.

    • domainOwner — (String)

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

    • format — (String)

      The format of the package from which to get the associated package group.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

      The namespace of the package from which to get the associated package group. The package component that specifies its namespace depends on its type. For example:

      Note: The namespace is required when getting associated package groups from packages of the following formats:
      • Maven
      • Swift
      • generic
      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The package from which to get the associated package group.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • packageGroup — (map)

        The package group that is associated with the requested package.

        • arn — (String)

          The ARN of the package group.

        • pattern — (String)

          The pattern of the package group. The pattern determines which packages are associated with the package group.

        • domainName — (String)

          The name of the domain that contains the package group.

        • domainOwner — (String)

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

        • createdTime — (Date)

          A timestamp that represents the date and time the package group was created.

        • contactInfo — (String)

          The contact information of the package group.

        • description — (String)

          The description of the package group.

        • originConfiguration — (map)

          The package group origin configuration that determines how package versions can enter repositories.

          • restrictions — (map<map>)

            The origin configuration settings that determine how package versions can enter repositories.

            • mode — (String)

              The package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • effectiveMode — (String)

              The effective package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • inheritedFrom — (map)

              The parent package group that the package group origin restrictions are inherited from.

              • arn — (String)

                The ARN of the package group.

              • pattern — (String)

                The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

            • repositoriesCount — (Integer)

              The number of repositories in the allowed repository list.

        • parent — (map)

          The direct parent package group of the package group.

          • arn — (String)

            The ARN of the package group.

          • pattern — (String)

            The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

      • associationType — (String)

        Describes the strength of the association between the package and package group. A strong match is also known as an exact match, and a weak match is known as a relative match.

        Possible values include:
        • "STRONG"
        • "WEAK"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getAuthorizationToken(params = {}, callback) ⇒ AWS.Request

Generates a temporary authorization token for accessing repositories in the domain. This API requires the codeartifact:GetAuthorizationToken and sts:GetServiceBearerToken permissions. For more information about authorization tokens, see CodeArtifact authentication and tokens.

Note: CodeArtifact authorization tokens are valid for a period of 12 hours when created with the login command. You can call login periodically to refresh the token. When you create an authorization token with the GetAuthorizationToken API, you can set a custom authorization period, up to a maximum of 12 hours, with the durationSeconds parameter. The authorization period begins after login or GetAuthorizationToken is called. If login or GetAuthorizationToken is called while assuming a role, the token lifetime is independent of the maximum session duration of the role. For example, if you call sts assume-role and specify a session duration of 15 minutes, then generate a CodeArtifact authorization token, the token will be valid for the full authorization period even though this is longer than the 15-minute session duration. See Using IAM Roles for more information on controlling session duration.

Service Reference:

Examples:

Calling the getAuthorizationToken operation

var params = {
  domain: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  durationSeconds: 'NUMBER_VALUE'
};
codeartifact.getAuthorizationToken(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that is in scope for the generated authorization token.

    • domainOwner — (String)

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

    • durationSeconds — (Integer)

      The time, in seconds, that the generated authorization token is valid. Valid values are 0 and any number between 900 (15 minutes) and 43200 (12 hours). A value of 0 will set the expiration of the authorization token to the same expiration of the user's role's temporary credentials.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • authorizationToken — (String)

        The returned authentication token.

      • expiration — (Date)

        A timestamp that specifies the date and time the authorization token expires.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDomainPermissionsPolicy(params = {}, callback) ⇒ AWS.Request

Returns the resource policy attached to the specified domain.

Note: The policy is a resource-based policy, not an identity-based policy. For more information, see Identity-based policies and resource-based policies in the IAM User Guide.

Service Reference:

Examples:

Calling the getDomainPermissionsPolicy operation

var params = {
  domain: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE'
};
codeartifact.getDomainPermissionsPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain to which the resource policy is attached.

    • domainOwner — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policy — (map)

        The returned resource policy.

        • resourceArn — (String)

          The ARN of the resource associated with the resource policy

        • revision — (String)

          The current revision of the resource policy.

        • document — (String)

          The resource policy formatted in JSON.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getPackageVersionAsset(params = {}, callback) ⇒ AWS.Request

Returns an asset (or file) that is in a package. For example, for a Maven package version, use GetPackageVersionAsset to download a JAR file, a POM file, or any other assets in the package version.

Service Reference:

Examples:

Calling the getPackageVersionAsset operation

var params = {
  asset: 'STRING_VALUE', /* required */
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  packageVersion: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  namespace: 'STRING_VALUE',
  packageVersionRevision: 'STRING_VALUE'
};
codeartifact.getPackageVersionAsset(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the repository that contains the package version with the requested asset.

    • domainOwner — (String)

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

    • repository — (String)

      The repository that contains the package version with the requested asset.

    • format — (String)

      A format that specifies the type of the package version with the requested asset file.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

      The namespace of the package version with the requested asset file. The package component that specifies its namespace depends on its type. For example:

      Note: The namespace is required when requesting assets from package versions of the following formats:
      • Maven
      • Swift
      • generic
      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The name of the package that contains the requested asset.

    • packageVersion — (String)

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

    • asset — (String)

      The name of the requested asset.

    • packageVersionRevision — (String)

      The name of the package version revision that contains the requested asset.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • asset — (Buffer(Node.js), Typed Array(Browser), ReadableStream)

        The binary file, or asset, that is downloaded.

      • assetName — (String)

        The name of the asset that is downloaded.

      • packageVersion — (String)

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

      • packageVersionRevision — (String)

        The name of the package version revision that contains the downloaded asset.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getPackageVersionReadme(params = {}, callback) ⇒ AWS.Request

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

The returned text might contain formatting. For example, it might contain formatting for Markdown or reStructuredText.

Service Reference:

Examples:

Calling the getPackageVersionReadme operation

var params = {
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  packageVersion: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  namespace: 'STRING_VALUE'
};
codeartifact.getPackageVersionReadme(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the repository that contains the package version with the requested readme file.

    • domainOwner — (String)

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

    • repository — (String)

      The repository that contains the package with the requested readme file.

    • format — (String)

      A format that specifies the type of the package version with the requested readme file.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

      The namespace of the package version with the requested readme file. The package component that specifies its namespace depends on its type. For example:

      Note: The namespace is required when requesting the readme from package versions of the following formats:
      • Maven
      • Swift
      • generic
      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The name of the package version that contains the requested readme file.

    • packageVersion — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • format — (String)

        The format of the package with the requested readme file.

        Possible values include:
        • "npm"
        • "pypi"
        • "maven"
        • "nuget"
        • "generic"
        • "swift"
      • namespace — (String)

        The namespace of the package version with the requested readme file. The package component that specifies its namespace depends on its type. For example:

        • The namespace of a Maven package version is its groupId.

        • The namespace of an npm or Swift package version is its scope.

        • The namespace of a generic package is its namespace.

        • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

      • package — (String)

        The name of the package that contains the returned readme file.

      • version — (String)

        The version of the package with the requested readme file.

      • versionRevision — (String)

        The current revision associated with the package version.

      • readme — (String)

        The text of the returned readme file.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getRepositoryEndpoint(params = {}, callback) ⇒ AWS.Request

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

  • generic

  • maven

  • npm

  • nuget

  • pypi

  • swift

Service Reference:

Examples:

Calling the getRepositoryEndpoint operation

var params = {
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE'
};
codeartifact.getRepositoryEndpoint(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (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.

    • repository — (String)

      The name of the repository.

    • format — (String)

      Returns which endpoint of a repository to return. A repository has one endpoint for each package format.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repositoryEndpoint — (String)

        A string that specifies the URL of the returned endpoint.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getRepositoryPermissionsPolicy(params = {}, callback) ⇒ AWS.Request

Returns the resource policy that is set on a repository.

Service Reference:

Examples:

Calling the getRepositoryPermissionsPolicy operation

var params = {
  domain: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE'
};
codeartifact.getRepositoryPermissionsPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain containing the repository whose associated resource policy is to be retrieved.

    • domainOwner — (String)

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

    • repository — (String)

      The name of the repository whose associated resource policy is to be retrieved.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policy — (map)

        The returned resource policy.

        • resourceArn — (String)

          The ARN of the resource associated with the resource policy

        • revision — (String)

          The current revision of the resource policy.

        • document — (String)

          The resource policy formatted in JSON.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAllowedRepositoriesForGroup(params = {}, callback) ⇒ AWS.Request

Lists the repositories in the added repositories list of the specified restriction type for a package group. For more information about restriction types and added repository lists, see Package group origin controls in the CodeArtifact User Guide.

Service Reference:

Examples:

Calling the listAllowedRepositoriesForGroup operation

var params = {
  domain: 'STRING_VALUE', /* required */
  originRestrictionType: EXTERNAL_UPSTREAM | INTERNAL_UPSTREAM | PUBLISH, /* required */
  packageGroup: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
codeartifact.listAllowedRepositoriesForGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the package group from which to list allowed repositories.

    • domainOwner — (String)

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

    • packageGroup — (String)

      The pattern of the package group from which to list allowed repositories.

    • originRestrictionType — (String)

      The origin configuration restriction type of which to list allowed repositories.

      Possible values include:
      • "EXTERNAL_UPSTREAM"
      • "INTERNAL_UPSTREAM"
      • "PUBLISH"
    • maxResults — (Integer)

      The maximum number of results to return per page.

    • nextToken — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • allowedRepositories — (Array<String>)

        The list of allowed repositories for the package group and origin configuration restriction type.

      • nextToken — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listAssociatedPackages(params = {}, callback) ⇒ AWS.Request

Returns a list of packages associated with the requested package group. For information package group association and matching, see Package group definition syntax and matching behavior in the CodeArtifact User Guide.

Service Reference:

Examples:

Calling the listAssociatedPackages operation

var params = {
  domain: 'STRING_VALUE', /* required */
  packageGroup: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  preview: true || false
};
codeartifact.listAssociatedPackages(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the package group from which to list associated packages.

    • domainOwner — (String)

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

    • packageGroup — (String)

      The pattern of the package group from which to list associated packages.

    • maxResults — (Integer)

      The maximum number of results to return per page.

    • nextToken — (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.

    • preview — (Boolean)

      When this flag is included, ListAssociatedPackages will return a list of packages that would be associated with a package group, even if it does not exist.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • packages — (Array<map>)

        The list of packages associated with the requested package group.

        • format — (String)

          A format that specifies the type of the associated package.

          Possible values include:
          • "npm"
          • "pypi"
          • "maven"
          • "nuget"
          • "generic"
          • "swift"
        • namespace — (String)

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

          • The namespace of a Maven package version is its groupId.

          • The namespace of an npm or Swift package version is its scope.

          • The namespace of a generic package is its namespace.

          • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

        • package — (String)

          The name of the associated package.

        • associationType — (String)

          Describes the strength of the association between the package and package group. A strong match can be thought of as an exact match, and a weak match can be thought of as a variation match, for example, the package name matches a variation of the package group pattern. For more information about package group pattern matching, including strong and weak matches, see Package group definition syntax and matching behavior in the CodeArtifact User Guide.

          Possible values include:
          • "STRONG"
          • "WEAK"
      • nextToken — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDomains(params = {}, callback) ⇒ AWS.Request

Returns a list of DomainSummary objects for all domains owned by the Amazon Web Services account that makes this call. Each returned DomainSummary object contains information about a domain.

Service Reference:

Examples:

Calling the listDomains operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
codeartifact.listDomains(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • maxResults — (Integer)

      The maximum number of results to return per page.

    • nextToken — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • domains — (Array<map>)

        The returned list of DomainSummary objects.

        • name — (String)

          The name of the domain.

        • owner — (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 domain.

        • status — (String)

          A string that contains the status of the domain.

          Possible values include:
          • "Active"
          • "Deleted"
        • createdTime — (Date)

          A timestamp that contains the date and time the domain was created.

        • encryptionKey — (String)

          The key used to encrypt the domain.

      • nextToken — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPackageGroups(params = {}, callback) ⇒ AWS.Request

Returns a list of package groups in the requested domain.

Service Reference:

Examples:

Calling the listPackageGroups operation

var params = {
  domain: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  prefix: 'STRING_VALUE'
};
codeartifact.listPackageGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The domain for which you want to list package groups.

    • domainOwner — (String)

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

    • maxResults — (Integer)

      The maximum number of results to return per page.

    • nextToken — (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.

    • prefix — (String)

      A prefix for which to search package groups. When included, ListPackageGroups will return only package groups with patterns that match the prefix.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • packageGroups — (Array<map>)

        The list of package groups in the requested domain.

        • arn — (String)

          The ARN of the package group.

        • pattern — (String)

          The pattern of the package group. The pattern determines which packages are associated with the package group.

        • domainName — (String)

          The domain that contains the package group.

        • domainOwner — (String)

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

        • createdTime — (Date)

          A timestamp that represents the date and time the repository was created.

        • contactInfo — (String)

          The contact information of the package group.

        • description — (String)

          The description of the package group.

        • originConfiguration — (map)

          Details about the package origin configuration of a package group.

          • restrictions — (map<map>)

            The origin configuration settings that determine how package versions can enter repositories.

            • mode — (String)

              The package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • effectiveMode — (String)

              The effective package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • inheritedFrom — (map)

              The parent package group that the package group origin restrictions are inherited from.

              • arn — (String)

                The ARN of the package group.

              • pattern — (String)

                The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

            • repositoriesCount — (Integer)

              The number of repositories in the allowed repository list.

        • parent — (map)

          The direct parent package group of the package group.

          • arn — (String)

            The ARN of the package group.

          • pattern — (String)

            The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

      • nextToken — (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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPackages(params = {}, callback) ⇒ AWS.Request

Returns a list of PackageSummary objects for packages in a repository that match the request parameters.

Service Reference:

Examples:

Calling the listPackages operation

var params = {
  domain: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  format: npm | pypi | maven | nuget | generic | swift,
  maxResults: 'NUMBER_VALUE',
  namespace: 'STRING_VALUE',
  nextToken: 'STRING_VALUE',
  packagePrefix: 'STRING_VALUE',
  publish: ALLOW | BLOCK,
  upstream: ALLOW | BLOCK
};
codeartifact.listPackages(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the repository that contains the requested packages.

    • domainOwner — (String)

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

    • repository — (String)

      The name of the repository that contains the requested packages.

    • format — (String)

      The format used to filter requested packages. Only packages from the provided format will be returned.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

      The namespace prefix used to filter requested packages. Only packages with a namespace that starts with the provided string value are returned. Note that although this option is called --namespace and not --namespace-prefix, it has prefix-matching behavior.

      Each package format uses namespace as follows:

      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • packagePrefix — (String)

      A prefix used to filter requested packages. Only packages with names that start with packagePrefix are returned.

    • maxResults — (Integer)

      The maximum number of results to return per page.

    • nextToken — (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.

    • publish — (String)

      The value of the Publish package origin control restriction used to filter requested packages. Only packages with the provided restriction are returned. For more information, see PackageOriginRestrictions.

      Possible values include:
      • "ALLOW"
      • "BLOCK"
    • upstream — (String)

      The value of the Upstream package origin control restriction used to filter requested packages. Only packages with the provided restriction are returned. For more information, see PackageOriginRestrictions.

      Possible values include:
      • "ALLOW"
      • "BLOCK"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • packages — (Array<map>)

        The list of returned PackageSummary objects.

        • format — (String)

          The format of the package.

          Possible values include:
          • "npm"
          • "pypi"
          • "maven"
          • "nuget"
          • "generic"
          • "swift"
        • namespace — (String)

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

          • The namespace of a Maven package version is its groupId.

          • The namespace of an npm or Swift package version is its scope.

          • The namespace of a generic package is its namespace.

          • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

        • package — (String)

          The name of the package.

        • originConfiguration — (map)

          A PackageOriginConfiguration object that contains a PackageOriginRestrictions object that contains information about the upstream and publish package origin restrictions.

          • restrictions — (map)

            A PackageOriginRestrictions object that contains information about the upstream and publish package origin configuration for the package.

            • publishrequired — (String)

              The package origin configuration that determines if new versions of the package can be published directly to the repository.

              Possible values include:
              • "ALLOW"
              • "BLOCK"
            • upstreamrequired — (String)

              The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

              Possible values include:
              • "ALLOW"
              • "BLOCK"
      • nextToken — (String)

        If there are additional results, this is the token for the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPackageVersionAssets(params = {}, callback) ⇒ AWS.Request

Returns a list of AssetSummary objects for assets in a package version.

Service Reference:

Examples:

Calling the listPackageVersionAssets operation

var params = {
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  packageVersion: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  namespace: 'STRING_VALUE',
  nextToken: 'STRING_VALUE'
};
codeartifact.listPackageVersionAssets(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the repository associated with the package version assets.

    • domainOwner — (String)

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

    • repository — (String)

      The name of the repository that contains the package that contains the requested package version assets.

    • format — (String)

      The format of the package that contains the requested package version assets.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

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

      Note: The namespace is required requesting assets from package versions of the following formats:
      • Maven
      • Swift
      • generic
      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The name of the package that contains the requested package version assets.

    • packageVersion — (String)

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

    • maxResults — (Integer)

      The maximum number of results to return per page.

    • nextToken — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • format — (String)

        The format of the package that contains the requested package version assets.

        Possible values include:
        • "npm"
        • "pypi"
        • "maven"
        • "nuget"
        • "generic"
        • "swift"
      • namespace — (String)

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

        • The namespace of a Maven package version is its groupId.

        • The namespace of an npm or Swift package version is its scope.

        • The namespace of a generic package is its namespace.

        • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

      • package — (String)

        The name of the package that contains the requested package version assets.

      • version — (String)

        The version of the package associated with the requested assets.

      • versionRevision — (String)

        The current revision associated with the package version.

      • nextToken — (String)

        If there are additional results, this is the token for the next set of results.

      • assets — (Array<map>)

        The returned list of AssetSummary objects.

        • namerequired — (String)

          The name of the asset.

        • size — (Integer)

          The size of the asset.

        • hashes — (map<String>)

          The hashes of the asset.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPackageVersionDependencies(params = {}, callback) ⇒ AWS.Request

Returns the direct dependencies for a package version. The dependencies are returned as PackageDependency objects. CodeArtifact extracts the dependencies for a package version from the metadata file for the package format (for example, the package.json file for npm packages and the pom.xml file for Maven). Any package version dependencies that are not listed in the configuration file are not returned.

Service Reference:

Examples:

Calling the listPackageVersionDependencies operation

var params = {
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  packageVersion: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  namespace: 'STRING_VALUE',
  nextToken: 'STRING_VALUE'
};
codeartifact.listPackageVersionDependencies(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

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

    • domainOwner — (String)

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

    • repository — (String)

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

    • format — (String)

      The format of the package with the requested dependencies.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

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

      Note: The namespace is required when listing dependencies from package versions of the following formats:
      • Maven
      • Swift
      • generic
      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The name of the package versions' package.

    • packageVersion — (String)

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

    • nextToken — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • format — (String)

        A format that specifies the type of the package that contains the returned dependencies.

        Possible values include:
        • "npm"
        • "pypi"
        • "maven"
        • "nuget"
        • "generic"
        • "swift"
      • namespace — (String)

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

        • The namespace of a Maven package version is its groupId.

        • The namespace of an npm or Swift package version is its scope.

        • The namespace of a generic package is its namespace.

        • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

      • package — (String)

        The name of the package that contains the returned package versions dependencies.

      • version — (String)

        The version of the package that is specified in the request.

      • versionRevision — (String)

        The current revision associated with the package version.

      • nextToken — (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.

      • dependencies — (Array<map>)

        The returned list of PackageDependency objects.

        • namespace — (String)

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

          • The namespace of a Maven package version is its groupId.

          • The namespace of an npm or Swift package version is its scope.

          • The namespace of a generic package is its namespace.

          • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

        • package — (String)

          The name of the package that this package depends on.

        • dependencyType — (String)

          The type of a package dependency. The possible values depend on the package type.

          • npm: regular, dev, peer, optional

          • maven: optional, parent, compile, runtime, test, system, provided.

            Note: Note that parent is not a regular Maven dependency type; instead this is extracted from the <parent> element if one is defined in the package version's POM file.
          • nuget: The dependencyType field is never set for NuGet packages.

          • pypi: Requires-Dist

        • versionRequirement — (String)

          The required version, or version range, of the package that this package depends on. The version format is specific to the package type. For example, the following are possible valid required versions: 1.2.3, ^2.3.4, or 4.x.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPackageVersions(params = {}, callback) ⇒ AWS.Request

Returns a list of PackageVersionSummary objects for package versions in a repository that match the request parameters. Package versions of all statuses will be returned by default when calling list-package-versions with no --status parameter.

Service Reference:

Examples:

Calling the listPackageVersions operation

var params = {
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  namespace: 'STRING_VALUE',
  nextToken: 'STRING_VALUE',
  originType: INTERNAL | EXTERNAL | UNKNOWN,
  sortBy: PUBLISHED_TIME,
  status: Published | Unfinished | Unlisted | Archived | Disposed | Deleted
};
codeartifact.listPackageVersions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the repository that contains the requested package versions.

    • domainOwner — (String)

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

    • repository — (String)

      The name of the repository that contains the requested package versions.

    • format — (String)

      The format of the package versions you want to list.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

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

      Note: The namespace is required when deleting package versions of the following formats:
      • Maven
      • Swift
      • generic
      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The name of the package for which you want to request package versions.

    • status — (String)

      A string that filters the requested package versions by status.

      Possible values include:
      • "Published"
      • "Unfinished"
      • "Unlisted"
      • "Archived"
      • "Disposed"
      • "Deleted"
    • sortBy — (String)

      How to sort the requested list of package versions.

      Possible values include:
      • "PUBLISHED_TIME"
    • maxResults — (Integer)

      The maximum number of results to return per page.

    • nextToken — (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.

    • originType — (String)

      The originType used to filter package versions. Only package versions with the provided originType will be returned.

      Possible values include:
      • "INTERNAL"
      • "EXTERNAL"
      • "UNKNOWN"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • defaultDisplayVersion — (String)

        The default package version to display. This depends on the package format:

        • For Maven and PyPI packages, it's the most recently published package version.

        • For npm packages, it's the version referenced by the latest tag. If the latest tag is not set, it's the most recently published package version.

      • format — (String)

        A format of the package.

        Possible values include:
        • "npm"
        • "pypi"
        • "maven"
        • "nuget"
        • "generic"
        • "swift"
      • namespace — (String)

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

        • The namespace of a Maven package version is its groupId.

        • The namespace of an npm or Swift package version is its scope.

        • The namespace of a generic package is its namespace.

        • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

      • package — (String)

        The name of the package.

      • versions — (Array<map>)

        The returned list of PackageVersionSummary objects.

        • versionrequired — (String)

          Information about a package version.

        • revision — (String)

          The revision associated with a package version.

        • statusrequired — (String)

          A string that contains the status of the package version. It can be one of the following:

          Possible values include:
          • "Published"
          • "Unfinished"
          • "Unlisted"
          • "Archived"
          • "Disposed"
          • "Deleted"
        • origin — (map)

          A PackageVersionOrigin object that contains information about how the package version was added to the repository.

          • domainEntryPoint — (map)

            A DomainEntryPoint object that contains information about from which repository or external connection the package version was added to the domain.

            • repositoryName — (String)

              The name of the repository that a package was originally published to.

            • externalConnectionName — (String)

              The name of the external connection that a package was ingested from.

          • originType — (String)

            Describes how the package version was originally added to the domain. An INTERNAL origin type means the package version was published directly to a repository in the domain. An EXTERNAL origin type means the package version was ingested from an external connection.

            Possible values include:
            • "INTERNAL"
            • "EXTERNAL"
            • "UNKNOWN"
      • nextToken — (String)

        If there are additional results, this is the token for the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listRepositories(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the listRepositories operation

var params = {
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  repositoryPrefix: 'STRING_VALUE'
};
codeartifact.listRepositories(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • repositoryPrefix — (String)

      A prefix used to filter returned repositories. Only repositories with names that start with repositoryPrefix are returned.

    • maxResults — (Integer)

      The maximum number of results to return per page.

    • nextToken — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repositories — (Array<map>)

        The returned 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 — (Date)

          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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listRepositoriesInDomain(params = {}, callback) ⇒ AWS.Request

Returns a list of RepositorySummary objects. Each RepositorySummary contains information about a repository in the specified domain and that matches the input parameters.

Service Reference:

Examples:

Calling the listRepositoriesInDomain operation

var params = {
  domain: 'STRING_VALUE', /* required */
  administratorAccount: 'STRING_VALUE',
  domainOwner: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE',
  repositoryPrefix: 'STRING_VALUE'
};
codeartifact.listRepositoriesInDomain(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the returned list of repositories.

    • domainOwner — (String)

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

    • administratorAccount — (String)

      Filter the list of repositories to only include those that are managed by the Amazon Web Services account ID.

    • repositoryPrefix — (String)

      A prefix used to filter returned repositories. Only repositories with names that start with repositoryPrefix are returned.

    • maxResults — (Integer)

      The maximum number of results to return per page.

    • nextToken — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repositories — (Array<map>)

        The returned list of repositories.

        • 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 — (Date)

          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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listSubPackageGroups(params = {}, callback) ⇒ AWS.Request

Returns a list of direct children of the specified package group.

For information package group hierarchy, see Package group definition syntax and matching behavior in the CodeArtifact User Guide.

Service Reference:

Examples:

Calling the listSubPackageGroups operation

var params = {
  domain: 'STRING_VALUE', /* required */
  packageGroup: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  maxResults: 'NUMBER_VALUE',
  nextToken: 'STRING_VALUE'
};
codeartifact.listSubPackageGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain which contains the package group from which to list sub package groups.

    • domainOwner — (String)

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

    • packageGroup — (String)

      The pattern of the package group from which to list sub package groups.

    • maxResults — (Integer)

      The maximum number of results to return per page.

    • nextToken — (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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • packageGroups — (Array<map>)

        A list of sub package groups for the requested package group.

        • arn — (String)

          The ARN of the package group.

        • pattern — (String)

          The pattern of the package group. The pattern determines which packages are associated with the package group.

        • domainName — (String)

          The domain that contains the package group.

        • domainOwner — (String)

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

        • createdTime — (Date)

          A timestamp that represents the date and time the repository was created.

        • contactInfo — (String)

          The contact information of the package group.

        • description — (String)

          The description of the package group.

        • originConfiguration — (map)

          Details about the package origin configuration of a package group.

          • restrictions — (map<map>)

            The origin configuration settings that determine how package versions can enter repositories.

            • mode — (String)

              The package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • effectiveMode — (String)

              The effective package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • inheritedFrom — (map)

              The parent package group that the package group origin restrictions are inherited from.

              • arn — (String)

                The ARN of the package group.

              • pattern — (String)

                The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

            • repositoriesCount — (Integer)

              The number of repositories in the allowed repository list.

        • parent — (map)

          The direct parent package group of the package group.

          • arn — (String)

            The ARN of the package group.

          • pattern — (String)

            The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

      • nextToken — (String)

        If there are additional results, this is the token for the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Gets information about Amazon Web Services tags for a specified Amazon Resource Name (ARN) in CodeArtifact.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  resourceArn: 'STRING_VALUE' /* required */
};
codeartifact.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the resource to get tags for.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • tags — (Array<map>)

        A list of tag key and value pairs associated with the specified resource.

        • keyrequired — (String)

          The tag key.

        • valuerequired — (String)

          The tag value.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

publishPackageVersion(params = {}, callback) ⇒ AWS.Request

Creates a new package version containing one or more assets (or files).

The unfinished flag can be used to keep the package version in the Unfinished state until all of its assets have been uploaded (see Package version status in the CodeArtifact user guide). To set the package version’s status to Published, omit the unfinished flag when uploading the final asset, or set the status using UpdatePackageVersionStatus. Once a package version’s status is set to Published, it cannot change back to Unfinished.

Note: Only generic packages can be published using this API. For more information, see Using generic packages in the CodeArtifact User Guide.

Service Reference:

Examples:

Calling the publishPackageVersion operation

var params = {
  assetContent: Buffer.from('...') || 'STRING_VALUE' || streamObject, /* required */
  assetName: 'STRING_VALUE', /* required */
  assetSHA256: 'STRING_VALUE', /* required */
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  packageVersion: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  namespace: 'STRING_VALUE',
  unfinished: true || false
};
codeartifact.publishPackageVersion(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

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

    • domainOwner — (String)

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

    • repository — (String)

      The name of the repository that the package version will be published to.

    • format — (String)

      A format that specifies the type of the package version with the requested asset file.

      The only supported value is generic.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

      The namespace of the package version to publish.

    • package — (String)

      The name of the package version to publish.

    • packageVersion — (String)

      The package version to publish (for example, 3.5.2).

    • assetContent — (Buffer, Typed Array, Blob, String, ReadableStream)

      The content of the asset to publish.

    • assetName — (String)

      The name of the asset to publish. Asset names can include Unicode letters and numbers, and the following special characters: ~ ! @ ^ & ( ) - _ + [ ] { } ; , .

    • assetSHA256 — (String)

      The SHA256 hash of the assetContent to publish. This value must be calculated by the caller and provided with the request (see Publishing a generic package in the CodeArtifact User Guide).

      This value is used as an integrity check to verify that the assetContent has not changed after it was originally sent.

    • unfinished — (Boolean)

      Specifies whether the package version should remain in the unfinished state. If omitted, the package version status will be set to Published (see Package version status in the CodeArtifact User Guide).

      Valid values: unfinished

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • format — (String)

        The format of the package version.

        Possible values include:
        • "npm"
        • "pypi"
        • "maven"
        • "nuget"
        • "generic"
        • "swift"
      • namespace — (String)

        The namespace of the package version.

      • package — (String)

        The name of the package.

      • version — (String)

        The version of the package.

      • versionRevision — (String)

        The revision of the package version.

      • status — (String)

        A string that contains the status of the package version. For more information, see Package version status in the CodeArtifact User Guide.

        Possible values include:
        • "Published"
        • "Unfinished"
        • "Unlisted"
        • "Archived"
        • "Disposed"
        • "Deleted"
      • asset — (map)

        An AssetSummary for the published asset.

        • namerequired — (String)

          The name of the asset.

        • size — (Integer)

          The size of the asset.

        • hashes — (map<String>)

          The hashes of the asset.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putDomainPermissionsPolicy(params = {}, callback) ⇒ AWS.Request

Sets a resource policy on a domain that specifies permissions to access it.

When you call PutDomainPermissionsPolicy, the resource policy on the domain is ignored when evaluting permissions. This ensures that the owner of a domain cannot lock themselves out of the domain, which would prevent them from being able to update the resource policy.

Service Reference:

Examples:

Calling the putDomainPermissionsPolicy operation

var params = {
  domain: 'STRING_VALUE', /* required */
  policyDocument: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  policyRevision: 'STRING_VALUE'
};
codeartifact.putDomainPermissionsPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain on which to set the resource policy.

    • domainOwner — (String)

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

    • policyRevision — (String)

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

    • policyDocument — (String)

      A valid displayable JSON Aspen policy string to be set as the access control resource policy on the provided domain.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policy — (map)

        The resource policy that was set after processing the request.

        • resourceArn — (String)

          The ARN of the resource associated with the resource policy

        • revision — (String)

          The current revision of the resource policy.

        • document — (String)

          The resource policy formatted in JSON.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putPackageOriginConfiguration(params = {}, callback) ⇒ AWS.Request

Sets the package origin configuration for a package.

The package origin configuration determines how new versions of a package can be added to a repository. You can allow or block direct publishing of new package versions, or ingestion and retaining of new package versions from an external connection or upstream source. For more information about package origin controls and configuration, see Editing package origin controls in the CodeArtifact User Guide.

PutPackageOriginConfiguration can be called on a package that doesn't yet exist in the repository. When called on a package that does not exist, a package is created in the repository with no versions and the requested restrictions are set on the package. This can be used to preemptively block ingesting or retaining any versions from external connections or upstream repositories, or to block publishing any versions of the package into the repository before connecting any package managers or publishers to the repository.

Service Reference:

Examples:

Calling the putPackageOriginConfiguration operation

var params = {
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  restrictions: { /* required */
    publish: ALLOW | BLOCK, /* required */
    upstream: ALLOW | BLOCK /* required */
  },
  domainOwner: 'STRING_VALUE',
  namespace: 'STRING_VALUE'
};
codeartifact.putPackageOriginConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

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

    • domainOwner — (String)

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

    • repository — (String)

      The name of the repository that contains the package.

    • format — (String)

      A format that specifies the type of the package to be updated.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

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

      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The name of the package to be updated.

    • restrictions — (map)

      A PackageOriginRestrictions object that contains information about the upstream and publish package origin restrictions. The upstream restriction determines if new package versions can be ingested or retained from external connections or upstream repositories. The publish restriction determines if new package versions can be published directly to the repository.

      You must include both the desired upstream and publish restrictions.

      • publishrequired — (String)

        The package origin configuration that determines if new versions of the package can be published directly to the repository.

        Possible values include:
        • "ALLOW"
        • "BLOCK"
      • upstreamrequired — (String)

        The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

        Possible values include:
        • "ALLOW"
        • "BLOCK"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • originConfiguration — (map)

        A PackageOriginConfiguration object that describes the origin configuration set for the package. It contains a PackageOriginRestrictions object that describes how new versions of the package can be introduced to the repository.

        • restrictions — (map)

          A PackageOriginRestrictions object that contains information about the upstream and publish package origin configuration for the package.

          • publishrequired — (String)

            The package origin configuration that determines if new versions of the package can be published directly to the repository.

            Possible values include:
            • "ALLOW"
            • "BLOCK"
          • upstreamrequired — (String)

            The package origin configuration that determines if new versions of the package can be added to the repository from an external connection or upstream source.

            Possible values include:
            • "ALLOW"
            • "BLOCK"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putRepositoryPermissionsPolicy(params = {}, callback) ⇒ AWS.Request

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

When you call PutRepositoryPermissionsPolicy, the resource policy on the repository is ignored when evaluting permissions. This ensures that the owner of a repository cannot lock themselves out of the repository, which would prevent them from being able to update the resource policy.

Service Reference:

Examples:

Calling the putRepositoryPermissionsPolicy operation

var params = {
  domain: 'STRING_VALUE', /* required */
  policyDocument: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  domainOwner: 'STRING_VALUE',
  policyRevision: 'STRING_VALUE'
};
codeartifact.putRepositoryPermissionsPolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain containing the repository to set the resource policy on.

    • domainOwner — (String)

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

    • repository — (String)

      The name of the repository to set the resource policy on.

    • policyRevision — (String)

      Sets the revision of the resource policy that specifies permissions to access the repository. This revision is used for optimistic locking, which prevents others from overwriting your changes to the repository's resource policy.

    • policyDocument — (String)

      A valid displayable JSON Aspen policy string to be set as the access control resource policy on the provided repository.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • policy — (map)

        The resource policy that was set after processing the request.

        • resourceArn — (String)

          The ARN of the resource associated with the resource policy

        • revision — (String)

          The current revision of the resource policy.

        • document — (String)

          The resource policy formatted in JSON.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Adds or updates tags for a resource in CodeArtifact.

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tags: [ /* required */
    {
      key: 'STRING_VALUE', /* required */
      value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
codeartifact.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the resource that you want to add or update tags for.

    • tags — (Array<map>)

      The tags you want to modify or add to the resource.

      • keyrequired — (String)

        The tag key.

      • valuerequired — (String)

        The tag value.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes tags from a resource in CodeArtifact.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  resourceArn: 'STRING_VALUE', /* required */
  tagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
codeartifact.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • resourceArn — (String)

      The Amazon Resource Name (ARN) of the resource that you want to remove tags from.

    • tagKeys — (Array<String>)

      The tag key for each tag that you want to remove from the resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updatePackageGroup(params = {}, callback) ⇒ AWS.Request

Updates a package group. This API cannot be used to update a package group's origin configuration or pattern. To update a package group's origin configuration, use UpdatePackageGroupOriginConfiguration.

Service Reference:

Examples:

Calling the updatePackageGroup operation

var params = {
  domain: 'STRING_VALUE', /* required */
  packageGroup: 'STRING_VALUE', /* required */
  contactInfo: 'STRING_VALUE',
  description: 'STRING_VALUE',
  domainOwner: 'STRING_VALUE'
};
codeartifact.updatePackageGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain which contains the package group to be updated.

    • domainOwner — (String)

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

    • packageGroup — (String)

      The pattern of the package group to be updated.

    • contactInfo — (String)

      Contact information which you want to update the requested package group with.

    • description — (String)

      The description you want to update the requested package group with.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • packageGroup — (map)

        The package group and information about it after the request has been processed.

        • arn — (String)

          The ARN of the package group.

        • pattern — (String)

          The pattern of the package group. The pattern determines which packages are associated with the package group.

        • domainName — (String)

          The name of the domain that contains the package group.

        • domainOwner — (String)

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

        • createdTime — (Date)

          A timestamp that represents the date and time the package group was created.

        • contactInfo — (String)

          The contact information of the package group.

        • description — (String)

          The description of the package group.

        • originConfiguration — (map)

          The package group origin configuration that determines how package versions can enter repositories.

          • restrictions — (map<map>)

            The origin configuration settings that determine how package versions can enter repositories.

            • mode — (String)

              The package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • effectiveMode — (String)

              The effective package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • inheritedFrom — (map)

              The parent package group that the package group origin restrictions are inherited from.

              • arn — (String)

                The ARN of the package group.

              • pattern — (String)

                The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

            • repositoriesCount — (Integer)

              The number of repositories in the allowed repository list.

        • parent — (map)

          The direct parent package group of the package group.

          • arn — (String)

            The ARN of the package group.

          • pattern — (String)

            The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updatePackageGroupOriginConfiguration(params = {}, callback) ⇒ AWS.Request

Updates the package origin configuration for a package group.

The package origin configuration determines how new versions of a package can be added to a repository. You can allow or block direct publishing of new package versions, or ingestion and retaining of new package versions from an external connection or upstream source. For more information about package group origin controls and configuration, see Package group origin controls in the CodeArtifact User Guide.

Examples:

Calling the updatePackageGroupOriginConfiguration operation

var params = {
  domain: 'STRING_VALUE', /* required */
  packageGroup: 'STRING_VALUE', /* required */
  addAllowedRepositories: [
    {
      originRestrictionType: EXTERNAL_UPSTREAM | INTERNAL_UPSTREAM | PUBLISH,
      repositoryName: 'STRING_VALUE'
    },
    /* more items */
  ],
  domainOwner: 'STRING_VALUE',
  removeAllowedRepositories: [
    {
      originRestrictionType: EXTERNAL_UPSTREAM | INTERNAL_UPSTREAM | PUBLISH,
      repositoryName: 'STRING_VALUE'
    },
    /* more items */
  ],
  restrictions: {
    '<PackageGroupOriginRestrictionType>': ALLOW | ALLOW_SPECIFIC_REPOSITORIES | BLOCK | INHERIT,
    /* '<PackageGroupOriginRestrictionType>': ... */
  }
};
codeartifact.updatePackageGroupOriginConfiguration(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain which contains the package group for which to update the origin configuration.

    • domainOwner — (String)

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

    • packageGroup — (String)

      The pattern of the package group for which to update the origin configuration.

    • restrictions — (map<String>)

      The origin configuration settings that determine how package versions can enter repositories.

    • addAllowedRepositories — (Array<map>)

      The repository name and restrictions to add to the allowed repository list of the specified package group.

      • repositoryName — (String)

        The name of the allowed repository.

      • originRestrictionType — (String)

        The origin configuration restriction type of the allowed repository.

        Possible values include:
        • "EXTERNAL_UPSTREAM"
        • "INTERNAL_UPSTREAM"
        • "PUBLISH"
    • removeAllowedRepositories — (Array<map>)

      The repository name and restrictions to remove from the allowed repository list of the specified package group.

      • repositoryName — (String)

        The name of the allowed repository.

      • originRestrictionType — (String)

        The origin configuration restriction type of the allowed repository.

        Possible values include:
        • "EXTERNAL_UPSTREAM"
        • "INTERNAL_UPSTREAM"
        • "PUBLISH"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • packageGroup — (map)

        The package group and information about it after processing the request.

        • arn — (String)

          The ARN of the package group.

        • pattern — (String)

          The pattern of the package group. The pattern determines which packages are associated with the package group.

        • domainName — (String)

          The name of the domain that contains the package group.

        • domainOwner — (String)

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

        • createdTime — (Date)

          A timestamp that represents the date and time the package group was created.

        • contactInfo — (String)

          The contact information of the package group.

        • description — (String)

          The description of the package group.

        • originConfiguration — (map)

          The package group origin configuration that determines how package versions can enter repositories.

          • restrictions — (map<map>)

            The origin configuration settings that determine how package versions can enter repositories.

            • mode — (String)

              The package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • effectiveMode — (String)

              The effective package group origin restriction setting. If the value of mode is ALLOW, ALLOW_SPECIFIC_REPOSITORIES, or BLOCK, then the value of effectiveMode is the same. Otherwise, when the value of mode is INHERIT, then the value of effectiveMode is the value of mode of the first parent group which does not have a value of INHERIT.

              Possible values include:
              • "ALLOW"
              • "ALLOW_SPECIFIC_REPOSITORIES"
              • "BLOCK"
              • "INHERIT"
            • inheritedFrom — (map)

              The parent package group that the package group origin restrictions are inherited from.

              • arn — (String)

                The ARN of the package group.

              • pattern — (String)

                The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

            • repositoriesCount — (Integer)

              The number of repositories in the allowed repository list.

        • parent — (map)

          The direct parent package group of the package group.

          • arn — (String)

            The ARN of the package group.

          • pattern — (String)

            The pattern of the package group. The pattern determines which packages are associated with the package group, and is also the identifier of the package group.

      • allowedRepositoryUpdates — (map<map<Array<String>>>)

        Information about the updated allowed repositories after processing the request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updatePackageVersionsStatus(params = {}, callback) ⇒ AWS.Request

Updates the status of one or more versions of a package. Using UpdatePackageVersionsStatus, you can update the status of package versions to Archived, Published, or Unlisted. To set the status of a package version to Disposed, use DisposePackageVersions.

Service Reference:

Examples:

Calling the updatePackageVersionsStatus operation

var params = {
  domain: 'STRING_VALUE', /* required */
  format: npm | pypi | maven | nuget | generic | swift, /* required */
  package: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  targetStatus: Published | Unfinished | Unlisted | Archived | Disposed | Deleted, /* required */
  versions: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  domainOwner: 'STRING_VALUE',
  expectedStatus: Published | Unfinished | Unlisted | Archived | Disposed | Deleted,
  namespace: 'STRING_VALUE',
  versionRevisions: {
    '<PackageVersion>': 'STRING_VALUE',
    /* '<PackageVersion>': ... */
  }
};
codeartifact.updatePackageVersionsStatus(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain that contains the repository that contains the package versions with a status to be updated.

    • domainOwner — (String)

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

    • repository — (String)

      The repository that contains the package versions with the status you want to update.

    • format — (String)

      A format that specifies the type of the package with the statuses to update.

      Possible values include:
      • "npm"
      • "pypi"
      • "maven"
      • "nuget"
      • "generic"
      • "swift"
    • namespace — (String)

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

      • The namespace of a Maven package version is its groupId.

      • The namespace of an npm or Swift package version is its scope.

      • The namespace of a generic package is its namespace.

      • Python and NuGet package versions do not contain a corresponding component, package versions of those formats do not have a namespace.

    • package — (String)

      The name of the package with the version statuses to update.

    • versions — (Array<String>)

      An array of strings that specify the versions of the package with the statuses to update.

    • versionRevisions — (map<String>)

      A map of package versions and package version revisions. The map key is the package version (for example, 3.5.2), and the map value is the package version revision.

    • expectedStatus — (String)

      The package version’s expected status before it is updated. If expectedStatus is provided, the package version's status is updated only if its status at the time UpdatePackageVersionsStatus is called matches expectedStatus.

      Possible values include:
      • "Published"
      • "Unfinished"
      • "Unlisted"
      • "Archived"
      • "Disposed"
      • "Deleted"
    • targetStatus — (String)

      The status you want to change the package version status to.

      Possible values include:
      • "Published"
      • "Unfinished"
      • "Unlisted"
      • "Archived"
      • "Disposed"
      • "Deleted"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • successfulVersions — (map<map>)

        A list of PackageVersionError objects, one for each package version with a status that failed to update.

        • revision — (String)

          The revision of a package version.

        • status — (String)

          The status of a package version.

          Possible values include:
          • "Published"
          • "Unfinished"
          • "Unlisted"
          • "Archived"
          • "Disposed"
          • "Deleted"
      • failedVersions — (map<map>)

        A list of SuccessfulPackageVersionInfo objects, one for each package version with a status that successfully updated.

        • errorCode — (String)

          The error code associated with the error. Valid error codes are:

          • ALREADY_EXISTS

          • MISMATCHED_REVISION

          • MISMATCHED_STATUS

          • NOT_ALLOWED

          • NOT_FOUND

          • SKIPPED

          Possible values include:
          • "ALREADY_EXISTS"
          • "MISMATCHED_REVISION"
          • "MISMATCHED_STATUS"
          • "NOT_ALLOWED"
          • "NOT_FOUND"
          • "SKIPPED"
        • errorMessage — (String)

          The error message associated with the error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateRepository(params = {}, callback) ⇒ AWS.Request

Update the properties of a repository.

Service Reference:

Examples:

Calling the updateRepository operation

var params = {
  domain: 'STRING_VALUE', /* required */
  repository: 'STRING_VALUE', /* required */
  description: 'STRING_VALUE',
  domainOwner: 'STRING_VALUE',
  upstreams: [
    {
      repositoryName: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
codeartifact.updateRepository(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • domain — (String)

      The name of the domain associated with the repository to update.

    • domainOwner — (String)

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

    • repository — (String)

      The name of the repository to update.

    • description — (String)

      An updated repository description.

    • upstreams — (Array<map>)

      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.

      • repositoryNamerequired — (String)

        The name of an upstream repository.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • repository — (map)

        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 — (Array<map>)

          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.

          • repositoryName — (String)

            The name of an upstream repository.

        • externalConnections — (Array<map>)

          An array of external connections associated with the 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.

            Possible values include:
            • "npm"
            • "pypi"
            • "maven"
            • "nuget"
            • "generic"
            • "swift"
          • status — (String)

            The status of the external connection of a repository. There is one valid value, Available.

            Possible values include:
            • "Available"
        • createdTime — (Date)

          A timestamp that represents the date and time the repository was created.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.