pub struct GetNetworkResourceRelationships { /* private fields */ }Expand description
Operation shape for GetNetworkResourceRelationships.
This is usually constructed for you using the the fluent builder returned by
get_network_resource_relationships.
See crate::client::fluent_builders::GetNetworkResourceRelationships for more details about the operation.
Implementations§
source§impl GetNetworkResourceRelationships
impl GetNetworkResourceRelationships
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture GetNetworkResourceRelationshipsInput.
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new GetNetworkResourceRelationships operation.
Examples found in repository?
src/input.rs (line 10096)
9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9954 9955 9956 9957 9958 9959 9960 9961 9962 9963 9964 9965 9966 9967 9968 9969 9970 9971 9972 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 10038 10039 10040 10041 10042 10043 10044 10045 10046 10047 10048 10049 10050 10051 10052 10053 10054 10055 10056 10057 10058 10059 10060 10061 10062 10063 10064 10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<
crate::operation::GetNetworkResourceRelationships,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::operation::error::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetNetworkResourceRelationshipsInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let input_96 = &_input.global_network_id;
let input_96 = input_96.as_ref().ok_or_else(|| {
aws_smithy_http::operation::error::BuildError::missing_field(
"global_network_id",
"cannot be empty or unset",
)
})?;
let global_network_id = aws_smithy_http::label::fmt_string(
input_96,
aws_smithy_http::label::EncodingStrategy::Default,
);
if global_network_id.is_empty() {
return Err(
aws_smithy_http::operation::error::BuildError::missing_field(
"global_network_id",
"cannot be empty or unset",
),
);
}
write!(
output,
"/global-networks/{GlobalNetworkId}/network-resource-relationships",
GlobalNetworkId = global_network_id
)
.expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetNetworkResourceRelationshipsInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::error::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_97) = &_input.core_network_id {
{
query.push_kv(
"coreNetworkId",
&aws_smithy_http::query::fmt_string(&inner_97),
);
}
}
if let Some(inner_98) = &_input.registered_gateway_arn {
{
query.push_kv(
"registeredGatewayArn",
&aws_smithy_http::query::fmt_string(&inner_98),
);
}
}
if let Some(inner_99) = &_input.aws_region {
{
query.push_kv("awsRegion", &aws_smithy_http::query::fmt_string(&inner_99));
}
}
if let Some(inner_100) = &_input.account_id {
{
query.push_kv("accountId", &aws_smithy_http::query::fmt_string(&inner_100));
}
}
if let Some(inner_101) = &_input.resource_type {
{
query.push_kv(
"resourceType",
&aws_smithy_http::query::fmt_string(&inner_101),
);
}
}
if let Some(inner_102) = &_input.resource_arn {
{
query.push_kv(
"resourceArn",
&aws_smithy_http::query::fmt_string(&inner_102),
);
}
}
if let Some(inner_103) = &_input.max_results {
if *inner_103 != 0 {
query.push_kv(
"maxResults",
aws_smithy_types::primitive::Encoder::from(*inner_103).encode(),
);
}
}
if let Some(inner_104) = &_input.next_token {
{
query.push_kv("nextToken", &aws_smithy_http::query::fmt_string(&inner_104));
}
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetNetworkResourceRelationshipsInput,
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::GetNetworkResourceRelationships::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetNetworkResourceRelationships",
"networkmanager",
));
let op = op.with_retry_classifier(aws_http::retry::AwsResponseRetryClassifier::new());
Ok(op)
}Trait Implementations§
source§impl Clone for GetNetworkResourceRelationships
impl Clone for GetNetworkResourceRelationships
source§fn clone(&self) -> GetNetworkResourceRelationships
fn clone(&self) -> GetNetworkResourceRelationships
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 GetNetworkResourceRelationships
impl Default for GetNetworkResourceRelationships
source§fn default() -> GetNetworkResourceRelationships
fn default() -> GetNetworkResourceRelationships
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for GetNetworkResourceRelationships
impl Send for GetNetworkResourceRelationships
impl Sync for GetNetworkResourceRelationships
impl Unpin for GetNetworkResourceRelationships
impl UnwindSafe for GetNetworkResourceRelationships
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