CodePipeline / Client / get_pipeline_state

get_pipeline_state#

CodePipeline.Client.get_pipeline_state(**kwargs)#

Returns information about the state of a pipeline, including the stages and actions.

Note

Values returned in the revisionId and revisionUrl fields indicate the source revision information, such as the commit ID, for the current state.

See also: AWS API Documentation

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',
            'inboundExecution': {
                'pipelineExecutionId': 'string',
                'status': 'Cancelled'|'InProgress'|'Failed'|'Stopped'|'Stopping'|'Succeeded',
                'type': 'STANDARD'|'ROLLBACK'
            },
            'inboundExecutions': [
                {
                    'pipelineExecutionId': 'string',
                    'status': 'Cancelled'|'InProgress'|'Failed'|'Stopped'|'Stopping'|'Succeeded',
                    'type': 'STANDARD'|'ROLLBACK'
                },
            ],
            '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': {
                        'actionExecutionId': 'string',
                        'status': 'InProgress'|'Abandoned'|'Succeeded'|'Failed',
                        'summary': 'string',
                        'lastStatusChange': datetime(2015, 1, 1),
                        'token': 'string',
                        'lastUpdatedBy': 'string',
                        'externalExecutionId': 'string',
                        'externalExecutionUrl': 'string',
                        'percentComplete': 123,
                        'errorDetails': {
                            'code': 'string',
                            'message': 'string'
                        }
                    },
                    'entityUrl': 'string',
                    'revisionUrl': 'string'
                },
            ],
            'latestExecution': {
                'pipelineExecutionId': 'string',
                'status': 'Cancelled'|'InProgress'|'Failed'|'Stopped'|'Stopping'|'Succeeded',
                'type': 'STANDARD'|'ROLLBACK'
            },
            'beforeEntryConditionState': {
                'latestExecution': {
                    'status': 'InProgress'|'Failed'|'Errored'|'Succeeded'|'Cancelled'|'Abandoned'|'Overridden',
                    'summary': 'string'
                },
                'conditionStates': [
                    {
                        'latestExecution': {
                            'status': 'InProgress'|'Failed'|'Errored'|'Succeeded'|'Cancelled'|'Abandoned'|'Overridden',
                            'summary': 'string',
                            'lastStatusChange': datetime(2015, 1, 1)
                        },
                        'ruleStates': [
                            {
                                'ruleName': 'string',
                                'currentRevision': {
                                    'revisionId': 'string',
                                    'revisionChangeId': 'string',
                                    'created': datetime(2015, 1, 1)
                                },
                                'latestExecution': {
                                    'ruleExecutionId': 'string',
                                    'status': 'InProgress'|'Abandoned'|'Succeeded'|'Failed',
                                    'summary': 'string',
                                    'lastStatusChange': datetime(2015, 1, 1),
                                    'token': 'string',
                                    'lastUpdatedBy': 'string',
                                    'externalExecutionId': 'string',
                                    'externalExecutionUrl': 'string',
                                    'errorDetails': {
                                        'code': 'string',
                                        'message': 'string'
                                    }
                                },
                                'entityUrl': 'string',
                                'revisionUrl': 'string'
                            },
                        ]
                    },
                ]
            },
            'onSuccessConditionState': {
                'latestExecution': {
                    'status': 'InProgress'|'Failed'|'Errored'|'Succeeded'|'Cancelled'|'Abandoned'|'Overridden',
                    'summary': 'string'
                },
                'conditionStates': [
                    {
                        'latestExecution': {
                            'status': 'InProgress'|'Failed'|'Errored'|'Succeeded'|'Cancelled'|'Abandoned'|'Overridden',
                            'summary': 'string',
                            'lastStatusChange': datetime(2015, 1, 1)
                        },
                        'ruleStates': [
                            {
                                'ruleName': 'string',
                                'currentRevision': {
                                    'revisionId': 'string',
                                    'revisionChangeId': 'string',
                                    'created': datetime(2015, 1, 1)
                                },
                                'latestExecution': {
                                    'ruleExecutionId': 'string',
                                    'status': 'InProgress'|'Abandoned'|'Succeeded'|'Failed',
                                    'summary': 'string',
                                    'lastStatusChange': datetime(2015, 1, 1),
                                    'token': 'string',
                                    'lastUpdatedBy': 'string',
                                    'externalExecutionId': 'string',
                                    'externalExecutionUrl': 'string',
                                    'errorDetails': {
                                        'code': 'string',
                                        'message': 'string'
                                    }
                                },
                                'entityUrl': 'string',
                                'revisionUrl': 'string'
                            },
                        ]
                    },
                ]
            },
            'onFailureConditionState': {
                'latestExecution': {
                    'status': 'InProgress'|'Failed'|'Errored'|'Succeeded'|'Cancelled'|'Abandoned'|'Overridden',
                    'summary': 'string'
                },
                'conditionStates': [
                    {
                        'latestExecution': {
                            'status': 'InProgress'|'Failed'|'Errored'|'Succeeded'|'Cancelled'|'Abandoned'|'Overridden',
                            'summary': 'string',
                            'lastStatusChange': datetime(2015, 1, 1)
                        },
                        'ruleStates': [
                            {
                                'ruleName': 'string',
                                'currentRevision': {
                                    'revisionId': 'string',
                                    'revisionChangeId': 'string',
                                    'created': datetime(2015, 1, 1)
                                },
                                'latestExecution': {
                                    'ruleExecutionId': 'string',
                                    'status': 'InProgress'|'Abandoned'|'Succeeded'|'Failed',
                                    'summary': 'string',
                                    'lastStatusChange': datetime(2015, 1, 1),
                                    'token': 'string',
                                    'lastUpdatedBy': 'string',
                                    'externalExecutionId': 'string',
                                    'externalExecutionUrl': 'string',
                                    'errorDetails': {
                                        'code': 'string',
                                        'message': 'string'
                                    }
                                },
                                'entityUrl': 'string',
                                'revisionUrl': 'string'
                            },
                        ]
                    },
                ]
            }
        },
    ],
    'created': datetime(2015, 1, 1),
    'updated': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    Represents the output of a GetPipelineState action.

    • pipelineName (string) –

      The name of the pipeline for which you want to get the state.

    • pipelineVersion (integer) –

      The version number of the pipeline.

      Note

      A newly created pipeline is always assigned a version number of 1.

    • stageStates (list) –

      A list of the pipeline stage output information, including stage name, state, most recent run details, whether the stage is disabled, and other data.

      • (dict) –

        Represents information about the state of the stage.

        • stageName (string) –

          The name of the stage.

        • inboundExecution (dict) –

          Represents information about the run of a stage.

          • pipelineExecutionId (string) –

            The ID of the pipeline execution associated with the stage.

          • status (string) –

            The status of the stage, or for a completed stage, the last status of the stage.

            Note

            A status of cancelled means that the pipeline’s definition was updated before the stage execution could be completed.

          • type (string) –

            The type of pipeline execution for the stage, such as a rollback pipeline execution.

        • inboundExecutions (list) –

          The inbound executions for a stage.

          • (dict) –

            Represents information about the run of a stage.

            • pipelineExecutionId (string) –

              The ID of the pipeline execution associated with the stage.

            • status (string) –

              The status of the stage, or for a completed stage, the last status of the stage.

              Note

              A status of cancelled means that the pipeline’s definition was updated before the stage execution could be completed.

            • type (string) –

              The type of pipeline execution for the stage, such as a rollback pipeline execution.

        • inboundTransitionState (dict) –

          The state of the inbound transition, which is either enabled or disabled.

          • enabled (boolean) –

            Whether the transition between stages is enabled (true) or disabled (false).

          • lastChangedBy (string) –

            The ID of the user who last changed the transition state.

          • lastChangedAt (datetime) –

            The timestamp when the transition state was last changed.

          • disabledReason (string) –

            The user-specified reason why the transition between two stages of a pipeline was disabled.

        • actionStates (list) –

          The state of the stage.

          • (dict) –

            Represents information about the state of an action.

            • actionName (string) –

              The name of the action.

            • currentRevision (dict) –

              Represents information about the version (or revision) of an action.

              • revisionId (string) –

                The system-generated unique ID that identifies the revision number of the action.

              • revisionChangeId (string) –

                The unique identifier of the change that set the state to this revision (for example, a deployment ID or timestamp).

              • created (datetime) –

                The date and time when the most recent version of the action was created, in timestamp format.

            • latestExecution (dict) –

              Represents information about the run of an action.

              • actionExecutionId (string) –

                ID of the workflow action execution in the current stage. Use the GetPipelineState action to retrieve the current action execution details of the current stage.

                Note

                For older executions, this field might be empty. The action execution ID is available for executions run on or after March 2020.

              • status (string) –

                The status of the action, or for a completed action, the last status of the action.

              • summary (string) –

                A summary of the run of the action.

              • lastStatusChange (datetime) –

                The last status change of the action.

              • token (string) –

                The system-generated token used to identify a unique approval request. The token for each open approval request can be obtained using the GetPipelineState command. It is used to validate that the approval request corresponding to this token is still valid.

              • lastUpdatedBy (string) –

                The ARN of the user who last changed the pipeline.

              • externalExecutionId (string) –

                The external ID of the run of the action.

              • externalExecutionUrl (string) –

                The URL of a resource external to Amazon Web Services that is used when running the action (for example, an external repository URL).

              • percentComplete (integer) –

                A percentage of completeness of the action as it runs.

              • errorDetails (dict) –

                The details of an error returned by a URL external to Amazon Web Services.

                • code (string) –

                  The system ID or number code of the error.

                • message (string) –

                  The text of the error message.

            • entityUrl (string) –

              A URL link for more information about the state of the action, such as a deployment group details page.

            • revisionUrl (string) –

              A URL link for more information about the revision, such as a commit details page.

        • latestExecution (dict) –

          Information about the latest execution in the stage, including its ID and status.

          • pipelineExecutionId (string) –

            The ID of the pipeline execution associated with the stage.

          • status (string) –

            The status of the stage, or for a completed stage, the last status of the stage.

            Note

            A status of cancelled means that the pipeline’s definition was updated before the stage execution could be completed.

          • type (string) –

            The type of pipeline execution for the stage, such as a rollback pipeline execution.

        • beforeEntryConditionState (dict) –

          The state of the entry conditions for a stage.

          • latestExecution (dict) –

            Represents information about the latest run of a condition for a stage.

            • status (string) –

              The status of a run of a condition for a stage.

            • summary (string) –

              A summary of the run of the condition for a stage.

          • conditionStates (list) –

            The states of the conditions for a run of a condition for a stage.

            • (dict) –

              Information about the state of the condition.

              • latestExecution (dict) –

                The state of the latest run of the rule.

                • status (string) –

                  The status of the run for a condition.

                • summary (string) –

                  The summary of information about a run for a condition.

                • lastStatusChange (datetime) –

                  The last status change of the condition.

              • ruleStates (list) –

                The state of the rules for the condition.

                • (dict) –

                  Returns information about the state of a rule.

                  Note

                  Values returned in the revisionId field indicate the rule revision information, such as the commit ID, for the current state.

                  • ruleName (string) –

                    The name of the rule.

                  • currentRevision (dict) –

                    The ID of the current revision of the artifact successfully worked on by the job.

                    • revisionId (string) –

                      The system-generated unique ID that identifies the revision number of the rule.

                    • revisionChangeId (string) –

                      The unique identifier of the change that set the state to this revision (for example, a deployment ID or timestamp).

                    • created (datetime) –

                      The date and time when the most recent version of the rule was created, in timestamp format.

                  • latestExecution (dict) –

                    Represents information about the latest run of an rule.

                    • ruleExecutionId (string) –

                      The execution ID for the run of the rule.

                    • status (string) –

                      The status of the run of the rule, such as FAILED.

                    • summary (string) –

                      A summary of the run of the rule.

                    • lastStatusChange (datetime) –

                      The last status change of the rule.

                    • token (string) –

                      The system-generated token used to identify a unique request.

                    • lastUpdatedBy (string) –

                      The ARN of the user who last changed the rule.

                    • externalExecutionId (string) –

                      The external ID of the run of the rule.

                    • externalExecutionUrl (string) –

                      The URL of a resource external to Amazon Web Services that is used when running the rule (for example, an external repository URL).

                    • 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.

                  • entityUrl (string) –

                    A URL link for more information about the state of the action, such as a details page.

                  • revisionUrl (string) –

                    A URL link for more information about the revision, such as a commit details page.

        • onSuccessConditionState (dict) –

          The state of the success conditions for a stage.

          • latestExecution (dict) –

            Represents information about the latest run of a condition for a stage.

            • status (string) –

              The status of a run of a condition for a stage.

            • summary (string) –

              A summary of the run of the condition for a stage.

          • conditionStates (list) –

            The states of the conditions for a run of a condition for a stage.

            • (dict) –

              Information about the state of the condition.

              • latestExecution (dict) –

                The state of the latest run of the rule.

                • status (string) –

                  The status of the run for a condition.

                • summary (string) –

                  The summary of information about a run for a condition.

                • lastStatusChange (datetime) –

                  The last status change of the condition.

              • ruleStates (list) –

                The state of the rules for the condition.

                • (dict) –

                  Returns information about the state of a rule.

                  Note

                  Values returned in the revisionId field indicate the rule revision information, such as the commit ID, for the current state.

                  • ruleName (string) –

                    The name of the rule.

                  • currentRevision (dict) –

                    The ID of the current revision of the artifact successfully worked on by the job.

                    • revisionId (string) –

                      The system-generated unique ID that identifies the revision number of the rule.

                    • revisionChangeId (string) –

                      The unique identifier of the change that set the state to this revision (for example, a deployment ID or timestamp).

                    • created (datetime) –

                      The date and time when the most recent version of the rule was created, in timestamp format.

                  • latestExecution (dict) –

                    Represents information about the latest run of an rule.

                    • ruleExecutionId (string) –

                      The execution ID for the run of the rule.

                    • status (string) –

                      The status of the run of the rule, such as FAILED.

                    • summary (string) –

                      A summary of the run of the rule.

                    • lastStatusChange (datetime) –

                      The last status change of the rule.

                    • token (string) –

                      The system-generated token used to identify a unique request.

                    • lastUpdatedBy (string) –

                      The ARN of the user who last changed the rule.

                    • externalExecutionId (string) –

                      The external ID of the run of the rule.

                    • externalExecutionUrl (string) –

                      The URL of a resource external to Amazon Web Services that is used when running the rule (for example, an external repository URL).

                    • 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.

                  • entityUrl (string) –

                    A URL link for more information about the state of the action, such as a details page.

                  • revisionUrl (string) –

                    A URL link for more information about the revision, such as a commit details page.

        • onFailureConditionState (dict) –

          The state of the failure conditions for a stage.

          • latestExecution (dict) –

            Represents information about the latest run of a condition for a stage.

            • status (string) –

              The status of a run of a condition for a stage.

            • summary (string) –

              A summary of the run of the condition for a stage.

          • conditionStates (list) –

            The states of the conditions for a run of a condition for a stage.

            • (dict) –

              Information about the state of the condition.

              • latestExecution (dict) –

                The state of the latest run of the rule.

                • status (string) –

                  The status of the run for a condition.

                • summary (string) –

                  The summary of information about a run for a condition.

                • lastStatusChange (datetime) –

                  The last status change of the condition.

              • ruleStates (list) –

                The state of the rules for the condition.

                • (dict) –

                  Returns information about the state of a rule.

                  Note

                  Values returned in the revisionId field indicate the rule revision information, such as the commit ID, for the current state.

                  • ruleName (string) –

                    The name of the rule.

                  • currentRevision (dict) –

                    The ID of the current revision of the artifact successfully worked on by the job.

                    • revisionId (string) –

                      The system-generated unique ID that identifies the revision number of the rule.

                    • revisionChangeId (string) –

                      The unique identifier of the change that set the state to this revision (for example, a deployment ID or timestamp).

                    • created (datetime) –

                      The date and time when the most recent version of the rule was created, in timestamp format.

                  • latestExecution (dict) –

                    Represents information about the latest run of an rule.

                    • ruleExecutionId (string) –

                      The execution ID for the run of the rule.

                    • status (string) –

                      The status of the run of the rule, such as FAILED.

                    • summary (string) –

                      A summary of the run of the rule.

                    • lastStatusChange (datetime) –

                      The last status change of the rule.

                    • token (string) –

                      The system-generated token used to identify a unique request.

                    • lastUpdatedBy (string) –

                      The ARN of the user who last changed the rule.

                    • externalExecutionId (string) –

                      The external ID of the run of the rule.

                    • externalExecutionUrl (string) –

                      The URL of a resource external to Amazon Web Services that is used when running the rule (for example, an external repository URL).

                    • 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.

                  • entityUrl (string) –

                    A URL link for more information about the state of the action, such as a details page.

                  • revisionUrl (string) –

                    A URL link for more information about the revision, such as a commit details page.

    • created (datetime) –

      The date and time the pipeline was created, in timestamp format.

    • updated (datetime) –

      The date and time the pipeline was last updated, in timestamp format.

Exceptions

  • CodePipeline.Client.exceptions.ValidationException

  • CodePipeline.Client.exceptions.PipelineNotFoundException