pub struct DescribeInstanceStorageConfig { /* private fields */ }
Expand description
Operation shape for DescribeInstanceStorageConfig
.
This is usually constructed for you using the the fluent builder returned by
describe_instance_storage_config
.
See crate::client::fluent_builders::DescribeInstanceStorageConfig
for more details about the operation.
Implementations§
source§impl DescribeInstanceStorageConfig
impl DescribeInstanceStorageConfig
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture DescribeInstanceStorageConfigInput
.
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new DescribeInstanceStorageConfig
operation.
Examples found in repository?
src/input.rs (line 9690)
9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 9564 9565 9566 9567 9568 9569 9570 9571 9572 9573 9574 9575 9576 9577 9578 9579 9580 9581 9582 9583 9584 9585 9586 9587 9588 9589 9590 9591 9592 9593 9594 9595 9596 9597 9598 9599 9600 9601 9602 9603 9604 9605 9606 9607 9608 9609 9610 9611 9612 9613 9614 9615 9616 9617 9618 9619 9620 9621 9622 9623 9624 9625 9626 9627 9628 9629 9630 9631 9632 9633 9634 9635 9636 9637 9638 9639 9640 9641 9642 9643 9644 9645 9646 9647 9648 9649 9650 9651 9652 9653 9654 9655 9656 9657 9658 9659 9660 9661 9662 9663 9664 9665 9666 9667 9668 9669 9670 9671 9672 9673 9674 9675 9676 9677 9678 9679 9680 9681 9682 9683 9684 9685 9686 9687 9688 9689 9690 9691 9692 9693 9694 9695 9696 9697 9698
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DescribeInstanceStorageConfig,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DescribeInstanceStorageConfigInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_66 = &_input.instance_id;
let input_66 = input_66.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"instance_id",
"cannot be empty or unset",
)
})?;
let instance_id = aws_smithy_http::label::fmt_string(
input_66,
aws_smithy_http::label::EncodingStrategy::Default,
);
if instance_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"instance_id",
"cannot be empty or unset",
),
);
}
let input_67 = &_input.association_id;
let input_67 = input_67.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"association_id",
"cannot be empty or unset",
)
})?;
let association_id = aws_smithy_http::label::fmt_string(
input_67,
aws_smithy_http::label::EncodingStrategy::Default,
);
if association_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"association_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/instance/{InstanceId}/storage-config/{AssociationId}",
InstanceId = instance_id,
AssociationId = association_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DescribeInstanceStorageConfigInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_68 = &_input.resource_type;
let inner_68 = inner_68.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"resource_type",
"cannot be empty or unset",
)
})?;
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_68),
);
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DescribeInstanceStorageConfigInput,
builder: http::request::Builder,
) -> std::result::Result<
http::request::Builder,
aws_smithy_http::operation::error::BuildError,
> {
let mut uri = String::new();
uri_base(input, &mut uri)?;
uri_query(input, &mut uri)?;
Ok(builder.method("GET").uri(uri))
}
let mut builder = update_http_builder(&self, http::request::Builder::new())?;
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let mut user_agent = aws_http::user_agent::AwsUserAgent::new_from_environment(
aws_types::os_shim_internal::Env::real(),
crate::API_METADATA.clone(),
);
if let Some(app_name) = _config.app_name() {
user_agent = user_agent.with_app_name(app_name.clone());
}
request.properties_mut().insert(user_agent);
let mut signing_config = aws_sig_auth::signer::OperationSigningConfig::default_config();
request.properties_mut().insert(signing_config);
request
.properties_mut()
.insert(aws_types::SigningService::from_static(
_config.signing_service(),
));
if let Some(region) = &_config.region {
request
.properties_mut()
.insert(aws_types::region::SigningRegion::from(region.clone()));
}
let endpoint_params = aws_endpoint::Params::new(_config.region.clone());
request
.properties_mut()
.insert::<aws_smithy_http::endpoint::Result>(
_config.endpoint_resolver.resolve_endpoint(&endpoint_params),
);
if let Some(region) = &_config.region {
request.properties_mut().insert(region.clone());
}
aws_http::auth::set_provider(
&mut request.properties_mut(),
_config.credentials_provider.clone(),
);
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DescribeInstanceStorageConfig::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DescribeInstanceStorageConfig",
"connect",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
Trait Implementations§
source§impl Clone for DescribeInstanceStorageConfig
impl Clone for DescribeInstanceStorageConfig
source§fn clone(&self) -> DescribeInstanceStorageConfig
fn clone(&self) -> DescribeInstanceStorageConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for DescribeInstanceStorageConfig
impl Default for DescribeInstanceStorageConfig
source§fn default() -> DescribeInstanceStorageConfig
fn default() -> DescribeInstanceStorageConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for DescribeInstanceStorageConfig
impl Send for DescribeInstanceStorageConfig
impl Sync for DescribeInstanceStorageConfig
impl Unpin for DescribeInstanceStorageConfig
impl UnwindSafe for DescribeInstanceStorageConfig
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> ParseHttpResponse for Twhere
T: ParseStrictResponse,
impl<T> ParseHttpResponse for Twhere
T: ParseStrictResponse,
§type Output = <T as ParseStrictResponse>::Output
type Output = <T as ParseStrictResponse>::Output
Output type of the HttpResponse. Read more
source§fn parse_unloaded(
&self,
_response: &mut Response
) -> Option<<T as ParseHttpResponse>::Output>
fn parse_unloaded(
&self,
_response: &mut Response
) -> Option<<T as ParseHttpResponse>::Output>
Parse an HTTP request without reading the body. If the body must be provided to proceed,
return
None
Read moresource§fn parse_loaded(
&self,
response: &Response<Bytes>
) -> <T as ParseHttpResponse>::Output
fn parse_loaded(
&self,
response: &Response<Bytes>
) -> <T as ParseHttpResponse>::Output
Parse an HTTP request from a fully loaded body. This is for standard request/response style
APIs like AwsJson 1.0/1.1 and the error path of most streaming APIs Read more