// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::get_deployable_patch_snapshot_for_instance::_get_deployable_patch_snapshot_for_instance_input::GetDeployablePatchSnapshotForInstanceInputBuilder;
pub use crate::operation::get_deployable_patch_snapshot_for_instance::_get_deployable_patch_snapshot_for_instance_output::GetDeployablePatchSnapshotForInstanceOutputBuilder;
impl crate::operation::get_deployable_patch_snapshot_for_instance::builders::GetDeployablePatchSnapshotForInstanceInputBuilder {
/// Sends a request with this input using the given client.
pub async fn send_with(
self,
client: &crate::Client,
) -> ::std::result::Result<
crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceError,
::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
>,
> {
let mut fluent_builder = client.get_deployable_patch_snapshot_for_instance();
fluent_builder.inner = self;
fluent_builder.send().await
}
}
/// Fluent builder constructing a request to `GetDeployablePatchSnapshotForInstance`.
///
/// <p>Retrieves the current snapshot for the patch baseline the managed node uses. This API is primarily used by the <code>AWS-RunPatchBaseline</code> Systems Manager document (SSM document).</p><note>
/// <p>If you run the command locally, such as with the Command Line Interface (CLI), the system attempts to use your local Amazon Web Services credentials and the operation fails. To avoid this, you can run the command in the Amazon Web Services Systems Manager console. Use Run Command, a tool in Amazon Web Services Systems Manager, with an SSM document that enables you to target a managed node with a script or command. For example, run the command using the <code>AWS-RunShellScript</code> document or the <code>AWS-RunPowerShellScript</code> document.</p>
/// </note>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct GetDeployablePatchSnapshotForInstanceFluentBuilder {
handle: ::std::sync::Arc<crate::client::Handle>,
inner: crate::operation::get_deployable_patch_snapshot_for_instance::builders::GetDeployablePatchSnapshotForInstanceInputBuilder,
config_override: ::std::option::Option<crate::config::Builder>,
}
impl
crate::client::customize::internal::CustomizableSend<
crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceOutput,
crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceError,
> for GetDeployablePatchSnapshotForInstanceFluentBuilder
{
fn send(
self,
config_override: crate::config::Builder,
) -> crate::client::customize::internal::BoxFuture<
crate::client::customize::internal::SendResult<
crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceOutput,
crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceError,
>,
> {
::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
}
}
impl GetDeployablePatchSnapshotForInstanceFluentBuilder {
/// Creates a new `GetDeployablePatchSnapshotForInstanceFluentBuilder`.
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 GetDeployablePatchSnapshotForInstance as a reference.
pub fn as_input(
&self,
) -> &crate::operation::get_deployable_patch_snapshot_for_instance::builders::GetDeployablePatchSnapshotForInstanceInputBuilder {
&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::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceOutput,
::aws_smithy_runtime_api::client::result::SdkError<
crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceError,
::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::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstance::operation_runtime_plugins(
self.handle.runtime_plugins.clone(),
&self.handle.conf,
self.config_override,
);
crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstance::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::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceOutput,
crate::operation::get_deployable_patch_snapshot_for_instance::GetDeployablePatchSnapshotForInstanceError,
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 ID of the managed node for which the appropriate patch snapshot should be retrieved.</p>
pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.instance_id(input.into());
self
}
/// <p>The ID of the managed node for which the appropriate patch snapshot should be retrieved.</p>
pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_instance_id(input);
self
}
/// <p>The ID of the managed node for which the appropriate patch snapshot should be retrieved.</p>
pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_instance_id()
}
/// <p>The snapshot ID provided by the user when running <code>AWS-RunPatchBaseline</code>.</p>
pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.inner = self.inner.snapshot_id(input.into());
self
}
/// <p>The snapshot ID provided by the user when running <code>AWS-RunPatchBaseline</code>.</p>
pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.inner = self.inner.set_snapshot_id(input);
self
}
/// <p>The snapshot ID provided by the user when running <code>AWS-RunPatchBaseline</code>.</p>
pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
self.inner.get_snapshot_id()
}
/// <p>Defines the basic information about a patch baseline override.</p>
pub fn baseline_override(mut self, input: crate::types::BaselineOverride) -> Self {
self.inner = self.inner.baseline_override(input);
self
}
/// <p>Defines the basic information about a patch baseline override.</p>
pub fn set_baseline_override(mut self, input: ::std::option::Option<crate::types::BaselineOverride>) -> Self {
self.inner = self.inner.set_baseline_override(input);
self
}
/// <p>Defines the basic information about a patch baseline override.</p>
pub fn get_baseline_override(&self) -> &::std::option::Option<crate::types::BaselineOverride> {
self.inner.get_baseline_override()
}
/// <p>Specifies whether to use S3 dualstack endpoints for the patch snapshot download URL. Set to <code>true</code> to receive a presigned URL that supports both IPv4 and IPv6 connectivity. Set to <code>false</code> to use standard IPv4-only endpoints. Default is <code>false</code>. This parameter is required for managed nodes in IPv6-only environments.</p>
pub fn use_s3_dual_stack_endpoint(mut self, input: bool) -> Self {
self.inner = self.inner.use_s3_dual_stack_endpoint(input);
self
}
/// <p>Specifies whether to use S3 dualstack endpoints for the patch snapshot download URL. Set to <code>true</code> to receive a presigned URL that supports both IPv4 and IPv6 connectivity. Set to <code>false</code> to use standard IPv4-only endpoints. Default is <code>false</code>. This parameter is required for managed nodes in IPv6-only environments.</p>
pub fn set_use_s3_dual_stack_endpoint(mut self, input: ::std::option::Option<bool>) -> Self {
self.inner = self.inner.set_use_s3_dual_stack_endpoint(input);
self
}
/// <p>Specifies whether to use S3 dualstack endpoints for the patch snapshot download URL. Set to <code>true</code> to receive a presigned URL that supports both IPv4 and IPv6 connectivity. Set to <code>false</code> to use standard IPv4-only endpoints. Default is <code>false</code>. This parameter is required for managed nodes in IPv6-only environments.</p>
pub fn get_use_s3_dual_stack_endpoint(&self) -> &::std::option::Option<bool> {
self.inner.get_use_s3_dual_stack_endpoint()
}
}