Class: Aws::CodeArtifact::Client

Inherits:
Seahorse::Client::Base show all
Includes:
Aws::ClientStubs
Defined in:
gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb

Overview

An API client for CodeArtifact. To construct a client, you need to configure a :region and :credentials.

client = Aws::CodeArtifact::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the developer guide.

See #initialize for a full list of supported configuration options.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from Aws::ClientStubs

#api_requests, #stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

add_plugin, api, clear_plugins, define, new, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • Aws::Credentials - Used for configuring static, non-refreshing credentials.

    • Aws::SharedCredentials - Used for loading static credentials from a shared file, such as ~/.aws/config.

    • Aws::AssumeRoleCredentials - Used when you need to assume a role.

    • Aws::AssumeRoleWebIdentityCredentials - Used when you need to assume a role after providing credentials via the web.

    • Aws::SSOCredentials - Used for loading credentials from AWS SSO using an access token generated from aws login.

    • Aws::ProcessCredentials - Used for loading credentials from a process that outputs to stdout.

    • Aws::InstanceProfileCredentials - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • Aws::ECSCredentials - Used for loading credentials from instances running in ECS.

    • Aws::CognitoIdentityCredentials - Used for loading credentials from the Cognito Identity service.

    When :credentials are not configured directly, the following locations will be searched for credentials:

    • Aws.config[:credentials]
    • The :access_key_id, :secret_access_key, and :session_token options.
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • ~/.aws/credentials
    • ~/.aws/config
    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of Aws::InstanceProfileCredentails or Aws::ECSCredentials to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV['AWS_EC2_METADATA_DISABLED'] to true.
  • :region (required, String)

    The AWS region to connect to. The configured :region is used to determine the service :endpoint. When not passed, a default :region is searched for in the following locations:

    • Aws.config[:region]
    • ENV['AWS_REGION']
    • ENV['AMAZON_REGION']
    • ENV['AWS_DEFAULT_REGION']
    • ~/.aws/credentials
    • ~/.aws/config
  • :access_key_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in adaptive retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a RetryCapacityNotAvailableError and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When true, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in standard and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :disable_request_compression (Boolean) — default: false

    When set to 'true' the request body will not be compressed for supported operations.

  • :endpoint (String)

    The client endpoint is normally constructed from the :region option. You should only configure an :endpoint when connecting to test or custom endpoints. This should be a valid HTTP(S) URI.

  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec.

  • :endpoint_discovery (Boolean) — default: false

    When set to true, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the :logger at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in standard and adaptive retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used.

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the legacy retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the legacy retry mode.

    @see https://www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the legacy retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the legacy retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • legacy - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • standard - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • adaptive - An experimental retry mode that includes all the functionality of standard mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/. It should have a maximum length of 50.

  • :secret_access_key (String)
  • :session_token (String)
  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling Aws::ClientStubs#stub_responses. See Aws::ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • Aws::StaticTokenProvider - Used for configuring static, non-refreshing tokens.

    • Aws::SSOTokenProvider - Used for loading tokens from AWS SSO using an access token generated from aws login.

    When :token_provider is not configured directly, the Aws::TokenProviderChain will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to true, dualstack enabled endpoints (with .aws TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to true, fips compatible endpoints will be used if available. When a fips region is used, the region is normalized and this config is set to true.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::CodeArtifact::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to #resolve_endpoint(parameters) where parameters is a Struct similar to Aws::CodeArtifact::EndpointParameters

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like 'http://proxy.com:123'.

  • :http_open_timeout (Float) — default: 15

    The number of seconds to wait when opening a HTTP session before raising a Timeout::Error.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has "Expect" header set to "100-continue". Defaults to nil which disables this behaviour. This value can safely be set per request on the session.

  • :ssl_timeout (Float) — default: nil

    Sets the SSL timeout in seconds.

  • :http_wire_trace (Boolean) — default: false

    When true, HTTP debug output will be sent to the :logger.

  • :ssl_verify_peer (Boolean) — default: true

    When true, SSL peer certificates are verified when establishing a connection.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass :ssl_ca_bundle or :ssl_ca_directory the the system default will be used if available.



385
386
387
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 385

def initialize(*args)
  super
end

Instance Method Details

#associate_external_connection(params = {}) ⇒ Types::AssociateExternalConnectionResult

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

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

Examples:

Request syntax with placeholder values


resp = client.associate_external_connection({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  external_connection: "ExternalConnectionName", # required
})

Response structure


resp.repository.name #=> String
resp.repository. #=> String
resp.repository.domain_name #=> String
resp.repository.domain_owner #=> String
resp.repository.arn #=> String
resp.repository.description #=> String
resp.repository.upstreams #=> Array
resp.repository.upstreams[0].repository_name #=> String
resp.repository.external_connections #=> Array
resp.repository.external_connections[0].external_connection_name #=> String
resp.repository.external_connections[0].package_format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.repository.external_connections[0].status #=> String, one of "Available"
resp.repository.created_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain that contains the repository.

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

  • :repository (required, String)

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

  • :external_connection (required, 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.

Returns:

See Also:



462
463
464
465
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 462

def associate_external_connection(params = {}, options = {})
  req = build_request(:associate_external_connection, params)
  req.send_request(options)
end

#copy_package_versions(params = {}) ⇒ Types::CopyPackageVersionsResult

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

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

Examples:

Request syntax with placeholder values


resp = client.copy_package_versions({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  source_repository: "RepositoryName", # required
  destination_repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
  versions: ["PackageVersion"],
  version_revisions: {
    "PackageVersion" => "PackageVersionRevision",
  },
  allow_overwrite: false,
  include_from_upstream: false,
})

Response structure


resp.successful_versions #=> Hash
resp.successful_versions["PackageVersion"].revision #=> String
resp.successful_versions["PackageVersion"].status #=> String, one of "Published", "Unfinished", "Unlisted", "Archived", "Disposed", "Deleted"
resp.failed_versions #=> Hash
resp.failed_versions["PackageVersion"].error_code #=> String, one of "ALREADY_EXISTS", "MISMATCHED_REVISION", "MISMATCHED_STATUS", "NOT_ALLOWED", "NOT_FOUND", "SKIPPED"
resp.failed_versions["PackageVersion"].error_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :source_repository (required, String)

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

  • :destination_repository (required, String)

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

  • :format (required, String)

    The format of the package versions to be copied.

  • :namespace (String)

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

    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 (required, String)

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

  • :versions (Array<String>)

    The versions of the package to be copied.

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

  • :version_revisions (Hash<String,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.

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

  • :allow_overwrite (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.

  • :include_from_upstream (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.

Returns:

See Also:



594
595
596
597
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 594

def copy_package_versions(params = {}, options = {})
  req = build_request(:copy_package_versions, params)
  req.send_request(options)
end

#create_domain(params = {}) ⇒ Types::CreateDomainResult

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.

Examples:

Request syntax with placeholder values


resp = client.create_domain({
  domain: "DomainName", # required
  encryption_key: "Arn",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.domain.name #=> String
resp.domain.owner #=> String
resp.domain.arn #=> String
resp.domain.status #=> String, one of "Active", "Deleted"
resp.domain.created_time #=> Time
resp.domain.encryption_key #=> String
resp.domain.repository_count #=> Integer
resp.domain.asset_size_bytes #=> Integer
resp.domain.s3_bucket_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, 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.

  • :encryption_key (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<Types::Tag>)

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

Returns:

See Also:



675
676
677
678
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 675

def create_domain(params = {}, options = {})
  req = build_request(:create_domain, params)
  req.send_request(options)
end

#create_package_group(params = {}) ⇒ Types::CreatePackageGroupResult

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.

Examples:

Request syntax with placeholder values


resp = client.create_package_group({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  package_group: "PackageGroupPattern", # required
  contact_info: "PackageGroupContactInfo",
  description: "Description",
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.package_group.arn #=> String
resp.package_group.pattern #=> String
resp.package_group.domain_name #=> String
resp.package_group.domain_owner #=> String
resp.package_group.created_time #=> Time
resp.package_group.contact_info #=> String
resp.package_group.description #=> String
resp.package_group.origin_configuration.restrictions #=> Hash
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].effective_mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.arn #=> String
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.pattern #=> String
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].repositories_count #=> Integer
resp.package_group.parent.arn #=> String
resp.package_group.parent.pattern #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :package_group (required, String)

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

  • :contact_info (String)

    The contact information for the created package group.

  • :description (String)

    A description of the package group.

  • :tags (Array<Types::Tag>)

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

Returns:

See Also:



750
751
752
753
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 750

def create_package_group(params = {}, options = {})
  req = build_request(:create_package_group, params)
  req.send_request(options)
end

#create_repository(params = {}) ⇒ Types::CreateRepositoryResult

Creates a repository.

Examples:

Request syntax with placeholder values


resp = client.create_repository({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  description: "Description",
  upstreams: [
    {
      repository_name: "RepositoryName", # required
    },
  ],
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.repository.name #=> String
resp.repository. #=> String
resp.repository.domain_name #=> String
resp.repository.domain_owner #=> String
resp.repository.arn #=> String
resp.repository.description #=> String
resp.repository.upstreams #=> Array
resp.repository.upstreams[0].repository_name #=> String
resp.repository.external_connections #=> Array
resp.repository.external_connections[0].external_connection_name #=> String
resp.repository.external_connections[0].package_format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.repository.external_connections[0].status #=> String, one of "Available"
resp.repository.created_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain that contains the created repository.

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

  • :repository (required, String)

    The name of the repository to create.

  • :description (String)

    A description of the created repository.

  • :upstreams (Array<Types::UpstreamRepository>)

    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.

  • :tags (Array<Types::Tag>)

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

Returns:

See Also:



828
829
830
831
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 828

def create_repository(params = {}, options = {})
  req = build_request(:create_repository, params)
  req.send_request(options)
end

#delete_domain(params = {}) ⇒ Types::DeleteDomainResult

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

Examples:

Request syntax with placeholder values


resp = client.delete_domain({
  domain: "DomainName", # required
  domain_owner: "AccountId",
})

Response structure


resp.domain.name #=> String
resp.domain.owner #=> String
resp.domain.arn #=> String
resp.domain.status #=> String, one of "Active", "Deleted"
resp.domain.created_time #=> Time
resp.domain.encryption_key #=> String
resp.domain.repository_count #=> Integer
resp.domain.asset_size_bytes #=> Integer
resp.domain.s3_bucket_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain to delete.

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

Returns:

See Also:



871
872
873
874
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 871

def delete_domain(params = {}, options = {})
  req = build_request(:delete_domain, params)
  req.send_request(options)
end

#delete_domain_permissions_policy(params = {}) ⇒ Types::DeleteDomainPermissionsPolicyResult

Deletes the resource policy set on a domain.

Examples:

Request syntax with placeholder values


resp = client.delete_domain_permissions_policy({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  policy_revision: "PolicyRevision",
})

Response structure


resp.policy.resource_arn #=> String
resp.policy.revision #=> String
resp.policy.document #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :policy_revision (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.

Returns:

See Also:



913
914
915
916
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 913

def delete_domain_permissions_policy(params = {}, options = {})
  req = build_request(:delete_domain_permissions_policy, params)
  req.send_request(options)
end

#delete_package(params = {}) ⇒ Types::DeletePackageResult

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.

Examples:

Request syntax with placeholder values


resp = client.delete_package({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
})

Response structure


resp.deleted_package.format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.deleted_package.namespace #=> String
resp.deleted_package.package #=> String
resp.deleted_package.origin_configuration.restrictions.publish #=> String, one of "ALLOW", "BLOCK"
resp.deleted_package.origin_configuration.restrictions.upstream #=> String, one of "ALLOW", "BLOCK"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

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

  • :format (required, String)

    The format of the requested package to delete.

  • :namespace (String)

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

    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 (required, String)

    The name of the package to delete.

Returns:

See Also:



994
995
996
997
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 994

def delete_package(params = {}, options = {})
  req = build_request(:delete_package, params)
  req.send_request(options)
end

#delete_package_group(params = {}) ⇒ Types::DeletePackageGroupResult

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.

Examples:

Request syntax with placeholder values


resp = client.delete_package_group({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  package_group: "String", # required
})

Response structure


resp.package_group.arn #=> String
resp.package_group.pattern #=> String
resp.package_group.domain_name #=> String
resp.package_group.domain_owner #=> String
resp.package_group.created_time #=> Time
resp.package_group.contact_info #=> String
resp.package_group.description #=> String
resp.package_group.origin_configuration.restrictions #=> Hash
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].effective_mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.arn #=> String
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.pattern #=> String
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].repositories_count #=> Integer
resp.package_group.parent.arn #=> String
resp.package_group.parent.pattern #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The domain that contains the package group to be deleted.

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

  • :package_group (required, String)

    The pattern of the package group to be deleted.

Returns:

See Also:



1050
1051
1052
1053
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1050

def delete_package_group(params = {}, options = {})
  req = build_request(:delete_package_group, params)
  req.send_request(options)
end

#delete_package_versions(params = {}) ⇒ Types::DeletePackageVersionsResult

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.

Examples:

Request syntax with placeholder values


resp = client.delete_package_versions({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
  versions: ["PackageVersion"], # required
  expected_status: "Published", # accepts Published, Unfinished, Unlisted, Archived, Disposed, Deleted
})

Response structure


resp.successful_versions #=> Hash
resp.successful_versions["PackageVersion"].revision #=> String
resp.successful_versions["PackageVersion"].status #=> String, one of "Published", "Unfinished", "Unlisted", "Archived", "Disposed", "Deleted"
resp.failed_versions #=> Hash
resp.failed_versions["PackageVersion"].error_code #=> String, one of "ALREADY_EXISTS", "MISMATCHED_REVISION", "MISMATCHED_STATUS", "NOT_ALLOWED", "NOT_FOUND", "SKIPPED"
resp.failed_versions["PackageVersion"].error_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

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

  • :format (required, String)

    The format of the package versions to delete.

  • :namespace (String)

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

    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 (required, String)

    The name of the package with the versions to delete.

  • :versions (required, Array<String>)

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

  • :expected_status (String)

    The expected status of the package version to delete.

Returns:

See Also:



1149
1150
1151
1152
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1149

def delete_package_versions(params = {}, options = {})
  req = build_request(:delete_package_versions, params)
  req.send_request(options)
end

#delete_repository(params = {}) ⇒ Types::DeleteRepositoryResult

Deletes a repository.

Examples:

Request syntax with placeholder values


resp = client.delete_repository({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
})

Response structure


resp.repository.name #=> String
resp.repository. #=> String
resp.repository.domain_name #=> String
resp.repository.domain_owner #=> String
resp.repository.arn #=> String
resp.repository.description #=> String
resp.repository.upstreams #=> Array
resp.repository.upstreams[0].repository_name #=> String
resp.repository.external_connections #=> Array
resp.repository.external_connections[0].external_connection_name #=> String
resp.repository.external_connections[0].package_format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.repository.external_connections[0].status #=> String, one of "Available"
resp.repository.created_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

    The name of the repository to delete.

Returns:

See Also:



1198
1199
1200
1201
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1198

def delete_repository(params = {}, options = {})
  req = build_request(:delete_repository, params)
  req.send_request(options)
end

#delete_repository_permissions_policy(params = {}) ⇒ Types::DeleteRepositoryPermissionsPolicyResult

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:

Request syntax with placeholder values


resp = client.delete_repository_permissions_policy({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  policy_revision: "PolicyRevision",
})

Response structure


resp.policy.resource_arn #=> String
resp.policy.revision #=> String
resp.policy.document #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

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

  • :policy_revision (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.

Returns:

See Also:



1254
1255
1256
1257
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1254

def delete_repository_permissions_policy(params = {}, options = {})
  req = build_request(:delete_repository_permissions_policy, params)
  req.send_request(options)
end

#describe_domain(params = {}) ⇒ Types::DescribeDomainResult

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

Examples:

Request syntax with placeholder values


resp = client.describe_domain({
  domain: "DomainName", # required
  domain_owner: "AccountId",
})

Response structure


resp.domain.name #=> String
resp.domain.owner #=> String
resp.domain.arn #=> String
resp.domain.status #=> String, one of "Active", "Deleted"
resp.domain.created_time #=> Time
resp.domain.encryption_key #=> String
resp.domain.repository_count #=> Integer
resp.domain.asset_size_bytes #=> Integer
resp.domain.s3_bucket_arn #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    A string that specifies the name of the requested domain.

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

Returns:

See Also:



1300
1301
1302
1303
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1300

def describe_domain(params = {}, options = {})
  req = build_request(:describe_domain, params)
  req.send_request(options)
end

#describe_package(params = {}) ⇒ Types::DescribePackageResult

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

Examples:

Request syntax with placeholder values


resp = client.describe_package({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
})

Response structure


resp.package.format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.package.namespace #=> String
resp.package.name #=> String
resp.package.origin_configuration.restrictions.publish #=> String, one of "ALLOW", "BLOCK"
resp.package.origin_configuration.restrictions.upstream #=> String, one of "ALLOW", "BLOCK"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

    The name of the repository that contains the requested package.

  • :format (required, String)

    A format that specifies the type of the requested package.

  • :namespace (String)

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

    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 (required, String)

    The name of the requested package.

Returns:

See Also:



1381
1382
1383
1384
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1381

def describe_package(params = {}, options = {})
  req = build_request(:describe_package, params)
  req.send_request(options)
end

#describe_package_group(params = {}) ⇒ Types::DescribePackageGroupResult

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

Examples:

Request syntax with placeholder values


resp = client.describe_package_group({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  package_group: "PackageGroupPattern", # required
})

Response structure


resp.package_group.arn #=> String
resp.package_group.pattern #=> String
resp.package_group.domain_name #=> String
resp.package_group.domain_owner #=> String
resp.package_group.created_time #=> Time
resp.package_group.contact_info #=> String
resp.package_group.description #=> String
resp.package_group.origin_configuration.restrictions #=> Hash
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].effective_mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.arn #=> String
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.pattern #=> String
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].repositories_count #=> Integer
resp.package_group.parent.arn #=> String
resp.package_group.parent.pattern #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain that contains the package group.

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

  • :package_group (required, String)

    The pattern of the requested package group.

Returns:

See Also:



1437
1438
1439
1440
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1437

def describe_package_group(params = {}, options = {})
  req = build_request(:describe_package_group, params)
  req.send_request(options)
end

#describe_package_version(params = {}) ⇒ Types::DescribePackageVersionResult

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

Examples:

Request syntax with placeholder values


resp = client.describe_package_version({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
  package_version: "PackageVersion", # required
})

Response structure


resp.package_version.format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.package_version.namespace #=> String
resp.package_version.package_name #=> String
resp.package_version.display_name #=> String
resp.package_version.version #=> String
resp.package_version.summary #=> String
resp.package_version.home_page #=> String
resp.package_version.source_code_repository #=> String
resp.package_version.published_time #=> Time
resp.package_version.licenses #=> Array
resp.package_version.licenses[0].name #=> String
resp.package_version.licenses[0].url #=> String
resp.package_version.revision #=> String
resp.package_version.status #=> String, one of "Published", "Unfinished", "Unlisted", "Archived", "Disposed", "Deleted"
resp.package_version.origin.domain_entry_point.repository_name #=> String
resp.package_version.origin.domain_entry_point.external_connection_name #=> String
resp.package_version.origin.origin_type #=> String, one of "INTERNAL", "EXTERNAL", "UNKNOWN"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

    The name of the repository that contains the package version.

  • :format (required, String)

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

  • :namespace (String)

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

    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 (required, String)

    The name of the requested package version.

  • :package_version (required, String)

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

Returns:

See Also:



1534
1535
1536
1537
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1534

def describe_package_version(params = {}, options = {})
  req = build_request(:describe_package_version, params)
  req.send_request(options)
end

#describe_repository(params = {}) ⇒ Types::DescribeRepositoryResult

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

Examples:

Request syntax with placeholder values


resp = client.describe_repository({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
})

Response structure


resp.repository.name #=> String
resp.repository. #=> String
resp.repository.domain_name #=> String
resp.repository.domain_owner #=> String
resp.repository.arn #=> String
resp.repository.description #=> String
resp.repository.upstreams #=> Array
resp.repository.upstreams[0].repository_name #=> String
resp.repository.external_connections #=> Array
resp.repository.external_connections[0].external_connection_name #=> String
resp.repository.external_connections[0].package_format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.repository.external_connections[0].status #=> String, one of "Available"
resp.repository.created_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

    A string that specifies the name of the requested repository.

Returns:

See Also:



1584
1585
1586
1587
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1584

def describe_repository(params = {}, options = {})
  req = build_request(:describe_repository, params)
  req.send_request(options)
end

#disassociate_external_connection(params = {}) ⇒ Types::DisassociateExternalConnectionResult

Removes an existing external connection from a repository.

Examples:

Request syntax with placeholder values


resp = client.disassociate_external_connection({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  external_connection: "ExternalConnectionName", # required
})

Response structure


resp.repository.name #=> String
resp.repository. #=> String
resp.repository.domain_name #=> String
resp.repository.domain_owner #=> String
resp.repository.arn #=> String
resp.repository.description #=> String
resp.repository.upstreams #=> Array
resp.repository.upstreams[0].repository_name #=> String
resp.repository.external_connections #=> Array
resp.repository.external_connections[0].external_connection_name #=> String
resp.repository.external_connections[0].package_format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.repository.external_connections[0].status #=> String, one of "Available"
resp.repository.created_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain that contains the repository from which to remove the external repository.

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

  • :repository (required, String)

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

  • :external_connection (required, String)

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

Returns:

See Also:



1639
1640
1641
1642
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1639

def disassociate_external_connection(params = {}, options = {})
  req = build_request(:disassociate_external_connection, params)
  req.send_request(options)
end

#dispose_package_versions(params = {}) ⇒ Types::DisposePackageVersionsResult

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.

Examples:

Request syntax with placeholder values


resp = client.dispose_package_versions({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
  versions: ["PackageVersion"], # required
  version_revisions: {
    "PackageVersion" => "PackageVersionRevision",
  },
  expected_status: "Published", # accepts Published, Unfinished, Unlisted, Archived, Disposed, Deleted
})

Response structure


resp.successful_versions #=> Hash
resp.successful_versions["PackageVersion"].revision #=> String
resp.successful_versions["PackageVersion"].status #=> String, one of "Published", "Unfinished", "Unlisted", "Archived", "Disposed", "Deleted"
resp.failed_versions #=> Hash
resp.failed_versions["PackageVersion"].error_code #=> String, one of "ALREADY_EXISTS", "MISMATCHED_REVISION", "MISMATCHED_STATUS", "NOT_ALLOWED", "NOT_FOUND", "SKIPPED"
resp.failed_versions["PackageVersion"].error_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

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

  • :format (required, String)

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

  • :namespace (String)

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

    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 (required, String)

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

  • :versions (required, Array<String>)

    The versions of the package you want to dispose.

  • :version_revisions (Hash<String,String>)

    The revisions of the package versions you want to dispose.

  • :expected_status (String)

    The expected status of the package version to dispose.

Returns:

See Also:



1749
1750
1751
1752
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1749

def dispose_package_versions(params = {}, options = {})
  req = build_request(:dispose_package_versions, params)
  req.send_request(options)
end

#get_associated_package_group(params = {}) ⇒ Types::GetAssociatedPackageGroupResult

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.

Examples:

Request syntax with placeholder values


resp = client.get_associated_package_group({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
})

Response structure


resp.package_group.arn #=> String
resp.package_group.pattern #=> String
resp.package_group.domain_name #=> String
resp.package_group.domain_owner #=> String
resp.package_group.created_time #=> Time
resp.package_group.contact_info #=> String
resp.package_group.description #=> String
resp.package_group.origin_configuration.restrictions #=> Hash
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].effective_mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.arn #=> String
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.pattern #=> String
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].repositories_count #=> Integer
resp.package_group.parent.arn #=> String
resp.package_group.parent.pattern #=> String
resp.association_type #=> String, one of "STRONG", "WEAK"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :format (required, String)

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

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

    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 (required, String)

    The package from which to get the associated package group.

Returns:

See Also:



1848
1849
1850
1851
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1848

def get_associated_package_group(params = {}, options = {})
  req = build_request(:get_associated_package_group, params)
  req.send_request(options)
end

#get_authorization_token(params = {}) ⇒ Types::GetAuthorizationTokenResult

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.

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.

Examples:

Request syntax with placeholder values


resp = client.get_authorization_token({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  duration_seconds: 1,
})

Response structure


resp.authorization_token #=> String
resp.expiration #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :duration_seconds (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.

Returns:

See Also:



1922
1923
1924
1925
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1922

def get_authorization_token(params = {}, options = {})
  req = build_request(:get_authorization_token, params)
  req.send_request(options)
end

#get_domain_permissions_policy(params = {}) ⇒ Types::GetDomainPermissionsPolicyResult

Returns the resource policy attached to the specified domain.

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.

Examples:

Request syntax with placeholder values


resp = client.get_domain_permissions_policy({
  domain: "DomainName", # required
  domain_owner: "AccountId",
})

Response structure


resp.policy.resource_arn #=> String
resp.policy.revision #=> String
resp.policy.document #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

Returns:

See Also:



1967
1968
1969
1970
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1967

def get_domain_permissions_policy(params = {}, options = {})
  req = build_request(:get_domain_permissions_policy, params)
  req.send_request(options)
end

#get_package_version_asset(params = {}) ⇒ Types::GetPackageVersionAssetResult

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.

Examples:

Request syntax with placeholder values


resp = client.get_package_version_asset({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
  package_version: "PackageVersion", # required
  asset: "AssetName", # required
  package_version_revision: "PackageVersionRevision",
})

Response structure


resp.asset #=> IO
resp.asset_name #=> String
resp.package_version #=> String
resp.package_version_revision #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

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

  • :format (required, String)

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

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

    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 (required, String)

    The name of the package that contains the requested asset.

  • :package_version (required, String)

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

  • :asset (required, String)

    The name of the requested asset.

  • :package_version_revision (String)

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

Returns:

See Also:



2063
2064
2065
2066
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2063

def get_package_version_asset(params = {}, options = {}, &block)
  req = build_request(:get_package_version_asset, params)
  req.send_request(options, &block)
end

#get_package_version_readme(params = {}) ⇒ Types::GetPackageVersionReadmeResult

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.

Examples:

Request syntax with placeholder values


resp = client.get_package_version_readme({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
  package_version: "PackageVersion", # required
})

Response structure


resp.format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.namespace #=> String
resp.package #=> String
resp.version #=> String
resp.version_revision #=> String
resp.readme #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

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

  • :format (required, String)

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

  • :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 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 (required, String)

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

  • :package_version (required, String)

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

Returns:

See Also:



2156
2157
2158
2159
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2156

def get_package_version_readme(params = {}, options = {})
  req = build_request(:get_package_version_readme, params)
  req.send_request(options)
end

#get_repository_endpoint(params = {}) ⇒ Types::GetRepositoryEndpointResult

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

Examples:

Request syntax with placeholder values


resp = client.get_repository_endpoint({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
})

Response structure


resp.repository_endpoint #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain that contains the repository.

  • :domain_owner (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 (required, String)

    The name of the repository.

  • :format (required, String)

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

Returns:

See Also:



2212
2213
2214
2215
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2212

def get_repository_endpoint(params = {}, options = {})
  req = build_request(:get_repository_endpoint, params)
  req.send_request(options)
end

#get_repository_permissions_policy(params = {}) ⇒ Types::GetRepositoryPermissionsPolicyResult

Returns the resource policy that is set on a repository.

Examples:

Request syntax with placeholder values


resp = client.get_repository_permissions_policy({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
})

Response structure


resp.policy.resource_arn #=> String
resp.policy.revision #=> String
resp.policy.document #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

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

Returns:

See Also:



2253
2254
2255
2256
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2253

def get_repository_permissions_policy(params = {}, options = {})
  req = build_request(:get_repository_permissions_policy, params)
  req.send_request(options)
end

#list_allowed_repositories_for_group(params = {}) ⇒ Types::ListAllowedRepositoriesForGroupResult

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_allowed_repositories_for_group({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  package_group: "PackageGroupPattern", # required
  origin_restriction_type: "EXTERNAL_UPSTREAM", # required, accepts EXTERNAL_UPSTREAM, INTERNAL_UPSTREAM, PUBLISH
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.allowed_repositories #=> Array
resp.allowed_repositories[0] #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :package_group (required, String)

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

  • :origin_restriction_type (required, String)

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

  • :max_results (Integer)

    The maximum number of results to return per page.

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

See Also:



2319
2320
2321
2322
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2319

def list_allowed_repositories_for_group(params = {}, options = {})
  req = build_request(:list_allowed_repositories_for_group, params)
  req.send_request(options)
end

#list_associated_packages(params = {}) ⇒ Types::ListAssociatedPackagesResult

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_associated_packages({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  package_group: "PackageGroupPattern", # required
  max_results: 1,
  next_token: "PaginationToken",
  preview: false,
})

Response structure


resp.packages #=> Array
resp.packages[0].format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.packages[0].namespace #=> String
resp.packages[0].package #=> String
resp.packages[0].association_type #=> String, one of "STRONG", "WEAK"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :package_group (required, String)

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

  • :max_results (Integer)

    The maximum number of results to return per page.

  • :next_token (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.

Returns:

See Also:



2389
2390
2391
2392
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2389

def list_associated_packages(params = {}, options = {})
  req = build_request(:list_associated_packages, params)
  req.send_request(options)
end

#list_domains(params = {}) ⇒ Types::ListDomainsResult

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_domains({
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.domains #=> Array
resp.domains[0].name #=> String
resp.domains[0].owner #=> String
resp.domains[0].arn #=> String
resp.domains[0].status #=> String, one of "Active", "Deleted"
resp.domains[0].created_time #=> Time
resp.domains[0].encryption_key #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :max_results (Integer)

    The maximum number of results to return per page.

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

See Also:



2439
2440
2441
2442
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2439

def list_domains(params = {}, options = {})
  req = build_request(:list_domains, params)
  req.send_request(options)
end

#list_package_groups(params = {}) ⇒ Types::ListPackageGroupsResult

Returns a list of package groups in the requested domain.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_package_groups({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  max_results: 1,
  next_token: "PaginationToken",
  prefix: "PackageGroupPatternPrefix",
})

Response structure


resp.package_groups #=> Array
resp.package_groups[0].arn #=> String
resp.package_groups[0].pattern #=> String
resp.package_groups[0].domain_name #=> String
resp.package_groups[0].domain_owner #=> String
resp.package_groups[0].created_time #=> Time
resp.package_groups[0].contact_info #=> String
resp.package_groups[0].description #=> String
resp.package_groups[0].origin_configuration.restrictions #=> Hash
resp.package_groups[0].origin_configuration.restrictions["PackageGroupOriginRestrictionType"].mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_groups[0].origin_configuration.restrictions["PackageGroupOriginRestrictionType"].effective_mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_groups[0].origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.arn #=> String
resp.package_groups[0].origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.pattern #=> String
resp.package_groups[0].origin_configuration.restrictions["PackageGroupOriginRestrictionType"].repositories_count #=> Integer
resp.package_groups[0].parent.arn #=> String
resp.package_groups[0].parent.pattern #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The domain for which you want to list package groups.

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

  • :max_results (Integer)

    The maximum number of results to return per page.

  • :next_token (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.

Returns:

See Also:



2507
2508
2509
2510
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2507

def list_package_groups(params = {}, options = {})
  req = build_request(:list_package_groups, params)
  req.send_request(options)
end

#list_package_version_assets(params = {}) ⇒ Types::ListPackageVersionAssetsResult

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_package_version_assets({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
  package_version: "PackageVersion", # required
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.namespace #=> String
resp.package #=> String
resp.version #=> String
resp.version_revision #=> String
resp.next_token #=> String
resp.assets #=> Array
resp.assets[0].name #=> String
resp.assets[0].size #=> Integer
resp.assets[0].hashes #=> Hash
resp.assets[0].hashes["HashAlgorithm"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

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

  • :format (required, String)

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

  • :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 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 (required, String)

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

  • :package_version (required, String)

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

  • :max_results (Integer)

    The maximum number of results to return per page.

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

See Also:



2620
2621
2622
2623
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2620

def list_package_version_assets(params = {}, options = {})
  req = build_request(:list_package_version_assets, params)
  req.send_request(options)
end

#list_package_version_dependencies(params = {}) ⇒ Types::ListPackageVersionDependenciesResult

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.

Examples:

Request syntax with placeholder values


resp = client.list_package_version_dependencies({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
  package_version: "PackageVersion", # required
  next_token: "PaginationToken",
})

Response structure


resp.format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.namespace #=> String
resp.package #=> String
resp.version #=> String
resp.version_revision #=> String
resp.next_token #=> String
resp.dependencies #=> Array
resp.dependencies[0].namespace #=> String
resp.dependencies[0].package #=> String
resp.dependencies[0].dependency_type #=> String
resp.dependencies[0].version_requirement #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

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

  • :format (required, String)

    The format of the package with the requested dependencies.

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

    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 (required, String)

    The name of the package versions' package.

  • :package_version (required, String)

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

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

See Also:



2730
2731
2732
2733
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2730

def list_package_version_dependencies(params = {}, options = {})
  req = build_request(:list_package_version_dependencies, params)
  req.send_request(options)
end

#list_package_versions(params = {}) ⇒ Types::ListPackageVersionsResult

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_package_versions({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
  status: "Published", # accepts Published, Unfinished, Unlisted, Archived, Disposed, Deleted
  sort_by: "PUBLISHED_TIME", # accepts PUBLISHED_TIME
  max_results: 1,
  next_token: "PaginationToken",
  origin_type: "INTERNAL", # accepts INTERNAL, EXTERNAL, UNKNOWN
})

Response structure


resp.default_display_version #=> String
resp.format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.namespace #=> String
resp.package #=> String
resp.versions #=> Array
resp.versions[0].version #=> String
resp.versions[0].revision #=> String
resp.versions[0].status #=> String, one of "Published", "Unfinished", "Unlisted", "Archived", "Disposed", "Deleted"
resp.versions[0].origin.domain_entry_point.repository_name #=> String
resp.versions[0].origin.domain_entry_point.external_connection_name #=> String
resp.versions[0].origin.origin_type #=> String, one of "INTERNAL", "EXTERNAL", "UNKNOWN"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

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

  • :format (required, String)

    The format of the package versions you want to list.

  • :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 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 (required, 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.

  • :sort_by (String)

    How to sort the requested list of package versions.

  • :max_results (Integer)

    The maximum number of results to return per page.

  • :next_token (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.

  • :origin_type (String)

    The originType used to filter package versions. Only package versions with the provided originType will be returned.

Returns:

See Also:



2853
2854
2855
2856
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2853

def list_package_versions(params = {}, options = {})
  req = build_request(:list_package_versions, params)
  req.send_request(options)
end

#list_packages(params = {}) ⇒ Types::ListPackagesResult

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

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_packages({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package_prefix: "PackageName",
  max_results: 1,
  next_token: "PaginationToken",
  publish: "ALLOW", # accepts ALLOW, BLOCK
  upstream: "ALLOW", # accepts ALLOW, BLOCK
})

Response structure


resp.packages #=> Array
resp.packages[0].format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.packages[0].namespace #=> String
resp.packages[0].package #=> String
resp.packages[0].origin_configuration.restrictions.publish #=> String, one of "ALLOW", "BLOCK"
resp.packages[0].origin_configuration.restrictions.upstream #=> String, one of "ALLOW", "BLOCK"
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, 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.

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

  • :package_prefix (String)

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

  • :max_results (Integer)

    The maximum number of results to return per page.

  • :next_token (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.

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

Returns:

See Also:



2966
2967
2968
2969
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2966

def list_packages(params = {}, options = {})
  req = build_request(:list_packages, params)
  req.send_request(options)
end

#list_repositories(params = {}) ⇒ Types::ListRepositoriesResult

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_repositories({
  repository_prefix: "RepositoryName",
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.repositories #=> Array
resp.repositories[0].name #=> String
resp.repositories[0]. #=> String
resp.repositories[0].domain_name #=> String
resp.repositories[0].domain_owner #=> String
resp.repositories[0].arn #=> String
resp.repositories[0].description #=> String
resp.repositories[0].created_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :repository_prefix (String)

    A prefix used to filter returned repositories. Only repositories with names that start with repositoryPrefix are returned.

  • :max_results (Integer)

    The maximum number of results to return per page.

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

See Also:



3023
3024
3025
3026
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3023

def list_repositories(params = {}, options = {})
  req = build_request(:list_repositories, params)
  req.send_request(options)
end

#list_repositories_in_domain(params = {}) ⇒ Types::ListRepositoriesInDomainResult

Returns a list of RepositorySummary objects. Each RepositorySummary contains information about a repository in the specified domain and that matches the input parameters.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_repositories_in_domain({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  administrator_account: "AccountId",
  repository_prefix: "RepositoryName",
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.repositories #=> Array
resp.repositories[0].name #=> String
resp.repositories[0]. #=> String
resp.repositories[0].domain_name #=> String
resp.repositories[0].domain_owner #=> String
resp.repositories[0].arn #=> String
resp.repositories[0].description #=> String
resp.repositories[0].created_time #=> Time
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain that contains the returned list of repositories.

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

  • :administrator_account (String)

    Filter the list of repositories to only include those that are managed by the Amazon Web Services account ID.

  • :repository_prefix (String)

    A prefix used to filter returned repositories. Only repositories with names that start with repositoryPrefix are returned.

  • :max_results (Integer)

    The maximum number of results to return per page.

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

See Also:



3094
3095
3096
3097
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3094

def list_repositories_in_domain(params = {}, options = {})
  req = build_request(:list_repositories_in_domain, params)
  req.send_request(options)
end

#list_sub_package_groups(params = {}) ⇒ Types::ListSubPackageGroupsResult

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.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_sub_package_groups({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  package_group: "PackageGroupPattern", # required
  max_results: 1,
  next_token: "PaginationToken",
})

Response structure


resp.package_groups #=> Array
resp.package_groups[0].arn #=> String
resp.package_groups[0].pattern #=> String
resp.package_groups[0].domain_name #=> String
resp.package_groups[0].domain_owner #=> String
resp.package_groups[0].created_time #=> Time
resp.package_groups[0].contact_info #=> String
resp.package_groups[0].description #=> String
resp.package_groups[0].origin_configuration.restrictions #=> Hash
resp.package_groups[0].origin_configuration.restrictions["PackageGroupOriginRestrictionType"].mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_groups[0].origin_configuration.restrictions["PackageGroupOriginRestrictionType"].effective_mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_groups[0].origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.arn #=> String
resp.package_groups[0].origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.pattern #=> String
resp.package_groups[0].origin_configuration.restrictions["PackageGroupOriginRestrictionType"].repositories_count #=> Integer
resp.package_groups[0].parent.arn #=> String
resp.package_groups[0].parent.pattern #=> String
resp.next_token #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain which contains the package group from which to list sub package groups.

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

  • :package_group (required, String)

    The pattern of the package group from which to list sub package groups.

  • :max_results (Integer)

    The maximum number of results to return per page.

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

See Also:



3169
3170
3171
3172
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3169

def list_sub_package_groups(params = {}, options = {})
  req = build_request(:list_sub_package_groups, params)
  req.send_request(options)
end

#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResult

Gets information about Amazon Web Services tags for a specified Amazon Resource Name (ARN) in CodeArtifact.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "Arn", # required
})

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource to get tags for.

Returns:

See Also:



3200
3201
3202
3203
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3200

def list_tags_for_resource(params = {}, options = {})
  req = build_request(:list_tags_for_resource, params)
  req.send_request(options)
end

#publish_package_version(params = {}) ⇒ Types::PublishPackageVersionResult

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.

Only generic packages can be published using this API. For more information, see Using generic packages in the CodeArtifact User Guide.

Examples:

Request syntax with placeholder values


resp = client.publish_package_version({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
  package_version: "PackageVersion", # required
  asset_content: "data", # required
  asset_name: "AssetName", # required
  asset_sha256: "SHA256", # required
  unfinished: false,
})

Response structure


resp.format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.namespace #=> String
resp.package #=> String
resp.version #=> String
resp.version_revision #=> String
resp.status #=> String, one of "Published", "Unfinished", "Unlisted", "Archived", "Disposed", "Deleted"
resp.asset.name #=> String
resp.asset.size #=> Integer
resp.asset.hashes #=> Hash
resp.asset.hashes["HashAlgorithm"] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

  • :domain_owner (String)

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

  • :repository (required, String)

    The name of the repository that the package version will be published to.

  • :format (required, String)

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

    The only supported value is generic.

  • :namespace (String)

    The namespace of the package version to publish.

  • :package (required, String)

    The name of the package version to publish.

  • :package_version (required, String)

    The package version to publish (for example, 3.5.2).

  • :asset_content (required, String, StringIO, File)

    The content of the asset to publish.

  • :asset_name (required, String)

    The name of the asset to publish. Asset names can include Unicode letters and numbers, and the following special characters: ~ ! @ ^ & ( ) - ` _ + [ ] \{ \} ; , . `

  • :asset_sha256 (required, 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

Returns:

See Also:



3330
3331
3332
3333
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3330

def publish_package_version(params = {}, options = {})
  req = build_request(:publish_package_version, params)
  req.send_request(options)
end

#put_domain_permissions_policy(params = {}) ⇒ Types::PutDomainPermissionsPolicyResult

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.

Examples:

Request syntax with placeholder values


resp = client.put_domain_permissions_policy({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  policy_revision: "PolicyRevision",
  policy_document: "PolicyDocument", # required
})

Response structure


resp.policy.resource_arn #=> String
resp.policy.revision #=> String
resp.policy.document #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain on which to set the resource policy.

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

  • :policy_revision (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.

  • :policy_document (required, String)

    A valid displayable JSON Aspen policy string to be set as the access control resource policy on the provided domain.

Returns:

See Also:



3382
3383
3384
3385
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3382

def put_domain_permissions_policy(params = {}, options = {})
  req = build_request(:put_domain_permissions_policy, params)
  req.send_request(options)
end

#put_package_origin_configuration(params = {}) ⇒ Types::PutPackageOriginConfigurationResult

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.

Examples:

Request syntax with placeholder values


resp = client.put_package_origin_configuration({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
  restrictions: { # required
    publish: "ALLOW", # required, accepts ALLOW, BLOCK
    upstream: "ALLOW", # required, accepts ALLOW, BLOCK
  },
})

Response structure


resp.origin_configuration.restrictions.publish #=> String, one of "ALLOW", "BLOCK"
resp.origin_configuration.restrictions.upstream #=> String, one of "ALLOW", "BLOCK"

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

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

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

  • :repository (required, String)

    The name of the repository that contains the package.

  • :format (required, String)

    A format that specifies the type of the package to be updated.

  • :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 (required, String)

    The name of the package to be updated.

  • :restrictions (required, Types::PackageOriginRestrictions)

    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.

Returns:

See Also:



3483
3484
3485
3486
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3483

def put_package_origin_configuration(params = {}, options = {})
  req = build_request(:put_package_origin_configuration, params)
  req.send_request(options)
end

#put_repository_permissions_policy(params = {}) ⇒ Types::PutRepositoryPermissionsPolicyResult

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.

Examples:

Request syntax with placeholder values


resp = client.put_repository_permissions_policy({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  policy_revision: "PolicyRevision",
  policy_document: "PolicyDocument", # required
})

Response structure


resp.policy.resource_arn #=> String
resp.policy.revision #=> String
resp.policy.document #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain containing the repository to set the resource policy on.

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

  • :repository (required, String)

    The name of the repository to set the resource policy on.

  • :policy_revision (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.

  • :policy_document (required, String)

    A valid displayable JSON Aspen policy string to be set as the access control resource policy on the provided repository.

Returns:

See Also:



3542
3543
3544
3545
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3542

def put_repository_permissions_policy(params = {}, options = {})
  req = build_request(:put_repository_permissions_policy, params)
  req.send_request(options)
end

#tag_resource(params = {}) ⇒ Struct

Adds or updates tags for a resource in CodeArtifact.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "Arn", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource that you want to add or update tags for.

  • :tags (required, Array<Types::Tag>)

    The tags you want to modify or add to the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3574
3575
3576
3577
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3574

def tag_resource(params = {}, options = {})
  req = build_request(:tag_resource, params)
  req.send_request(options)
end

#untag_resource(params = {}) ⇒ Struct

Removes tags from a resource in CodeArtifact.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "Arn", # required
  tag_keys: ["TagKey"], # required
})

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource that you want to remove tags from.

  • :tag_keys (required, Array<String>)

    The tag key for each tag that you want to remove from the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



3601
3602
3603
3604
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3601

def untag_resource(params = {}, options = {})
  req = build_request(:untag_resource, params)
  req.send_request(options)
end

#update_package_group(params = {}) ⇒ Types::UpdatePackageGroupResult

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.

Examples:

Request syntax with placeholder values


resp = client.update_package_group({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  package_group: "PackageGroupPattern", # required
  contact_info: "PackageGroupContactInfo",
  description: "Description",
})

Response structure


resp.package_group.arn #=> String
resp.package_group.pattern #=> String
resp.package_group.domain_name #=> String
resp.package_group.domain_owner #=> String
resp.package_group.created_time #=> Time
resp.package_group.contact_info #=> String
resp.package_group.description #=> String
resp.package_group.origin_configuration.restrictions #=> Hash
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].effective_mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.arn #=> String
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.pattern #=> String
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].repositories_count #=> Integer
resp.package_group.parent.arn #=> String
resp.package_group.parent.pattern #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain which contains the package group to be updated.

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

  • :package_group (required, String)

    The pattern of the package group to be updated.

  • :contact_info (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.

Returns:

See Also:



3667
3668
3669
3670
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3667

def update_package_group(params = {}, options = {})
  req = build_request(:update_package_group, params)
  req.send_request(options)
end

#update_package_group_origin_configuration(params = {}) ⇒ Types::UpdatePackageGroupOriginConfigurationResult

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:

Request syntax with placeholder values


resp = client.update_package_group_origin_configuration({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  package_group: "PackageGroupPattern", # required
  restrictions: {
    "EXTERNAL_UPSTREAM" => "ALLOW", # accepts ALLOW, ALLOW_SPECIFIC_REPOSITORIES, BLOCK, INHERIT
  },
  add_allowed_repositories: [
    {
      repository_name: "RepositoryName",
      origin_restriction_type: "EXTERNAL_UPSTREAM", # accepts EXTERNAL_UPSTREAM, INTERNAL_UPSTREAM, PUBLISH
    },
  ],
  remove_allowed_repositories: [
    {
      repository_name: "RepositoryName",
      origin_restriction_type: "EXTERNAL_UPSTREAM", # accepts EXTERNAL_UPSTREAM, INTERNAL_UPSTREAM, PUBLISH
    },
  ],
})

Response structure


resp.package_group.arn #=> String
resp.package_group.pattern #=> String
resp.package_group.domain_name #=> String
resp.package_group.domain_owner #=> String
resp.package_group.created_time #=> Time
resp.package_group.contact_info #=> String
resp.package_group.description #=> String
resp.package_group.origin_configuration.restrictions #=> Hash
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].effective_mode #=> String, one of "ALLOW", "ALLOW_SPECIFIC_REPOSITORIES", "BLOCK", "INHERIT"
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.arn #=> String
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].inherited_from.pattern #=> String
resp.package_group.origin_configuration.restrictions["PackageGroupOriginRestrictionType"].repositories_count #=> Integer
resp.package_group.parent.arn #=> String
resp.package_group.parent.pattern #=> String
resp.allowed_repository_updates #=> Hash
resp.allowed_repository_updates["PackageGroupOriginRestrictionType"] #=> Hash
resp.allowed_repository_updates["PackageGroupOriginRestrictionType"]["PackageGroupAllowedRepositoryUpdateType"] #=> Array
resp.allowed_repository_updates["PackageGroupOriginRestrictionType"]["PackageGroupAllowedRepositoryUpdateType"][0] #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain which contains the package group for which to update the origin configuration.

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

  • :package_group (required, String)

    The pattern of the package group for which to update the origin configuration.

  • :restrictions (Hash<String,String>)

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

  • :add_allowed_repositories (Array<Types::PackageGroupAllowedRepository>)

    The repository name and restrictions to add to the allowed repository list of the specified package group.

  • :remove_allowed_repositories (Array<Types::PackageGroupAllowedRepository>)

    The repository name and restrictions to remove from the allowed repository list of the specified package group.

Returns:

See Also:



3764
3765
3766
3767
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3764

def update_package_group_origin_configuration(params = {}, options = {})
  req = build_request(:update_package_group_origin_configuration, params)
  req.send_request(options)
end

#update_package_versions_status(params = {}) ⇒ Types::UpdatePackageVersionsStatusResult

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.

Examples:

Request syntax with placeholder values


resp = client.update_package_versions_status({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  format: "npm", # required, accepts npm, pypi, maven, nuget, generic, swift
  namespace: "PackageNamespace",
  package: "PackageName", # required
  versions: ["PackageVersion"], # required
  version_revisions: {
    "PackageVersion" => "PackageVersionRevision",
  },
  expected_status: "Published", # accepts Published, Unfinished, Unlisted, Archived, Disposed, Deleted
  target_status: "Published", # required, accepts Published, Unfinished, Unlisted, Archived, Disposed, Deleted
})

Response structure


resp.successful_versions #=> Hash
resp.successful_versions["PackageVersion"].revision #=> String
resp.successful_versions["PackageVersion"].status #=> String, one of "Published", "Unfinished", "Unlisted", "Archived", "Disposed", "Deleted"
resp.failed_versions #=> Hash
resp.failed_versions["PackageVersion"].error_code #=> String, one of "ALREADY_EXISTS", "MISMATCHED_REVISION", "MISMATCHED_STATUS", "NOT_ALLOWED", "NOT_FOUND", "SKIPPED"
resp.failed_versions["PackageVersion"].error_message #=> String

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain that contains the repository that contains the package versions with a status to be updated.

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

  • :repository (required, String)

    The repository that contains the package versions with the status you want to update.

  • :format (required, String)

    A format that specifies the type of the package with the statuses to update.

  • :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 (required, String)

    The name of the package with the version statuses to update.

  • :versions (required, Array<String>)

    An array of strings that specify the versions of the package with the statuses to update.

  • :version_revisions (Hash<String,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.

  • :expected_status (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.

  • :target_status (required, String)

    The status you want to change the package version status to.

Returns:

See Also:



3865
3866
3867
3868
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3865

def update_package_versions_status(params = {}, options = {})
  req = build_request(:update_package_versions_status, params)
  req.send_request(options)
end

#update_repository(params = {}) ⇒ Types::UpdateRepositoryResult

Update the properties of a repository.

Examples:

Request syntax with placeholder values


resp = client.update_repository({
  domain: "DomainName", # required
  domain_owner: "AccountId",
  repository: "RepositoryName", # required
  description: "Description",
  upstreams: [
    {
      repository_name: "RepositoryName", # required
    },
  ],
})

Response structure


resp.repository.name #=> String
resp.repository. #=> String
resp.repository.domain_name #=> String
resp.repository.domain_owner #=> String
resp.repository.arn #=> String
resp.repository.description #=> String
resp.repository.upstreams #=> Array
resp.repository.upstreams[0].repository_name #=> String
resp.repository.external_connections #=> Array
resp.repository.external_connections[0].external_connection_name #=> String
resp.repository.external_connections[0].package_format #=> String, one of "npm", "pypi", "maven", "nuget", "generic", "swift"
resp.repository.external_connections[0].status #=> String, one of "Available"
resp.repository.created_time #=> Time

Parameters:

  • params (Hash) (defaults to: {})

    ({})

Options Hash (params):

  • :domain (required, String)

    The name of the domain associated with the repository to update.

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

  • :repository (required, String)

    The name of the repository to update.

  • :description (String)

    An updated repository description.

  • :upstreams (Array<Types::UpstreamRepository>)

    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.

Returns:

See Also:



3934
3935
3936
3937
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 3934

def update_repository(params = {}, options = {})
  req = build_request(:update_repository, params)
  req.send_request(options)
end