IoT / Client / create_package_version

create_package_version#

IoT.Client.create_package_version(**kwargs)#

Creates a new version for an existing IoT software package.

Requires permission to access the CreatePackageVersion and GetIndexingConfiguration actions.

See also: AWS API Documentation

Request Syntax

response = client.create_package_version(
    packageName='string',
    versionName='string',
    description='string',
    attributes={
        'string': 'string'
    },
    artifact={
        's3Location': {
            'bucket': 'string',
            'key': 'string',
            'version': 'string'
        }
    },
    recipe='string',
    tags={
        'string': 'string'
    },
    clientToken='string'
)
Parameters:
  • packageName (string) –

    [REQUIRED]

    The name of the associated software package.

  • versionName (string) –

    [REQUIRED]

    The name of the new package version.

  • description (string) – A summary of the package version being created. This can be used to outline the package’s contents or purpose.

  • attributes (dict) –

    Metadata that can be used to define a package version’s configuration. For example, the S3 file location, configuration options that are being sent to the device or fleet.

    The combined size of all the attributes on a package version is limited to 3KB.

    • (string) –

      • (string) –

  • artifact (dict) –

    The various build components created during the build process such as libraries and configuration files that make up a software package version.

    • s3Location (dict) –

      The S3 location.

      • bucket (string) –

        The S3 bucket.

      • key (string) –

        The S3 key.

      • version (string) –

        The S3 bucket version.

  • recipe (string) – The inline job document associated with a software package version used for a quick job deployment.

  • tags (dict) –

    Metadata that can be used to manage the package version.

    • (string) –

      • (string) –

  • clientToken (string) –

    A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don’t reuse this client token if a new idempotent request is required.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'packageVersionArn': 'string',
    'packageName': 'string',
    'versionName': 'string',
    'description': 'string',
    'attributes': {
        'string': 'string'
    },
    'status': 'DRAFT'|'PUBLISHED'|'DEPRECATED',
    'errorReason': 'string'
}

Response Structure

  • (dict) –

    • packageVersionArn (string) –

      The Amazon Resource Name (ARN) for the package.

    • packageName (string) –

      The name of the associated software package.

    • versionName (string) –

      The name of the new package version.

    • description (string) –

      The package version description.

    • attributes (dict) –

      Metadata that were added to the package version that can be used to define a package version’s configuration.

      • (string) –

        • (string) –

    • status (string) –

      The status of the package version. For more information, see Package version lifecycle.

    • errorReason (string) –

      Error reason for a package version failure during creation or update.

Exceptions