create_service

create_service(**kwargs)

Create an Proton service. An Proton service is an instantiation of a service template and often includes several service instances and pipeline. For more information, see Services in the Proton User Guide .

See also: AWS API Documentation

Request Syntax

response = client.create_service(
    branchName='string',
    description='string',
    name='string',
    repositoryConnectionArn='string',
    repositoryId='string',
    spec='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    templateMajorVersion='string',
    templateMinorVersion='string',
    templateName='string'
)
Parameters
  • branchName (string) -- The name of the code repository branch that holds the code that's deployed in Proton. Don't include this parameter if your service template doesn't include a service pipeline.
  • description (string) -- A description of the Proton service.
  • name (string) --

    [REQUIRED]

    The service name.

  • 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 . Don't include this parameter if your service template doesn't include a service pipeline.
  • repositoryId (string) -- The ID of the code repository. Don't include this parameter if your service template doesn't include a service pipeline.
  • spec (string) --

    [REQUIRED]

    A link to a spec file that provides inputs as defined in the service template bundle schema file. The spec file is in YAML format. Don’t include pipeline inputs in the spec if your service template doesn’t include a service pipeline. For more information, see Create a service in the Proton User Guide .

  • tags (list) --

    An optional list of metadata items that you can associate with the Proton service. A tag is a key-value pair.

    For more information, see Proton resources and tagging in the Proton User Guide .

    • (dict) --

      A description of a resource tag.

      • key (string) -- [REQUIRED]

        The key of the resource tag.

      • value (string) -- [REQUIRED]

        The value of the resource tag.

  • templateMajorVersion (string) --

    [REQUIRED]

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

  • templateMinorVersion (string) -- The minor version of the service template that was used to create the service.
  • templateName (string) --

    [REQUIRED]

    The name of the service template that's used to create the service.

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