Class: Aws::CodeArtifact::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::CodeArtifact::Client
- 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
API Operations collapse
-
#associate_external_connection(params = {}) ⇒ Types::AssociateExternalConnectionResult
Adds an existing external connection to a repository.
-
#copy_package_versions(params = {}) ⇒ Types::CopyPackageVersionsResult
Copies package versions from one repository to another repository in the same domain.
-
#create_domain(params = {}) ⇒ Types::CreateDomainResult
Creates a domain.
-
#create_repository(params = {}) ⇒ Types::CreateRepositoryResult
Creates a repository.
-
#delete_domain(params = {}) ⇒ Types::DeleteDomainResult
Deletes a domain.
-
#delete_domain_permissions_policy(params = {}) ⇒ Types::DeleteDomainPermissionsPolicyResult
Deletes the resource policy set on a domain.
-
#delete_package_versions(params = {}) ⇒ Types::DeletePackageVersionsResult
Deletes one or more versions of a package.
-
#delete_repository(params = {}) ⇒ Types::DeleteRepositoryResult
Deletes a repository.
-
#delete_repository_permissions_policy(params = {}) ⇒ Types::DeleteRepositoryPermissionsPolicyResult
Deletes the resource policy that is set on a repository.
-
#describe_domain(params = {}) ⇒ Types::DescribeDomainResult
Returns a [
DomainDescription
][1] object that contains information about the requested domain. -
#describe_package_version(params = {}) ⇒ Types::DescribePackageVersionResult
Returns a [
PackageVersionDescription
][1] object that contains information about the requested package version. -
#describe_repository(params = {}) ⇒ Types::DescribeRepositoryResult
Returns a
RepositoryDescription
object that contains detailed information about the requested repository. -
#disassociate_external_connection(params = {}) ⇒ Types::DisassociateExternalConnectionResult
Removes an existing external connection from a repository.
-
#dispose_package_versions(params = {}) ⇒ Types::DisposePackageVersionsResult
Deletes the assets in package versions and sets the package versions' status to
Disposed
. -
#get_authorization_token(params = {}) ⇒ Types::GetAuthorizationTokenResult
Generates a temporary authorization token for accessing repositories in the domain.
-
#get_domain_permissions_policy(params = {}) ⇒ Types::GetDomainPermissionsPolicyResult
Returns the resource policy attached to the specified domain.
-
#get_package_version_asset(params = {}) ⇒ Types::GetPackageVersionAssetResult
Returns an asset (or file) that is in a package.
-
#get_package_version_readme(params = {}) ⇒ Types::GetPackageVersionReadmeResult
Gets the readme file or descriptive text for a package version.
-
#get_repository_endpoint(params = {}) ⇒ Types::GetRepositoryEndpointResult
Returns the endpoint of a repository for a specific package format.
-
#get_repository_permissions_policy(params = {}) ⇒ Types::GetRepositoryPermissionsPolicyResult
Returns the resource policy that is set on a repository.
-
#list_domains(params = {}) ⇒ Types::ListDomainsResult
Returns a list of
DomainSummary
objects for all domains owned by the AWS account that makes this call. -
#list_package_version_assets(params = {}) ⇒ Types::ListPackageVersionAssetsResult
Returns a list of [
AssetSummary
][1] objects for assets in a package version. -
#list_package_version_dependencies(params = {}) ⇒ Types::ListPackageVersionDependenciesResult
Returns the direct dependencies for a package version.
-
#list_package_versions(params = {}) ⇒ Types::ListPackageVersionsResult
Returns a list of [
PackageVersionSummary
][1] objects for package versions in a repository that match the request parameters. -
#list_packages(params = {}) ⇒ Types::ListPackagesResult
Returns a list of [
PackageSummary
][1] objects for packages in a repository that match the request parameters. -
#list_repositories(params = {}) ⇒ Types::ListRepositoriesResult
Returns a list of [
RepositorySummary
][1] objects. -
#list_repositories_in_domain(params = {}) ⇒ Types::ListRepositoriesInDomainResult
Returns a list of [
RepositorySummary
][1] objects. -
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResult
Gets information about AWS tags for a specified Amazon Resource Name (ARN) in AWS CodeArtifact.
-
#put_domain_permissions_policy(params = {}) ⇒ Types::PutDomainPermissionsPolicyResult
Sets a resource policy on a domain that specifies permissions to access it.
-
#put_repository_permissions_policy(params = {}) ⇒ Types::PutRepositoryPermissionsPolicyResult
Sets the resource policy on a repository that specifies permissions to access it.
-
#tag_resource(params = {}) ⇒ Struct
Adds or updates tags for a resource in AWS CodeArtifact.
-
#untag_resource(params = {}) ⇒ Struct
Removes tags from a resource in AWS CodeArtifact.
-
#update_package_versions_status(params = {}) ⇒ Types::UpdatePackageVersionsStatusResult
Updates the status of one or more versions of a package.
-
#update_repository(params = {}) ⇒ Types::UpdateRepositoryResult
Update the properties of a repository.
Instance Method Summary collapse
-
#initialize(options) ⇒ Client
constructor
A new instance of Client.
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.
324 325 326 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 324 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.
398 399 400 401 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 398 def associate_external_connection(params = {}, = {}) req = build_request(:associate_external_connection, params) req.send_request() end |
#copy_package_versions(params = {}) ⇒ Types::CopyPackageVersionsResult
Copies package versions from one repository to another repository in the same domain.
versions
or versionRevisions
. You cannot specify
both.
526 527 528 529 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 526 def copy_package_versions(params = {}, = {}) req = build_request(:copy_package_versions, params) req.send_request() 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 AWS accounts. An asset is stored only once in a domain, even if it's in multiple repositories.
Although you can have multiple domains, we recommend a single production domain that contains all published artifacts so that your development teams can find and share packages. You can use a second pre-production domain to test changes to the production domain configuration.
606 607 608 609 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 606 def create_domain(params = {}, = {}) req = build_request(:create_domain, params) req.send_request() end |
#create_repository(params = {}) ⇒ Types::CreateRepositoryResult
Creates a repository.
683 684 685 686 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 683 def create_repository(params = {}, = {}) req = build_request(:create_repository, params) req.send_request() 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.
726 727 728 729 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 726 def delete_domain(params = {}, = {}) req = build_request(:delete_domain, params) req.send_request() end |
#delete_domain_permissions_policy(params = {}) ⇒ Types::DeleteDomainPermissionsPolicyResult
Deletes the resource policy set on a domain.
768 769 770 771 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 768 def (params = {}, = {}) req = build_request(:delete_domain_permissions_policy, params) req.send_request() 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,
ListackageVersions
), but you can restore them using
UpdatePackageVersionsStatus
.
869 870 871 872 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 869 def delete_package_versions(params = {}, = {}) req = build_request(:delete_package_versions, params) req.send_request() end |
#delete_repository(params = {}) ⇒ Types::DeleteRepositoryResult
Deletes a repository.
917 918 919 920 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 917 def delete_repository(params = {}, = {}) req = build_request(:delete_repository, params) req.send_request() 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, AWS users, roles, and accounts lose permissions to perform
the repository actions granted by the deleted policy.
972 973 974 975 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 972 def (params = {}, = {}) req = build_request(:delete_repository_permissions_policy, params) req.send_request() end |
#describe_domain(params = {}) ⇒ Types::DescribeDomainResult
Returns a DomainDescription
object that contains information
about the requested domain.
1018 1019 1020 1021 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1018 def describe_domain(params = {}, = {}) req = build_request(:describe_domain, params) req.send_request() end |
#describe_package_version(params = {}) ⇒ Types::DescribePackageVersionResult
Returns a PackageVersionDescription
object that contains
information about the requested package version.
1110 1111 1112 1113 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1110 def describe_package_version(params = {}, = {}) req = build_request(:describe_package_version, params) req.send_request() end |
#describe_repository(params = {}) ⇒ Types::DescribeRepositoryResult
Returns a RepositoryDescription
object that contains detailed
information about the requested repository.
1159 1160 1161 1162 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1159 def describe_repository(params = {}, = {}) req = build_request(:describe_repository, params) req.send_request() end |
#disassociate_external_connection(params = {}) ⇒ Types::DisassociateExternalConnectionResult
Removes an existing external connection from a repository.
1213 1214 1215 1216 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1213 def disassociate_external_connection(params = {}, = {}) req = build_request(:disassociate_external_connection, params) req.send_request() 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
..
1330 1331 1332 1333 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1330 def dispose_package_versions(params = {}, = {}) req = build_request(:dispose_package_versions, params) req.send_request() 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 AWS
CodeArtifact authentication and tokens.
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.
1404 1405 1406 1407 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1404 def (params = {}, = {}) req = build_request(:get_authorization_token, params) req.send_request() end |
#get_domain_permissions_policy(params = {}) ⇒ Types::GetDomainPermissionsPolicyResult
Returns the resource policy attached to the specified domain.
1449 1450 1451 1452 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1449 def (params = {}, = {}) req = build_request(:get_domain_permissions_policy, params) req.send_request() 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.
1541 1542 1543 1544 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1541 def get_package_version_asset(params = {}, = {}, &block) req = build_request(:get_package_version_asset, params) req.send_request(, &block) end |
#get_package_version_readme(params = {}) ⇒ Types::GetPackageVersionReadmeResult
Gets the readme file or descriptive text for a package version. For
packages that do not contain a readme file, CodeArtifact extracts a
description from a metadata file. For example, from the
<description>
element in the pom.xml
file of a Maven package.
The returned text might contain formatting. For example, it might contain formatting for Markdown or reStructuredText.
1633 1634 1635 1636 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1633 def get_package_version_readme(params = {}, = {}) req = build_request(:get_package_version_readme, params) req.send_request() 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:
npm
pypi
maven
nuget
1692 1693 1694 1695 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1692 def get_repository_endpoint(params = {}, = {}) req = build_request(:get_repository_endpoint, params) req.send_request() end |
#get_repository_permissions_policy(params = {}) ⇒ Types::GetRepositoryPermissionsPolicyResult
Returns the resource policy that is set on a repository.
1733 1734 1735 1736 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1733 def (params = {}, = {}) req = build_request(:get_repository_permissions_policy, params) req.send_request() end |
#list_domains(params = {}) ⇒ Types::ListDomainsResult
Returns a list of DomainSummary
objects for all domains owned by
the AWS 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.
1779 1780 1781 1782 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1779 def list_domains(params = {}, = {}) req = build_request(:list_domains, params) req.send_request() 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.
1889 1890 1891 1892 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1889 def list_package_version_assets(params = {}, = {}) req = build_request(:list_package_version_assets, params) req.send_request() 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.
1997 1998 1999 2000 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 1997 def list_package_version_dependencies(params = {}, = {}) req = build_request(:list_package_version_dependencies, params) req.send_request() end |
#list_package_versions(params = {}) ⇒ Types::ListPackageVersionsResult
Returns a list of PackageVersionSummary
objects for package
versions in a repository that match the request parameters.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2117 2118 2119 2120 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2117 def list_package_versions(params = {}, = {}) req = build_request(:list_package_versions, params) req.send_request() 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.
2210 2211 2212 2213 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2210 def list_packages(params = {}, = {}) req = build_request(:list_packages, params) req.send_request() end |
#list_repositories(params = {}) ⇒ Types::ListRepositoriesResult
Returns a list of RepositorySummary
objects. Each
RepositorySummary
contains information about a repository in the
specified AWS account and that matches the input parameters.
The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.
2265 2266 2267 2268 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2265 def list_repositories(params = {}, = {}) req = build_request(:list_repositories, params) req.send_request() 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.
2335 2336 2337 2338 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2335 def list_repositories_in_domain(params = {}, = {}) req = build_request(:list_repositories_in_domain, params) req.send_request() end |
#list_tags_for_resource(params = {}) ⇒ Types::ListTagsForResourceResult
Gets information about AWS tags for a specified Amazon Resource Name (ARN) in AWS CodeArtifact.
2366 2367 2368 2369 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2366 def (params = {}, = {}) req = build_request(:list_tags_for_resource, params) req.send_request() 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.
2418 2419 2420 2421 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2418 def (params = {}, = {}) req = build_request(:put_domain_permissions_policy, params) req.send_request() 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.
2477 2478 2479 2480 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2477 def (params = {}, = {}) req = build_request(:put_repository_permissions_policy, params) req.send_request() end |
#tag_resource(params = {}) ⇒ Struct
Adds or updates tags for a resource in AWS CodeArtifact.
2509 2510 2511 2512 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2509 def tag_resource(params = {}, = {}) req = build_request(:tag_resource, params) req.send_request() end |
#untag_resource(params = {}) ⇒ Struct
Removes tags from a resource in AWS CodeArtifact.
2536 2537 2538 2539 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2536 def untag_resource(params = {}, = {}) req = build_request(:untag_resource, params) req.send_request() end |
#update_package_versions_status(params = {}) ⇒ Types::UpdatePackageVersionsStatusResult
Updates the status of one or more versions of a package.
2637 2638 2639 2640 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2637 def update_package_versions_status(params = {}, = {}) req = build_request(:update_package_versions_status, params) req.send_request() end |
#update_repository(params = {}) ⇒ Types::UpdateRepositoryResult
Update the properties of a repository.
2705 2706 2707 2708 |
# File 'gems/aws-sdk-codeartifact/lib/aws-sdk-codeartifact/client.rb', line 2705 def update_repository(params = {}, = {}) req = build_request(:update_repository, params) req.send_request() end |