get_package_version_asset
(**kwargs)¶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.
See also: AWS API Documentation
Request Syntax
response = client.get_package_version_asset(
domain='string',
domainOwner='string',
repository='string',
format='npm'|'pypi'|'maven'|'nuget',
namespace='string',
package='string',
packageVersion='string',
asset='string',
packageVersionRevision='string'
)
[REQUIRED]
The name of the domain that contains the repository that contains the package version with the requested asset.
[REQUIRED]
The repository that contains the package version with the requested asset.
[REQUIRED]
A format that specifies the type of the package version with the requested asset file.
The namespace of the package version with the requested asset file. The package version component that specifies its namespace depends on its type. For example:
groupId
.scope
.[REQUIRED]
The name of the package that contains the requested asset.
[REQUIRED]
A string that contains the package version (for example, 3.5.2
).
[REQUIRED]
The name of the requested asset.
dict
Response Syntax
{
'asset': StreamingBody(),
'assetName': 'string',
'packageVersion': 'string',
'packageVersionRevision': 'string'
}
Response Structure
(dict) --
asset (StreamingBody
) --
The binary file, or asset, that is downloaded.
assetName (string) --
The name of the asset that is downloaded.
packageVersion (string) --
A string that contains the package version (for example, 3.5.2
).
packageVersionRevision (string) --
The name of the package version revision that contains the downloaded asset.
Exceptions
CodeArtifact.Client.exceptions.AccessDeniedException
CodeArtifact.Client.exceptions.InternalServerException
CodeArtifact.Client.exceptions.ResourceNotFoundException
CodeArtifact.Client.exceptions.ThrottlingException
CodeArtifact.Client.exceptions.ValidationException
CodeArtifact.Client.exceptions.ConflictException