aws_sdk_iam/operation/create_role/_create_role_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateRoleInput {
6 /// <p>The path to the role. For more information about paths, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM Identifiers</a> in the <i>IAM User Guide</i>.</p>
7 /// <p>This parameter is optional. If it is not included, it defaults to a slash (/).</p>
8 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (<code>\u0021</code>) through the DEL character (<code>\u007F</code>), including most punctuation characters, digits, and upper and lowercased letters.</p>
9 pub path: ::std::option::Option<::std::string::String>,
10 /// <p>The name of the role to create.</p>
11 /// <p>IAM user, group, role, and policy names must be unique within the account. Names are not distinguished by case. For example, you cannot create resources named both "MyResource" and "myresource".</p>
12 /// <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>
13 pub role_name: ::std::option::Option<::std::string::String>,
14 /// <p>The trust relationship policy document that grants an entity permission to assume the role.</p>
15 /// <p>In IAM, you must provide a JSON policy that has been converted to a string. However, for CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. CloudFormation always converts a YAML policy to JSON format before submitting it to IAM.</p>
16 /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> used to validate this parameter is a string of characters consisting of the following:</p>
17 /// <ul>
18 /// <li>
19 /// <p>Any printable ASCII character ranging from the space character (<code>\u0020</code>) through the end of the ASCII character range</p></li>
20 /// <li>
21 /// <p>The printable characters in the Basic Latin and Latin-1 Supplement character set (through <code>\u00FF</code>)</p></li>
22 /// <li>
23 /// <p>The special characters tab (<code>\u0009</code>), line feed (<code>\u000A</code>), and carriage return (<code>\u000D</code>)</p></li>
24 /// </ul>
25 /// <p>Upon success, the response includes the same trust policy in JSON format.</p>
26 pub assume_role_policy_document: ::std::option::Option<::std::string::String>,
27 /// <p>A description of the role.</p>
28 pub description: ::std::option::Option<::std::string::String>,
29 /// <p>The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default value of one hour is applied. This setting can have a value from 1 hour to 12 hours.</p>
30 /// <p>Anyone who assumes the role from the CLI or API can use the <code>DurationSeconds</code> API parameter or the <code>duration-seconds</code> CLI parameter to request a longer session. The <code>MaxSessionDuration</code> setting determines the maximum duration that can be requested using the <code>DurationSeconds</code> parameter. If users don't specify a value for the <code>DurationSeconds</code> parameter, their security credentials are valid for one hour by default. This applies when you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI operations but does not apply when you use those operations to create a console URL. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html">Using IAM roles</a> in the <i>IAM User Guide</i>.</p>
31 pub max_session_duration: ::std::option::Option<i32>,
32 /// <p>The ARN of the managed policy that is used to set the permissions boundary for the role.</p>
33 /// <p>A permissions boundary policy defines the maximum permissions that identity-based policies can grant to an entity, but does not grant permissions. Permissions boundaries do not define the maximum permissions that a resource-based policy can grant to an entity. To learn more, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html">Permissions boundaries for IAM entities</a> in the <i>IAM User Guide</i>.</p>
34 /// <p>For more information about policy types, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types">Policy types </a> in the <i>IAM User Guide</i>.</p>
35 pub permissions_boundary: ::std::option::Option<::std::string::String>,
36 /// <p>A list of tags that you want to attach to the new role. Each tag consists of a key name and an associated value. For more information about tagging, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html">Tagging IAM resources</a> in the <i>IAM User Guide</i>.</p><note>
37 /// <p>If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request fails and the resource is not created.</p>
38 /// </note>
39 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
40}
41impl CreateRoleInput {
42 /// <p>The path to the role. For more information about paths, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM Identifiers</a> in the <i>IAM User Guide</i>.</p>
43 /// <p>This parameter is optional. If it is not included, it defaults to a slash (/).</p>
44 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (<code>\u0021</code>) through the DEL character (<code>\u007F</code>), including most punctuation characters, digits, and upper and lowercased letters.</p>
45 pub fn path(&self) -> ::std::option::Option<&str> {
46 self.path.as_deref()
47 }
48 /// <p>The name of the role to create.</p>
49 /// <p>IAM user, group, role, and policy names must be unique within the account. Names are not distinguished by case. For example, you cannot create resources named both "MyResource" and "myresource".</p>
50 /// <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>
51 pub fn role_name(&self) -> ::std::option::Option<&str> {
52 self.role_name.as_deref()
53 }
54 /// <p>The trust relationship policy document that grants an entity permission to assume the role.</p>
55 /// <p>In IAM, you must provide a JSON policy that has been converted to a string. However, for CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. CloudFormation always converts a YAML policy to JSON format before submitting it to IAM.</p>
56 /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> used to validate this parameter is a string of characters consisting of the following:</p>
57 /// <ul>
58 /// <li>
59 /// <p>Any printable ASCII character ranging from the space character (<code>\u0020</code>) through the end of the ASCII character range</p></li>
60 /// <li>
61 /// <p>The printable characters in the Basic Latin and Latin-1 Supplement character set (through <code>\u00FF</code>)</p></li>
62 /// <li>
63 /// <p>The special characters tab (<code>\u0009</code>), line feed (<code>\u000A</code>), and carriage return (<code>\u000D</code>)</p></li>
64 /// </ul>
65 /// <p>Upon success, the response includes the same trust policy in JSON format.</p>
66 pub fn assume_role_policy_document(&self) -> ::std::option::Option<&str> {
67 self.assume_role_policy_document.as_deref()
68 }
69 /// <p>A description of the role.</p>
70 pub fn description(&self) -> ::std::option::Option<&str> {
71 self.description.as_deref()
72 }
73 /// <p>The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default value of one hour is applied. This setting can have a value from 1 hour to 12 hours.</p>
74 /// <p>Anyone who assumes the role from the CLI or API can use the <code>DurationSeconds</code> API parameter or the <code>duration-seconds</code> CLI parameter to request a longer session. The <code>MaxSessionDuration</code> setting determines the maximum duration that can be requested using the <code>DurationSeconds</code> parameter. If users don't specify a value for the <code>DurationSeconds</code> parameter, their security credentials are valid for one hour by default. This applies when you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI operations but does not apply when you use those operations to create a console URL. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html">Using IAM roles</a> in the <i>IAM User Guide</i>.</p>
75 pub fn max_session_duration(&self) -> ::std::option::Option<i32> {
76 self.max_session_duration
77 }
78 /// <p>The ARN of the managed policy that is used to set the permissions boundary for the role.</p>
79 /// <p>A permissions boundary policy defines the maximum permissions that identity-based policies can grant to an entity, but does not grant permissions. Permissions boundaries do not define the maximum permissions that a resource-based policy can grant to an entity. To learn more, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html">Permissions boundaries for IAM entities</a> in the <i>IAM User Guide</i>.</p>
80 /// <p>For more information about policy types, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types">Policy types </a> in the <i>IAM User Guide</i>.</p>
81 pub fn permissions_boundary(&self) -> ::std::option::Option<&str> {
82 self.permissions_boundary.as_deref()
83 }
84 /// <p>A list of tags that you want to attach to the new role. Each tag consists of a key name and an associated value. For more information about tagging, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html">Tagging IAM resources</a> in the <i>IAM User Guide</i>.</p><note>
85 /// <p>If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request fails and the resource is not created.</p>
86 /// </note>
87 ///
88 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
89 pub fn tags(&self) -> &[crate::types::Tag] {
90 self.tags.as_deref().unwrap_or_default()
91 }
92}
93impl CreateRoleInput {
94 /// Creates a new builder-style object to manufacture [`CreateRoleInput`](crate::operation::create_role::CreateRoleInput).
95 pub fn builder() -> crate::operation::create_role::builders::CreateRoleInputBuilder {
96 crate::operation::create_role::builders::CreateRoleInputBuilder::default()
97 }
98}
99
100/// A builder for [`CreateRoleInput`](crate::operation::create_role::CreateRoleInput).
101#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
102#[non_exhaustive]
103pub struct CreateRoleInputBuilder {
104 pub(crate) path: ::std::option::Option<::std::string::String>,
105 pub(crate) role_name: ::std::option::Option<::std::string::String>,
106 pub(crate) assume_role_policy_document: ::std::option::Option<::std::string::String>,
107 pub(crate) description: ::std::option::Option<::std::string::String>,
108 pub(crate) max_session_duration: ::std::option::Option<i32>,
109 pub(crate) permissions_boundary: ::std::option::Option<::std::string::String>,
110 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
111}
112impl CreateRoleInputBuilder {
113 /// <p>The path to the role. For more information about paths, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM Identifiers</a> in the <i>IAM User Guide</i>.</p>
114 /// <p>This parameter is optional. If it is not included, it defaults to a slash (/).</p>
115 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (<code>\u0021</code>) through the DEL character (<code>\u007F</code>), including most punctuation characters, digits, and upper and lowercased letters.</p>
116 pub fn path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117 self.path = ::std::option::Option::Some(input.into());
118 self
119 }
120 /// <p>The path to the role. For more information about paths, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM Identifiers</a> in the <i>IAM User Guide</i>.</p>
121 /// <p>This parameter is optional. If it is not included, it defaults to a slash (/).</p>
122 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (<code>\u0021</code>) through the DEL character (<code>\u007F</code>), including most punctuation characters, digits, and upper and lowercased letters.</p>
123 pub fn set_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.path = input;
125 self
126 }
127 /// <p>The path to the role. For more information about paths, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html">IAM Identifiers</a> in the <i>IAM User Guide</i>.</p>
128 /// <p>This parameter is optional. If it is not included, it defaults to a slash (/).</p>
129 /// <p>This parameter allows (through its <a href="http://wikipedia.org/wiki/regex">regex pattern</a>) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (<code>\u0021</code>) through the DEL character (<code>\u007F</code>), including most punctuation characters, digits, and upper and lowercased letters.</p>
130 pub fn get_path(&self) -> &::std::option::Option<::std::string::String> {
131 &self.path
132 }
133 /// <p>The name of the role to create.</p>
134 /// <p>IAM user, group, role, and policy names must be unique within the account. Names are not distinguished by case. For example, you cannot create resources named both "MyResource" and "myresource".</p>
135 /// <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>
136 /// This field is required.
137 pub fn role_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138 self.role_name = ::std::option::Option::Some(input.into());
139 self
140 }
141 /// <p>The name of the role to create.</p>
142 /// <p>IAM user, group, role, and policy names must be unique within the account. Names are not distinguished by case. For example, you cannot create resources named both "MyResource" and "myresource".</p>
143 /// <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>
144 pub fn set_role_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
145 self.role_name = input;
146 self
147 }
148 /// <p>The name of the role to create.</p>
149 /// <p>IAM user, group, role, and policy names must be unique within the account. Names are not distinguished by case. For example, you cannot create resources named both "MyResource" and "myresource".</p>
150 /// <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>
151 pub fn get_role_name(&self) -> &::std::option::Option<::std::string::String> {
152 &self.role_name
153 }
154 /// <p>The trust relationship policy document that grants an entity permission to assume the role.</p>
155 /// <p>In IAM, you must provide a JSON policy that has been converted to a string. However, for CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. CloudFormation always converts a YAML policy to JSON format before submitting it to IAM.</p>
156 /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> used to validate this parameter is a string of characters consisting of the following:</p>
157 /// <ul>
158 /// <li>
159 /// <p>Any printable ASCII character ranging from the space character (<code>\u0020</code>) through the end of the ASCII character range</p></li>
160 /// <li>
161 /// <p>The printable characters in the Basic Latin and Latin-1 Supplement character set (through <code>\u00FF</code>)</p></li>
162 /// <li>
163 /// <p>The special characters tab (<code>\u0009</code>), line feed (<code>\u000A</code>), and carriage return (<code>\u000D</code>)</p></li>
164 /// </ul>
165 /// <p>Upon success, the response includes the same trust policy in JSON format.</p>
166 /// This field is required.
167 pub fn assume_role_policy_document(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
168 self.assume_role_policy_document = ::std::option::Option::Some(input.into());
169 self
170 }
171 /// <p>The trust relationship policy document that grants an entity permission to assume the role.</p>
172 /// <p>In IAM, you must provide a JSON policy that has been converted to a string. However, for CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. CloudFormation always converts a YAML policy to JSON format before submitting it to IAM.</p>
173 /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> used to validate this parameter is a string of characters consisting of the following:</p>
174 /// <ul>
175 /// <li>
176 /// <p>Any printable ASCII character ranging from the space character (<code>\u0020</code>) through the end of the ASCII character range</p></li>
177 /// <li>
178 /// <p>The printable characters in the Basic Latin and Latin-1 Supplement character set (through <code>\u00FF</code>)</p></li>
179 /// <li>
180 /// <p>The special characters tab (<code>\u0009</code>), line feed (<code>\u000A</code>), and carriage return (<code>\u000D</code>)</p></li>
181 /// </ul>
182 /// <p>Upon success, the response includes the same trust policy in JSON format.</p>
183 pub fn set_assume_role_policy_document(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
184 self.assume_role_policy_document = input;
185 self
186 }
187 /// <p>The trust relationship policy document that grants an entity permission to assume the role.</p>
188 /// <p>In IAM, you must provide a JSON policy that has been converted to a string. However, for CloudFormation templates formatted in YAML, you can provide the policy in JSON or YAML format. CloudFormation always converts a YAML policy to JSON format before submitting it to IAM.</p>
189 /// <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> used to validate this parameter is a string of characters consisting of the following:</p>
190 /// <ul>
191 /// <li>
192 /// <p>Any printable ASCII character ranging from the space character (<code>\u0020</code>) through the end of the ASCII character range</p></li>
193 /// <li>
194 /// <p>The printable characters in the Basic Latin and Latin-1 Supplement character set (through <code>\u00FF</code>)</p></li>
195 /// <li>
196 /// <p>The special characters tab (<code>\u0009</code>), line feed (<code>\u000A</code>), and carriage return (<code>\u000D</code>)</p></li>
197 /// </ul>
198 /// <p>Upon success, the response includes the same trust policy in JSON format.</p>
199 pub fn get_assume_role_policy_document(&self) -> &::std::option::Option<::std::string::String> {
200 &self.assume_role_policy_document
201 }
202 /// <p>A description of the role.</p>
203 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
204 self.description = ::std::option::Option::Some(input.into());
205 self
206 }
207 /// <p>A description of the role.</p>
208 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
209 self.description = input;
210 self
211 }
212 /// <p>A description of the role.</p>
213 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
214 &self.description
215 }
216 /// <p>The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default value of one hour is applied. This setting can have a value from 1 hour to 12 hours.</p>
217 /// <p>Anyone who assumes the role from the CLI or API can use the <code>DurationSeconds</code> API parameter or the <code>duration-seconds</code> CLI parameter to request a longer session. The <code>MaxSessionDuration</code> setting determines the maximum duration that can be requested using the <code>DurationSeconds</code> parameter. If users don't specify a value for the <code>DurationSeconds</code> parameter, their security credentials are valid for one hour by default. This applies when you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI operations but does not apply when you use those operations to create a console URL. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html">Using IAM roles</a> in the <i>IAM User Guide</i>.</p>
218 pub fn max_session_duration(mut self, input: i32) -> Self {
219 self.max_session_duration = ::std::option::Option::Some(input);
220 self
221 }
222 /// <p>The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default value of one hour is applied. This setting can have a value from 1 hour to 12 hours.</p>
223 /// <p>Anyone who assumes the role from the CLI or API can use the <code>DurationSeconds</code> API parameter or the <code>duration-seconds</code> CLI parameter to request a longer session. The <code>MaxSessionDuration</code> setting determines the maximum duration that can be requested using the <code>DurationSeconds</code> parameter. If users don't specify a value for the <code>DurationSeconds</code> parameter, their security credentials are valid for one hour by default. This applies when you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI operations but does not apply when you use those operations to create a console URL. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html">Using IAM roles</a> in the <i>IAM User Guide</i>.</p>
224 pub fn set_max_session_duration(mut self, input: ::std::option::Option<i32>) -> Self {
225 self.max_session_duration = input;
226 self
227 }
228 /// <p>The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default value of one hour is applied. This setting can have a value from 1 hour to 12 hours.</p>
229 /// <p>Anyone who assumes the role from the CLI or API can use the <code>DurationSeconds</code> API parameter or the <code>duration-seconds</code> CLI parameter to request a longer session. The <code>MaxSessionDuration</code> setting determines the maximum duration that can be requested using the <code>DurationSeconds</code> parameter. If users don't specify a value for the <code>DurationSeconds</code> parameter, their security credentials are valid for one hour by default. This applies when you use the <code>AssumeRole*</code> API operations or the <code>assume-role*</code> CLI operations but does not apply when you use those operations to create a console URL. For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html">Using IAM roles</a> in the <i>IAM User Guide</i>.</p>
230 pub fn get_max_session_duration(&self) -> &::std::option::Option<i32> {
231 &self.max_session_duration
232 }
233 /// <p>The ARN of the managed policy that is used to set the permissions boundary for the role.</p>
234 /// <p>A permissions boundary policy defines the maximum permissions that identity-based policies can grant to an entity, but does not grant permissions. Permissions boundaries do not define the maximum permissions that a resource-based policy can grant to an entity. To learn more, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html">Permissions boundaries for IAM entities</a> in the <i>IAM User Guide</i>.</p>
235 /// <p>For more information about policy types, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types">Policy types </a> in the <i>IAM User Guide</i>.</p>
236 pub fn permissions_boundary(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
237 self.permissions_boundary = ::std::option::Option::Some(input.into());
238 self
239 }
240 /// <p>The ARN of the managed policy that is used to set the permissions boundary for the role.</p>
241 /// <p>A permissions boundary policy defines the maximum permissions that identity-based policies can grant to an entity, but does not grant permissions. Permissions boundaries do not define the maximum permissions that a resource-based policy can grant to an entity. To learn more, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html">Permissions boundaries for IAM entities</a> in the <i>IAM User Guide</i>.</p>
242 /// <p>For more information about policy types, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types">Policy types </a> in the <i>IAM User Guide</i>.</p>
243 pub fn set_permissions_boundary(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
244 self.permissions_boundary = input;
245 self
246 }
247 /// <p>The ARN of the managed policy that is used to set the permissions boundary for the role.</p>
248 /// <p>A permissions boundary policy defines the maximum permissions that identity-based policies can grant to an entity, but does not grant permissions. Permissions boundaries do not define the maximum permissions that a resource-based policy can grant to an entity. To learn more, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html">Permissions boundaries for IAM entities</a> in the <i>IAM User Guide</i>.</p>
249 /// <p>For more information about policy types, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#access_policy-types">Policy types </a> in the <i>IAM User Guide</i>.</p>
250 pub fn get_permissions_boundary(&self) -> &::std::option::Option<::std::string::String> {
251 &self.permissions_boundary
252 }
253 /// Appends an item to `tags`.
254 ///
255 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
256 ///
257 /// <p>A list of tags that you want to attach to the new role. Each tag consists of a key name and an associated value. For more information about tagging, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html">Tagging IAM resources</a> in the <i>IAM User Guide</i>.</p><note>
258 /// <p>If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request fails and the resource is not created.</p>
259 /// </note>
260 pub fn tags(mut self, input: crate::types::Tag) -> Self {
261 let mut v = self.tags.unwrap_or_default();
262 v.push(input);
263 self.tags = ::std::option::Option::Some(v);
264 self
265 }
266 /// <p>A list of tags that you want to attach to the new role. Each tag consists of a key name and an associated value. For more information about tagging, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html">Tagging IAM resources</a> in the <i>IAM User Guide</i>.</p><note>
267 /// <p>If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request fails and the resource is not created.</p>
268 /// </note>
269 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
270 self.tags = input;
271 self
272 }
273 /// <p>A list of tags that you want to attach to the new role. Each tag consists of a key name and an associated value. For more information about tagging, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_tags.html">Tagging IAM resources</a> in the <i>IAM User Guide</i>.</p><note>
274 /// <p>If any one of the tags is invalid or if you exceed the allowed maximum number of tags, then the entire request fails and the resource is not created.</p>
275 /// </note>
276 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
277 &self.tags
278 }
279 /// Consumes the builder and constructs a [`CreateRoleInput`](crate::operation::create_role::CreateRoleInput).
280 pub fn build(self) -> ::std::result::Result<crate::operation::create_role::CreateRoleInput, ::aws_smithy_types::error::operation::BuildError> {
281 ::std::result::Result::Ok(crate::operation::create_role::CreateRoleInput {
282 path: self.path,
283 role_name: self.role_name,
284 assume_role_policy_document: self.assume_role_policy_document,
285 description: self.description,
286 max_session_duration: self.max_session_duration,
287 permissions_boundary: self.permissions_boundary,
288 tags: self.tags,
289 })
290 }
291}