CodePipeline ************ Client ====== class CodePipeline.Client A low-level client representing AWS CodePipeline **Overview** This is the CodePipeline API Reference. This guide provides descriptions of the actions and data types for CodePipeline. Some functionality for your pipeline can only be configured through the API. For more information, see the CodePipeline User Guide. You can use the CodePipeline API to work with pipelines, stages, actions, and transitions. *Pipelines* are models of automated release processes. Each pipeline is uniquely named, and consists of stages, actions, and transitions. You can work with pipelines by calling: * CreatePipeline, which creates a uniquely named pipeline. * DeletePipeline, which deletes the specified pipeline. * GetPipeline, which returns information about the pipeline structure and pipeline metadata, including the pipeline Amazon Resource Name (ARN). * GetPipelineExecution, which returns information about a specific execution of a pipeline. * GetPipelineState, which returns information about the current state of the stages and actions of a pipeline. * ListActionExecutions, which returns action-level details for past executions. The details include full stage and action-level details, including individual action duration, status, any errors that occurred during the execution, and input and output artifact location details. * ListPipelines, which gets a summary of all of the pipelines associated with your account. * ListPipelineExecutions, which gets a summary of the most recent executions for a pipeline. * StartPipelineExecution, which runs the most recent revision of an artifact through the pipeline. * StopPipelineExecution, which stops the specified pipeline execution from continuing through the pipeline. * UpdatePipeline, which updates a pipeline with edits or changes to the structure of the pipeline. Pipelines include *stages*. Each stage contains one or more actions that must complete before the next stage begins. A stage results in success or failure. If a stage fails, the pipeline stops at that stage and remains stopped until either a new version of an artifact appears in the source location, or a user takes action to rerun the most recent artifact through the pipeline. You can call GetPipelineState, which displays the status of a pipeline, including the status of stages in the pipeline, or GetPipeline, which returns the entire structure of the pipeline, including the stages of that pipeline. For more information about the structure of stages and actions, see CodePipeline Pipeline Structure Reference. Pipeline stages include *actions* that are categorized into categories such as source or build actions performed in a stage of a pipeline. For example, you can use a source action to import artifacts into a pipeline from a source such as Amazon S3. Like stages, you do not work with actions directly in most cases, but you do define and interact with actions when working with pipeline operations such as CreatePipeline and GetPipelineState. Valid action categories are: * Source * Build * Test * Deploy * Approval * Invoke * Compute Pipelines also include *transitions*, which allow the transition of artifacts from one stage to the next in a pipeline after the actions in one stage complete. You can work with transitions by calling: * DisableStageTransition, which prevents artifacts from transitioning to the next stage in a pipeline. * EnableStageTransition, which enables transition of artifacts between stages in a pipeline. **Using the API to integrate with CodePipeline** For third-party integrators or developers who want to create their own integrations with CodePipeline, the expected sequence varies from the standard API user. To integrate with CodePipeline, developers need to work with the following items: **Jobs**, which are instances of an action. For example, a job for a source action might import a revision of an artifact from a source. You can work with jobs by calling: * AcknowledgeJob, which confirms whether a job worker has received the specified job. * GetJobDetails, which returns the details of a job. * PollForJobs, which determines whether there are any jobs to act on. * PutJobFailureResult, which provides details of a job failure. * PutJobSuccessResult, which provides details of a job success. **Third party jobs**, which are instances of an action created by a partner action and integrated into CodePipeline. Partner actions are created by members of the Amazon Web Services Partner Network. You can work with third party jobs by calling: * AcknowledgeThirdPartyJob, which confirms whether a job worker has received the specified job. * GetThirdPartyJobDetails, which requests the details of a job for a partner action. * PollForThirdPartyJobs, which determines whether there are any jobs to act on. * PutThirdPartyJobFailureResult, which provides details of a job failure. * PutThirdPartyJobSuccessResult, which provides details of a job success. import boto3 client = boto3.client('codepipeline') These are the available methods: * acknowledge_job * acknowledge_third_party_job * can_paginate * close * create_custom_action_type * create_pipeline * delete_custom_action_type * delete_pipeline * delete_webhook * deregister_webhook_with_third_party * disable_stage_transition * enable_stage_transition * get_action_type * get_job_details * get_paginator * get_pipeline * get_pipeline_execution * get_pipeline_state * get_third_party_job_details * get_waiter * list_action_executions * list_action_types * list_deploy_action_execution_targets * list_pipeline_executions * list_pipelines * list_rule_executions * list_rule_types * list_tags_for_resource * list_webhooks * override_stage_condition * poll_for_jobs * poll_for_third_party_jobs * put_action_revision * put_approval_result * put_job_failure_result * put_job_success_result * put_third_party_job_failure_result * put_third_party_job_success_result * put_webhook * register_webhook_with_third_party * retry_stage_execution * rollback_stage * start_pipeline_execution * stop_pipeline_execution * tag_resource * untag_resource * update_action_type * update_pipeline Paginators ========== Paginators are available on a client instance via the "get_paginator" method. For more detailed instructions and examples on the usage of paginators, see the paginators user guide. The available paginators are: * ListActionExecutions * ListActionTypes * ListDeployActionExecutionTargets * ListPipelineExecutions * ListPipelines * ListRuleExecutions * ListTagsForResource * ListWebhooks CodePipeline / Paginator / ListTagsForResource ListTagsForResource ******************* class CodePipeline.Paginator.ListTagsForResource paginator = client.get_paginator('list_tags_for_resource') paginate(**kwargs) Creates an iterator that will paginate through responses from "CodePipeline.Client.list_tags_for_resource()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( resourceArn='string', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **resourceArn** (*string*) -- **[REQUIRED]** The Amazon Resource Name (ARN) of the resource to get tags for. * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: 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) --* A token to resume pagination. CodePipeline / Paginator / ListActionExecutions ListActionExecutions ******************** class CodePipeline.Paginator.ListActionExecutions paginator = client.get_paginator('list_action_executions') paginate(**kwargs) Creates an iterator that will paginate through responses from "CodePipeline.Client.list_action_executions()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( pipelineName='string', filter={ 'pipelineExecutionId': 'string', 'latestInPipelineExecution': { 'pipelineExecutionId': 'string', 'startTimeRange': 'Latest'|'All' } }, PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: * **pipelineName** (*string*) -- **[REQUIRED]** The name of the pipeline for which you want to list action execution history. * **filter** (*dict*) -- Input information used to filter action execution history. * **pipelineExecutionId** *(string) --* The pipeline execution ID used to filter action execution history. * **latestInPipelineExecution** *(dict) --* The latest execution in the pipeline. Note: Filtering on the latest execution is available for executions run on or after February 08, 2024. * **pipelineExecutionId** *(string) --* **[REQUIRED]** The execution ID for the latest execution in the pipeline. * **startTimeRange** *(string) --* **[REQUIRED]** The start time to filter on for the latest execution in the pipeline. Valid options: * All * Latest * **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max-items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: dict Returns: **Response Syntax** { 'actionExecutionDetails': [ { 'pipelineExecutionId': 'string', 'actionExecutionId': 'string', 'pipelineVersion': 123, 'stageName': 'string', 'actionName': 'string', 'startTime': datetime(2015, 1, 1), 'lastUpdateTime': datetime(2015, 1, 1), 'updatedBy': 'string', 'status': 'InProgress'|'Abandoned'|'Succeeded'|'Failed', 'input': { 'actionTypeId': { 'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke'|'Approval'|'Compute', 'owner': 'AWS'|'ThirdParty'|'Custom', 'provider': 'string', 'version': 'string' }, 'configuration': { 'string': 'string' }, 'resolvedConfiguration': { 'string': 'string' }, 'roleArn': 'string', 'region': 'string', 'inputArtifacts': [ { 'name': 'string', 's3location': { 'bucket': 'string', 'key': 'string' } }, ], 'namespace': 'string' }, 'output': { 'outputArtifacts': [ { 'name': 'string', 's3location': { 'bucket': 'string', 'key': 'string' } }, ], 'executionResult': { 'externalExecutionId': 'string', 'externalExecutionSummary': 'string', 'externalExecutionUrl': 'string', 'errorDetails': { 'code': 'string', 'message': 'string' }, 'logStreamARN': 'string' }, 'outputVariables': { 'string': 'string' } } }, ], 'NextToken': 'string' } **Response Structure** * *(dict) --* * **actionExecutionDetails** *(list) --* The details for a list of recent executions, such as action execution ID. * *(dict) --* Returns information about an execution of an action, including the action execution ID, and the name, version, and timing of the action. * **pipelineExecutionId** *(string) --* The pipeline execution ID for the action execution. * **actionExecutionId** *(string) --* The action execution ID. * **pipelineVersion** *(integer) --* The version of the pipeline where the action was run. * **stageName** *(string) --* The name of the stage that contains the action. * **actionName** *(string) --* The name of the action. * **startTime** *(datetime) --* The start time of the action execution. * **lastUpdateTime** *(datetime) --* The last update time of the action execution. * **updatedBy** *(string) --* The ARN of the user who changed the pipeline execution details. * **status** *(string) --* The status of the action execution. Status categories are "InProgress", "Succeeded", and "Failed". * **input** *(dict) --* Input details for the action execution, such as role ARN, Region, and input artifacts. * **actionTypeId** *(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 following values. * Source * Build * Test * Deploy * Invoke * Approval * Compute * **owner** *(string) --* The creator of the action being called. There are three valid values for the "Owner" field in the action category section within your pipeline structure: "AWS", "ThirdParty", and "Custom". For more information, see Valid Action Types and Providers in CodePipeline. * **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 CodeDeploy, which would be specified as "CodeDeploy". For more information, see Valid Action Types and Providers in CodePipeline. * **version** *(string) --* A string that describes the action version. * **configuration** *(dict) --* Configuration data for an action execution. * *(string) --* * *(string) --* * **resolvedConfiguration** *(dict) --* Configuration data for an action execution with all variable references replaced with their real values for the execution. * *(string) --* * *(string) --* * **roleArn** *(string) --* The ARN of the IAM service role that performs the declared action. This is assumed through the roleArn for the pipeline. * **region** *(string) --* The Amazon Web Services Region for the action, such as us-east-1. * **inputArtifacts** *(list) --* Details of input artifacts of the action that correspond to the action execution. * *(dict) --* Artifact details for the action execution, such as the artifact location. * **name** *(string) --* The artifact object name for the action execution. * **s3location** *(dict) --* The Amazon S3 artifact location for the action execution. * **bucket** *(string) --* The Amazon S3 artifact bucket for an action's artifacts. * **key** *(string) --* The artifact name. * **namespace** *(string) --* The variable namespace associated with the action. All variables produced as output by this action fall under this namespace. * **output** *(dict) --* Output details for the action execution, such as the action execution result. * **outputArtifacts** *(list) --* Details of output artifacts of the action that correspond to the action execution. * *(dict) --* Artifact details for the action execution, such as the artifact location. * **name** *(string) --* The artifact object name for the action execution. * **s3location** *(dict) --* The Amazon S3 artifact location for the action execution. * **bucket** *(string) --* The Amazon S3 artifact bucket for an action's artifacts. * **key** *(string) --* The artifact name. * **executionResult** *(dict) --* Execution result information listed in the output details for an action execution. * **externalExecutionId** *(string) --* The action provider's external ID for the action execution. * **externalExecutionSummary** *(string) --* The action provider's summary for the action execution. * **externalExecutionUrl** *(string) --* The deepest external link to the external resource (for example, a repository URL or deployment endpoint) that is used when running the action. * **errorDetails** *(dict) --* Represents information about an error in CodePipeline. * **code** *(string) --* The system ID or number code of the error. * **message** *(string) --* The text of the error message. * **logStreamARN** *(string) --* The Amazon Resource Name (ARN) of the log stream for the action compute. * **outputVariables** *(dict) --* The outputVariables field shows the key-value pairs that were output as part of that execution. * *(string) --* * *(string) --* * **NextToken** *(string) --* A token to resume pagination. CodePipeline / Paginator / ListWebhooks ListWebhooks ************ class CodePipeline.Paginator.ListWebhooks paginator = client.get_paginator('list_webhooks') paginate(**kwargs) Creates an iterator that will paginate through responses from "CodePipeline.Client.list_webhooks()". See also: AWS API Documentation **Request Syntax** response_iterator = paginator.paginate( PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) Parameters: **PaginationConfig** (*dict*) -- A dictionary that provides parameters to control pagination. * **MaxItems** *(integer) --* The total number of items to return. If the total number of items available is more than the value specified in max- items then a "NextToken" will be provided in the output that you can use to resume pagination. * **PageSize** *(integer) --* The size of each page. * **StartingToken** *(string) --* A token to specify where to start paginating. This is the "NextToken" from a previous response. Return type: 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' }, ] }, ], } **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 is 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 is ignored. For more information, 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 is ignored. Properties from the target action configuration can be included as placeholders in this value by surrounding the action configuration key with curly brackets. 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 "main", the "MatchEquals" value is evaluated as "refs/heads/main". 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. Warning: When creating CodePipeline webhooks, do not use your own credentials or reuse the same secret token across multiple webhooks. For optimal security, generate a unique secret token for each webhook you create. The secret token is an arbitrary string that you provide, which GitHub uses to compute and sign the webhook payloads sent to CodePipeline, for protecting the integrity and authenticity of the webhook payloads. Using your own credentials or reusing the same token across multiple webhooks can lead to security vulnerabilities. Note: If a secret token was provided, it will be redacted in the response. * For information about the authentication scheme implemented by GITHUB_HMAC, see Securing your webhooks on the GitHub Developer website. * IP rejects webhooks trigger requests unless they originate from an IP address in the IP range whitelisted in the authentication configuration. * UNAUTHENTICATED accepts 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 >>``<>``<>``<>``<