aws-sdk-datazone 1.136.0

AWS SDK for Amazon DataZone
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::start_notebook_run::_start_notebook_run_input::StartNotebookRunInputBuilder;

pub use crate::operation::start_notebook_run::_start_notebook_run_output::StartNotebookRunOutputBuilder;

impl crate::operation::start_notebook_run::builders::StartNotebookRunInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::start_notebook_run::StartNotebookRunOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_notebook_run::StartNotebookRunError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.start_notebook_run();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `StartNotebookRun`.
///
/// <p>Starts a notebook run in an Amazon DataZone domain. A notebook run represents the execution of a Amazon DataZone notebook within a project. You can configure compute, network, timeout, and environment settings for the run.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct StartNotebookRunFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::start_notebook_run::builders::StartNotebookRunInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::start_notebook_run::StartNotebookRunOutput,
        crate::operation::start_notebook_run::StartNotebookRunError,
    > for StartNotebookRunFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::start_notebook_run::StartNotebookRunOutput,
            crate::operation::start_notebook_run::StartNotebookRunError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl StartNotebookRunFluentBuilder {
    /// Creates a new `StartNotebookRunFluentBuilder`.
    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 StartNotebookRun as a reference.
    pub fn as_input(&self) -> &crate::operation::start_notebook_run::builders::StartNotebookRunInputBuilder {
        &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::start_notebook_run::StartNotebookRunOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_notebook_run::StartNotebookRunError,
            ::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::start_notebook_run::StartNotebookRun::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::start_notebook_run::StartNotebookRun::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::start_notebook_run::StartNotebookRunOutput,
        crate::operation::start_notebook_run::StartNotebookRunError,
        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 identifier of the Amazon DataZone domain in which the notebook run is started.</p>
    pub fn domain_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.domain_identifier(input.into());
        self
    }
    /// <p>The identifier of the Amazon DataZone domain in which the notebook run is started.</p>
    pub fn set_domain_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_domain_identifier(input);
        self
    }
    /// <p>The identifier of the Amazon DataZone domain in which the notebook run is started.</p>
    pub fn get_domain_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_domain_identifier()
    }
    /// <p>The identifier of the project that owns the notebook run.</p>
    pub fn owning_project_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.owning_project_identifier(input.into());
        self
    }
    /// <p>The identifier of the project that owns the notebook run.</p>
    pub fn set_owning_project_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_owning_project_identifier(input);
        self
    }
    /// <p>The identifier of the project that owns the notebook run.</p>
    pub fn get_owning_project_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_owning_project_identifier()
    }
    /// <p>The identifier of the notebook to run.</p>
    pub fn notebook_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.notebook_identifier(input.into());
        self
    }
    /// <p>The identifier of the notebook to run.</p>
    pub fn set_notebook_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_notebook_identifier(input);
        self
    }
    /// <p>The identifier of the notebook to run.</p>
    pub fn get_notebook_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_notebook_identifier()
    }
    /// <p>The identifier of the schedule associated with the notebook run.</p>
    pub fn schedule_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.schedule_identifier(input.into());
        self
    }
    /// <p>The identifier of the schedule associated with the notebook run.</p>
    pub fn set_schedule_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_schedule_identifier(input);
        self
    }
    /// <p>The identifier of the schedule associated with the notebook run.</p>
    pub fn get_schedule_identifier(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_schedule_identifier()
    }
    /// <p>The compute configuration for the notebook run, including instance type and environment version.</p>
    pub fn compute_configuration(mut self, input: crate::types::ComputeConfig) -> Self {
        self.inner = self.inner.compute_configuration(input);
        self
    }
    /// <p>The compute configuration for the notebook run, including instance type and environment version.</p>
    pub fn set_compute_configuration(mut self, input: ::std::option::Option<crate::types::ComputeConfig>) -> Self {
        self.inner = self.inner.set_compute_configuration(input);
        self
    }
    /// <p>The compute configuration for the notebook run, including instance type and environment version.</p>
    pub fn get_compute_configuration(&self) -> &::std::option::Option<crate::types::ComputeConfig> {
        self.inner.get_compute_configuration()
    }
    /// <p>The network configuration for the notebook run, including network access type and optional VPC settings.</p>
    pub fn network_configuration(mut self, input: crate::types::NetworkConfig) -> Self {
        self.inner = self.inner.network_configuration(input);
        self
    }
    /// <p>The network configuration for the notebook run, including network access type and optional VPC settings.</p>
    pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::NetworkConfig>) -> Self {
        self.inner = self.inner.set_network_configuration(input);
        self
    }
    /// <p>The network configuration for the notebook run, including network access type and optional VPC settings.</p>
    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::NetworkConfig> {
        self.inner.get_network_configuration()
    }
    /// <p>The timeout configuration for the notebook run. The default timeout is 720 minutes (12 hours) and the maximum is 1440 minutes (24 hours).</p>
    pub fn timeout_configuration(mut self, input: crate::types::TimeoutConfig) -> Self {
        self.inner = self.inner.timeout_configuration(input);
        self
    }
    /// <p>The timeout configuration for the notebook run. The default timeout is 720 minutes (12 hours) and the maximum is 1440 minutes (24 hours).</p>
    pub fn set_timeout_configuration(mut self, input: ::std::option::Option<crate::types::TimeoutConfig>) -> Self {
        self.inner = self.inner.set_timeout_configuration(input);
        self
    }
    /// <p>The timeout configuration for the notebook run. The default timeout is 720 minutes (12 hours) and the maximum is 1440 minutes (24 hours).</p>
    pub fn get_timeout_configuration(&self) -> &::std::option::Option<crate::types::TimeoutConfig> {
        self.inner.get_timeout_configuration()
    }
    /// <p>The source that triggered the notebook run.</p>
    pub fn trigger_source(mut self, input: crate::types::TriggerSource) -> Self {
        self.inner = self.inner.trigger_source(input);
        self
    }
    /// <p>The source that triggered the notebook run.</p>
    pub fn set_trigger_source(mut self, input: ::std::option::Option<crate::types::TriggerSource>) -> Self {
        self.inner = self.inner.set_trigger_source(input);
        self
    }
    /// <p>The source that triggered the notebook run.</p>
    pub fn get_trigger_source(&self) -> &::std::option::Option<crate::types::TriggerSource> {
        self.inner.get_trigger_source()
    }
    ///
    /// Adds a key-value pair to `metadata`.
    ///
    /// To override the contents of this collection use [`set_metadata`](Self::set_metadata).
    ///
    /// <p>The metadata for the notebook run, specified as key-value pairs. You can specify up to 50 entries, with keys up to 128 characters and values up to 1024 characters.</p>
    pub fn metadata(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.metadata(k.into(), v.into());
        self
    }
    /// <p>The metadata for the notebook run, specified as key-value pairs. You can specify up to 50 entries, with keys up to 128 characters and values up to 1024 characters.</p>
    pub fn set_metadata(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.inner = self.inner.set_metadata(input);
        self
    }
    /// <p>The metadata for the notebook run, specified as key-value pairs. You can specify up to 50 entries, with keys up to 128 characters and values up to 1024 characters.</p>
    pub fn get_metadata(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_metadata()
    }
    ///
    /// Adds a key-value pair to `parameters`.
    ///
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
    ///
    /// <p>The sensitive parameters for the notebook run, specified as key-value pairs. You can specify up to 50 entries, with keys up to 128 characters and values up to 1024 characters.</p>
    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.parameters(k.into(), v.into());
        self
    }
    /// <p>The sensitive parameters for the notebook run, specified as key-value pairs. You can specify up to 50 entries, with keys up to 128 characters and values up to 1024 characters.</p>
    pub fn set_parameters(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.inner = self.inner.set_parameters(input);
        self
    }
    /// <p>The sensitive parameters for the notebook run, specified as key-value pairs. You can specify up to 50 entries, with keys up to 128 characters and values up to 1024 characters.</p>
    pub fn get_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.inner.get_parameters()
    }
    /// <p>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</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. This field is automatically populated if not provided.</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. This field is automatically populated if not provided.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_client_token()
    }
}