aws-sdk-appconfig 1.103.0

AWS SDK for Amazon AppConfig
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An action defines the tasks that the extension performs during the AppConfig workflow. Each action includes an action point, as shown in the following list:</p>
/// <ul>
/// <li>
/// <p><code>PRE_CREATE_HOSTED_CONFIGURATION_VERSION</code></p></li>
/// <li>
/// <p><code>PRE_START_DEPLOYMENT</code></p></li>
/// <li>
/// <p><code>AT_DEPLOYMENT_TICK</code></p></li>
/// <li>
/// <p><code>ON_DEPLOYMENT_START</code></p></li>
/// <li>
/// <p><code>ON_DEPLOYMENT_STEP</code></p></li>
/// <li>
/// <p><code>ON_DEPLOYMENT_BAKING</code></p></li>
/// <li>
/// <p><code>ON_DEPLOYMENT_COMPLETE</code></p></li>
/// <li>
/// <p><code>ON_DEPLOYMENT_ROLLED_BACK</code></p></li>
/// </ul>
/// <p>Each action also includes a name, a URI to an Lambda function, and an Amazon Resource Name (ARN) for an Identity and Access Management assume role. You specify the name, URI, and ARN for each <i>action point</i> defined in the extension.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Action {
    /// <p>The action name.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Information about the action.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
    pub uri: ::std::option::Option<::std::string::String>,
    /// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
    pub role_arn: ::std::option::Option<::std::string::String>,
}
impl Action {
    /// <p>The action name.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Information about the action.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
    pub fn uri(&self) -> ::std::option::Option<&str> {
        self.uri.as_deref()
    }
    /// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
    pub fn role_arn(&self) -> ::std::option::Option<&str> {
        self.role_arn.as_deref()
    }
}
impl Action {
    /// Creates a new builder-style object to manufacture [`Action`](crate::types::Action).
    pub fn builder() -> crate::types::builders::ActionBuilder {
        crate::types::builders::ActionBuilder::default()
    }
}

/// A builder for [`Action`](crate::types::Action).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ActionBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) uri: ::std::option::Option<::std::string::String>,
    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
}
impl ActionBuilder {
    /// <p>The action name.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The action name.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The action name.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Information about the action.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Information about the action.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>Information about the action.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
    pub fn uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.uri = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
    pub fn set_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.uri = input;
        self
    }
    /// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
    pub fn get_uri(&self) -> &::std::option::Option<::std::string::String> {
        &self.uri
    }
    /// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// Consumes the builder and constructs a [`Action`](crate::types::Action).
    pub fn build(self) -> crate::types::Action {
        crate::types::Action {
            name: self.name,
            description: self.description,
            uri: self.uri,
            role_arn: self.role_arn,
        }
    }
}