CodeArtifact / Client / describe_package

describe_package#

CodeArtifact.Client.describe_package(**kwargs)#

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

See also: AWS API Documentation

Request Syntax

response = client.describe_package(
    domain='string',
    domainOwner='string',
    repository='string',
    format='npm'|'pypi'|'maven'|'nuget'|'generic',
    namespace='string',
    package='string'
)
Parameters:
  • domain (string) –

    [REQUIRED]

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

  • domainOwner (string) – The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes or spaces.

  • repository (string) –

    [REQUIRED]

    The name of the repository that contains the requested package.

  • format (string) –

    [REQUIRED]

    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 of a Maven package is its groupId. The namespace is required when requesting Maven packages.

    • The namespace of an npm package is its scope.

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

    • The namespace of a generic package is its namespace.

  • package (string) –

    [REQUIRED]

    The name of the requested package.

Return type:

dict

Returns:

Response Syntax

{
    'package': {
        'format': 'npm'|'pypi'|'maven'|'nuget'|'generic',
        'namespace': 'string',
        'name': 'string',
        'originConfiguration': {
            'restrictions': {
                'publish': 'ALLOW'|'BLOCK',
                'upstream': 'ALLOW'|'BLOCK'
            }
        }
    }
}

Response Structure

  • (dict) –

    • package (dict) –

      A PackageDescription object that contains information about the requested package.

      • format (string) –

        A format that specifies the type of the package.

      • namespace (string) –

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

        • The namespace of a Maven package is its groupId.

        • The namespace of an npm package is its scope.

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

        • The namespace of a generic package is its namespace.

      • name (string) –

        The name of the package.

      • originConfiguration (dict) –

        The package origin configuration for the package.

        • restrictions (dict) –

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

          • publish (string) –

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

          • upstream (string) –

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

Exceptions

  • CodeArtifact.Client.exceptions.AccessDeniedException

  • CodeArtifact.Client.exceptions.InternalServerException

  • CodeArtifact.Client.exceptions.ResourceNotFoundException

  • CodeArtifact.Client.exceptions.ThrottlingException

  • CodeArtifact.Client.exceptions.ValidationException