pub struct DeleteProvisioningTemplateVersion { /* private fields */ }
Expand description
Operation shape for DeleteProvisioningTemplateVersion
.
This is usually constructed for you using the the fluent builder returned by
delete_provisioning_template_version
.
See crate::client::fluent_builders::DeleteProvisioningTemplateVersion
for more details about the operation.
Implementations§
source§impl DeleteProvisioningTemplateVersion
impl DeleteProvisioningTemplateVersion
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture DeleteProvisioningTemplateVersionInput
.
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new DeleteProvisioningTemplateVersion
operation.
Examples found in repository?
src/input.rs (line 13012)
12894 12895 12896 12897 12898 12899 12900 12901 12902 12903 12904 12905 12906 12907 12908 12909 12910 12911 12912 12913 12914 12915 12916 12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 12949 12950 12951 12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 12977 12978 12979 12980 12981 12982 12983 12984 12985 12986 12987 12988 12989 12990 12991 12992 12993 12994 12995 12996 12997 12998 12999 13000 13001 13002 13003 13004 13005 13006 13007 13008 13009 13010 13011 13012 13013 13014 13015 13016 13017 13018 13019 13020
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::DeleteProvisioningTemplateVersion,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteProvisioningTemplateVersionInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_65 = &_input.template_name;
let input_65 = input_65.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"template_name",
"cannot be empty or unset",
)
})?;
let template_name = aws_smithy_http::label::fmt_string(
input_65,
aws_smithy_http::label::EncodingStrategy::Default,
);
if template_name.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"template_name",
"cannot be empty or unset",
),
);
}
let input_66 = &_input.version_id;
let input_66 = input_66.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"version_id",
"cannot be empty or unset",
)
})?;
let mut version_id_encoder = aws_smithy_types::primitive::Encoder::from(*input_66);
let version_id = version_id_encoder.encode();
if version_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"version_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/provisioning-templates/{templateName}/versions/{versionId}",
templateName = template_name,
versionId = version_id
)
.expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteProvisioningTemplateVersionInput,
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)?;
Ok(builder.method("DELETE").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::DeleteProvisioningTemplateVersion::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteProvisioningTemplateVersion",
"iot",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
Trait Implementations§
source§impl Clone for DeleteProvisioningTemplateVersion
impl Clone for DeleteProvisioningTemplateVersion
source§fn clone(&self) -> DeleteProvisioningTemplateVersion
fn clone(&self) -> DeleteProvisioningTemplateVersion
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 DeleteProvisioningTemplateVersion
impl Default for DeleteProvisioningTemplateVersion
source§fn default() -> DeleteProvisioningTemplateVersion
fn default() -> DeleteProvisioningTemplateVersion
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for DeleteProvisioningTemplateVersion
impl Send for DeleteProvisioningTemplateVersion
impl Sync for DeleteProvisioningTemplateVersion
impl Unpin for DeleteProvisioningTemplateVersion
impl UnwindSafe for DeleteProvisioningTemplateVersion
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