Struct aws_sdk_iot::operation::ListAuditTasks
source · pub struct ListAuditTasks { /* private fields */ }
Expand description
Operation shape for ListAuditTasks
.
This is usually constructed for you using the the fluent builder returned by
list_audit_tasks
.
See crate::client::fluent_builders::ListAuditTasks
for more details about the operation.
Implementations§
source§impl ListAuditTasks
impl ListAuditTasks
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ListAuditTasksInput
.
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new ListAuditTasks
operation.
Examples found in repository?
src/input.rs (line 25184)
25046 25047 25048 25049 25050 25051 25052 25053 25054 25055 25056 25057 25058 25059 25060 25061 25062 25063 25064 25065 25066 25067 25068 25069 25070 25071 25072 25073 25074 25075 25076 25077 25078 25079 25080 25081 25082 25083 25084 25085 25086 25087 25088 25089 25090 25091 25092 25093 25094 25095 25096 25097 25098 25099 25100 25101 25102 25103 25104 25105 25106 25107 25108 25109 25110 25111 25112 25113 25114 25115 25116 25117 25118 25119 25120 25121 25122 25123 25124 25125 25126 25127 25128 25129 25130 25131 25132 25133 25134 25135 25136 25137 25138 25139 25140 25141 25142 25143 25144 25145 25146 25147 25148 25149 25150 25151 25152 25153 25154 25155 25156 25157 25158 25159 25160 25161 25162 25163 25164 25165 25166 25167 25168 25169 25170 25171 25172 25173 25174 25175 25176 25177 25178 25179 25180 25181 25182 25183 25184 25185 25186 25187 25188 25189 25190 25191 25192
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::ListAuditTasks,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::ListAuditTasksInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
write!(output, "/audit/tasks").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::ListAuditTasksInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
let inner_155 = &_input.start_time;
let inner_155 = inner_155.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"start_time",
"cannot be empty or unset",
)
})?;
query.push_kv(
"startTime",
&aws_smithy_http::query::fmt_timestamp(
inner_155,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
let inner_156 = &_input.end_time;
let inner_156 = inner_156.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"end_time",
"cannot be empty or unset",
)
})?;
query.push_kv(
"endTime",
&aws_smithy_http::query::fmt_timestamp(
inner_156,
aws_smithy_types::date_time::Format::DateTime,
)?,
);
if let Some(inner_157) = &_input.task_type {
{
query.push_kv("taskType", &aws_smithy_http::query::fmt_string(&inner_157));
}
}
if let Some(inner_158) = &_input.task_status {
{
query.push_kv(
"taskStatus",
&aws_smithy_http::query::fmt_string(&inner_158),
);
}
}
if let Some(inner_159) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_159));
}
}
if let Some(inner_160) = &_input.max_results {
if *inner_160 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_160).encode(),
);
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::ListAuditTasksInput,
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::ListAuditTasks::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"ListAuditTasks",
"iot",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}
Trait Implementations§
source§impl Clone for ListAuditTasks
impl Clone for ListAuditTasks
source§fn clone(&self) -> ListAuditTasks
fn clone(&self) -> ListAuditTasks
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 Debug for ListAuditTasks
impl Debug for ListAuditTasks
source§impl Default for ListAuditTasks
impl Default for ListAuditTasks
source§fn default() -> ListAuditTasks
fn default() -> ListAuditTasks
Returns the “default value” for a type. Read more
source§impl ParseStrictResponse for ListAuditTasks
impl ParseStrictResponse for ListAuditTasks
Auto Trait Implementations§
impl RefUnwindSafe for ListAuditTasks
impl Send for ListAuditTasks
impl Sync for ListAuditTasks
impl Unpin for ListAuditTasks
impl UnwindSafe for ListAuditTasks
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