pub struct ApplyStackInput {
pub capabilities: Vec<Capability>,
pub client_request_token: Option<String>,
pub disable_rollback: bool,
pub notification_arns: Vec<String>,
pub parameters: Vec<Parameter>,
pub resource_types: Option<Vec<String>>,
pub role_arn: Option<String>,
pub stack_name: String,
pub tags: Vec<Tag>,
pub template_source: TemplateSource,
}Expand description
The input for the apply_stack operation.
You can create an apply stack input via the new associated function. Setters are
also available to make construction as ergonomic as possible.
use cloudformatious::{ApplyStackInput, Capability, Parameter, Tag, TemplateSource};
let config = aws_config::load_from_env().await;
let client = cloudformatious::Client::new(&config);
let input = ApplyStackInput::new("my-stack", TemplateSource::inline("{}"))
.set_capabilities([Capability::Iam])
.set_client_request_token("hello")
.set_notification_arns(["arn:foo"])
.set_parameters([Parameter { key: "hello".to_string(), value: "world".to_string() }])
.set_resource_types(["AWS::IAM::Role"])
.set_role_arn("arn:foo")
.set_tags([Tag { key: "hello".to_string(), value: "world".to_string() }]);
let output = client.apply_stack(input).await?;
// ...Fields§
§capabilities: Vec<Capability>Capabilities to explicitly acknowledge.
See Capability for more information.
client_request_token: Option<String>A unique identifier for this apply_stack operation.
Specify this token if you plan to retry requests so that AWS CloudFormation knows that
you’re not attempting to apply a stack with the same name. You might retry apply_stack
requests to ensure that AWS CloudFormation successfully received them.
All events triggered by a given stack operation are assigned the same client request token, which are used to track operations.
disable_rollback: boolWhether or not to disable rolling back in the event of a failure.
When rollback is disabled, resources that were created/updated before the failing operation
are preserved and the stack settles with a *_FAILED status. This may be helpful when
debugging failing stack operations.
notification_arns: Vec<String>The Simple Notification Service (SNS) topic ARNs to publish stack related events.
You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI).
parameters: Vec<Parameter>A list of input parameters for the stack.
If you don’t specify a key and value for a particular parameter, AWS CloudFormation uses the default value that is specified in your template.
Note that, unlike when directly updating a stack, it is not possible to reuse previous values of parameters.
resource_types: Option<Vec<String>>The template resource types that you have permissions to work with for this apply_stack
operation, such as AWS::EC2::Instance, AWS::EC2::*, or Custom::MyCustomInstance.
Use the following syntax to describe template resource types:
AWS::*for all AWS resources.Custom::*for all custom resources.Custom::logical_IDfor a specific custom resource.AWS::service_name::*for all resources of a particular AWS service.AWS::service_name::resource_logical_IDfor a specific AWS resource.
If the list of resource types doesn’t include a resource that you’re applying, the operation fails. By default, AWS CloudFormation grants permissions to all resource types. AWS Identity and Access Management (IAM) uses this parameter for AWS CloudFormation-specific condition keys in IAM policies. For more information, see Controlling Access with AWS Identity and Access Management.
role_arn: Option<String>The Amazon Resource Name (ARN) of an AWS Identity And Access Management (IAM) role that AWS CloudFormation assumes to apply the stack.
AWS CloudFormation uses the role’s credentials to make calls on your behalf. AWS CloudFormation always uses this role for all future operations on the stack. As long as users have permission to operate on the stack, AWS CloudFormation uses this role even if the users don’t have permission to pass it. Ensure that the role grants least privilege.
If you don’t specify a value, AWS CloudFormation uses the role that was previously associated with the stack. If no role is available, AWS CloudFormation uses a temporary session that is generated from your user credentials.
stack_name: StringThe name that is associated with the stack.
The name must be unique in the region in which you are creating the stack.
A stack name can contain only alphanumeric characters (case sensitive) and hyphens. It must start with an alphabetic character and cannot be longer than 128 characters.
Key-value pairs to associate with this stack.
AWS CloudFormation also propagates these tags to the resources created in the stack. A maximum number of 50 tags can be specified.
template_source: TemplateSourceSource for the template body to apply.
For more information about templates, go to Template Anatomy in the AWS CloudFormation User Guide.
Implementations§
Source§impl ApplyStackInput
impl ApplyStackInput
Sourcepub fn new(
stack_name: impl Into<String>,
template_source: TemplateSource,
) -> Self
pub fn new( stack_name: impl Into<String>, template_source: TemplateSource, ) -> Self
Construct an input for the given stack_name and template_source.
Sourcepub fn set_capabilities(self, capabilities: impl Into<Vec<Capability>>) -> Self
pub fn set_capabilities(self, capabilities: impl Into<Vec<Capability>>) -> Self
Set the value for capabilities.
Note: this consumes and returns self for chaining.
Sourcepub fn set_client_request_token(
self,
client_request_token: impl Into<String>,
) -> Self
pub fn set_client_request_token( self, client_request_token: impl Into<String>, ) -> Self
Set the value for client_request_token.
Note: this consumes and returns self for chaining.
Sourcepub fn set_disable_rollback(self, disable_rollback: bool) -> Self
pub fn set_disable_rollback(self, disable_rollback: bool) -> Self
Set the value for disable_rollback.
Note: this consumes and returns self for chaining.
Sourcepub fn set_notification_arns<I, S>(self, notification_arns: I) -> Self
pub fn set_notification_arns<I, S>(self, notification_arns: I) -> Self
Set the value for notification_arns.
Note: this consumes and returns self for chaining.
Sourcepub fn set_parameters(self, parameters: impl Into<Vec<Parameter>>) -> Self
pub fn set_parameters(self, parameters: impl Into<Vec<Parameter>>) -> Self
Set the value for parameters.
Note: this consumes and returns self for chaining.
Sourcepub fn set_resource_types<I, S>(self, resource_types: I) -> Self
pub fn set_resource_types<I, S>(self, resource_types: I) -> Self
Set the value for resource_types.
Note: this consumes and returns self for chaining.
Sourcepub fn set_role_arn(self, role_arn: impl Into<String>) -> Self
pub fn set_role_arn(self, role_arn: impl Into<String>) -> Self
Set the value for role_arn.
Note: this consumes and returns self for chaining.
Set the value for tags.
Note: this consumes and returns self for chaining.
Trait Implementations§
Source§impl Clone for ApplyStackInput
impl Clone for ApplyStackInput
Source§fn clone(&self) -> ApplyStackInput
fn clone(&self) -> ApplyStackInput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ApplyStackInput
impl RefUnwindSafe for ApplyStackInput
impl Send for ApplyStackInput
impl Sync for ApplyStackInput
impl Unpin for ApplyStackInput
impl UnwindSafe for ApplyStackInput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more