1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSecurityProfileInput {
/// <p>The name of the security profile.</p>
pub security_profile_name: ::std::option::Option<::std::string::String>,
/// <p>The description of the security profile.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>Permissions assigned to the security profile. For a list of valid permissions, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-list.html">List of security profile permissions</a>.</p>
pub permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
pub instance_id: ::std::option::Option<::std::string::String>,
/// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>The list of tags that a security profile uses to restrict access to resources in Amazon Connect.</p>
pub allowed_access_control_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>The list of resources that a security profile applies tag restrictions to in Amazon Connect. For a list of Amazon Connect resources that you can tag, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tagging.html">Add tags to resources in Amazon Connect</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
pub tag_restricted_resources: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>A list of third-party applications or MCP Servers that the security profile will give access to.</p>
pub applications: ::std::option::Option<::std::vec::Vec<crate::types::Application>>,
/// <p>The list of resources that a security profile applies hierarchy restrictions to in Amazon Connect. Following are acceptable ResourceNames: <code>User</code>.</p>
pub hierarchy_restricted_resources: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The identifier of the hierarchy group that a security profile uses to restrict access to resources in Amazon Connect.</p>
pub allowed_access_control_hierarchy_group_id: ::std::option::Option<::std::string::String>,
/// <p>A list of Flow Modules an AI Agent can invoke as a tool.</p>
pub allowed_flow_modules: ::std::option::Option<::std::vec::Vec<crate::types::FlowModule>>,
/// <p>The granular access control configuration for the security profile, including data table permissions.</p>
pub granular_access_control_configuration: ::std::option::Option<crate::types::GranularAccessControlConfiguration>,
}
impl CreateSecurityProfileInput {
/// <p>The name of the security profile.</p>
pub fn security_profile_name(&self) -> ::std::option::Option<&str> {
self.security_profile_name.as_deref()
}
/// <p>The description of the security profile.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>Permissions assigned to the security profile. For a list of valid permissions, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-list.html">List of security profile permissions</a>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.permissions.is_none()`.
pub fn permissions(&self) -> &[::std::string::String] {
self.permissions.as_deref().unwrap_or_default()
}
/// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
pub fn instance_id(&self) -> ::std::option::Option<&str> {
self.instance_id.as_deref()
}
/// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
/// <p>The list of tags that a security profile uses to restrict access to resources in Amazon Connect.</p>
pub fn allowed_access_control_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.allowed_access_control_tags.as_ref()
}
/// <p>The list of resources that a security profile applies tag restrictions to in Amazon Connect. For a list of Amazon Connect resources that you can tag, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tagging.html">Add tags to resources in Amazon Connect</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_restricted_resources.is_none()`.
pub fn tag_restricted_resources(&self) -> &[::std::string::String] {
self.tag_restricted_resources.as_deref().unwrap_or_default()
}
/// <p>A list of third-party applications or MCP Servers that the security profile will give access to.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.applications.is_none()`.
pub fn applications(&self) -> &[crate::types::Application] {
self.applications.as_deref().unwrap_or_default()
}
/// <p>The list of resources that a security profile applies hierarchy restrictions to in Amazon Connect. Following are acceptable ResourceNames: <code>User</code>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.hierarchy_restricted_resources.is_none()`.
pub fn hierarchy_restricted_resources(&self) -> &[::std::string::String] {
self.hierarchy_restricted_resources.as_deref().unwrap_or_default()
}
/// <p>The identifier of the hierarchy group that a security profile uses to restrict access to resources in Amazon Connect.</p>
pub fn allowed_access_control_hierarchy_group_id(&self) -> ::std::option::Option<&str> {
self.allowed_access_control_hierarchy_group_id.as_deref()
}
/// <p>A list of Flow Modules an AI Agent can invoke as a tool.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.allowed_flow_modules.is_none()`.
pub fn allowed_flow_modules(&self) -> &[crate::types::FlowModule] {
self.allowed_flow_modules.as_deref().unwrap_or_default()
}
/// <p>The granular access control configuration for the security profile, including data table permissions.</p>
pub fn granular_access_control_configuration(&self) -> ::std::option::Option<&crate::types::GranularAccessControlConfiguration> {
self.granular_access_control_configuration.as_ref()
}
}
impl CreateSecurityProfileInput {
/// Creates a new builder-style object to manufacture [`CreateSecurityProfileInput`](crate::operation::create_security_profile::CreateSecurityProfileInput).
pub fn builder() -> crate::operation::create_security_profile::builders::CreateSecurityProfileInputBuilder {
crate::operation::create_security_profile::builders::CreateSecurityProfileInputBuilder::default()
}
}
/// A builder for [`CreateSecurityProfileInput`](crate::operation::create_security_profile::CreateSecurityProfileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSecurityProfileInputBuilder {
pub(crate) security_profile_name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) permissions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) instance_id: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) allowed_access_control_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) tag_restricted_resources: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) applications: ::std::option::Option<::std::vec::Vec<crate::types::Application>>,
pub(crate) hierarchy_restricted_resources: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) allowed_access_control_hierarchy_group_id: ::std::option::Option<::std::string::String>,
pub(crate) allowed_flow_modules: ::std::option::Option<::std::vec::Vec<crate::types::FlowModule>>,
pub(crate) granular_access_control_configuration: ::std::option::Option<crate::types::GranularAccessControlConfiguration>,
}
impl CreateSecurityProfileInputBuilder {
/// <p>The name of the security profile.</p>
/// This field is required.
pub fn security_profile_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.security_profile_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the security profile.</p>
pub fn set_security_profile_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.security_profile_name = input;
self
}
/// <p>The name of the security profile.</p>
pub fn get_security_profile_name(&self) -> &::std::option::Option<::std::string::String> {
&self.security_profile_name
}
/// <p>The description of the security profile.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>The description of the security profile.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>The description of the security profile.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// Appends an item to `permissions`.
///
/// To override the contents of this collection use [`set_permissions`](Self::set_permissions).
///
/// <p>Permissions assigned to the security profile. For a list of valid permissions, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-list.html">List of security profile permissions</a>.</p>
pub fn permissions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.permissions.unwrap_or_default();
v.push(input.into());
self.permissions = ::std::option::Option::Some(v);
self
}
/// <p>Permissions assigned to the security profile. For a list of valid permissions, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-list.html">List of security profile permissions</a>.</p>
pub fn set_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.permissions = input;
self
}
/// <p>Permissions assigned to the security profile. For a list of valid permissions, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-profile-list.html">List of security profile permissions</a>.</p>
pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.permissions
}
/// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
/// This field is required.
pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.instance_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.instance_id = input;
self
}
/// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
&self.instance_id
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
/// <p>The tags used to organize, track, or control access for this resource. For example, { "Tags": {"key1":"value1", "key2":"value2"} }.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
/// Adds a key-value pair to `allowed_access_control_tags`.
///
/// To override the contents of this collection use [`set_allowed_access_control_tags`](Self::set_allowed_access_control_tags).
///
/// <p>The list of tags that a security profile uses to restrict access to resources in Amazon Connect.</p>
pub fn allowed_access_control_tags(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.allowed_access_control_tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.allowed_access_control_tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>The list of tags that a security profile uses to restrict access to resources in Amazon Connect.</p>
pub fn set_allowed_access_control_tags(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.allowed_access_control_tags = input;
self
}
/// <p>The list of tags that a security profile uses to restrict access to resources in Amazon Connect.</p>
pub fn get_allowed_access_control_tags(
&self,
) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.allowed_access_control_tags
}
/// Appends an item to `tag_restricted_resources`.
///
/// To override the contents of this collection use [`set_tag_restricted_resources`](Self::set_tag_restricted_resources).
///
/// <p>The list of resources that a security profile applies tag restrictions to in Amazon Connect. For a list of Amazon Connect resources that you can tag, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tagging.html">Add tags to resources in Amazon Connect</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
pub fn tag_restricted_resources(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.tag_restricted_resources.unwrap_or_default();
v.push(input.into());
self.tag_restricted_resources = ::std::option::Option::Some(v);
self
}
/// <p>The list of resources that a security profile applies tag restrictions to in Amazon Connect. For a list of Amazon Connect resources that you can tag, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tagging.html">Add tags to resources in Amazon Connect</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
pub fn set_tag_restricted_resources(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.tag_restricted_resources = input;
self
}
/// <p>The list of resources that a security profile applies tag restrictions to in Amazon Connect. For a list of Amazon Connect resources that you can tag, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/tagging.html">Add tags to resources in Amazon Connect</a> in the <i>Amazon Connect Administrator Guide</i>.</p>
pub fn get_tag_restricted_resources(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.tag_restricted_resources
}
/// Appends an item to `applications`.
///
/// To override the contents of this collection use [`set_applications`](Self::set_applications).
///
/// <p>A list of third-party applications or MCP Servers that the security profile will give access to.</p>
pub fn applications(mut self, input: crate::types::Application) -> Self {
let mut v = self.applications.unwrap_or_default();
v.push(input);
self.applications = ::std::option::Option::Some(v);
self
}
/// <p>A list of third-party applications or MCP Servers that the security profile will give access to.</p>
pub fn set_applications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Application>>) -> Self {
self.applications = input;
self
}
/// <p>A list of third-party applications or MCP Servers that the security profile will give access to.</p>
pub fn get_applications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Application>> {
&self.applications
}
/// Appends an item to `hierarchy_restricted_resources`.
///
/// To override the contents of this collection use [`set_hierarchy_restricted_resources`](Self::set_hierarchy_restricted_resources).
///
/// <p>The list of resources that a security profile applies hierarchy restrictions to in Amazon Connect. Following are acceptable ResourceNames: <code>User</code>.</p>
pub fn hierarchy_restricted_resources(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.hierarchy_restricted_resources.unwrap_or_default();
v.push(input.into());
self.hierarchy_restricted_resources = ::std::option::Option::Some(v);
self
}
/// <p>The list of resources that a security profile applies hierarchy restrictions to in Amazon Connect. Following are acceptable ResourceNames: <code>User</code>.</p>
pub fn set_hierarchy_restricted_resources(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.hierarchy_restricted_resources = input;
self
}
/// <p>The list of resources that a security profile applies hierarchy restrictions to in Amazon Connect. Following are acceptable ResourceNames: <code>User</code>.</p>
pub fn get_hierarchy_restricted_resources(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.hierarchy_restricted_resources
}
/// <p>The identifier of the hierarchy group that a security profile uses to restrict access to resources in Amazon Connect.</p>
pub fn allowed_access_control_hierarchy_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.allowed_access_control_hierarchy_group_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the hierarchy group that a security profile uses to restrict access to resources in Amazon Connect.</p>
pub fn set_allowed_access_control_hierarchy_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.allowed_access_control_hierarchy_group_id = input;
self
}
/// <p>The identifier of the hierarchy group that a security profile uses to restrict access to resources in Amazon Connect.</p>
pub fn get_allowed_access_control_hierarchy_group_id(&self) -> &::std::option::Option<::std::string::String> {
&self.allowed_access_control_hierarchy_group_id
}
/// Appends an item to `allowed_flow_modules`.
///
/// To override the contents of this collection use [`set_allowed_flow_modules`](Self::set_allowed_flow_modules).
///
/// <p>A list of Flow Modules an AI Agent can invoke as a tool.</p>
pub fn allowed_flow_modules(mut self, input: crate::types::FlowModule) -> Self {
let mut v = self.allowed_flow_modules.unwrap_or_default();
v.push(input);
self.allowed_flow_modules = ::std::option::Option::Some(v);
self
}
/// <p>A list of Flow Modules an AI Agent can invoke as a tool.</p>
pub fn set_allowed_flow_modules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FlowModule>>) -> Self {
self.allowed_flow_modules = input;
self
}
/// <p>A list of Flow Modules an AI Agent can invoke as a tool.</p>
pub fn get_allowed_flow_modules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FlowModule>> {
&self.allowed_flow_modules
}
/// <p>The granular access control configuration for the security profile, including data table permissions.</p>
pub fn granular_access_control_configuration(mut self, input: crate::types::GranularAccessControlConfiguration) -> Self {
self.granular_access_control_configuration = ::std::option::Option::Some(input);
self
}
/// <p>The granular access control configuration for the security profile, including data table permissions.</p>
pub fn set_granular_access_control_configuration(
mut self,
input: ::std::option::Option<crate::types::GranularAccessControlConfiguration>,
) -> Self {
self.granular_access_control_configuration = input;
self
}
/// <p>The granular access control configuration for the security profile, including data table permissions.</p>
pub fn get_granular_access_control_configuration(&self) -> &::std::option::Option<crate::types::GranularAccessControlConfiguration> {
&self.granular_access_control_configuration
}
/// Consumes the builder and constructs a [`CreateSecurityProfileInput`](crate::operation::create_security_profile::CreateSecurityProfileInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_security_profile::CreateSecurityProfileInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_security_profile::CreateSecurityProfileInput {
security_profile_name: self.security_profile_name,
description: self.description,
permissions: self.permissions,
instance_id: self.instance_id,
tags: self.tags,
allowed_access_control_tags: self.allowed_access_control_tags,
tag_restricted_resources: self.tag_restricted_resources,
applications: self.applications,
hierarchy_restricted_resources: self.hierarchy_restricted_resources,
allowed_access_control_hierarchy_group_id: self.allowed_access_control_hierarchy_group_id,
allowed_flow_modules: self.allowed_flow_modules,
granular_access_control_configuration: self.granular_access_control_configuration,
})
}
}