Skip to content

describe_stack_events async

describe_stack_events(
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    stack_name: Optional[StackName] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeStackEventsOutput

Returns all stack related events for a specified stack in reverse chronological order. For more information about a stack's event history, see Understand CloudFormation stack creation events in the CloudFormation User Guide.

You can list events for stacks that have failed to create or have been deleted by specifying the unique stack identifier (stack ID).

Parameters:

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

    The name or the unique stack ID that's associated with the stack, which aren't always interchangeable:

    • Running stacks: You can specify either the stack's name or its unique stack ID.

    • Deleted stacks: You must specify the unique stack ID.

  • 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/async_cloud_formation.py
async def describe_stack_events(
    self,
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    stack_name: Optional["capo_cloudformation.types.stack_name.StackName"] = None,
    next_token: Optional["capo_cloudformation.types.next_token.NextToken"] = None,
) -> "capo_cloudformation.types.describe_stack_events_output.DescribeStackEventsOutput":
    """<p>Returns all stack related events for a specified stack in reverse chronological order. For more information about a stack's event history, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-resource-configuration-complete.html">Understand CloudFormation stack creation events</a> in the <i>CloudFormation User Guide</i>.</p> <note> <p>You can list events for stacks that have failed to create or have been deleted by specifying the unique stack identifier (stack ID).</p> </note>

    Args:
        stack_name: <p>The name or the unique stack ID that's associated with the stack, which aren't always interchangeable:</p> <ul> <li> <p>Running stacks: You can specify either the stack's name or its unique stack ID.</p> </li> <li> <p>Deleted stacks: You must specify the unique stack ID.</p> </li> </ul>
        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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudformation.types.describe_stack_events_input.DescribeStackEventsInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudformation.types.describe_stack_events_output.DescribeStackEventsOutput"
    ]:
        import capo_cloudformation._operations.cloud_formation.describe_stack_events

        (
            output,
            http_response,
        ) = await capo_cloudformation._operations.cloud_formation.describe_stack_events.async_describe_stack_events(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output