hook_results
Creates, updates, deletes, gets or lists a hook_results resource.
Overview
| Name | hook_results |
| Type | Resource |
| Id | aws.cloudformation.hook_results |
Fields
The following fields are returned by SELECT queries:
- get_hook_result
- list_hook_results
| Name | Datatype | Description |
|---|---|---|
line_items | array |
| Name | Datatype | Description |
|---|---|---|
failure_mode | string | The failure mode of the invocation. |
hook_execution_target | string | The Amazon Resource Name (ARN) of the target stack or request token of the Cloud Control API operation. Only shown in responses when the request does not specify TargetType and TargetId filters. |
hook_result_id | string | The unique identifier for this Hook invocation result. |
hook_status_reason | string | A description of the Hook results status. For example, if the Hook result is in a failed state, this may contain additional information for the failed state. |
invocation_point | string | The specific point in the provisioning process where the Hook is invoked. |
invoked_at | string | The timestamp when the Hook was invoked. Only shown in responses when the request does not specify TargetType and TargetId filters. |
status | string | The status of the Hook invocation. The following statuses are possible: 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 | string | The unique identifier of the Hook invocation target. |
target_type | string | The target type that the Hook was invoked against. |
type_arn | string | The ARN of the Hook that was invoked. |
type_configuration_version_id | string | The version of the Hook configuration. |
type_name | string | The name of the Hook that was invoked. |
type_version_id | string | The version of the Hook that was invoked. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_hook_result | select | HookResultId, region | Retrieves detailed information and remediation guidance for a Hook invocation result. If the Hook uses a KMS key to encrypt annotations, callers of the GetHookResult operation must have kms:Decrypt permissions. For more information, see KMS key policy and permissions for encrypting CloudFormation Hooks results at rest in the CloudFormation Hooks User Guide. | |
list_hook_results | select | region | TargetType, TargetId, TypeArn, Status, NextToken | 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
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
HookResultId | string | The unique identifier (ID) of the Hook invocation result that you want details about. You can get the ID from the ListHookResults operation. |
region | string | AWS region (default: us-east-1) |
NextToken | string | The token for the next set of items to return. (You received this token from a previous call.) |
Status | string | 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. |
TargetId | string | 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. |
TargetType | string | 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. |
TypeArn | string | Filters results by the ARN of the Hook. Can be used alone or in combination with Status. |
SELECT examples
- get_hook_result
- list_hook_results
Retrieves detailed information and remediation guidance for a Hook invocation result. If the Hook uses a KMS key to encrypt annotations, callers of the GetHookResult operation must have kms:Decrypt permissions. For more information, see KMS key policy and permissions for encrypting CloudFormation Hooks results at rest in the CloudFormation Hooks User Guide.
SELECT
line_items
FROM aws.cloudformation.hook_results
WHERE HookResultId = '{{ HookResultId }}' -- required
AND region = '{{ region }}' -- required
;
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.
SELECT
failure_mode,
hook_execution_target,
hook_result_id,
hook_status_reason,
invocation_point,
invoked_at,
status,
target_id,
target_type,
type_arn,
type_configuration_version_id,
type_name,
type_version_id
FROM aws.cloudformation.hook_results
WHERE region = '{{ region }}' -- required
AND TargetType = '{{ TargetType }}'
AND TargetId = '{{ TargetId }}'
AND TypeArn = '{{ TypeArn }}'
AND Status = '{{ Status }}'
AND NextToken = '{{ NextToken }}'
;