aws-sdk-elbproxy 1.0.0

AWS SDK for Elastic Load Balancing for Envoy
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::create_proxy::_create_proxy_input::CreateProxyInputBuilder;

pub use crate::operation::create_proxy::_create_proxy_output::CreateProxyOutputBuilder;

impl crate::operation::create_proxy::builders::CreateProxyInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::create_proxy::CreateProxyOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_proxy::CreateProxyError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_proxy();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateProxy`.
///
/// Creates a proxy. A proxy is a fully managed, Envoy-based proxy that runs your Envoy configuration on Amazon EC2 instances inside your own virtual private cloud (VPC). AWS provisions and scales the proxy, upgrades the Envoy version, patches the operating system, and monitors its health.
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateProxyFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_proxy::builders::CreateProxyInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_proxy::CreateProxyOutput,
        crate::operation::create_proxy::CreateProxyError,
    > for CreateProxyFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_proxy::CreateProxyOutput,
            crate::operation::create_proxy::CreateProxyError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateProxyFluentBuilder {
    /// Creates a new `CreateProxyFluentBuilder`.
    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 CreateProxy as a reference.
    pub fn as_input(&self) -> &crate::operation::create_proxy::builders::CreateProxyInputBuilder {
        &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::create_proxy::CreateProxyOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_proxy::CreateProxyError,
            ::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::create_proxy::CreateProxy::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_proxy::CreateProxy::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::create_proxy::CreateProxyOutput,
        crate::operation::create_proxy::CreateProxyError,
        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
    }
    /// The name of the proxy. The name must be unique within your account for the Region. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// The name of the proxy. The name must be unique within your account for the Region. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character.
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// The name of the proxy. The name must be unique within your account for the Region. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// The type of proxy.
    pub fn r#type(mut self, input: crate::types::ProxyType) -> Self {
        self.inner = self.inner.r#type(input);
        self
    }
    /// The type of proxy.
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::ProxyType>) -> Self {
        self.inner = self.inner.set_type(input);
        self
    }
    /// The type of proxy.
    pub fn get_type(&self) -> &::std::option::Option<crate::types::ProxyType> {
        self.inner.get_type()
    }
    /// The version of the proxy software, in `major.minor` format.
    pub fn proxy_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.proxy_version(input.into());
        self
    }
    /// The version of the proxy software, in `major.minor` format.
    pub fn set_proxy_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_proxy_version(input);
        self
    }
    /// The version of the proxy software, in `major.minor` format.
    pub fn get_proxy_version(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_proxy_version()
    }
    /// The Amazon Resource Name (ARN) of the IAM role that provides permissions to the code that your Envoy configuration runs on the proxy, such as filters and extensions. These are the permissions that this code needs when it calls AWS services.
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.role_arn(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the IAM role that provides permissions to the code that your Envoy configuration runs on the proxy, such as filters and extensions. These are the permissions that this code needs when it calls AWS services.
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_role_arn(input);
        self
    }
    /// The Amazon Resource Name (ARN) of the IAM role that provides permissions to the code that your Envoy configuration runs on the proxy, such as filters and extensions. These are the permissions that this code needs when it calls AWS services.
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_role_arn()
    }
    /// The configuration for the proxy.
    pub fn configuration(mut self, input: crate::types::ProxyConfiguration) -> Self {
        self.inner = self.inner.configuration(input);
        self
    }
    /// The configuration for the proxy.
    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::ProxyConfiguration>) -> Self {
        self.inner = self.inner.set_configuration(input);
        self
    }
    /// The configuration for the proxy.
    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::ProxyConfiguration> {
        self.inner.get_configuration()
    }
    /// The network configuration for the proxy.
    pub fn network_configuration(mut self, input: crate::types::ProxyNetworkUserConfiguration) -> Self {
        self.inner = self.inner.network_configuration(input);
        self
    }
    /// The network configuration for the proxy.
    pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::ProxyNetworkUserConfiguration>) -> Self {
        self.inner = self.inner.set_network_configuration(input);
        self
    }
    /// The network configuration for the proxy.
    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::ProxyNetworkUserConfiguration> {
        self.inner.get_network_configuration()
    }
    ///
    /// Appends an item to `attributes`.
    ///
    /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
    ///
    /// The attributes for the proxy. Attributes can be changed after creation. Attributes that you don't specify are set to their default values.
    pub fn attributes(mut self, input: crate::types::Attribute) -> Self {
        self.inner = self.inner.attributes(input);
        self
    }
    /// The attributes for the proxy. Attributes can be changed after creation. Attributes that you don't specify are set to their default values.
    pub fn set_attributes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Attribute>>) -> Self {
        self.inner = self.inner.set_attributes(input);
        self
    }
    /// The attributes for the proxy. Attributes can be changed after creation. Attributes that you don't specify are set to their default values.
    pub fn get_attributes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Attribute>> {
        self.inner.get_attributes()
    }
    /// The Amazon Resource Name (ARN) of the customer managed KMS key used to encrypt the proxy's configuration content. If you don't specify a key, the default service-owned key is used.
    pub fn customer_kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.customer_kms_key_arn(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the customer managed KMS key used to encrypt the proxy's configuration content. If you don't specify a key, the default service-owned key is used.
    pub fn set_customer_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_customer_kms_key_arn(input);
        self
    }
    /// The Amazon Resource Name (ARN) of the customer managed KMS key used to encrypt the proxy's configuration content. If you don't specify a key, the default service-owned key is used.
    pub fn get_customer_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_customer_kms_key_arn()
    }
    ///
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// The tags for the proxy.
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.tags(k.into(), v.into());
        self
    }
    /// The tags for the proxy.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.inner = self.inner.set_tags(input);
        self
    }
    /// The tags for the proxy.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_tags()
    }
    /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_token(input.into());
        self
    }
    /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_token(input);
        self
    }
    /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
}