CloudFormation class

AWS CloudFormation allows you to create and manage AWS infrastructure deployments predictably and repeatedly. You can use AWS CloudFormation to leverage AWS products, such as Amazon Elastic Compute Cloud, Amazon Elastic Block Store, Amazon Simple Notification Service, Elastic Load Balancing, and Auto Scaling to build highly-reliable, highly scalable, cost-effective applications without creating or configuring the underlying AWS infrastructure.

Constructors

CloudFormation({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shapes Map<String, Shape>
final

Methods

cancelUpdateStack({required String stackName, String? clientRequestToken}) Future<void>
Cancels an update on the specified stack. If the call completes successfully, the stack rolls back the update and reverts to the previous stack configuration.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
continueUpdateRollback({required String stackName, String? clientRequestToken, List<String>? resourcesToSkip, String? roleARN}) Future<void>
For a specified stack that is in the UPDATE_ROLLBACK_FAILED state, continues rolling it back to the UPDATE_ROLLBACK_COMPLETE state. Depending on the cause of the failure, you can manually fix the error and continue the rollback. By continuing the rollback, you can return your stack to a working state (the UPDATE_ROLLBACK_COMPLETE state), and then try to update the stack again.
createChangeSet({required String changeSetName, required String stackName, List<Capability>? capabilities, ChangeSetType? changeSetType, String? clientToken, String? description, bool? includeNestedStacks, List<String>? notificationARNs, List<Parameter>? parameters, List<String>? resourceTypes, List<ResourceToImport>? resourcesToImport, String? roleARN, RollbackConfiguration? rollbackConfiguration, List<Tag>? tags, String? templateBody, String? templateURL, bool? usePreviousTemplate}) Future<CreateChangeSetOutput>
Creates a list of changes that will be applied to a stack so that you can review the changes before executing them. You can create a change set for a stack that doesn't exist or an existing stack. If you create a change set for a stack that doesn't exist, the change set shows all of the resources that AWS CloudFormation will create. If you create a change set for an existing stack, AWS CloudFormation compares the stack's information with the information that you submit in the change set and lists the differences. Use change sets to understand which resources AWS CloudFormation will create or change, and how it will change resources in an existing stack, before you create or update a stack.
createStack({required String stackName, List<Capability>? capabilities, String? clientRequestToken, bool? disableRollback, bool? enableTerminationProtection, List<String>? notificationARNs, OnFailure? onFailure, List<Parameter>? parameters, List<String>? resourceTypes, String? roleARN, RollbackConfiguration? rollbackConfiguration, String? stackPolicyBody, String? stackPolicyURL, List<Tag>? tags, String? templateBody, String? templateURL, int? timeoutInMinutes}) Future<CreateStackOutput>
Creates a stack as specified in the template. After the call completes successfully, the stack creation starts. You can check the status of the stack via the DescribeStacks API.
createStackInstances({required List<String> regions, required String stackSetName, List<String>? accounts, DeploymentTargets? deploymentTargets, String? operationId, StackSetOperationPreferences? operationPreferences, List<Parameter>? parameterOverrides}) Future<CreateStackInstancesOutput>
Creates stack instances for the specified accounts, within the specified Regions. A stack instance refers to a stack in a specific account and Region. You must specify at least one value for either Accounts or DeploymentTargets, and you must specify at least one value for Regions.
createStackSet({required String stackSetName, String? administrationRoleARN, AutoDeployment? autoDeployment, List<Capability>? capabilities, String? clientRequestToken, String? description, String? executionRoleName, List<Parameter>? parameters, PermissionModels? permissionModel, List<Tag>? tags, String? templateBody, String? templateURL}) Future<CreateStackSetOutput>
Creates a stack set.
deleteChangeSet({required String changeSetName, String? stackName}) Future<void>
Deletes the specified change set. Deleting change sets ensures that no one executes the wrong change set.
deleteStack({required String stackName, String? clientRequestToken, List<String>? retainResources, String? roleARN}) Future<void>
Deletes a specified stack. Once the call completes successfully, stack deletion starts. Deleted stacks do not show up in the DescribeStacks API if the deletion has been completed successfully.
deleteStackInstances({required List<String> regions, required bool retainStacks, required String stackSetName, List<String>? accounts, DeploymentTargets? deploymentTargets, String? operationId, StackSetOperationPreferences? operationPreferences}) Future<DeleteStackInstancesOutput>
Deletes stack instances for the specified accounts, in the specified Regions.
deleteStackSet({required String stackSetName}) Future<void>
Deletes a stack set. Before you can delete a stack set, all of its member stack instances must be deleted. For more information about how to do this, see DeleteStackInstances.
deregisterType({String? arn, RegistryType? type, String? typeName, String? versionId}) Future<void>
Removes a type or type version from active use in the CloudFormation registry. If a type or type version is deregistered, it cannot be used in CloudFormation operations.
describeAccountLimits({String? nextToken}) Future<DescribeAccountLimitsOutput>
Retrieves your account's AWS CloudFormation limits, such as the maximum number of stacks that you can create in your account. For more information about account limits, see AWS CloudFormation Limits in the AWS CloudFormation User Guide.
describeChangeSet({required String changeSetName, String? nextToken, String? stackName}) Future<DescribeChangeSetOutput>
Returns the inputs for the change set and a list of changes that AWS CloudFormation will make if you execute the change set. For more information, see Updating Stacks Using Change Sets in the AWS CloudFormation User Guide.
describeStackDriftDetectionStatus({required String stackDriftDetectionId}) Future<DescribeStackDriftDetectionStatusOutput>
Returns information about a stack drift detection operation. A stack drift detection operation detects whether a stack's actual configuration differs, or has drifted, from it's expected configuration, as defined in the stack template and any values specified as template parameters. A stack is considered to have drifted if one or more of its resources have drifted. For more information on stack and resource drift, see Detecting Unregulated Configuration Changes to Stacks and Resources.
describeStackEvents({String? nextToken, String? stackName}) Future<DescribeStackEventsOutput>
Returns all stack related events for a specified stack in reverse chronological order. For more information about a stack's event history, go to Stacks in the AWS CloudFormation User Guide.
describeStackInstance({required String stackInstanceAccount, required String stackInstanceRegion, required String stackSetName}) Future<DescribeStackInstanceOutput>
Returns the stack instance that's associated with the specified stack set, AWS account, and Region.
describeStackResource({required String logicalResourceId, required String stackName}) Future<DescribeStackResourceOutput>
Returns a description of the specified resource in the specified stack.
describeStackResourceDrifts({required String stackName, int? maxResults, String? nextToken, List<StackResourceDriftStatus>? stackResourceDriftStatusFilters}) Future<DescribeStackResourceDriftsOutput>
Returns drift information for the resources that have been checked for drift in the specified stack. This includes actual and expected configuration values for resources where AWS CloudFormation detects configuration drift.
describeStackResources({String? logicalResourceId, String? physicalResourceId, String? stackName}) Future<DescribeStackResourcesOutput>
Returns AWS resource descriptions for running and deleted stacks. If StackName is specified, all the associated resources that are part of the stack are returned. If PhysicalResourceId is specified, the associated resources of the stack that the resource belongs to are returned. For deleted stacks, DescribeStackResources returns resource information for up to 90 days after the stack has been deleted.
describeStacks({String? nextToken, String? stackName}) Future<DescribeStacksOutput>
Returns the description for the specified stack; if no stack name was specified, then it returns the description for all the stacks created.
describeStackSet({required String stackSetName}) Future<DescribeStackSetOutput>
Returns the description of the specified stack set.
describeStackSetOperation({required String operationId, required String stackSetName}) Future<DescribeStackSetOperationOutput>
Returns the description of the specified stack set operation.
describeType({String? arn, RegistryType? type, String? typeName, String? versionId}) Future<DescribeTypeOutput>
Returns detailed information about a type that has been registered.
describeTypeRegistration({required String registrationToken}) Future<DescribeTypeRegistrationOutput>
Returns information about a type's registration, including its current status and type and version identifiers.
detectStackDrift({required String stackName, List<String>? logicalResourceIds}) Future<DetectStackDriftOutput>
Detects whether a stack's actual configuration differs, or has drifted, from it's expected configuration, as defined in the stack template and any values specified as template parameters. For each resource in the stack that supports drift detection, AWS CloudFormation compares the actual configuration of the resource with its expected template configuration. Only resource properties explicitly defined in the stack template are checked for drift. A stack is considered to have drifted if one or more of its resources differ from their expected template configurations. For more information, see Detecting Unregulated Configuration Changes to Stacks and Resources.
detectStackResourceDrift({required String logicalResourceId, required String stackName}) Future<DetectStackResourceDriftOutput>
Returns information about whether a resource's actual configuration differs, or has drifted, from it's expected configuration, as defined in the stack template and any values specified as template parameters. This information includes actual and expected property values for resources in which AWS CloudFormation detects drift. Only resource properties explicitly defined in the stack template are checked for drift. For more information about stack and resource drift, see Detecting Unregulated Configuration Changes to Stacks and Resources.
detectStackSetDrift({required String stackSetName, String? operationId, StackSetOperationPreferences? operationPreferences}) Future<DetectStackSetDriftOutput>
Detect drift on a stack set. When CloudFormation performs drift detection on a stack set, it performs drift detection on the stack associated with each stack instance in the stack set. For more information, see How CloudFormation Performs Drift Detection on a Stack Set.
estimateTemplateCost({List<Parameter>? parameters, String? templateBody, String? templateURL}) Future<EstimateTemplateCostOutput>
Returns the estimated monthly cost of a template. The return value is an AWS Simple Monthly Calculator URL with a query string that describes the resources required to run the template.
executeChangeSet({required String changeSetName, String? clientRequestToken, String? stackName}) Future<void>
Updates a stack using the input information that was provided when the specified change set was created. After the call successfully completes, AWS CloudFormation starts updating the stack. Use the DescribeStacks action to view the status of the update.
getStackPolicy({required String stackName}) Future<GetStackPolicyOutput>
Returns the stack policy for a specified stack. If a stack doesn't have a policy, a null value is returned.
getTemplate({String? changeSetName, String? stackName, TemplateStage? templateStage}) Future<GetTemplateOutput>
Returns the template body for a specified stack. You can get the template for running or deleted stacks.
getTemplateSummary({String? stackName, String? stackSetName, String? templateBody, String? templateURL}) Future<GetTemplateSummaryOutput>
Returns information about a new or existing template. The GetTemplateSummary action is useful for viewing parameter information, such as default parameter values and parameter types, before you create or update a stack or stack set.
listChangeSets({required String stackName, String? nextToken}) Future<ListChangeSetsOutput>
Returns the ID and status of each active change set for a stack. For example, AWS CloudFormation lists change sets that are in the CREATE_IN_PROGRESS or CREATE_PENDING state.
listExports({String? nextToken}) Future<ListExportsOutput>
Lists all exported output values in the account and Region in which you call this action. Use this action to see the exported output values that you can import into other stacks. To import values, use the Fn::ImportValue function.
listImports({required String exportName, String? nextToken}) Future<ListImportsOutput>
Lists all stacks that are importing an exported output value. To modify or remove an exported output value, first use this action to see which stacks are using it. To see the exported output values in your account, see ListExports.
listStackInstances({required String stackSetName, List<StackInstanceFilter>? filters, int? maxResults, String? nextToken, String? stackInstanceAccount, String? stackInstanceRegion}) Future<ListStackInstancesOutput>
Returns summary information about stack instances that are associated with the specified stack set. You can filter for stack instances that are associated with a specific AWS account name or Region, or that have a specific status.
listStackResources({required String stackName, String? nextToken}) Future<ListStackResourcesOutput>
Returns descriptions of all resources of the specified stack.
listStacks({String? nextToken, List<StackStatus>? stackStatusFilter}) Future<ListStacksOutput>
Returns the summary information for stacks whose status matches the specified StackStatusFilter. Summary information for stacks that have been deleted is kept for 90 days after the stack is deleted. If no StackStatusFilter is specified, summary information for all stacks is returned (including existing stacks and stacks that have been deleted).
listStackSetOperationResults({required String operationId, required String stackSetName, int? maxResults, String? nextToken}) Future<ListStackSetOperationResultsOutput>
Returns summary information about the results of a stack set operation.
listStackSetOperations({required String stackSetName, int? maxResults, String? nextToken}) Future<ListStackSetOperationsOutput>
Returns summary information about operations performed on a stack set.
listStackSets({int? maxResults, String? nextToken, StackSetStatus? status}) Future<ListStackSetsOutput>
Returns summary information about stack sets that are associated with the user.
listTypeRegistrations({int? maxResults, String? nextToken, RegistrationStatus? registrationStatusFilter, RegistryType? type, String? typeArn, String? typeName}) Future<ListTypeRegistrationsOutput>
Returns a list of registration tokens for the specified type(s).
listTypes({DeprecatedStatus? deprecatedStatus, int? maxResults, String? nextToken, ProvisioningType? provisioningType, RegistryType? type, Visibility? visibility}) Future<ListTypesOutput>
Returns summary information about types that have been registered with CloudFormation.
listTypeVersions({String? arn, DeprecatedStatus? deprecatedStatus, int? maxResults, String? nextToken, RegistryType? type, String? typeName}) Future<ListTypeVersionsOutput>
Returns summary information about the versions of a type.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordHandlerProgress({required String bearerToken, required OperationStatus operationStatus, String? clientRequestToken, OperationStatus? currentOperationStatus, HandlerErrorCode? errorCode, String? resourceModel, String? statusMessage}) Future<void>
Reports progress of a resource handler to CloudFormation.
registerType({required String schemaHandlerPackage, required String typeName, String? clientRequestToken, String? executionRoleArn, LoggingConfig? loggingConfig, RegistryType? type}) Future<RegisterTypeOutput>
Registers a type with the CloudFormation service. Registering a type makes it available for use in CloudFormation templates in your AWS account, and includes:
setStackPolicy({required String stackName, String? stackPolicyBody, String? stackPolicyURL}) Future<void>
Sets a stack policy for a specified stack.
setTypeDefaultVersion({String? arn, RegistryType? type, String? typeName, String? versionId}) Future<void>
Specify the default version of a type. The default version of a type will be used in CloudFormation operations.
signalResource({required String logicalResourceId, required String stackName, required ResourceSignalStatus status, required String uniqueId}) Future<void>
Sends a signal to the specified resource with a success or failure status. You can use the SignalResource API in conjunction with a creation policy or update policy. AWS CloudFormation doesn't proceed with a stack creation or update until resources receive the required number of signals or the timeout period is exceeded. The SignalResource API is useful in cases where you want to send signals from anywhere other than an Amazon EC2 instance.
stopStackSetOperation({required String operationId, required String stackSetName}) Future<void>
Stops an in-progress operation on a stack set and its associated stack instances.
toString() String
A string representation of this object.
inherited
updateStack({required String stackName, List<Capability>? capabilities, String? clientRequestToken, List<String>? notificationARNs, List<Parameter>? parameters, List<String>? resourceTypes, String? roleARN, RollbackConfiguration? rollbackConfiguration, String? stackPolicyBody, String? stackPolicyDuringUpdateBody, String? stackPolicyDuringUpdateURL, String? stackPolicyURL, List<Tag>? tags, String? templateBody, String? templateURL, bool? usePreviousTemplate}) Future<UpdateStackOutput>
Updates a stack as specified in the template. After the call completes successfully, the stack update starts. You can check the status of the stack via the DescribeStacks action.
updateStackInstances({required List<String> regions, required String stackSetName, List<String>? accounts, DeploymentTargets? deploymentTargets, String? operationId, StackSetOperationPreferences? operationPreferences, List<Parameter>? parameterOverrides}) Future<UpdateStackInstancesOutput>
Updates the parameter values for stack instances for the specified accounts, within the specified Regions. A stack instance refers to a stack in a specific account and Region.
updateStackSet({required String stackSetName, List<String>? accounts, String? administrationRoleARN, AutoDeployment? autoDeployment, List<Capability>? capabilities, DeploymentTargets? deploymentTargets, String? description, String? executionRoleName, String? operationId, StackSetOperationPreferences? operationPreferences, List<Parameter>? parameters, PermissionModels? permissionModel, List<String>? regions, List<Tag>? tags, String? templateBody, String? templateURL, bool? usePreviousTemplate}) Future<UpdateStackSetOutput>
Updates the stack set, and associated stack instances in the specified accounts and Regions.
updateTerminationProtection({required bool enableTerminationProtection, required String stackName}) Future<UpdateTerminationProtectionOutput>
Updates termination protection for the specified stack. If a user attempts to delete a stack with termination protection enabled, the operation fails and the stack remains unchanged. For more information, see Protecting a Stack From Being Deleted in the AWS CloudFormation User Guide.
validateTemplate({String? templateBody, String? templateURL}) Future<ValidateTemplateOutput>
Validates a specified template. AWS CloudFormation first checks if the template is valid JSON. If it isn't, AWS CloudFormation checks if the template is valid YAML. If both these checks fail, AWS CloudFormation returns a template validation error.

Operators

operator ==(Object other) bool
The equality operator.
inherited