Skip to content

list_change_sets

list_change_sets(
    *,
    config_overrides: Optional[CloudFormationClientConfig] = None,
    stack_name: Optional[StackNameOrId] = None,
    next_token: Optional[NextToken] = None,
) -> ListChangeSetsOutput

Returns the ID and status of each active change set for a stack. For example, CloudFormation lists change sets that are in the CREATE_IN_PROGRESS or CREATE_PENDING state.

Parameters:

  • stack_name (Optional[StackNameOrId], default: None ) –

    The name or the Amazon Resource Name (ARN) of the stack for which you want to list change sets.

  • next_token (Optional[NextToken], default: None ) –

    The token for the next set of items to return. (You received this token from a previous call.)

Raises:

Source code in docs_src/capo_cloudformation/_services/cloud_formation.py
def list_change_sets(
    self,
    *,
    config_overrides: Optional[CloudFormationClientConfig] = None,
    stack_name: Optional[
        "capo_cloudformation.types.stack_name_or_id.StackNameOrId"
    ] = None,
    next_token: Optional["capo_cloudformation.types.next_token.NextToken"] = None,
) -> "capo_cloudformation.types.list_change_sets_output.ListChangeSetsOutput":
    """<p>Returns the ID and status of each active change set for a stack. For example, CloudFormation lists change sets that are in the <code>CREATE_IN_PROGRESS</code> or <code>CREATE_PENDING</code> state.</p>

    Args:
        stack_name: <p>The name or the Amazon Resource Name (ARN) of the stack for which you want to list change sets.</p>
        next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>

    Raises:
        capo_cloudformation.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_cloudformation.types.list_change_sets_input.ListChangeSetsInput]",
    ) -> OperationResponse[
        "capo_cloudformation.types.list_change_sets_output.ListChangeSetsOutput"
    ]:
        import capo_cloudformation._operations.cloud_formation.list_change_sets

        output, http_response = (
            capo_cloudformation._operations.cloud_formation.list_change_sets.list_change_sets(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListChangeSets")
    )
    input_: capo_cloudformation.types.list_change_sets_input.ListChangeSetsInput = {}
    if stack_name is not None:
        input_["stack_name"] = stack_name
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output