pub struct ApplyStackInput {
    pub capabilities: Vec<Capability>,
    pub client_request_token: Option<String>,
    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.

§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_ID for a specific custom resource.
  • AWS::service_name::* for all resources of a particular AWS service.
  • AWS::service_name::resource_logical_ID for 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: String

The 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.

§tags: Vec<Tag>

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: TemplateSource

Source for the template body to apply.

For more information about templates, go to Template Anatomy in the AWS CloudFormation User Guide.

Implementations§

Construct an input for the given stack_name and template_source.

Set the value for capabilities.

Note: this consumes and returns self for chaining.

Set the value for client_request_token.

Note: this consumes and returns self for chaining.

Set the value for notification_arns.

Note: this consumes and returns self for chaining.

Set the value for parameters.

Note: this consumes and returns self for chaining.

Set the value for resource_types.

Note: this consumes and returns self for chaining.

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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more