aws_sdk_iam/operation/get_group/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::get_group::_get_group_output::GetGroupOutputBuilder;
3
4pub use crate::operation::get_group::_get_group_input::GetGroupInputBuilder;
5
6impl crate::operation::get_group::builders::GetGroupInputBuilder {
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_group::GetGroupOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::get_group::GetGroupError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.get_group();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `GetGroup`.
24///
25/// <p>Returns a list of IAM users that are in the specified IAM group. You can paginate the results using the <code>MaxItems</code> and <code>Marker</code> parameters.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct GetGroupFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::get_group::builders::GetGroupInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl crate::client::customize::internal::CustomizableSend<crate::operation::get_group::GetGroupOutput, crate::operation::get_group::GetGroupError>
33    for GetGroupFluentBuilder
34{
35    fn send(
36        self,
37        config_override: crate::config::Builder,
38    ) -> crate::client::customize::internal::BoxFuture<
39        crate::client::customize::internal::SendResult<crate::operation::get_group::GetGroupOutput, crate::operation::get_group::GetGroupError>,
40    > {
41        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
42    }
43}
44impl GetGroupFluentBuilder {
45    /// Creates a new `GetGroupFluentBuilder`.
46    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
47        Self {
48            handle,
49            inner: ::std::default::Default::default(),
50            config_override: ::std::option::Option::None,
51        }
52    }
53    /// Access the GetGroup as a reference.
54    pub fn as_input(&self) -> &crate::operation::get_group::builders::GetGroupInputBuilder {
55        &self.inner
56    }
57    /// Sends the request and returns the response.
58    ///
59    /// If an error occurs, an `SdkError` will be returned with additional details that
60    /// can be matched against.
61    ///
62    /// By default, any retryable failures will be retried twice. Retry behavior
63    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
64    /// set when configuring the client.
65    pub async fn send(
66        self,
67    ) -> ::std::result::Result<
68        crate::operation::get_group::GetGroupOutput,
69        ::aws_smithy_runtime_api::client::result::SdkError<
70            crate::operation::get_group::GetGroupError,
71            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
72        >,
73    > {
74        let input = self
75            .inner
76            .build()
77            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
78        let runtime_plugins = crate::operation::get_group::GetGroup::operation_runtime_plugins(
79            self.handle.runtime_plugins.clone(),
80            &self.handle.conf,
81            self.config_override,
82        );
83        crate::operation::get_group::GetGroup::orchestrate(&runtime_plugins, input).await
84    }
85
86    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
87    pub fn customize(
88        self,
89    ) -> crate::client::customize::CustomizableOperation<crate::operation::get_group::GetGroupOutput, crate::operation::get_group::GetGroupError, Self>
90    {
91        crate::client::customize::CustomizableOperation::new(self)
92    }
93    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
94        self.set_config_override(::std::option::Option::Some(config_override.into()));
95        self
96    }
97
98    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
99        self.config_override = config_override;
100        self
101    }
102    /// Create a paginator for this request
103    ///
104    /// Paginators are used by calling [`send().await`](crate::operation::get_group::paginator::GetGroupPaginator::send) which returns a [`PaginationStream`](aws_smithy_async::future::pagination_stream::PaginationStream).
105    pub fn into_paginator(self) -> crate::operation::get_group::paginator::GetGroupPaginator {
106        crate::operation::get_group::paginator::GetGroupPaginator::new(self.handle, self.inner)
107    }
108    /// <p>The name of the group.</p>
109    /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
110    pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
111        self.inner = self.inner.group_name(input.into());
112        self
113    }
114    /// <p>The name of the group.</p>
115    /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
116    pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117        self.inner = self.inner.set_group_name(input);
118        self
119    }
120    /// <p>The name of the group.</p>
121    /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-</p>
122    pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_group_name()
124    }
125    /// <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>
126    pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.inner = self.inner.marker(input.into());
128        self
129    }
130    /// <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>
131    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.inner = self.inner.set_marker(input);
133        self
134    }
135    /// <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>
136    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
137        self.inner.get_marker()
138    }
139    /// <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>
140    /// <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>
141    pub fn max_items(mut self, input: i32) -> Self {
142        self.inner = self.inner.max_items(input);
143        self
144    }
145    /// <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>
146    /// <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>
147    pub fn set_max_items(mut self, input: ::std::option::Option<i32>) -> Self {
148        self.inner = self.inner.set_max_items(input);
149        self
150    }
151    /// <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>
152    /// <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>
153    pub fn get_max_items(&self) -> &::std::option::Option<i32> {
154        self.inner.get_max_items()
155    }
156}