stack_refactors
Creates, updates, deletes, gets or lists a stack_refactors resource.
Overview
| Name | stack_refactors |
| Type | Resource |
| Id | aws.cloudformation.stack_refactors |
Fields
The following fields are returned by SELECT queries:
- describe_stack_refactor
- list_stack_refactors
| Name | Datatype | Description |
|---|---|---|
stack_refactor_id | string | The ID associated with the stack refactor created from the CreateStackRefactor action. |
description | string | A description to help you identify the refactor. |
execution_status | string | The stack refactor execution operation status that's provided after calling the ExecuteStackRefactor action. |
execution_status_reason | string | A detailed explanation for the stack refactor ExecutionStatus. |
stack_ids | array | The unique ID for each stack. |
status | string | The stack refactor operation status that's provided after calling the CreateStackRefactor action. |
status_reason | string | A detailed explanation for the stack refactor operation Status. |
| Name | Datatype | Description |
|---|---|---|
description | string | A description to help you identify the refactor. |
execution_status | string | The operation status that's provided after calling the ExecuteStackRefactor action. |
execution_status_reason | string | A detailed explanation for the stack refactor ExecutionStatus. |
stack_refactor_id | string | The ID associated with the stack refactor created from the CreateStackRefactor action. |
status | string | The stack refactor operation status that's provided after calling the CreateStackRefactor action. |
status_reason | string | A detailed explanation for the stack refactor Status. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_stack_refactor | select | StackRefactorId, region | Describes the stack refactor status. | |
list_stack_refactors | select | region | ExecutionStatusFilter, NextToken, MaxResults | Lists all account stack refactor operations and their statuses. |
create_stack_refactor | insert | StackDefinitions, region | Description, EnableStackCreation, ResourceMappings | Creates a refactor across multiple stacks, with the list of stacks and resources that are affected. |
execute_stack_refactor | exec | StackRefactorId, region | Executes the stack refactor operation. |
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 |
|---|---|---|
StackDefinitions | array | The stacks being refactored. |
StackRefactorId | string | The ID associated with the stack refactor created from the CreateStackRefactor action. |
region | string | AWS region (default: us-east-1) |
Description | string | A description to help you identify the stack refactor. |
EnableStackCreation | boolean | Determines if a new stack is created with the refactor. |
ExecutionStatusFilter | array | Execution status to use as a filter. Specify one or more execution status codes to list only stack refactors with the specified execution status codes. |
MaxResults | integer | The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a NextToken value that you can assign to the NextToken request parameter to get the next set of results. |
NextToken | string | The token for the next set of items to return. (You received this token from a previous call.) |
ResourceMappings | array | The mappings for the stack resource Source and stack resource Destination. |
SELECT examples
- describe_stack_refactor
- list_stack_refactors
Describes the stack refactor status.
SELECT
stack_refactor_id,
description,
execution_status,
execution_status_reason,
stack_ids,
status,
status_reason
FROM aws.cloudformation.stack_refactors
WHERE StackRefactorId = '{{ StackRefactorId }}' -- required
AND region = '{{ region }}' -- required
;
Lists all account stack refactor operations and their statuses.
SELECT
description,
execution_status,
execution_status_reason,
stack_refactor_id,
status,
status_reason
FROM aws.cloudformation.stack_refactors
WHERE region = '{{ region }}' -- required
AND ExecutionStatusFilter = '{{ ExecutionStatusFilter }}'
AND NextToken = '{{ NextToken }}'
AND MaxResults = '{{ MaxResults }}'
;
INSERT examples
- create_stack_refactor
- Manifest
Creates a refactor across multiple stacks, with the list of stacks and resources that are affected.
INSERT INTO aws.cloudformation.stack_refactors (
StackDefinitions,
region,
Description,
EnableStackCreation,
ResourceMappings
)
SELECT
'{{ StackDefinitions }}',
'{{ region }}',
'{{ Description }}',
'{{ EnableStackCreation }}',
'{{ ResourceMappings }}'
RETURNING
line_items
;
# Description fields are for documentation purposes
- name: stack_refactors
props:
- name: StackDefinitions
value: "{{ StackDefinitions }}"
description: Required parameter for the stack_refactors resource.
- name: region
value: "{{ region }}"
description: Required parameter for the stack_refactors resource.
- name: Description
value: "{{ Description }}"
description: A description to help you identify the stack refactor.
description: A description to help you identify the stack refactor.
- name: EnableStackCreation
value: {{ EnableStackCreation }}
description: Determines if a new stack is created with the refactor.
description: Determines if a new stack is created with the refactor.
- name: ResourceMappings
value: "{{ ResourceMappings }}"
description: The mappings for the stack resource Source and stack resource Destination.
description: The mappings for the stack resource Source and stack resource Destination.
Lifecycle Methods
- execute_stack_refactor
Executes the stack refactor operation.
EXEC aws.cloudformation.stack_refactors.execute_stack_refactor
@StackRefactorId='{{ StackRefactorId }}' --required,
@region='{{ region }}' --required
;