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'|'swift',
    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:

    Note

    The namespace is required when requesting packages of the following formats:

    • Maven

    • Swift

    • generic

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

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

    • The namespace of a generic package is its namespace.

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

  • package (string) –

    [REQUIRED]

    The name of the requested package.

Return type:

dict

Returns:

Response Syntax

{
    'package': {
        'format': 'npm'|'pypi'|'maven'|'nuget'|'generic'|'swift',
        '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 version is its groupId.

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

        • The namespace of a generic package is its namespace.

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

      • name (string) –

        The name of the package.

      • originConfiguration (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