Struct cloudformatious::ApplyInput[][src]

pub struct ApplyInput {
    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,
}

The input for the apply operation.

You can create an apply input via the [new] associated function. Setters are also available to make construction as ergonomic as possible.

use rusoto_cloudformation::Tag;
use cloudformatious::{ApplyInput, Capability, CloudFormatious, Parameter, TemplateSource};

let input = ApplyInput::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(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 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 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. If you do not specify a specific client request token, one will be generated in order to accurately correlate events with the performed 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 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

impl ApplyInput[src]

pub fn new(
    stack_name: impl Into<String>,
    template_source: TemplateSource
) -> Self
[src]

Construct an input for the given stack_name and template_source.

pub fn set_capabilities(self, capabilities: impl Into<Vec<Capability>>) -> Self[src]

Set the value for capabilities.

Note: this consumes and returns self for chaining.

pub fn set_client_request_token(
    self,
    client_request_token: impl Into<String>
) -> Self
[src]

Set the value for client_request_token.

Note: this consumes and returns self for chaining.

pub fn set_notification_arns<I, S>(self, notification_arns: I) -> Self where
    I: Into<Vec<S>>,
    S: Into<String>, 
[src]

Set the value for notification_arns.

Note: this consumes and returns self for chaining.

pub fn set_parameters(self, parameters: impl Into<Vec<Parameter>>) -> Self[src]

Set the value for parameters.

Note: this consumes and returns self for chaining.

pub fn set_resource_types<I, S>(self, resource_types: I) -> Self where
    I: Into<Vec<S>>,
    S: Into<String>, 
[src]

Set the value for resource_types.

Note: this consumes and returns self for chaining.

pub fn set_role_arn(self, role_arn: impl Into<String>) -> Self[src]

Set the value for role_arn.

Note: this consumes and returns self for chaining.

pub fn set_tags(self, tags: impl Into<Vec<Tag>>) -> Self[src]

Set the value for tags.

Note: this consumes and returns self for chaining.

Trait Implementations

impl Clone for ApplyInput[src]

impl Debug for ApplyInput[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.