listHookResults method
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.
-
TypeArnonly: Returns summaries for a specific Hook. -
TypeArnandStatus: Returns summaries for a specific Hook filtered by status. -
TargetIdandTargetType: Returns summaries for a specific Hook invocation target.
May throw HookResultNotFoundException.
Parameter nextToken :
The token for the next set of items to return. (You received this token
from a previous call.)
Parameter status :
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.
Parameter targetId :
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.
Parameter targetType :
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.
Parameter typeArn :
Filters results by the ARN of the Hook. Can be used alone or in
combination with Status.
Implementation
Future<ListHookResultsOutput> listHookResults({
String? nextToken,
HookStatus? status,
String? targetId,
ListHookResultsTargetType? targetType,
String? typeArn,
}) async {
final $request = <String, String>{
if (nextToken != null) 'NextToken': nextToken,
if (status != null) 'Status': status.value,
if (targetId != null) 'TargetId': targetId,
if (targetType != null) 'TargetType': targetType.value,
if (typeArn != null) 'TypeArn': typeArn,
};
final $result = await _protocol.send(
$request,
action: 'ListHookResults',
version: '2010-05-15',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ListHookResultsResult',
);
return ListHookResultsOutput.fromXml($result);
}