update_service

Proton.Client.update_service(**kwargs)

Edit a service description or use a spec to add and delete service instances.

Note

Existing service instances and the service pipeline can't be edited using this API. They can only be deleted.

Use the description parameter to modify the description.

Edit the spec parameter to add or delete instances.

Note

You can't delete a service instance (remove it from the spec) if it has an attached component.

For more information about components, see Proton components in the Proton User Guide .

See also: AWS API Documentation

Request Syntax

response = client.update_service(
    description='string',
    name='string',
    spec='string'
)
Parameters
  • description (string) -- The edited service description.
  • name (string) --

    [REQUIRED]

    The name of the service to edit.

  • spec (string) -- Lists the service instances to add and the existing service instances to remain. Omit the existing service instances to delete from the list. Don't include edits to the existing service instances or pipeline. For more information, see Edit a service in the Proton User Guide .
Return type

dict

Returns

Response Syntax

{
    'service': {
        'arn': 'string',
        'branchName': 'string',
        'createdAt': datetime(2015, 1, 1),
        'description': 'string',
        'lastModifiedAt': datetime(2015, 1, 1),
        'name': 'string',
        'pipeline': {
            'arn': 'string',
            'createdAt': datetime(2015, 1, 1),
            'deploymentStatus': 'IN_PROGRESS'|'FAILED'|'SUCCEEDED'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'DELETE_COMPLETE'|'CANCELLING'|'CANCELLED',
            'deploymentStatusMessage': 'string',
            'lastDeploymentAttemptedAt': datetime(2015, 1, 1),
            'lastDeploymentSucceededAt': datetime(2015, 1, 1),
            'spec': 'string',
            'templateMajorVersion': 'string',
            'templateMinorVersion': 'string',
            'templateName': 'string'
        },
        'repositoryConnectionArn': 'string',
        'repositoryId': 'string',
        'spec': 'string',
        'status': 'CREATE_IN_PROGRESS'|'CREATE_FAILED_CLEANUP_IN_PROGRESS'|'CREATE_FAILED_CLEANUP_COMPLETE'|'CREATE_FAILED_CLEANUP_FAILED'|'CREATE_FAILED'|'ACTIVE'|'DELETE_IN_PROGRESS'|'DELETE_FAILED'|'UPDATE_IN_PROGRESS'|'UPDATE_FAILED_CLEANUP_IN_PROGRESS'|'UPDATE_FAILED_CLEANUP_COMPLETE'|'UPDATE_FAILED_CLEANUP_FAILED'|'UPDATE_FAILED'|'UPDATE_COMPLETE_CLEANUP_FAILED',
        'statusMessage': 'string',
        'templateName': 'string'
    }
}

Response Structure

  • (dict) --

    • service (dict) --

      The service detail data that's returned by Proton.

      • arn (string) --

        The Amazon Resource Name (ARN) of the service.

      • branchName (string) --

        The name of the code repository branch that holds the code that's deployed in Proton.

      • createdAt (datetime) --

        The time when the service was created.

      • description (string) --

        A description of the service.

      • lastModifiedAt (datetime) --

        The time when the service was last modified.

      • name (string) --

        The name of the service.

      • pipeline (dict) --

        The service pipeline detail data.

        • arn (string) --

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

        • createdAt (datetime) --

          The time when the service pipeline was created.

        • deploymentStatus (string) --

          The deployment status of the service pipeline.

        • deploymentStatusMessage (string) --

          A service pipeline deployment status message.

        • lastDeploymentAttemptedAt (datetime) --

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

        • lastDeploymentSucceededAt (datetime) --

          The time when the service pipeline was last deployed successfully.

        • spec (string) --

          The service spec that was used to create the service pipeline.

        • templateMajorVersion (string) --

          The major version of the service template that was used to create the service pipeline.

        • templateMinorVersion (string) --

          The minor version of the service template that was used to create the service pipeline.

        • templateName (string) --

          The name of the service template that was used to create the service pipeline.

      • repositoryConnectionArn (string) --

        The Amazon Resource Name (ARN) of the repository connection. For more information, see Setting up an AWS CodeStar connection in the Proton User Guide .

      • repositoryId (string) --

        The ID of the source code repository.

      • spec (string) --

        The formatted specification that defines the service.

      • status (string) --

        The status of the service.

      • statusMessage (string) --

        A service status message.

      • templateName (string) --

        The name of the service template.

Exceptions

  • Proton.Client.exceptions.ServiceQuotaExceededException
  • Proton.Client.exceptions.ValidationException
  • Proton.Client.exceptions.AccessDeniedException
  • Proton.Client.exceptions.ThrottlingException
  • Proton.Client.exceptions.ConflictException
  • Proton.Client.exceptions.ResourceNotFoundException
  • Proton.Client.exceptions.InternalServerException