AWS Proton

2022/11/16 - AWS Proton - 1 updated api methods

Changes  Add support for sorting and filtering in ListServiceInstances

ListServiceInstances (updated) Link ΒΆ
Changes (request)
{'filters': [{'key': 'name | deploymentStatus | templateName | serviceName | '
                     'deployedTemplateVersionStatus | environmentName | '
                     'lastDeploymentAttemptedAtBefore | '
                     'lastDeploymentAttemptedAtAfter | createdAtBefore | '
                     'createdAtAfter',
              'value': 'string'}],
 'sortBy': 'name | deploymentStatus | templateName | serviceName | '
           'environmentName | lastDeploymentAttemptedAt | createdAt',
 'sortOrder': 'ASCENDING | DESCENDING'}

List service instances with summary data. This action lists service instances of all services in the Amazon Web Services account.

See also: AWS API Documentation

Request Syntax

client.list_service_instances(
    filters=[
        {
            'key': 'name'|'deploymentStatus'|'templateName'|'serviceName'|'deployedTemplateVersionStatus'|'environmentName'|'lastDeploymentAttemptedAtBefore'|'lastDeploymentAttemptedAtAfter'|'createdAtBefore'|'createdAtAfter',
            'value': 'string'
        },
    ],
    maxResults=123,
    nextToken='string',
    serviceName='string',
    sortBy='name'|'deploymentStatus'|'templateName'|'serviceName'|'environmentName'|'lastDeploymentAttemptedAt'|'createdAt',
    sortOrder='ASCENDING'|'DESCENDING'
)
type filters:

list

param filters:

An array of filtering criteria that scope down the result list. By default, all service instances in the Amazon Web Services account are returned.

  • (dict) --

    A filtering criterion to scope down the result list of the ListServiceInstances action.

    • key (string) --

      The name of a filtering criterion.

    • value (string) --

      A value to filter by.

      With the date/time keys ( *At{Before,After}), the value is a valid RFC 3339 string with no UTC offset and with an optional fractional precision (for example, 1985-04-12T23:20:50.52Z).

type maxResults:

integer

param maxResults:

The maximum number of service instances to list.

type nextToken:

string

param nextToken:

A token that indicates the location of the next service in the array of service instances, after the list of service instances that was previously requested.

type serviceName:

string

param serviceName:

The name of the service that the service instance belongs to.

type sortBy:

string

param sortBy:

The field that the result list is sorted by.

When you choose to sort by serviceName, service instances within each service are sorted by service instance name.

Default: serviceName

type sortOrder:

string

param sortOrder:

Result list sort order.

Default: ASCENDING

rtype:

dict

returns:

Response Syntax

{
    'nextToken': 'string',
    'serviceInstances': [
        {
            'arn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'deploymentStatus': 'IN_PROGRESS'|'FAILED'|'SUCCEEDED'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'CANCELLING'|'CANCELLED',
            'deploymentStatusMessage': 'string',
            'environmentName': 'string',
            'lastDeploymentAttemptedAt': datetime(2015, 1, 1),
            'lastDeploymentSucceededAt': datetime(2015, 1, 1),
            'name': 'string',
            'serviceName': 'string',
            'templateMajorVersion': 'string',
            'templateMinorVersion': 'string',
            'templateName': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      A token that indicates the location of the next service instance in the array of service instances, after the current requested list of service instances.

    • serviceInstances (list) --

      An array of service instances with summary data.

      • (dict) --

        Summary data of an Proton service instance resource.

        • arn (string) --

          The Amazon Resource Name (ARN) of the service instance.

        • createdAt (datetime) --

          The time when the service instance was created.

        • deploymentStatus (string) --

          The service instance deployment status.

        • deploymentStatusMessage (string) --

          A service instance deployment status message.

        • environmentName (string) --

          The name of the environment that the service instance was deployed into.

        • lastDeploymentAttemptedAt (datetime) --

          The time when a deployment of the service was last attempted.

        • lastDeploymentSucceededAt (datetime) --

          The time when the service was last deployed successfully.

        • name (string) --

          The name of the service instance.

        • serviceName (string) --

          The name of the service that the service instance belongs to.

        • templateMajorVersion (string) --

          The service instance template major version.

        • templateMinorVersion (string) --

          The service instance template minor version.

        • templateName (string) --

          The name of the service template.