Skip to content

CloudFormation  >  Operations  >  list_hook_results

list_hook_results

Operation

list_hook_results async

list_hook_results(input: ListHookResultsInput, plugins: list[Plugin] | None = None) -> ListHookResultsOutput

Returns summaries of invoked Hooks. For more information, see View invocation summaries for CloudFormation Hooks in the CloudFormation Hooks User Guide.

This operation supports the following parameter combinations:

  • No parameters: Returns all Hook invocation summaries.

  • TypeArn only: Returns summaries for a specific Hook.

  • TypeArn and Status: Returns summaries for a specific Hook filtered by status.

  • TargetId and TargetType: Returns summaries for a specific Hook invocation target.

Parameters:

Name Type Description Default
input ListHookResultsInput

An instance of ListHookResultsInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
ListHookResultsOutput

An instance of ListHookResultsOutput.

Input

ListHookResultsInput dataclass

Bases: _SerdeShape

Dataclass for ListHookResultsInput structure.

Attributes

next_token class-attribute instance-attribute
next_token: str | None = ...

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

status class-attribute instance-attribute
status: str | None = ...

Filters results by the status of Hook invocations. Can only be used in combination with TypeArn. Valid values are:

  • HOOK_IN_PROGRESS: The Hook is currently running.

  • HOOK_COMPLETE_SUCCEEDED: The Hook completed successfully.

  • HOOK_COMPLETE_FAILED: The Hook completed but failed validation.

  • HOOK_FAILED: The Hook encountered an error during execution.

target_id class-attribute instance-attribute
target_id: str | None = ...

Filters results by the unique identifier of the target the Hook was invoked against.

For change sets, this is the change set ARN. When the target is a Cloud Control API operation, this value must be the HookRequestToken returned by the Cloud Control API request. For more information on the HookRequestToken, see ProgressEvent.

Required when TargetType is specified and cannot be used otherwise.

target_type class-attribute instance-attribute
target_type: str | None = ...

Filters results by target type. Currently, only CHANGE_SET and CLOUD_CONTROL are supported filter options.

Required when TargetId is specified and cannot be used otherwise.

type_arn class-attribute instance-attribute
type_arn: str | None = ...

Filters results by the ARN of the Hook. Can be used alone or in combination with Status.

Output

ListHookResultsOutput dataclass

Bases: _SerdeShape

Dataclass for ListHookResultsOutput structure.

Attributes

hook_results class-attribute instance-attribute
hook_results: list[HookResultSummary] | None = ...

A list of HookResultSummary structures that provides the status and Hook status reason for each Hook invocation for the specified target.

next_token class-attribute instance-attribute
next_token: str | None = ...

Pagination token, null or empty if no more results.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

target_id class-attribute instance-attribute
target_id: str | None = ...

The unique identifier of the Hook invocation target.

target_type class-attribute instance-attribute
target_type: str | None = ...

The target type.