aws_sdk_iam/operation/get_account_authorization_details/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_account_authorization_details::_get_account_authorization_details_output::GetAccountAuthorizationDetailsOutputBuilder;
3
4pub use crate::operation::get_account_authorization_details::_get_account_authorization_details_input::GetAccountAuthorizationDetailsInputBuilder;
5
6impl crate::operation::get_account_authorization_details::builders::GetAccountAuthorizationDetailsInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::get_account_authorization_details::GetAccountAuthorizationDetailsOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::get_account_authorization_details::GetAccountAuthorizationDetailsError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.get_account_authorization_details();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `GetAccountAuthorizationDetails`.
24///
25/// <p>Retrieves information about all IAM users, groups, roles, and policies in your Amazon Web Services account, including their relationships to one another. Use this operation to obtain a snapshot of the configuration of IAM permissions (users, groups, roles, and policies) in your account.</p><note>
26/// <p>Policies returned by this operation are URL-encoded compliant with <a href="https://tools.ietf.org/html/rfc3986">RFC 3986</a>. You can use a URL decoding method to convert the policy back to plain JSON text. For example, if you use Java, you can use the <code>decode</code> method of the <code>java.net.URLDecoder</code> utility class in the Java SDK. Other languages and SDKs provide similar functionality, and some SDKs do this decoding automatically.</p>
27/// </note>
28/// <p>You can optionally filter the results using the <code>Filter</code> parameter. You can paginate the results using the <code>MaxItems</code> and <code>Marker</code> parameters.</p>
29#[derive(::std::clone::Clone, ::std::fmt::Debug)]
30pub struct GetAccountAuthorizationDetailsFluentBuilder {
31 handle: ::std::sync::Arc<crate::client::Handle>,
32 inner: crate::operation::get_account_authorization_details::builders::GetAccountAuthorizationDetailsInputBuilder,
33 config_override: ::std::option::Option<crate::config::Builder>,
34}
35impl
36 crate::client::customize::internal::CustomizableSend<
37 crate::operation::get_account_authorization_details::GetAccountAuthorizationDetailsOutput,
38 crate::operation::get_account_authorization_details::GetAccountAuthorizationDetailsError,
39 > for GetAccountAuthorizationDetailsFluentBuilder
40{
41 fn send(
42 self,
43 config_override: crate::config::Builder,
44 ) -> crate::client::customize::internal::BoxFuture<
45 crate::client::customize::internal::SendResult<
46 crate::operation::get_account_authorization_details::GetAccountAuthorizationDetailsOutput,
47 crate::operation::get_account_authorization_details::GetAccountAuthorizationDetailsError,
48 >,
49 > {
50 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
51 }
52}
53impl GetAccountAuthorizationDetailsFluentBuilder {
54 /// Creates a new `GetAccountAuthorizationDetailsFluentBuilder`.
55 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
56 Self {
57 handle,
58 inner: ::std::default::Default::default(),
59 config_override: ::std::option::Option::None,
60 }
61 }
62 /// Access the GetAccountAuthorizationDetails as a reference.
63 pub fn as_input(&self) -> &crate::operation::get_account_authorization_details::builders::GetAccountAuthorizationDetailsInputBuilder {
64 &self.inner
65 }
66 /// Sends the request and returns the response.
67 ///
68 /// If an error occurs, an `SdkError` will be returned with additional details that
69 /// can be matched against.
70 ///
71 /// By default, any retryable failures will be retried twice. Retry behavior
72 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
73 /// set when configuring the client.
74 pub async fn send(
75 self,
76 ) -> ::std::result::Result<
77 crate::operation::get_account_authorization_details::GetAccountAuthorizationDetailsOutput,
78 ::aws_smithy_runtime_api::client::result::SdkError<
79 crate::operation::get_account_authorization_details::GetAccountAuthorizationDetailsError,
80 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
81 >,
82 > {
83 let input = self
84 .inner
85 .build()
86 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
87 let runtime_plugins = crate::operation::get_account_authorization_details::GetAccountAuthorizationDetails::operation_runtime_plugins(
88 self.handle.runtime_plugins.clone(),
89 &self.handle.conf,
90 self.config_override,
91 );
92 crate::operation::get_account_authorization_details::GetAccountAuthorizationDetails::orchestrate(&runtime_plugins, input).await
93 }
94
95 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
96 pub fn customize(
97 self,
98 ) -> crate::client::customize::CustomizableOperation<
99 crate::operation::get_account_authorization_details::GetAccountAuthorizationDetailsOutput,
100 crate::operation::get_account_authorization_details::GetAccountAuthorizationDetailsError,
101 Self,
102 > {
103 crate::client::customize::CustomizableOperation::new(self)
104 }
105 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
106 self.set_config_override(::std::option::Option::Some(config_override.into()));
107 self
108 }
109
110 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
111 self.config_override = config_override;
112 self
113 }
114 /// Create a paginator for this request
115 ///
116 /// Paginators are used by calling [`send().await`](crate::operation::get_account_authorization_details::paginator::GetAccountAuthorizationDetailsPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
117 pub fn into_paginator(self) -> crate::operation::get_account_authorization_details::paginator::GetAccountAuthorizationDetailsPaginator {
118 crate::operation::get_account_authorization_details::paginator::GetAccountAuthorizationDetailsPaginator::new(self.handle, self.inner)
119 }
120 ///
121 /// Appends an item to `Filter`.
122 ///
123 /// To override the contents of this collection use [`set_filter`](Self::set_filter).
124 ///
125 /// <p>A list of entity types used to filter the results. Only the entities that match the types you specify are included in the output. Use the value <code>LocalManagedPolicy</code> to include customer managed policies.</p>
126 /// <p>The format for this parameter is a comma-separated (if more than one) list of strings. Each string value in the list must be one of the valid values listed below.</p>
127 pub fn filter(mut self, input: crate::types::EntityType) -> Self {
128 self.inner = self.inner.filter(input);
129 self
130 }
131 /// <p>A list of entity types used to filter the results. Only the entities that match the types you specify are included in the output. Use the value <code>LocalManagedPolicy</code> to include customer managed policies.</p>
132 /// <p>The format for this parameter is a comma-separated (if more than one) list of strings. Each string value in the list must be one of the valid values listed below.</p>
133 pub fn set_filter(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EntityType>>) -> Self {
134 self.inner = self.inner.set_filter(input);
135 self
136 }
137 /// <p>A list of entity types used to filter the results. Only the entities that match the types you specify are included in the output. Use the value <code>LocalManagedPolicy</code> to include customer managed policies.</p>
138 /// <p>The format for this parameter is a comma-separated (if more than one) list of strings. Each string value in the list must be one of the valid values listed below.</p>
139 pub fn get_filter(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EntityType>> {
140 self.inner.get_filter()
141 }
142 /// <p>Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the <code>IsTruncated</code> response element is <code>true</code>.</p>
143 /// <p>If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the <code>IsTruncated</code> response element returns <code>true</code>, and <code>Marker</code> contains a value to include in the subsequent call that tells the service where to continue from.</p>
144 pub fn max_items(mut self, input: i32) -> Self {
145 self.inner = self.inner.max_items(input);
146 self
147 }
148 /// <p>Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the <code>IsTruncated</code> response element is <code>true</code>.</p>
149 /// <p>If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the <code>IsTruncated</code> response element returns <code>true</code>, and <code>Marker</code> contains a value to include in the subsequent call that tells the service where to continue from.</p>
150 pub fn set_max_items(mut self, input: ::std::option::Option<i32>) -> Self {
151 self.inner = self.inner.set_max_items(input);
152 self
153 }
154 /// <p>Use this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the <code>IsTruncated</code> response element is <code>true</code>.</p>
155 /// <p>If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the <code>IsTruncated</code> response element returns <code>true</code>, and <code>Marker</code> contains a value to include in the subsequent call that tells the service where to continue from.</p>
156 pub fn get_max_items(&self) -> &::std::option::Option<i32> {
157 self.inner.get_max_items()
158 }
159 /// <p>Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the <code>Marker</code> element in the response that you received to indicate where the next call should start.</p>
160 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
161 self.inner = self.inner.marker(input.into());
162 self
163 }
164 /// <p>Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the <code>Marker</code> element in the response that you received to indicate where the next call should start.</p>
165 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166 self.inner = self.inner.set_marker(input);
167 self
168 }
169 /// <p>Use this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the <code>Marker</code> element in the response that you received to indicate where the next call should start.</p>
170 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
171 self.inner.get_marker()
172 }
173}