Skip to content

describe_events async

describe_events(
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    stack_name: Optional[StackNameOrId] = None,
    change_set_name: Optional[ChangeSetNameOrId] = None,
    operation_id: Optional[OperationId] = None,
    filters: Optional[EventFilter] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeEventsOutput

Returns CloudFormation events based on flexible query criteria. Groups events by operation ID, enabling you to focus on individual stack operations during deployment.

An operation is any action performed on a stack, including stack lifecycle actions (Create, Update, Delete, Rollback), change set creation, nested stack creation, and automatic rollbacks triggered by failures. Each operation has a unique identifier (Operation ID) and represents a discrete change attempt on the stack.

Returns different types of events including:

  • Progress events - Status updates during stack operation execution.

  • Validation errors - Failures from CloudFormation Early Validations.

  • Provisioning errors - Resource creation and update failures.

  • Hook invocation errors - Failures from CloudFormation Hook during stack operations.

One of ChangeSetName, OperationId or StackName must be specified as input.

Parameters:

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

    The name or unique stack ID for which you want to retrieve events. If you specified the name of a change set, specify the stack name or ID (ARN) of the change set you want to describe.

  • change_set_name (Optional[ChangeSetNameOrId], default: None ) –

    The name or Amazon Resource Name (ARN) of the change set for which you want to retrieve events.

  • operation_id (Optional[OperationId], default: None ) –

    The unique identifier of the operation for which you want to retrieve events.

  • filters (Optional[EventFilter], default: None ) –

    Filters to apply when retrieving events.

  • 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_events(
    self,
    *,
    config_overrides: Optional[AsyncCloudFormationClientConfig] = None,
    stack_name: Optional[
        "capo_cloudformation.types.stack_name_or_id.StackNameOrId"
    ] = None,
    change_set_name: Optional[
        "capo_cloudformation.types.change_set_name_or_id.ChangeSetNameOrId"
    ] = None,
    operation_id: Optional[
        "capo_cloudformation.types.operation_id.OperationId"
    ] = None,
    filters: Optional["capo_cloudformation.types.event_filter.EventFilter"] = None,
    next_token: Optional["capo_cloudformation.types.next_token.NextToken"] = None,
) -> "capo_cloudformation.types.describe_events_output.DescribeEventsOutput":
    """<p>Returns CloudFormation events based on flexible query criteria. Groups events by operation ID, enabling you to focus on individual stack operations during deployment.</p> <p>An operation is any action performed on a stack, including stack lifecycle actions (Create, Update, Delete, Rollback), change set creation, nested stack creation, and automatic rollbacks triggered by failures. Each operation has a unique identifier (Operation ID) and represents a discrete change attempt on the stack.</p> <p>Returns different types of events including:</p> <ul> <li> <p> <b>Progress events</b> - Status updates during stack operation execution.</p> </li> <li> <p> <b>Validation errors</b> - Failures from CloudFormation Early Validations.</p> </li> <li> <p> <b>Provisioning errors</b> - Resource creation and update failures.</p> </li> <li> <p> <b>Hook invocation errors</b> - Failures from CloudFormation Hook during stack operations.</p> </li> </ul> <note> <p>One of <code>ChangeSetName</code>, <code>OperationId</code> or <code>StackName</code> must be specified as input.</p> </note>

    Args:
        stack_name: <p>The name or unique stack ID for which you want to retrieve events. If you specified the name of a change set, specify the stack name or ID (ARN) of the change set you want to describe.</p>
        change_set_name: <p>The name or Amazon Resource Name (ARN) of the change set for which you want to retrieve events.</p>
        operation_id: <p>The unique identifier of the operation for which you want to retrieve events.</p>
        filters: <p>Filters to apply when retrieving events.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudformation.types.describe_events_input.DescribeEventsInput]",
    ) -> AsyncOperationResponse[
        "capo_cloudformation.types.describe_events_output.DescribeEventsOutput"
    ]:
        import capo_cloudformation._operations.cloud_formation.describe_events

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeEvents")
    )
    input_: capo_cloudformation.types.describe_events_input.DescribeEventsInput = {}
    if stack_name is not None:
        input_["stack_name"] = stack_name
    if change_set_name is not None:
        input_["change_set_name"] = change_set_name
    if operation_id is not None:
        input_["operation_id"] = operation_id
    if filters is not None:
        input_["filters"] = filters
    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