sceptre.plan package¶
Submodules¶
sceptre.plan.actions module¶
sceptre.plan.actions
This module implements the StackActions class which provides the functionality available to a Stack.
- class sceptre.plan.actions.StackActions(stack)[source]¶
Bases:
object
StackActions stores the operations a Stack can take, such as creating or deleting the Stack.
- Parameters
stack (sceptre.stack.Stack) – A Stack object
- cancel_stack_update()[source]¶
Cancels a Stack update.
- Returns
The cancelled Stack status.
- Return type
- change_set_creation_failed_due_to_no_changes(reason)[source]¶
Indicates the change set failed when it was created because there were actually no changes introduced from the change set.
- continue_update_rollback()[source]¶
Rolls back a Stack in the UPDATE_ROLLBACK_FAILED state to UPDATE_ROLLBACK_COMPLETE.
- create_change_set(change_set_name)[source]¶
Creates a Change Set with the name
change_set_name
.- Parameters
change_set_name (str) – The name of the Change Set.
- delete_change_set(change_set_name)[source]¶
Deletes the Change Set
change_set_name
.- Parameters
change_set_name (str) – The name of the Change Set.
- describe()[source]¶
Returns the a description of the Stack.
- Returns
A Stack description.
- Return type
- describe_events()[source]¶
Returns the CloudFormation events for a Stack.
- Returns
CloudFormation events for a Stack.
- Return type
- describe_resources()[source]¶
Returns the logical and physical resource IDs of the Stack’s resources.
- Returns
Information about the Stack’s resources.
- Return type
- diff(stack_differ)[source]¶
Returns a diff of local and deployed template and stack configuration using a specific diff library.
- Parameters
stack_differ (
StackDiffer
) – The differ to use- Return type
- Returns
A StackDiff object with the full, computed diff
- estimate_cost()[source]¶
Estimates a Stack’s cost.
- Returns
An estimate of the Stack’s cost.
- Return type
- Raises
botocore.exceptions.ClientError
- generate()[source]¶
Returns the Template for the Stack
Deprecated since version 4.2.0: This will be removed in 5.0.0. Use dump template instead.
- launch()[source]¶
Launches the Stack.
If the Stack status is create_failed or rollback_complete, the Stack is deleted. Launch then tries to create or update the Stack, depending if it already exists. If there are no updates to be performed, launch exits gracefully.
- Return type
- Returns
The Stack’s status.
- set_policy(policy_path)[source]¶
Applies a Stack Policy.
- Parameters
policy_path (str) – The relative path of JSON file containing the AWS Policy to apply.
- validate()[source]¶
Validates the Stack’s CloudFormation Template.
Raises an error if the Template is invalid.
- Returns
Validation information about the Template.
- Return type
- Raises
botocore.exceptions.ClientError
sceptre.plan.executor module¶
sceptre.plan.executor
This module implements a SceptrePlanExecutor, which is responsible for executing the command specified in a SceptrePlan.
sceptre.plan.plan module¶
sceptre.plan.plan
This module implements a SceptrePlan, which is responsible for holding all nessessary information for a command to execute.
- class sceptre.plan.plan.SceptrePlan(context)[source]¶
Bases:
object
- cancel_stack_update(*args)[source]¶
Cancels a Stack update.
- Returns
A dictionary of Stacks and their cancelled statuses.
- Return type
- continue_update_rollback(*args)[source]¶
Rolls back a Stack in the UPDATE_ROLLBACK_FAILED state to UPDATE_ROLLBACK_COMPLETE.
- Returns
A dictionary of Stacks
- Return type
- create(*args)[source]¶
Creates the Stack.
- Returns
A dictionary of Stacks and their status.
- Return type
- delete(*args)[source]¶
Deletes the Stack.
- Returns
A dictionary of Stacks and their status.
- Return type
- describe(*args)[source]¶
Returns the a description of the Stack.
- Returns
A dictionary of Stacks and their description.
- Return type
- describe_events(*args)[source]¶
Returns a dictionary contianing the Stack events.
- Returns
A dictionary of Stacks and their CloudFormation events.
- Return type
- describe_outputs(*args)[source]¶
Returns a list of Stack outputs.
- Returns
A dictionary of Stacks and their outputs.
- Return type
- describe_resources(*args)[source]¶
Returns the logical and physical resource IDs of the Stack’s resources.
- Returns
A dictionary of Stacks and their resources.
- Return type
- estimate_cost(*args)[source]¶
Estimates a Stack’s cost.
- Returns
A dictionary of Stacks and their estimated costs.
- Return type
- Raises
botocore.exceptions.ClientError
- fetch_remote_template(*args)[source]¶
Returns a generated Template for a given Stack
- Returns
A list of Stacks and their template body.
- Return type
List[str]
- generate(*args)[source]¶
Returns a generated Template for a given Stack
- Returns
A dictionary of Stacks and their template body.
- Return type
Deprecated since version 4.2.0: This will be removed in 5.0.0. Use dump template instead.
- get_policy(*args)[source]¶
Returns a Stack’s policy.
- Returns
A dictionary of Stacks and their Stack policy.
- Return type
- get_status(*args)[source]¶
Returns the Stack’s status.
- Returns
A dictionary of Stacks and their status.
- Return type
- Raises
sceptre.exceptions.StackDoesNotExistError
- launch(*args)[source]¶
Launches the Stack.
If the Stack status is create_failed or rollback_complete, the Stack is deleted. Launch then tries to create or update the Stack, depending if it already exists. If there are no updates to be performed, launch exits gracefully.
- Returns
A dictionary of Stacks and their status.
- Return type
- list_change_sets(*args)[source]¶
Lists the Stack’s Change Sets.
- Returns
TA dictionary of Stacks and their Change Sets.
- Return type
- lock(*args)[source]¶
Locks the Stack by applying a deny all updates Stack policy.
- Returns
A dictionary of Stacks
- Return type
- template(*args)[source]¶
Returns the CloudFormation Template used to create the Stack.
- Returns
A dictionary of Stacks and their templates.
- Return type
- unlock(*args)[source]¶
Unlocks the Stack by applying an allow all updates Stack policy.
- Returns
A dictionary of Stacks
- Return type
- update(*args)[source]¶
Updates the Stack.
- Returns
A dictionary of Stacks and their status.
- Return type
- validate(*args)[source]¶
Validates the Stack’s CloudFormation template.
Raises an error if the Template is invalid.
- Returns
A dictionary of Stacks and their template validation information.
- Return type
- Raises
botocore.exceptions.ClientError