AWS CodePipeline

2019/05/15 - AWS CodePipeline - 3 new 4 updated api methods

Changes  This feature includes new APIs to add, edit, remove and view tags for pipeline, custom action type and webhook resources. You can also add tags while creating these resources.

ListTagsForResource (new) Link ¶

Gets the set of key/value pairs (metadata) that are used to manage the resource.

See also: AWS API Documentation

Request Syntax

client.list_tags_for_resource(
    resourceArn='string',
    nextToken='string',
    maxResults=123
)
type resourceArn

string

param resourceArn

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to get tags for.

type nextToken

string

param nextToken

The token that was returned from the previous API call, which would be used to return the next page of the list. However, the ListTagsforResource call lists all available tags in one call and does not use pagination.

type maxResults

integer

param maxResults

The maximum number of results to return in a single call.

rtype

dict

returns

Response Syntax

{
    'tags': [
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • tags (list) --

      The tags for the resource.

      • (dict) --

        A tag is a key/value pair that is used to manage the resource.

        • key (string) --

          The tag's key.

        • value (string) --

          The tag's value.

    • nextToken (string) --

      If the amount of returned information is significantly large, an identifier is also returned and can be used in a subsequent API call to return the next page of the list. However, the ListTagsforResource call lists all available tags in one call and does not use pagination.

TagResource (new) Link ¶

Adds to or modifies the tags of the given resource. Tags are metadata that can be used to manage a resource.

See also: AWS API Documentation

Request Syntax

client.tag_resource(
    resourceArn='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
type resourceArn

string

param resourceArn

[REQUIRED]

The Amazon Resource Name (ARN) of the resource you want to add tags to.

type tags

list

param tags

[REQUIRED]

The tags you want to modify or add to the resource.

  • (dict) --

    A tag is a key/value pair that is used to manage the resource.

    • key (string) -- [REQUIRED]

      The tag's key.

    • value (string) -- [REQUIRED]

      The tag's value.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

UntagResource (new) Link ¶

Removes tags from an AWS resource.

See also: AWS API Documentation

Request Syntax

client.untag_resource(
    resourceArn='string',
    tagKeys=[
        'string',
    ]
)
type resourceArn

string

param resourceArn

[REQUIRED]

The Amazon Resource Name (ARN) of the resource to remove tags from.

type tagKeys

list

param tagKeys

[REQUIRED]

The list of keys for the tags to be removed from the resource.

  • (string) --

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

CreateCustomActionType (updated) Link ¶
Changes (both)
{'tags': [{'key': 'string', 'value': 'string'}]}

Creates a new custom action that can be used in all pipelines associated with the AWS account. Only used for custom actions.

See also: AWS API Documentation

Request Syntax

client.create_custom_action_type(
    category='Source'|'Build'|'Deploy'|'Test'|'Invoke'|'Approval',
    provider='string',
    version='string',
    settings={
        'thirdPartyConfigurationUrl': 'string',
        'entityUrlTemplate': 'string',
        'executionUrlTemplate': 'string',
        'revisionUrlTemplate': 'string'
    },
    configurationProperties=[
        {
            'name': 'string',
            'required': True|False,
            'key': True|False,
            'secret': True|False,
            'queryable': True|False,
            'description': 'string',
            'type': 'String'|'Number'|'Boolean'
        },
    ],
    inputArtifactDetails={
        'minimumCount': 123,
        'maximumCount': 123
    },
    outputArtifactDetails={
        'minimumCount': 123,
        'maximumCount': 123
    },
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
type category

string

param category

[REQUIRED]

The category of the custom action, such as a build action or a test action.

Note

Although Source and Approval are listed as valid values, they are not currently functional. These values are reserved for future use.

type provider

string

param provider

[REQUIRED]

The provider of the service used in the custom action, such as AWS CodeDeploy.

type version

string

param version

[REQUIRED]

The version identifier of the custom action.

type settings

dict

param settings

URLs that provide users information about this custom action.

  • thirdPartyConfigurationUrl (string) --

    The URL of a sign-up page where users can sign up for an external service and perform initial configuration of the action provided by that service.

  • entityUrlTemplate (string) --

    The URL returned to the AWS CodePipeline console that provides a deep link to the resources of the external system, such as the configuration page for an AWS CodeDeploy deployment group. This link is provided as part of the action display within the pipeline.

  • executionUrlTemplate (string) --

    The URL returned to the AWS CodePipeline console that contains a link to the top-level landing page for the external system, such as console page for AWS CodeDeploy. This link is shown on the pipeline view page in the AWS CodePipeline console and provides a link to the execution entity of the external action.

  • revisionUrlTemplate (string) --

    The URL returned to the AWS CodePipeline console that contains a link to the page where customers can update or change the configuration of the external action.

type configurationProperties

list

param configurationProperties

The configuration properties for the custom action.

Note

You can refer to a name in the configuration properties of the custom action within the URL templates by following the format of {Config:name}, as long as the configuration property is both required and not secret. For more information, see Create a Custom Action for a Pipeline.

  • (dict) --

    Represents information about an action configuration property.

    • name (string) -- [REQUIRED]

      The name of the action configuration property.

    • required (boolean) -- [REQUIRED]

      Whether the configuration property is a required value.

    • key (boolean) -- [REQUIRED]

      Whether the configuration property is a key.

    • secret (boolean) -- [REQUIRED]

      Whether the configuration property is secret. Secrets are hidden from all calls except for GetJobDetails , GetThirdPartyJobDetails , PollForJobs , and PollForThirdPartyJobs .

      When updating a pipeline, passing * * * * * without changing any other values of the action will preserve the prior value of the secret.

    • queryable (boolean) --

      Indicates that the property will be used in conjunction with PollForJobs . When creating a custom action, an action can have up to one queryable property. If it has one, that property must be both required and not secret.

      If you create a pipeline with a custom action type, and that custom action contains a queryable property, the value for that configuration property is subject to additional restrictions. The value must be less than or equal to twenty (20) characters. The value can contain only alphanumeric characters, underscores, and hyphens.

    • description (string) --

      The description of the action configuration property that will be displayed to users.

    • type (string) --

      The type of the configuration property.

type inputArtifactDetails

dict

param inputArtifactDetails

[REQUIRED]

The details of the input artifact for the action, such as its commit ID.

  • minimumCount (integer) -- [REQUIRED]

    The minimum number of artifacts allowed for the action type.

  • maximumCount (integer) -- [REQUIRED]

    The maximum number of artifacts allowed for the action type.

type outputArtifactDetails

dict

param outputArtifactDetails

[REQUIRED]

The details of the output artifact of the action, such as its commit ID.

  • minimumCount (integer) -- [REQUIRED]

    The minimum number of artifacts allowed for the action type.

  • maximumCount (integer) -- [REQUIRED]

    The maximum number of artifacts allowed for the action type.

type tags

list

param tags

The tags for the custom action.

  • (dict) --

    A tag is a key/value pair that is used to manage the resource.

    • key (string) -- [REQUIRED]

      The tag's key.

    • value (string) -- [REQUIRED]

      The tag's value.

rtype

dict

returns

Response Syntax

{
    'actionType': {
        'id': {
            'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke'|'Approval',
            'owner': 'AWS'|'ThirdParty'|'Custom',
            'provider': 'string',
            'version': 'string'
        },
        'settings': {
            'thirdPartyConfigurationUrl': 'string',
            'entityUrlTemplate': 'string',
            'executionUrlTemplate': 'string',
            'revisionUrlTemplate': 'string'
        },
        'actionConfigurationProperties': [
            {
                'name': 'string',
                'required': True|False,
                'key': True|False,
                'secret': True|False,
                'queryable': True|False,
                'description': 'string',
                'type': 'String'|'Number'|'Boolean'
            },
        ],
        'inputArtifactDetails': {
            'minimumCount': 123,
            'maximumCount': 123
        },
        'outputArtifactDetails': {
            'minimumCount': 123,
            'maximumCount': 123
        }
    },
    'tags': [
        {
            'key': 'string',
            'value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of a CreateCustomActionType operation.

    • actionType (dict) --

      Returns information about the details of an action type.

      • id (dict) --

        Represents information about an action type.

        • category (string) --

          A category defines what kind of action can be taken in the stage, and constrains the provider type for the action. Valid categories are limited to one of the values below.

        • owner (string) --

          The creator of the action being called.

        • provider (string) --

          The provider of the service being called by the action. Valid providers are determined by the action category. For example, an action in the Deploy category type might have a provider of AWS CodeDeploy, which would be specified as CodeDeploy. To reference a list of action providers by action type, see Valid Action Types and Providers in CodePipeline.

        • version (string) --

          A string that describes the action version.

      • settings (dict) --

        The settings for the action type.

        • thirdPartyConfigurationUrl (string) --

          The URL of a sign-up page where users can sign up for an external service and perform initial configuration of the action provided by that service.

        • entityUrlTemplate (string) --

          The URL returned to the AWS CodePipeline console that provides a deep link to the resources of the external system, such as the configuration page for an AWS CodeDeploy deployment group. This link is provided as part of the action display within the pipeline.

        • executionUrlTemplate (string) --

          The URL returned to the AWS CodePipeline console that contains a link to the top-level landing page for the external system, such as console page for AWS CodeDeploy. This link is shown on the pipeline view page in the AWS CodePipeline console and provides a link to the execution entity of the external action.

        • revisionUrlTemplate (string) --

          The URL returned to the AWS CodePipeline console that contains a link to the page where customers can update or change the configuration of the external action.

      • actionConfigurationProperties (list) --

        The configuration properties for the action type.

        • (dict) --

          Represents information about an action configuration property.

          • name (string) --

            The name of the action configuration property.

          • required (boolean) --

            Whether the configuration property is a required value.

          • key (boolean) --

            Whether the configuration property is a key.

          • secret (boolean) --

            Whether the configuration property is secret. Secrets are hidden from all calls except for GetJobDetails , GetThirdPartyJobDetails , PollForJobs , and PollForThirdPartyJobs .

            When updating a pipeline, passing * * * * * without changing any other values of the action will preserve the prior value of the secret.

          • queryable (boolean) --

            Indicates that the property will be used in conjunction with PollForJobs . When creating a custom action, an action can have up to one queryable property. If it has one, that property must be both required and not secret.

            If you create a pipeline with a custom action type, and that custom action contains a queryable property, the value for that configuration property is subject to additional restrictions. The value must be less than or equal to twenty (20) characters. The value can contain only alphanumeric characters, underscores, and hyphens.

          • description (string) --

            The description of the action configuration property that will be displayed to users.

          • type (string) --

            The type of the configuration property.

      • inputArtifactDetails (dict) --

        The details of the input artifact for the action, such as its commit ID.

        • minimumCount (integer) --

          The minimum number of artifacts allowed for the action type.

        • maximumCount (integer) --

          The maximum number of artifacts allowed for the action type.

      • outputArtifactDetails (dict) --

        The details of the output artifact of the action, such as its commit ID.

        • minimumCount (integer) --

          The minimum number of artifacts allowed for the action type.

        • maximumCount (integer) --

          The maximum number of artifacts allowed for the action type.

    • tags (list) --

      Specifies the tags applied to the custom action.

      • (dict) --

        A tag is a key/value pair that is used to manage the resource.

        • key (string) --

          The tag's key.

        • value (string) --

          The tag's value.

CreatePipeline (updated) Link ¶
Changes (both)
{'tags': [{'key': 'string', 'value': 'string'}]}

Creates a pipeline.

See also: AWS API Documentation

Request Syntax

client.create_pipeline(
    pipeline={
        'name': 'string',
        'roleArn': 'string',
        'artifactStore': {
            'type': 'S3',
            'location': 'string',
            'encryptionKey': {
                'id': 'string',
                'type': 'KMS'
            }
        },
        'artifactStores': {
            'string': {
                'type': 'S3',
                'location': 'string',
                'encryptionKey': {
                    'id': 'string',
                    'type': 'KMS'
                }
            }
        },
        'stages': [
            {
                'name': 'string',
                'blockers': [
                    {
                        'name': 'string',
                        'type': 'Schedule'
                    },
                ],
                'actions': [
                    {
                        'name': 'string',
                        'actionTypeId': {
                            'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke'|'Approval',
                            'owner': 'AWS'|'ThirdParty'|'Custom',
                            'provider': 'string',
                            'version': 'string'
                        },
                        'runOrder': 123,
                        'configuration': {
                            'string': 'string'
                        },
                        'outputArtifacts': [
                            {
                                'name': 'string'
                            },
                        ],
                        'inputArtifacts': [
                            {
                                'name': 'string'
                            },
                        ],
                        'roleArn': 'string',
                        'region': 'string'
                    },
                ]
            },
        ],
        'version': 123
    },
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
type pipeline

dict

param pipeline

[REQUIRED]

Represents the structure of actions and stages to be performed in the pipeline.

  • name (string) -- [REQUIRED]

    The name of the action to be performed.

  • roleArn (string) -- [REQUIRED]

    The Amazon Resource Name (ARN) for AWS CodePipeline to use to either perform actions with no actionRoleArn , or to use to assume roles for actions with an actionRoleArn .

  • artifactStore (dict) --

    Represents information about the Amazon S3 bucket where artifacts are stored for the pipeline.

    • type (string) -- [REQUIRED]

      The type of the artifact store, such as S3.

    • location (string) -- [REQUIRED]

      The Amazon S3 bucket used for storing the artifacts for a pipeline. You can specify the name of an S3 bucket but not a folder within the bucket. A folder to contain the pipeline artifacts is created for you based on the name of the pipeline. You can use any Amazon S3 bucket in the same AWS Region as the pipeline to store your pipeline artifacts.

    • encryptionKey (dict) --

      The encryption key used to encrypt the data in the artifact store, such as an AWS Key Management Service (AWS KMS) key. If this is undefined, the default key for Amazon S3 is used.

      • id (string) -- [REQUIRED]

        The ID used to identify the key. For an AWS KMS key, this is the key ID or key ARN.

      • type (string) -- [REQUIRED]

        The type of encryption key, such as an AWS Key Management Service (AWS KMS) key. When creating or updating a pipeline, the value must be set to 'KMS'.

  • artifactStores (dict) --

    A mapping of artifactStore objects and their corresponding regions. There must be an artifact store for the pipeline region and for each cross-region action within the pipeline. You can only use either artifactStore or artifactStores , not both.

    If you create a cross-region action in your pipeline, you must use artifactStores .

    • (string) --

      • (dict) --

        The Amazon S3 bucket where artifacts are stored for the pipeline.

        • type (string) -- [REQUIRED]

          The type of the artifact store, such as S3.

        • location (string) -- [REQUIRED]

          The Amazon S3 bucket used for storing the artifacts for a pipeline. You can specify the name of an S3 bucket but not a folder within the bucket. A folder to contain the pipeline artifacts is created for you based on the name of the pipeline. You can use any Amazon S3 bucket in the same AWS Region as the pipeline to store your pipeline artifacts.

        • encryptionKey (dict) --

          The encryption key used to encrypt the data in the artifact store, such as an AWS Key Management Service (AWS KMS) key. If this is undefined, the default key for Amazon S3 is used.

          • id (string) -- [REQUIRED]

            The ID used to identify the key. For an AWS KMS key, this is the key ID or key ARN.

          • type (string) -- [REQUIRED]

            The type of encryption key, such as an AWS Key Management Service (AWS KMS) key. When creating or updating a pipeline, the value must be set to 'KMS'.

  • stages (list) -- [REQUIRED]

    The stage in which to perform the action.

    • (dict) --

      Represents information about a stage and its definition.

      • name (string) -- [REQUIRED]

        The name of the stage.

      • blockers (list) --

        Reserved for future use.

        • (dict) --

          Reserved for future use.

          • name (string) -- [REQUIRED]

            Reserved for future use.

          • type (string) -- [REQUIRED]

            Reserved for future use.

      • actions (list) -- [REQUIRED]

        The actions included in a stage.

        • (dict) --

          Represents information about an action declaration.

          • name (string) -- [REQUIRED]

            The action declaration's name.

          • actionTypeId (dict) -- [REQUIRED]

            The configuration information for the action type.

            • category (string) -- [REQUIRED]

              A category defines what kind of action can be taken in the stage, and constrains the provider type for the action. Valid categories are limited to one of the values below.

            • owner (string) -- [REQUIRED]

              The creator of the action being called.

            • provider (string) -- [REQUIRED]

              The provider of the service being called by the action. Valid providers are determined by the action category. For example, an action in the Deploy category type might have a provider of AWS CodeDeploy, which would be specified as CodeDeploy. To reference a list of action providers by action type, see Valid Action Types and Providers in CodePipeline.

            • version (string) -- [REQUIRED]

              A string that describes the action version.

          • runOrder (integer) --

            The order in which actions are run.

          • configuration (dict) --

            The action declaration's configuration.

            • (string) --

              • (string) --

          • outputArtifacts (list) --

            The name or ID of the result of the action declaration, such as a test or build artifact.

            • (dict) --

              Represents information about the output of an action.

              • name (string) -- [REQUIRED]

                The name of the output of an artifact, such as "My App".

                The input artifact of an action must exactly match the output artifact declared in a preceding action, but the input artifact does not have to be the next action in strict sequence from the action that provided the output artifact. Actions in parallel can declare different output artifacts, which are in turn consumed by different following actions.

                Output artifact names must be unique within a pipeline.

          • inputArtifacts (list) --

            The name or ID of the artifact consumed by the action, such as a test or build artifact.

            • (dict) --

              Represents information about an artifact to be worked on, such as a test or build artifact.

              • name (string) -- [REQUIRED]

                The name of the artifact to be worked on, for example, "My App".

                The input artifact of an action must exactly match the output artifact declared in a preceding action, but the input artifact does not have to be the next action in strict sequence from the action that provided the output artifact. Actions in parallel can declare different output artifacts, which are in turn consumed by different following actions.

          • roleArn (string) --

            The ARN of the IAM service role that will perform the declared action. This is assumed through the roleArn for the pipeline.

          • region (string) --

            The action declaration's AWS Region, such as us-east-1.

  • version (integer) --

    The version number of the pipeline. A new pipeline always has a version number of 1. This number is automatically incremented when a pipeline is updated.

type tags

list

param tags

The tags for the pipeline.

  • (dict) --

    A tag is a key/value pair that is used to manage the resource.

    • key (string) -- [REQUIRED]

      The tag's key.

    • value (string) -- [REQUIRED]

      The tag's value.

rtype

dict

returns

Response Syntax

{
    'pipeline': {
        'name': 'string',
        'roleArn': 'string',
        'artifactStore': {
            'type': 'S3',
            'location': 'string',
            'encryptionKey': {
                'id': 'string',
                'type': 'KMS'
            }
        },
        'artifactStores': {
            'string': {
                'type': 'S3',
                'location': 'string',
                'encryptionKey': {
                    'id': 'string',
                    'type': 'KMS'
                }
            }
        },
        'stages': [
            {
                'name': 'string',
                'blockers': [
                    {
                        'name': 'string',
                        'type': 'Schedule'
                    },
                ],
                'actions': [
                    {
                        'name': 'string',
                        'actionTypeId': {
                            'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke'|'Approval',
                            'owner': 'AWS'|'ThirdParty'|'Custom',
                            'provider': 'string',
                            'version': 'string'
                        },
                        'runOrder': 123,
                        'configuration': {
                            'string': 'string'
                        },
                        'outputArtifacts': [
                            {
                                'name': 'string'
                            },
                        ],
                        'inputArtifacts': [
                            {
                                'name': 'string'
                            },
                        ],
                        'roleArn': 'string',
                        'region': 'string'
                    },
                ]
            },
        ],
        'version': 123
    },
    'tags': [
        {
            'key': 'string',
            'value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Represents the output of a CreatePipeline action.

    • pipeline (dict) --

      Represents the structure of actions and stages to be performed in the pipeline.

      • name (string) --

        The name of the action to be performed.

      • roleArn (string) --

        The Amazon Resource Name (ARN) for AWS CodePipeline to use to either perform actions with no actionRoleArn , or to use to assume roles for actions with an actionRoleArn .

      • artifactStore (dict) --

        Represents information about the Amazon S3 bucket where artifacts are stored for the pipeline.

        • type (string) --

          The type of the artifact store, such as S3.

        • location (string) --

          The Amazon S3 bucket used for storing the artifacts for a pipeline. You can specify the name of an S3 bucket but not a folder within the bucket. A folder to contain the pipeline artifacts is created for you based on the name of the pipeline. You can use any Amazon S3 bucket in the same AWS Region as the pipeline to store your pipeline artifacts.

        • encryptionKey (dict) --

          The encryption key used to encrypt the data in the artifact store, such as an AWS Key Management Service (AWS KMS) key. If this is undefined, the default key for Amazon S3 is used.

          • id (string) --

            The ID used to identify the key. For an AWS KMS key, this is the key ID or key ARN.

          • type (string) --

            The type of encryption key, such as an AWS Key Management Service (AWS KMS) key. When creating or updating a pipeline, the value must be set to 'KMS'.

      • artifactStores (dict) --

        A mapping of artifactStore objects and their corresponding regions. There must be an artifact store for the pipeline region and for each cross-region action within the pipeline. You can only use either artifactStore or artifactStores , not both.

        If you create a cross-region action in your pipeline, you must use artifactStores .

        • (string) --

          • (dict) --

            The Amazon S3 bucket where artifacts are stored for the pipeline.

            • type (string) --

              The type of the artifact store, such as S3.

            • location (string) --

              The Amazon S3 bucket used for storing the artifacts for a pipeline. You can specify the name of an S3 bucket but not a folder within the bucket. A folder to contain the pipeline artifacts is created for you based on the name of the pipeline. You can use any Amazon S3 bucket in the same AWS Region as the pipeline to store your pipeline artifacts.

            • encryptionKey (dict) --

              The encryption key used to encrypt the data in the artifact store, such as an AWS Key Management Service (AWS KMS) key. If this is undefined, the default key for Amazon S3 is used.

              • id (string) --

                The ID used to identify the key. For an AWS KMS key, this is the key ID or key ARN.

              • type (string) --

                The type of encryption key, such as an AWS Key Management Service (AWS KMS) key. When creating or updating a pipeline, the value must be set to 'KMS'.

      • stages (list) --

        The stage in which to perform the action.

        • (dict) --

          Represents information about a stage and its definition.

          • name (string) --

            The name of the stage.

          • blockers (list) --

            Reserved for future use.

            • (dict) --

              Reserved for future use.

              • name (string) --

                Reserved for future use.

              • type (string) --

                Reserved for future use.

          • actions (list) --

            The actions included in a stage.

            • (dict) --

              Represents information about an action declaration.

              • name (string) --

                The action declaration's name.

              • actionTypeId (dict) --

                The configuration information for the action type.

                • category (string) --

                  A category defines what kind of action can be taken in the stage, and constrains the provider type for the action. Valid categories are limited to one of the values below.

                • owner (string) --

                  The creator of the action being called.

                • provider (string) --

                  The provider of the service being called by the action. Valid providers are determined by the action category. For example, an action in the Deploy category type might have a provider of AWS CodeDeploy, which would be specified as CodeDeploy. To reference a list of action providers by action type, see Valid Action Types and Providers in CodePipeline.

                • version (string) --

                  A string that describes the action version.

              • runOrder (integer) --

                The order in which actions are run.

              • configuration (dict) --

                The action declaration's configuration.

                • (string) --

                  • (string) --

              • outputArtifacts (list) --

                The name or ID of the result of the action declaration, such as a test or build artifact.

                • (dict) --

                  Represents information about the output of an action.

                  • name (string) --

                    The name of the output of an artifact, such as "My App".

                    The input artifact of an action must exactly match the output artifact declared in a preceding action, but the input artifact does not have to be the next action in strict sequence from the action that provided the output artifact. Actions in parallel can declare different output artifacts, which are in turn consumed by different following actions.

                    Output artifact names must be unique within a pipeline.

              • inputArtifacts (list) --

                The name or ID of the artifact consumed by the action, such as a test or build artifact.

                • (dict) --

                  Represents information about an artifact to be worked on, such as a test or build artifact.

                  • name (string) --

                    The name of the artifact to be worked on, for example, "My App".

                    The input artifact of an action must exactly match the output artifact declared in a preceding action, but the input artifact does not have to be the next action in strict sequence from the action that provided the output artifact. Actions in parallel can declare different output artifacts, which are in turn consumed by different following actions.

              • roleArn (string) --

                The ARN of the IAM service role that will perform the declared action. This is assumed through the roleArn for the pipeline.

              • region (string) --

                The action declaration's AWS Region, such as us-east-1.

      • version (integer) --

        The version number of the pipeline. A new pipeline always has a version number of 1. This number is automatically incremented when a pipeline is updated.

    • tags (list) --

      Specifies the tags applied to the pipeline.

      • (dict) --

        A tag is a key/value pair that is used to manage the resource.

        • key (string) --

          The tag's key.

        • value (string) --

          The tag's value.

ListWebhooks (updated) Link ¶
Changes (response)
{'webhooks': {'tags': [{'key': 'string', 'value': 'string'}]}}

Gets a listing of all the webhooks in this region for this account. The output lists all webhooks and includes the webhook URL and ARN, as well the configuration for each webhook.

See also: AWS API Documentation

Request Syntax

client.list_webhooks(
    NextToken='string',
    MaxResults=123
)
type NextToken

string

param NextToken

The token that was returned from the previous ListWebhooks call, which can be used to return the next set of webhooks in the list.

type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.

rtype

dict

returns

Response Syntax

{
    'webhooks': [
        {
            'definition': {
                'name': 'string',
                'targetPipeline': 'string',
                'targetAction': 'string',
                'filters': [
                    {
                        'jsonPath': 'string',
                        'matchEquals': 'string'
                    },
                ],
                'authentication': 'GITHUB_HMAC'|'IP'|'UNAUTHENTICATED',
                'authenticationConfiguration': {
                    'AllowedIPRange': 'string',
                    'SecretToken': 'string'
                }
            },
            'url': 'string',
            'errorMessage': 'string',
            'errorCode': 'string',
            'lastTriggered': datetime(2015, 1, 1),
            'arn': 'string',
            'tags': [
                {
                    'key': 'string',
                    'value': 'string'
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • webhooks (list) --

      The JSON detail returned for each webhook in the list output for the ListWebhooks call.

      • (dict) --

        The detail returned for each webhook after listing webhooks, such as the webhook URL, the webhook name, and the webhook ARN.

        • definition (dict) --

          The detail returned for each webhook, such as the webhook authentication type and filter rules.

          • name (string) --

            The name of the webhook.

          • targetPipeline (string) --

            The name of the pipeline you want to connect to the webhook.

          • targetAction (string) --

            The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline.

          • filters (list) --

            A list of rules applied to the body/payload sent in the POST request to a webhook URL. All defined rules must pass for the request to be accepted and the pipeline started.

            • (dict) --

              The event criteria that specify when a webhook notification is sent to your URL.

              • jsonPath (string) --

                A JsonPath expression that will be applied to the body/payload of the webhook. The value selected by the JsonPath expression must match the value specified in the MatchEquals field, otherwise the request will be ignored. For more information about JsonPath expressions, see Java JsonPath implementation in GitHub.

              • matchEquals (string) --

                The value selected by the JsonPath expression must match what is supplied in the MatchEquals field, otherwise the request will be ignored. Properties from the target action configuration can be included as placeholders in this value by surrounding the action configuration key with curly braces. For example, if the value supplied here is "refs/heads/{Branch}" and the target action has an action configuration property called "Branch" with a value of "master", the MatchEquals value will be evaluated as "refs/heads/master". For a list of action configuration properties for built-in action types, see Pipeline Structure Reference Action Requirements.

          • authentication (string) --

            Supported options are GITHUB_HMAC, IP and UNAUTHENTICATED.

            • For information about the authentication scheme implemented by GITHUB_HMAC, see Securing your webhooks on the GitHub Developer website.

            • IP will reject webhooks trigger requests unless they originate from an IP within the IP range whitelisted in the authentication configuration.

            • UNAUTHENTICATED will accept all webhook trigger requests regardless of origin.

          • authenticationConfiguration (dict) --

            Properties that configure the authentication applied to incoming webhook trigger requests. The required properties depend on the authentication type. For GITHUB_HMAC, only the SecretToken property must be set. For IP, only the AllowedIPRange property must be set to a valid CIDR range. For UNAUTHENTICATED, no properties can be set.

            • AllowedIPRange (string) --

              The property used to configure acceptance of webhooks within a specific IP range. For IP, only the AllowedIPRange property must be set, and this property must be set to a valid CIDR range.

            • SecretToken (string) --

              The property used to configure GitHub authentication. For GITHUB_HMAC, only the SecretToken property must be set.

        • url (string) --

          A unique URL generated by CodePipeline. When a POST request is made to this URL, the defined pipeline is started as long as the body of the post request satisfies the defined authentication and filtering conditions. Deleting and re-creating a webhook will make the old URL invalid and generate a new URL.

        • errorMessage (string) --

          The text of the error message about the webhook.

        • errorCode (string) --

          The number code of the error.

        • lastTriggered (datetime) --

          The date and time a webhook was last successfully triggered, in timestamp format.

        • arn (string) --

          The Amazon Resource Name (ARN) of the webhook.

        • tags (list) --

          Specifies the tags applied to the webhook.

          • (dict) --

            A tag is a key/value pair that is used to manage the resource.

            • key (string) --

              The tag's key.

            • value (string) --

              The tag's value.

    • NextToken (string) --

      If the amount of returned information is significantly large, an identifier is also returned and can be used in a subsequent ListWebhooks call to return the next set of webhooks in the list.

PutWebhook (updated) Link ¶
Changes (request, response)
Request
{'tags': [{'key': 'string', 'value': 'string'}]}
Response
{'webhook': {'tags': [{'key': 'string', 'value': 'string'}]}}

Defines a webhook and returns a unique webhook URL generated by CodePipeline. This URL can be supplied to third party source hosting providers to call every time there's a code change. When CodePipeline receives a POST request on this URL, the pipeline defined in the webhook is started as long as the POST request satisfied the authentication and filtering requirements supplied when defining the webhook. RegisterWebhookWithThirdParty and DeregisterWebhookWithThirdParty APIs can be used to automatically configure supported third parties to call the generated webhook URL.

See also: AWS API Documentation

Request Syntax

client.put_webhook(
    webhook={
        'name': 'string',
        'targetPipeline': 'string',
        'targetAction': 'string',
        'filters': [
            {
                'jsonPath': 'string',
                'matchEquals': 'string'
            },
        ],
        'authentication': 'GITHUB_HMAC'|'IP'|'UNAUTHENTICATED',
        'authenticationConfiguration': {
            'AllowedIPRange': 'string',
            'SecretToken': 'string'
        }
    },
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
type webhook

dict

param webhook

[REQUIRED]

The detail provided in an input file to create the webhook, such as the webhook name, the pipeline name, and the action name. Give the webhook a unique name which identifies the webhook being defined. You may choose to name the webhook after the pipeline and action it targets so that you can easily recognize what it's used for later.

  • name (string) -- [REQUIRED]

    The name of the webhook.

  • targetPipeline (string) -- [REQUIRED]

    The name of the pipeline you want to connect to the webhook.

  • targetAction (string) -- [REQUIRED]

    The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline.

  • filters (list) -- [REQUIRED]

    A list of rules applied to the body/payload sent in the POST request to a webhook URL. All defined rules must pass for the request to be accepted and the pipeline started.

    • (dict) --

      The event criteria that specify when a webhook notification is sent to your URL.

      • jsonPath (string) -- [REQUIRED]

        A JsonPath expression that will be applied to the body/payload of the webhook. The value selected by the JsonPath expression must match the value specified in the MatchEquals field, otherwise the request will be ignored. For more information about JsonPath expressions, see Java JsonPath implementation in GitHub.

      • matchEquals (string) --

        The value selected by the JsonPath expression must match what is supplied in the MatchEquals field, otherwise the request will be ignored. Properties from the target action configuration can be included as placeholders in this value by surrounding the action configuration key with curly braces. For example, if the value supplied here is "refs/heads/{Branch}" and the target action has an action configuration property called "Branch" with a value of "master", the MatchEquals value will be evaluated as "refs/heads/master". For a list of action configuration properties for built-in action types, see Pipeline Structure Reference Action Requirements.

  • authentication (string) -- [REQUIRED]

    Supported options are GITHUB_HMAC, IP and UNAUTHENTICATED.

    • For information about the authentication scheme implemented by GITHUB_HMAC, see Securing your webhooks on the GitHub Developer website.

    • IP will reject webhooks trigger requests unless they originate from an IP within the IP range whitelisted in the authentication configuration.

    • UNAUTHENTICATED will accept all webhook trigger requests regardless of origin.

  • authenticationConfiguration (dict) -- [REQUIRED]

    Properties that configure the authentication applied to incoming webhook trigger requests. The required properties depend on the authentication type. For GITHUB_HMAC, only the SecretToken property must be set. For IP, only the AllowedIPRange property must be set to a valid CIDR range. For UNAUTHENTICATED, no properties can be set.

    • AllowedIPRange (string) --

      The property used to configure acceptance of webhooks within a specific IP range. For IP, only the AllowedIPRange property must be set, and this property must be set to a valid CIDR range.

    • SecretToken (string) --

      The property used to configure GitHub authentication. For GITHUB_HMAC, only the SecretToken property must be set.

type tags

list

param tags

The tags for the webhook.

  • (dict) --

    A tag is a key/value pair that is used to manage the resource.

    • key (string) -- [REQUIRED]

      The tag's key.

    • value (string) -- [REQUIRED]

      The tag's value.

rtype

dict

returns

Response Syntax

{
    'webhook': {
        'definition': {
            'name': 'string',
            'targetPipeline': 'string',
            'targetAction': 'string',
            'filters': [
                {
                    'jsonPath': 'string',
                    'matchEquals': 'string'
                },
            ],
            'authentication': 'GITHUB_HMAC'|'IP'|'UNAUTHENTICATED',
            'authenticationConfiguration': {
                'AllowedIPRange': 'string',
                'SecretToken': 'string'
            }
        },
        'url': 'string',
        'errorMessage': 'string',
        'errorCode': 'string',
        'lastTriggered': datetime(2015, 1, 1),
        'arn': 'string',
        'tags': [
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • webhook (dict) --

      The detail returned from creating the webhook, such as the webhook name, webhook URL, and webhook ARN.

      • definition (dict) --

        The detail returned for each webhook, such as the webhook authentication type and filter rules.

        • name (string) --

          The name of the webhook.

        • targetPipeline (string) --

          The name of the pipeline you want to connect to the webhook.

        • targetAction (string) --

          The name of the action in a pipeline you want to connect to the webhook. The action must be from the source (first) stage of the pipeline.

        • filters (list) --

          A list of rules applied to the body/payload sent in the POST request to a webhook URL. All defined rules must pass for the request to be accepted and the pipeline started.

          • (dict) --

            The event criteria that specify when a webhook notification is sent to your URL.

            • jsonPath (string) --

              A JsonPath expression that will be applied to the body/payload of the webhook. The value selected by the JsonPath expression must match the value specified in the MatchEquals field, otherwise the request will be ignored. For more information about JsonPath expressions, see Java JsonPath implementation in GitHub.

            • matchEquals (string) --

              The value selected by the JsonPath expression must match what is supplied in the MatchEquals field, otherwise the request will be ignored. Properties from the target action configuration can be included as placeholders in this value by surrounding the action configuration key with curly braces. For example, if the value supplied here is "refs/heads/{Branch}" and the target action has an action configuration property called "Branch" with a value of "master", the MatchEquals value will be evaluated as "refs/heads/master". For a list of action configuration properties for built-in action types, see Pipeline Structure Reference Action Requirements.

        • authentication (string) --

          Supported options are GITHUB_HMAC, IP and UNAUTHENTICATED.

          • For information about the authentication scheme implemented by GITHUB_HMAC, see Securing your webhooks on the GitHub Developer website.

          • IP will reject webhooks trigger requests unless they originate from an IP within the IP range whitelisted in the authentication configuration.

          • UNAUTHENTICATED will accept all webhook trigger requests regardless of origin.

        • authenticationConfiguration (dict) --

          Properties that configure the authentication applied to incoming webhook trigger requests. The required properties depend on the authentication type. For GITHUB_HMAC, only the SecretToken property must be set. For IP, only the AllowedIPRange property must be set to a valid CIDR range. For UNAUTHENTICATED, no properties can be set.

          • AllowedIPRange (string) --

            The property used to configure acceptance of webhooks within a specific IP range. For IP, only the AllowedIPRange property must be set, and this property must be set to a valid CIDR range.

          • SecretToken (string) --

            The property used to configure GitHub authentication. For GITHUB_HMAC, only the SecretToken property must be set.

      • url (string) --

        A unique URL generated by CodePipeline. When a POST request is made to this URL, the defined pipeline is started as long as the body of the post request satisfies the defined authentication and filtering conditions. Deleting and re-creating a webhook will make the old URL invalid and generate a new URL.

      • errorMessage (string) --

        The text of the error message about the webhook.

      • errorCode (string) --

        The number code of the error.

      • lastTriggered (datetime) --

        The date and time a webhook was last successfully triggered, in timestamp format.

      • arn (string) --

        The Amazon Resource Name (ARN) of the webhook.

      • tags (list) --

        Specifies the tags applied to the webhook.

        • (dict) --

          A tag is a key/value pair that is used to manage the resource.

          • key (string) --

            The tag's key.

          • value (string) --

            The tag's value.