Table of Contents
CodePipeline.
Client
¶A low-level client representing AWS CodePipeline:
client = session.create_client('codepipeline')
These are the available methods:
acknowledge_job()
acknowledge_third_party_job()
can_paginate()
create_custom_action_type()
create_pipeline()
delete_custom_action_type()
delete_pipeline()
disable_stage_transition()
enable_stage_transition()
generate_presigned_url()
get_job_details()
get_paginator()
get_pipeline()
get_pipeline_state()
get_third_party_job_details()
get_waiter()
list_action_types()
list_pipelines()
poll_for_jobs()
poll_for_third_party_jobs()
put_action_revision()
put_job_failure_result()
put_job_success_result()
put_third_party_job_failure_result()
put_third_party_job_success_result()
start_pipeline_execution()
update_pipeline()
acknowledge_job
(**kwargs)¶Returns information about a specified job and whether that job has been received by the job worker. Only used for custom actions.
Request Syntax
response = client.acknowledge_job(
jobId='string',
nonce='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'status': 'Created'|'Queued'|'Dispatched'|'InProgress'|'TimedOut'|'Succeeded'|'Failed'
}
Response Structure
|
acknowledge_third_party_job
(**kwargs)¶Confirms a job worker has received the specified job. Only used for partner actions.
Request Syntax
response = client.acknowledge_third_party_job(
jobId='string',
nonce='string',
clientToken='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'status': 'Created'|'Queued'|'Dispatched'|'InProgress'|'TimedOut'|'Succeeded'|'Failed'
}
Response Structure
|
can_paginate
(operation_name)¶Check if an operation can be paginated.
Parameters: | operation_name (string) -- The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo , and you'd normally invoke the
operation as client.create_foo(**kwargs) , if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo") . |
---|---|
Returns: | True if the operation can be paginated,
False otherwise. |
create_custom_action_type
(**kwargs)¶Creates a new custom action that can be used in all pipelines associated with the AWS account. Only used for custom actions.
Request Syntax
response = client.create_custom_action_type(
category='Source'|'Build'|'Deploy'|'Test'|'Invoke',
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
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'actionType': {
'id': {
'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke',
'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
}
}
}
Response Structure
|
create_pipeline
(**kwargs)¶Creates a pipeline.
Request Syntax
response = client.create_pipeline(
pipeline={
'name': 'string',
'roleArn': 'string',
'artifactStore': {
'type': 'S3',
'location': 'string'
},
'stages': [
{
'name': 'string',
'blockers': [
{
'name': 'string',
'type': 'Schedule'
},
],
'actions': [
{
'name': 'string',
'actionTypeId': {
'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke',
'owner': 'AWS'|'ThirdParty'|'Custom',
'provider': 'string',
'version': 'string'
},
'runOrder': 123,
'configuration': {
'string': 'string'
},
'outputArtifacts': [
{
'name': 'string'
},
],
'inputArtifacts': [
{
'name': 'string'
},
],
'roleArn': 'string'
},
]
},
],
'version': 123
}
)
Parameters: | pipeline (dict) -- [REQUIRED] Represents the structure of actions and stages to be performed in the pipeline.
|
---|---|
Return type: | dict |
Returns: | Response Syntax{
'pipeline': {
'name': 'string',
'roleArn': 'string',
'artifactStore': {
'type': 'S3',
'location': 'string'
},
'stages': [
{
'name': 'string',
'blockers': [
{
'name': 'string',
'type': 'Schedule'
},
],
'actions': [
{
'name': 'string',
'actionTypeId': {
'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke',
'owner': 'AWS'|'ThirdParty'|'Custom',
'provider': 'string',
'version': 'string'
},
'runOrder': 123,
'configuration': {
'string': 'string'
},
'outputArtifacts': [
{
'name': 'string'
},
],
'inputArtifacts': [
{
'name': 'string'
},
],
'roleArn': 'string'
},
]
},
],
'version': 123
}
}
Response Structure
|
delete_custom_action_type
(**kwargs)¶Marks a custom action as deleted. PollForJobs for the custom action will fail after the action is marked for deletion. Only used for custom actions.
Warning
You cannot recreate a custom action after it has been deleted unless you increase the version number of the action.
Request Syntax
response = client.delete_custom_action_type(
category='Source'|'Build'|'Deploy'|'Test'|'Invoke',
provider='string',
version='string'
)
Parameters: |
|
---|---|
Returns: | None |
delete_pipeline
(**kwargs)¶Deletes the specified pipeline.
Request Syntax
response = client.delete_pipeline(
name='string'
)
Parameters: | name (string) -- [REQUIRED] The name of the pipeline to be deleted. |
---|---|
Returns: | None |
disable_stage_transition
(**kwargs)¶Prevents artifacts in a pipeline from transitioning to the next stage in the pipeline.
Request Syntax
response = client.disable_stage_transition(
pipelineName='string',
stageName='string',
transitionType='Inbound'|'Outbound',
reason='string'
)
Parameters: |
|
---|---|
Returns: | None |
enable_stage_transition
(**kwargs)¶Enables artifacts in a pipeline to transition to a stage in a pipeline.
Request Syntax
response = client.enable_stage_transition(
pipelineName='string',
stageName='string',
transitionType='Inbound'|'Outbound'
)
Parameters: |
|
---|---|
Returns: | None |
generate_presigned_url
(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
Parameters: |
|
---|---|
Returns: | The presigned url |
get_job_details
(**kwargs)¶Returns information about a job. Only used for custom actions.
Warning
When this API is called, AWS CodePipeline returns temporary credentials for the Amazon S3 bucket used to store artifacts for the pipeline, if the action requires access to that Amazon S3 bucket for input or output artifacts. Additionally, this API returns any secret values defined for the action.
Request Syntax
response = client.get_job_details(
jobId='string'
)
Parameters: | jobId (string) -- [REQUIRED] The unique system-generated ID for the job. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'jobDetails': {
'id': 'string',
'data': {
'actionTypeId': {
'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke',
'owner': 'AWS'|'ThirdParty'|'Custom',
'provider': 'string',
'version': 'string'
},
'actionConfiguration': {
'configuration': {
'string': 'string'
}
},
'pipelineContext': {
'pipelineName': 'string',
'stage': {
'name': 'string'
},
'action': {
'name': 'string'
}
},
'inputArtifacts': [
{
'name': 'string',
'revision': 'string',
'location': {
'type': 'S3',
's3Location': {
'bucketName': 'string',
'objectKey': 'string'
}
}
},
],
'outputArtifacts': [
{
'name': 'string',
'revision': 'string',
'location': {
'type': 'S3',
's3Location': {
'bucketName': 'string',
'objectKey': 'string'
}
}
},
],
'artifactCredentials': {
'accessKeyId': 'string',
'secretAccessKey': 'string',
'sessionToken': 'string'
},
'continuationToken': 'string'
},
'accountId': 'string'
}
}
Response Structure
|
get_paginator
(operation_name)¶Create a paginator for an operation.
Parameters: | operation_name (string) -- The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo , and you'd normally invoke the
operation as client.create_foo(**kwargs) , if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo") . |
---|---|
Raises OperationNotPageableError: | |
Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
|
Return type: | L{botocore.paginate.Paginator} |
Returns: | A paginator object. |
get_pipeline
(**kwargs)¶Returns the metadata, structure, stages, and actions of a pipeline. Can be used to return the entire structure of a pipeline in JSON format, which can then be modified and used to update the pipeline structure with UpdatePipeline .
Request Syntax
response = client.get_pipeline(
name='string',
version=123
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'pipeline': {
'name': 'string',
'roleArn': 'string',
'artifactStore': {
'type': 'S3',
'location': 'string'
},
'stages': [
{
'name': 'string',
'blockers': [
{
'name': 'string',
'type': 'Schedule'
},
],
'actions': [
{
'name': 'string',
'actionTypeId': {
'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke',
'owner': 'AWS'|'ThirdParty'|'Custom',
'provider': 'string',
'version': 'string'
},
'runOrder': 123,
'configuration': {
'string': 'string'
},
'outputArtifacts': [
{
'name': 'string'
},
],
'inputArtifacts': [
{
'name': 'string'
},
],
'roleArn': 'string'
},
]
},
],
'version': 123
}
}
Response Structure
|
get_pipeline_state
(**kwargs)¶Returns information about the state of a pipeline, including the stages, actions, and details about the last run of the pipeline.
Request Syntax
response = client.get_pipeline_state(
name='string'
)
Parameters: | name (string) -- [REQUIRED] The name of the pipeline about which you want to get information. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'pipelineName': 'string',
'pipelineVersion': 123,
'stageStates': [
{
'stageName': 'string',
'inboundTransitionState': {
'enabled': True|False,
'lastChangedBy': 'string',
'lastChangedAt': datetime(2015, 1, 1),
'disabledReason': 'string'
},
'actionStates': [
{
'actionName': 'string',
'currentRevision': {
'revisionId': 'string',
'revisionChangeId': 'string',
'created': datetime(2015, 1, 1)
},
'latestExecution': {
'status': 'InProgress'|'Succeeded'|'Failed',
'summary': 'string',
'lastStatusChange': datetime(2015, 1, 1),
'externalExecutionId': 'string',
'externalExecutionUrl': 'string',
'percentComplete': 123,
'errorDetails': {
'code': 'string',
'message': 'string'
}
},
'entityUrl': 'string',
'revisionUrl': 'string'
},
]
},
],
'created': datetime(2015, 1, 1),
'updated': datetime(2015, 1, 1)
}
Response Structure
|
get_third_party_job_details
(**kwargs)¶Requests the details of a job for a third party action. Only used for partner actions.
Warning
When this API is called, AWS CodePipeline returns temporary credentials for the Amazon S3 bucket used to store artifacts for the pipeline, if the action requires access to that Amazon S3 bucket for input or output artifacts. Additionally, this API returns any secret values defined for the action.
Request Syntax
response = client.get_third_party_job_details(
jobId='string',
clientToken='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'jobDetails': {
'id': 'string',
'data': {
'actionTypeId': {
'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke',
'owner': 'AWS'|'ThirdParty'|'Custom',
'provider': 'string',
'version': 'string'
},
'actionConfiguration': {
'configuration': {
'string': 'string'
}
},
'pipelineContext': {
'pipelineName': 'string',
'stage': {
'name': 'string'
},
'action': {
'name': 'string'
}
},
'inputArtifacts': [
{
'name': 'string',
'revision': 'string',
'location': {
'type': 'S3',
's3Location': {
'bucketName': 'string',
'objectKey': 'string'
}
}
},
],
'outputArtifacts': [
{
'name': 'string',
'revision': 'string',
'location': {
'type': 'S3',
's3Location': {
'bucketName': 'string',
'objectKey': 'string'
}
}
},
],
'artifactCredentials': {
'accessKeyId': 'string',
'secretAccessKey': 'string',
'sessionToken': 'string'
},
'continuationToken': 'string'
},
'nonce': 'string'
}
}
Response Structure
|
get_waiter
(waiter_name)¶list_action_types
(**kwargs)¶Gets a summary of all AWS CodePipeline action types associated with your account.
Request Syntax
response = client.list_action_types(
actionOwnerFilter='AWS'|'ThirdParty'|'Custom',
nextToken='string'
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'actionTypes': [
{
'id': {
'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke',
'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
}
},
],
'nextToken': 'string'
}
Response Structure
|
list_pipelines
(**kwargs)¶Gets a summary of all of the pipelines associated with your account.
Request Syntax
response = client.list_pipelines(
nextToken='string'
)
Parameters: | nextToken (string) -- An identifier that was returned from the previous list pipelines call, which can be used to return the next set of pipelines in the list. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'pipelines': [
{
'name': 'string',
'version': 123,
'created': datetime(2015, 1, 1),
'updated': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
|
poll_for_jobs
(**kwargs)¶Returns information about any jobs for AWS CodePipeline to act upon.
Warning
When this API is called, AWS CodePipeline returns temporary credentials for the Amazon S3 bucket used to store artifacts for the pipeline, if the action requires access to that Amazon S3 bucket for input or output artifacts. Additionally, this API returns any secret values defined for the action.
Request Syntax
response = client.poll_for_jobs(
actionTypeId={
'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke',
'owner': 'AWS'|'ThirdParty'|'Custom',
'provider': 'string',
'version': 'string'
},
maxBatchSize=123,
queryParam={
'string': 'string'
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'jobs': [
{
'id': 'string',
'data': {
'actionTypeId': {
'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke',
'owner': 'AWS'|'ThirdParty'|'Custom',
'provider': 'string',
'version': 'string'
},
'actionConfiguration': {
'configuration': {
'string': 'string'
}
},
'pipelineContext': {
'pipelineName': 'string',
'stage': {
'name': 'string'
},
'action': {
'name': 'string'
}
},
'inputArtifacts': [
{
'name': 'string',
'revision': 'string',
'location': {
'type': 'S3',
's3Location': {
'bucketName': 'string',
'objectKey': 'string'
}
}
},
],
'outputArtifacts': [
{
'name': 'string',
'revision': 'string',
'location': {
'type': 'S3',
's3Location': {
'bucketName': 'string',
'objectKey': 'string'
}
}
},
],
'artifactCredentials': {
'accessKeyId': 'string',
'secretAccessKey': 'string',
'sessionToken': 'string'
},
'continuationToken': 'string'
},
'nonce': 'string',
'accountId': 'string'
},
]
}
Response Structure
|
poll_for_third_party_jobs
(**kwargs)¶Determines whether there are any third party jobs for a job worker to act on. Only used for partner actions.
Warning
When this API is called, AWS CodePipeline returns temporary credentials for the Amazon S3 bucket used to store artifacts for the pipeline, if the action requires access to that Amazon S3 bucket for input or output artifacts.
Request Syntax
response = client.poll_for_third_party_jobs(
actionTypeId={
'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke',
'owner': 'AWS'|'ThirdParty'|'Custom',
'provider': 'string',
'version': 'string'
},
maxBatchSize=123
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'jobs': [
{
'clientId': 'string',
'jobId': 'string'
},
]
}
Response Structure
|
put_action_revision
(**kwargs)¶Provides information to AWS CodePipeline about new revisions to a source.
Request Syntax
response = client.put_action_revision(
pipelineName='string',
stageName='string',
actionName='string',
actionRevision={
'revisionId': 'string',
'revisionChangeId': 'string',
'created': datetime(2015, 1, 1)
}
)
Parameters: |
|
---|---|
Return type: | dict |
Returns: | Response Syntax {
'newRevision': True|False,
'pipelineExecutionId': 'string'
}
Response Structure
|
put_job_failure_result
(**kwargs)¶Represents the failure of a job as returned to the pipeline by a job worker. Only used for custom actions.
Request Syntax
response = client.put_job_failure_result(
jobId='string',
failureDetails={
'type': 'JobFailed'|'ConfigurationError'|'PermissionError'|'RevisionOutOfSync'|'RevisionUnavailable'|'SystemUnavailable',
'message': 'string',
'externalExecutionId': 'string'
}
)
Parameters: |
|
---|---|
Returns: | None |
put_job_success_result
(**kwargs)¶Represents the success of a job as returned to the pipeline by a job worker. Only used for custom actions.
Request Syntax
response = client.put_job_success_result(
jobId='string',
currentRevision={
'revision': 'string',
'changeIdentifier': 'string'
},
continuationToken='string',
executionDetails={
'summary': 'string',
'externalExecutionId': 'string',
'percentComplete': 123
}
)
Parameters: |
|
---|---|
Returns: | None |
put_third_party_job_failure_result
(**kwargs)¶Represents the failure of a third party job as returned to the pipeline by a job worker. Only used for partner actions.
Request Syntax
response = client.put_third_party_job_failure_result(
jobId='string',
clientToken='string',
failureDetails={
'type': 'JobFailed'|'ConfigurationError'|'PermissionError'|'RevisionOutOfSync'|'RevisionUnavailable'|'SystemUnavailable',
'message': 'string',
'externalExecutionId': 'string'
}
)
Parameters: |
|
---|---|
Returns: | None |
put_third_party_job_success_result
(**kwargs)¶Represents the success of a third party job as returned to the pipeline by a job worker. Only used for partner actions.
Request Syntax
response = client.put_third_party_job_success_result(
jobId='string',
clientToken='string',
currentRevision={
'revision': 'string',
'changeIdentifier': 'string'
},
continuationToken='string',
executionDetails={
'summary': 'string',
'externalExecutionId': 'string',
'percentComplete': 123
}
)
Parameters: |
|
---|---|
Returns: | None |
start_pipeline_execution
(**kwargs)¶Starts the specified pipeline. Specifically, it begins processing the latest commit to the source location specified as part of the pipeline.
Request Syntax
response = client.start_pipeline_execution(
name='string'
)
Parameters: | name (string) -- [REQUIRED] The name of the pipeline to start. |
---|---|
Return type: | dict |
Returns: | Response Syntax{
'pipelineExecutionId': 'string'
}
Response Structure
|
update_pipeline
(**kwargs)¶Updates a specified pipeline with edits or changes to its structure. Use a JSON file with the pipeline structure in conjunction with UpdatePipeline to provide the full structure of the pipeline. Updating the pipeline increases the version number of the pipeline by 1.
Request Syntax
response = client.update_pipeline(
pipeline={
'name': 'string',
'roleArn': 'string',
'artifactStore': {
'type': 'S3',
'location': 'string'
},
'stages': [
{
'name': 'string',
'blockers': [
{
'name': 'string',
'type': 'Schedule'
},
],
'actions': [
{
'name': 'string',
'actionTypeId': {
'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke',
'owner': 'AWS'|'ThirdParty'|'Custom',
'provider': 'string',
'version': 'string'
},
'runOrder': 123,
'configuration': {
'string': 'string'
},
'outputArtifacts': [
{
'name': 'string'
},
],
'inputArtifacts': [
{
'name': 'string'
},
],
'roleArn': 'string'
},
]
},
],
'version': 123
}
)
Parameters: | pipeline (dict) -- [REQUIRED] The name of the pipeline to be updated.
|
---|---|
Return type: | dict |
Returns: | Response Syntax{
'pipeline': {
'name': 'string',
'roleArn': 'string',
'artifactStore': {
'type': 'S3',
'location': 'string'
},
'stages': [
{
'name': 'string',
'blockers': [
{
'name': 'string',
'type': 'Schedule'
},
],
'actions': [
{
'name': 'string',
'actionTypeId': {
'category': 'Source'|'Build'|'Deploy'|'Test'|'Invoke',
'owner': 'AWS'|'ThirdParty'|'Custom',
'provider': 'string',
'version': 'string'
},
'runOrder': 123,
'configuration': {
'string': 'string'
},
'outputArtifacts': [
{
'name': 'string'
},
],
'inputArtifacts': [
{
'name': 'string'
},
],
'roleArn': 'string'
},
]
},
],
'version': 123
}
}
Response Structure
|