aws-sdk-applicationinsights 1.103.0

AWS SDK for Amazon CloudWatch Application Insights
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_application::_update_application_input::UpdateApplicationInputBuilder;

pub use crate::operation::update_application::_update_application_output::UpdateApplicationOutputBuilder;

impl crate::operation::update_application::builders::UpdateApplicationInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_application::UpdateApplicationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_application::UpdateApplicationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_application();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateApplication`.
///
/// <p>Updates the application.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateApplicationFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_application::builders::UpdateApplicationInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_application::UpdateApplicationOutput,
        crate::operation::update_application::UpdateApplicationError,
    > for UpdateApplicationFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_application::UpdateApplicationOutput,
            crate::operation::update_application::UpdateApplicationError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateApplicationFluentBuilder {
    /// Creates a new `UpdateApplicationFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the UpdateApplication as a reference.
    pub fn as_input(&self) -> &crate::operation::update_application::builders::UpdateApplicationInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_application::UpdateApplicationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_application::UpdateApplicationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::update_application::UpdateApplication::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_application::UpdateApplication::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::update_application::UpdateApplicationOutput,
        crate::operation::update_application::UpdateApplicationError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The name of the resource group.</p>
    pub fn resource_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.resource_group_name(input.into());
        self
    }
    /// <p>The name of the resource group.</p>
    pub fn set_resource_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_resource_group_name(input);
        self
    }
    /// <p>The name of the resource group.</p>
    pub fn get_resource_group_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_resource_group_name()
    }
    /// <p>When set to <code>true</code>, creates opsItems for any problems detected on an application.</p>
    pub fn ops_center_enabled(mut self, input: bool) -> Self {
        self.inner = self.inner.ops_center_enabled(input);
        self
    }
    /// <p>When set to <code>true</code>, creates opsItems for any problems detected on an application.</p>
    pub fn set_ops_center_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_ops_center_enabled(input);
        self
    }
    /// <p>When set to <code>true</code>, creates opsItems for any problems detected on an application.</p>
    pub fn get_ops_center_enabled(&self) -> &::std::option::Option<bool> {
        self.inner.get_ops_center_enabled()
    }
    /// <p>Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as <code>instance terminated</code>, <code>failed deployment</code>, and others.</p>
    pub fn cwe_monitor_enabled(mut self, input: bool) -> Self {
        self.inner = self.inner.cwe_monitor_enabled(input);
        self
    }
    /// <p>Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as <code>instance terminated</code>, <code>failed deployment</code>, and others.</p>
    pub fn set_cwe_monitor_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_cwe_monitor_enabled(input);
        self
    }
    /// <p>Indicates whether Application Insights can listen to CloudWatch events for the application resources, such as <code>instance terminated</code>, <code>failed deployment</code>, and others.</p>
    pub fn get_cwe_monitor_enabled(&self) -> &::std::option::Option<bool> {
        self.inner.get_cwe_monitor_enabled()
    }
    /// <p>The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.</p>
    pub fn ops_item_sns_topic_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.ops_item_sns_topic_arn(input.into());
        self
    }
    /// <p>The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.</p>
    pub fn set_ops_item_sns_topic_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_ops_item_sns_topic_arn(input);
        self
    }
    /// <p>The SNS topic provided to Application Insights that is associated to the created opsItem. Allows you to receive notifications for updates to the opsItem.</p>
    pub fn get_ops_item_sns_topic_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_ops_item_sns_topic_arn()
    }
    /// <p>The SNS topic ARN. Allows you to receive SNS notifications for updates and issues with an application.</p>
    pub fn sns_notification_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.sns_notification_arn(input.into());
        self
    }
    /// <p>The SNS topic ARN. Allows you to receive SNS notifications for updates and issues with an application.</p>
    pub fn set_sns_notification_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_sns_notification_arn(input);
        self
    }
    /// <p>The SNS topic ARN. Allows you to receive SNS notifications for updates and issues with an application.</p>
    pub fn get_sns_notification_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_sns_notification_arn()
    }
    /// <p>Disassociates the SNS topic from the opsItem created for detected problems.</p>
    pub fn remove_sns_topic(mut self, input: bool) -> Self {
        self.inner = self.inner.remove_sns_topic(input);
        self
    }
    /// <p>Disassociates the SNS topic from the opsItem created for detected problems.</p>
    pub fn set_remove_sns_topic(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_remove_sns_topic(input);
        self
    }
    /// <p>Disassociates the SNS topic from the opsItem created for detected problems.</p>
    pub fn get_remove_sns_topic(&self) -> &::std::option::Option<bool> {
        self.inner.get_remove_sns_topic()
    }
    /// <p>Turns auto-configuration on or off.</p>
    pub fn auto_config_enabled(mut self, input: bool) -> Self {
        self.inner = self.inner.auto_config_enabled(input);
        self
    }
    /// <p>Turns auto-configuration on or off.</p>
    pub fn set_auto_config_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_auto_config_enabled(input);
        self
    }
    /// <p>Turns auto-configuration on or off.</p>
    pub fn get_auto_config_enabled(&self) -> &::std::option::Option<bool> {
        self.inner.get_auto_config_enabled()
    }
    /// <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
    pub fn attach_missing_permission(mut self, input: bool) -> Self {
        self.inner = self.inner.attach_missing_permission(input);
        self
    }
    /// <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
    pub fn set_attach_missing_permission(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_attach_missing_permission(input);
        self
    }
    /// <p>If set to true, the managed policies for SSM and CW will be attached to the instance roles if they are missing.</p>
    pub fn get_attach_missing_permission(&self) -> &::std::option::Option<bool> {
        self.inner.get_attach_missing_permission()
    }
}