aws-sdk-bedrockagentcorecontrol 1.34.0

AWS SDK for Amazon Bedrock AgentCore Control
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_agent_runtime::_update_agent_runtime_input::UpdateAgentRuntimeInputBuilder;

pub use crate::operation::update_agent_runtime::_update_agent_runtime_output::UpdateAgentRuntimeOutputBuilder;

impl crate::operation::update_agent_runtime::builders::UpdateAgentRuntimeInputBuilder {
    /// 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_agent_runtime::UpdateAgentRuntimeOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_agent_runtime::UpdateAgentRuntimeError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_agent_runtime();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateAgentRuntime`.
///
/// <p>Updates an existing Amazon Secure Agent.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateAgentRuntimeFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_agent_runtime::builders::UpdateAgentRuntimeInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_agent_runtime::UpdateAgentRuntimeOutput,
        crate::operation::update_agent_runtime::UpdateAgentRuntimeError,
    > for UpdateAgentRuntimeFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_agent_runtime::UpdateAgentRuntimeOutput,
            crate::operation::update_agent_runtime::UpdateAgentRuntimeError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateAgentRuntimeFluentBuilder {
    /// Creates a new `UpdateAgentRuntimeFluentBuilder`.
    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 UpdateAgentRuntime as a reference.
    pub fn as_input(&self) -> &crate::operation::update_agent_runtime::builders::UpdateAgentRuntimeInputBuilder {
        &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_agent_runtime::UpdateAgentRuntimeOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_agent_runtime::UpdateAgentRuntimeError,
            ::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_agent_runtime::UpdateAgentRuntime::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_agent_runtime::UpdateAgentRuntime::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_agent_runtime::UpdateAgentRuntimeOutput,
        crate::operation::update_agent_runtime::UpdateAgentRuntimeError,
        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 unique identifier of the AgentCore Runtime to update.</p>
    pub fn agent_runtime_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.agent_runtime_id(input.into());
        self
    }
    /// <p>The unique identifier of the AgentCore Runtime to update.</p>
    pub fn set_agent_runtime_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_agent_runtime_id(input);
        self
    }
    /// <p>The unique identifier of the AgentCore Runtime to update.</p>
    pub fn get_agent_runtime_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_agent_runtime_id()
    }
    /// <p>The updated artifact of the AgentCore Runtime.</p>
    pub fn agent_runtime_artifact(mut self, input: crate::types::AgentRuntimeArtifact) -> Self {
        self.inner = self.inner.agent_runtime_artifact(input);
        self
    }
    /// <p>The updated artifact of the AgentCore Runtime.</p>
    pub fn set_agent_runtime_artifact(mut self, input: ::std::option::Option<crate::types::AgentRuntimeArtifact>) -> Self {
        self.inner = self.inner.set_agent_runtime_artifact(input);
        self
    }
    /// <p>The updated artifact of the AgentCore Runtime.</p>
    pub fn get_agent_runtime_artifact(&self) -> &::std::option::Option<crate::types::AgentRuntimeArtifact> {
        self.inner.get_agent_runtime_artifact()
    }
    /// <p>The updated IAM role ARN that provides permissions for the AgentCore Runtime.</p>
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.role_arn(input.into());
        self
    }
    /// <p>The updated IAM role ARN that provides permissions for the AgentCore Runtime.</p>
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_role_arn(input);
        self
    }
    /// <p>The updated IAM role ARN that provides permissions for the AgentCore Runtime.</p>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_role_arn()
    }
    /// <p>The updated network configuration for the AgentCore Runtime.</p>
    pub fn network_configuration(mut self, input: crate::types::NetworkConfiguration) -> Self {
        self.inner = self.inner.network_configuration(input);
        self
    }
    /// <p>The updated network configuration for the AgentCore Runtime.</p>
    pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfiguration>) -> Self {
        self.inner = self.inner.set_network_configuration(input);
        self
    }
    /// <p>The updated network configuration for the AgentCore Runtime.</p>
    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfiguration> {
        self.inner.get_network_configuration()
    }
    /// <p>The updated description of the AgentCore Runtime.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.description(input.into());
        self
    }
    /// <p>The updated description of the AgentCore Runtime.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_description(input);
        self
    }
    /// <p>The updated description of the AgentCore Runtime.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_description()
    }
    /// <p>The updated authorizer configuration for the AgentCore Runtime.</p>
    pub fn authorizer_configuration(mut self, input: crate::types::AuthorizerConfiguration) -> Self {
        self.inner = self.inner.authorizer_configuration(input);
        self
    }
    /// <p>The updated authorizer configuration for the AgentCore Runtime.</p>
    pub fn set_authorizer_configuration(mut self, input: ::std::option::Option<crate::types::AuthorizerConfiguration>) -> Self {
        self.inner = self.inner.set_authorizer_configuration(input);
        self
    }
    /// <p>The updated authorizer configuration for the AgentCore Runtime.</p>
    pub fn get_authorizer_configuration(&self) -> &::std::option::Option<crate::types::AuthorizerConfiguration> {
        self.inner.get_authorizer_configuration()
    }
    /// <p>The updated configuration for HTTP request headers that will be passed through to the runtime.</p>
    pub fn request_header_configuration(mut self, input: crate::types::RequestHeaderConfiguration) -> Self {
        self.inner = self.inner.request_header_configuration(input);
        self
    }
    /// <p>The updated configuration for HTTP request headers that will be passed through to the runtime.</p>
    pub fn set_request_header_configuration(mut self, input: ::std::option::Option<crate::types::RequestHeaderConfiguration>) -> Self {
        self.inner = self.inner.set_request_header_configuration(input);
        self
    }
    /// <p>The updated configuration for HTTP request headers that will be passed through to the runtime.</p>
    pub fn get_request_header_configuration(&self) -> &::std::option::Option<crate::types::RequestHeaderConfiguration> {
        self.inner.get_request_header_configuration()
    }
    /// <p>The protocol configuration for an agent runtime. This structure defines how the agent runtime communicates with clients.</p>
    pub fn protocol_configuration(mut self, input: crate::types::ProtocolConfiguration) -> Self {
        self.inner = self.inner.protocol_configuration(input);
        self
    }
    /// <p>The protocol configuration for an agent runtime. This structure defines how the agent runtime communicates with clients.</p>
    pub fn set_protocol_configuration(mut self, input: ::std::option::Option<crate::types::ProtocolConfiguration>) -> Self {
        self.inner = self.inner.set_protocol_configuration(input);
        self
    }
    /// <p>The protocol configuration for an agent runtime. This structure defines how the agent runtime communicates with clients.</p>
    pub fn get_protocol_configuration(&self) -> &::std::option::Option<crate::types::ProtocolConfiguration> {
        self.inner.get_protocol_configuration()
    }
    /// <p>The updated life cycle configuration for the AgentCore Runtime.</p>
    pub fn lifecycle_configuration(mut self, input: crate::types::LifecycleConfiguration) -> Self {
        self.inner = self.inner.lifecycle_configuration(input);
        self
    }
    /// <p>The updated life cycle configuration for the AgentCore Runtime.</p>
    pub fn set_lifecycle_configuration(mut self, input: ::std::option::Option<crate::types::LifecycleConfiguration>) -> Self {
        self.inner = self.inner.set_lifecycle_configuration(input);
        self
    }
    /// <p>The updated life cycle configuration for the AgentCore Runtime.</p>
    pub fn get_lifecycle_configuration(&self) -> &::std::option::Option<crate::types::LifecycleConfiguration> {
        self.inner.get_lifecycle_configuration()
    }
    /// <p>The updated configuration for microVM Metadata Service (MMDS) settings for the AgentCore Runtime.</p>
    pub fn metadata_configuration(mut self, input: crate::types::RuntimeMetadataConfiguration) -> Self {
        self.inner = self.inner.metadata_configuration(input);
        self
    }
    /// <p>The updated configuration for microVM Metadata Service (MMDS) settings for the AgentCore Runtime.</p>
    pub fn set_metadata_configuration(mut self, input: ::std::option::Option<crate::types::RuntimeMetadataConfiguration>) -> Self {
        self.inner = self.inner.set_metadata_configuration(input);
        self
    }
    /// <p>The updated configuration for microVM Metadata Service (MMDS) settings for the AgentCore Runtime.</p>
    pub fn get_metadata_configuration(&self) -> &::std::option::Option<crate::types::RuntimeMetadataConfiguration> {
        self.inner.get_metadata_configuration()
    }
    ///
    /// Adds a key-value pair to `environmentVariables`.
    ///
    /// To override the contents of this collection use [`set_environment_variables`](Self::set_environment_variables).
    ///
    /// <p>Updated environment variables to set in the AgentCore Runtime environment.</p>
    pub fn environment_variables(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        self.inner = self.inner.environment_variables(k.into(), v.into());
        self
    }
    /// <p>Updated environment variables to set in the AgentCore Runtime environment.</p>
    pub fn set_environment_variables(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.inner = self.inner.set_environment_variables(input);
        self
    }
    /// <p>Updated environment variables to set in the AgentCore Runtime environment.</p>
    pub fn get_environment_variables(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_environment_variables()
    }
    /// <p>A unique, case-sensitive identifier to ensure idempotency of the request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.client_token(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier to ensure idempotency of the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_client_token(input);
        self
    }
    /// <p>A unique, case-sensitive identifier to ensure idempotency of the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
}