aws-sdk-bedrockagentcorecontrol 1.44.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::create_online_evaluation_config::_create_online_evaluation_config_input::CreateOnlineEvaluationConfigInputBuilder;

pub use crate::operation::create_online_evaluation_config::_create_online_evaluation_config_output::CreateOnlineEvaluationConfigOutputBuilder;

impl crate::operation::create_online_evaluation_config::builders::CreateOnlineEvaluationConfigInputBuilder {
    /// 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_online_evaluation_config::CreateOnlineEvaluationConfigOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_online_evaluation_config::CreateOnlineEvaluationConfigError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.create_online_evaluation_config();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `CreateOnlineEvaluationConfig`.
///
/// <p>Creates an online evaluation configuration for continuous monitoring of agent performance. Online evaluation automatically samples live traffic from CloudWatch logs at specified rates and applies evaluators to assess agent quality in production.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct CreateOnlineEvaluationConfigFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::create_online_evaluation_config::builders::CreateOnlineEvaluationConfigInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::create_online_evaluation_config::CreateOnlineEvaluationConfigOutput,
        crate::operation::create_online_evaluation_config::CreateOnlineEvaluationConfigError,
    > for CreateOnlineEvaluationConfigFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::create_online_evaluation_config::CreateOnlineEvaluationConfigOutput,
            crate::operation::create_online_evaluation_config::CreateOnlineEvaluationConfigError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl CreateOnlineEvaluationConfigFluentBuilder {
    /// Creates a new `CreateOnlineEvaluationConfigFluentBuilder`.
    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 CreateOnlineEvaluationConfig as a reference.
    pub fn as_input(&self) -> &crate::operation::create_online_evaluation_config::builders::CreateOnlineEvaluationConfigInputBuilder {
        &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_online_evaluation_config::CreateOnlineEvaluationConfigOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::create_online_evaluation_config::CreateOnlineEvaluationConfigError,
            ::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_online_evaluation_config::CreateOnlineEvaluationConfig::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::create_online_evaluation_config::CreateOnlineEvaluationConfig::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_online_evaluation_config::CreateOnlineEvaluationConfigOutput,
        crate::operation::create_online_evaluation_config::CreateOnlineEvaluationConfigError,
        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>A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</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 that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</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 that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
    /// <p>The name of the online evaluation configuration. Must be unique within your account.</p>
    pub fn online_evaluation_config_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.online_evaluation_config_name(input.into());
        self
    }
    /// <p>The name of the online evaluation configuration. Must be unique within your account.</p>
    pub fn set_online_evaluation_config_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_online_evaluation_config_name(input);
        self
    }
    /// <p>The name of the online evaluation configuration. Must be unique within your account.</p>
    pub fn get_online_evaluation_config_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_online_evaluation_config_name()
    }
    /// <p>The description of the online evaluation configuration that explains its monitoring purpose and scope.</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 description of the online evaluation configuration that explains its monitoring purpose and scope.</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 description of the online evaluation configuration that explains its monitoring purpose and scope.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_description()
    }
    /// <p>The evaluation rule that defines sampling configuration, filters, and session detection settings for the online evaluation.</p>
    pub fn rule(mut self, input: crate::types::Rule) -> Self {
        self.inner = self.inner.rule(input);
        self
    }
    /// <p>The evaluation rule that defines sampling configuration, filters, and session detection settings for the online evaluation.</p>
    pub fn set_rule(mut self, input: ::std::option::Option<crate::types::Rule>) -> Self {
        self.inner = self.inner.set_rule(input);
        self
    }
    /// <p>The evaluation rule that defines sampling configuration, filters, and session detection settings for the online evaluation.</p>
    pub fn get_rule(&self) -> &::std::option::Option<crate::types::Rule> {
        self.inner.get_rule()
    }
    /// <p>The data source configuration that specifies CloudWatch log groups and service names to monitor for agent traces.</p>
    pub fn data_source_config(mut self, input: crate::types::DataSourceConfig) -> Self {
        self.inner = self.inner.data_source_config(input);
        self
    }
    /// <p>The data source configuration that specifies CloudWatch log groups and service names to monitor for agent traces.</p>
    pub fn set_data_source_config(mut self, input: ::std::option::Option<crate::types::DataSourceConfig>) -> Self {
        self.inner = self.inner.set_data_source_config(input);
        self
    }
    /// <p>The data source configuration that specifies CloudWatch log groups and service names to monitor for agent traces.</p>
    pub fn get_data_source_config(&self) -> &::std::option::Option<crate::types::DataSourceConfig> {
        self.inner.get_data_source_config()
    }
    ///
    /// Appends an item to `evaluators`.
    ///
    /// To override the contents of this collection use [`set_evaluators`](Self::set_evaluators).
    ///
    /// <p>The list of evaluators to apply during online evaluation. Can include both built-in evaluators and custom evaluators created with <code>CreateEvaluator</code>.</p>
    pub fn evaluators(mut self, input: crate::types::EvaluatorReference) -> Self {
        self.inner = self.inner.evaluators(input);
        self
    }
    /// <p>The list of evaluators to apply during online evaluation. Can include both built-in evaluators and custom evaluators created with <code>CreateEvaluator</code>.</p>
    pub fn set_evaluators(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EvaluatorReference>>) -> Self {
        self.inner = self.inner.set_evaluators(input);
        self
    }
    /// <p>The list of evaluators to apply during online evaluation. Can include both built-in evaluators and custom evaluators created with <code>CreateEvaluator</code>.</p>
    pub fn get_evaluators(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EvaluatorReference>> {
        self.inner.get_evaluators()
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that grants permissions to read from CloudWatch logs, write evaluation results, and invoke Amazon Bedrock models for evaluation.</p>
    pub fn evaluation_execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.evaluation_execution_role_arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that grants permissions to read from CloudWatch logs, write evaluation results, and invoke Amazon Bedrock models for evaluation.</p>
    pub fn set_evaluation_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_evaluation_execution_role_arn(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that grants permissions to read from CloudWatch logs, write evaluation results, and invoke Amazon Bedrock models for evaluation.</p>
    pub fn get_evaluation_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_evaluation_execution_role_arn()
    }
    /// <p>Whether to enable the online evaluation configuration immediately upon creation. If true, evaluation begins automatically.</p>
    pub fn enable_on_create(mut self, input: bool) -> Self {
        self.inner = self.inner.enable_on_create(input);
        self
    }
    /// <p>Whether to enable the online evaluation configuration immediately upon creation. If true, evaluation begins automatically.</p>
    pub fn set_enable_on_create(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_enable_on_create(input);
        self
    }
    /// <p>Whether to enable the online evaluation configuration immediately upon creation. If true, evaluation begins automatically.</p>
    pub fn get_enable_on_create(&self) -> &::std::option::Option<bool> {
        self.inner.get_enable_on_create()
    }
    ///
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A map of tag keys and values to assign to an AgentCore Online Evaluation Config. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.</p>
    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
    }
    /// <p>A map of tag keys and values to assign to an AgentCore Online Evaluation Config. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.</p>
    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
    }
    /// <p>A map of tag keys and values to assign to an AgentCore Online Evaluation Config. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_tags()
    }
}