list_deployments

list_deployments(**kwargs)

Lists the deployments for an environment in descending deployment number order.

See also: AWS API Documentation

Request Syntax

response = client.list_deployments(
    ApplicationId='string',
    EnvironmentId='string',
    MaxResults=123,
    NextToken='string'
)
Parameters
  • ApplicationId (string) --

    [REQUIRED]

    The application ID.

  • EnvironmentId (string) --

    [REQUIRED]

    The environment ID.

  • MaxResults (integer) -- The maximum number of items that may be returned for this call. If there are items that have not yet been returned, the response will include a non-null NextToken that you can provide in a subsequent call to get the next set of results.
  • NextToken (string) -- The token returned by a prior call to this operation indicating the next set of results to be returned. If not specified, the operation will return the first set of results.
Return type

dict

Returns

Response Syntax

{
    'Items': [
        {
            'DeploymentNumber': 123,
            'ConfigurationName': 'string',
            'ConfigurationVersion': 'string',
            'DeploymentDurationInMinutes': 123,
            'GrowthType': 'LINEAR'|'EXPONENTIAL',
            'GrowthFactor': ...,
            'FinalBakeTimeInMinutes': 123,
            'State': 'BAKING'|'VALIDATING'|'DEPLOYING'|'COMPLETE'|'ROLLING_BACK'|'ROLLED_BACK',
            'PercentageComplete': ...,
            'StartedAt': datetime(2015, 1, 1),
            'CompletedAt': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Items (list) --

      The elements from this collection.

      • (dict) --

        Information about the deployment.

        • DeploymentNumber (integer) --

          The sequence number of the deployment.

        • ConfigurationName (string) --

          The name of the configuration.

        • ConfigurationVersion (string) --

          The version of the configuration.

        • DeploymentDurationInMinutes (integer) --

          Total amount of time the deployment lasted.

        • GrowthType (string) --

          The algorithm used to define how percentage grows over time.

        • GrowthFactor (float) --

          The percentage of targets to receive a deployed configuration during each interval.

        • FinalBakeTimeInMinutes (integer) --

          The amount of time that AppConfig monitors for alarms before considering the deployment to be complete and no longer eligible for automatic rollback.

        • State (string) --

          The state of the deployment.

        • PercentageComplete (float) --

          The percentage of targets for which the deployment is available.

        • StartedAt (datetime) --

          Time the deployment started.

        • CompletedAt (datetime) --

          Time the deployment completed.

    • NextToken (string) --

      The token for the next set of items to return. Use this token to get the next set of results.

Exceptions

  • AppConfig.Client.exceptions.ResourceNotFoundException
  • AppConfig.Client.exceptions.InternalServerException
  • AppConfig.Client.exceptions.BadRequestException

Examples

The following list-deployments example lists the available deployments in your AWS account for the specified application and environment.

response = client.list_deployments(
    ApplicationId='339ohji',
    EnvironmentId='54j1r29',
)

print(response)

Expected Output:

{
    'Items': [
        {
            'CompletedAt': datetime(2021, 9, 17, 21, 59, 3, 4, 260, 0),
            'ConfigurationName': 'Example-Configuration-Profile',
            'ConfigurationVersion': '1',
            'DeploymentDurationInMinutes': 15,
            'DeploymentNumber': 1,
            'FinalBakeTimeInMinutes': 0,
            'GrowthFactor': 25,
            'GrowthType': 'LINEAR',
            'PercentageComplete': 100,
            'StartedAt': datetime(2021, 9, 17, 21, 43, 54, 4, 260, 0),
            'State': 'COMPLETE',
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}