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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>///////////////////////// /////////////////////////</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetIdentityContextInput {
/// <p>The ID for the Amazon Web Services account that the user whose identity context you want to retrieve is in. Currently, you use the ID for the Amazon Web Services account that contains your Quick Sight account.</p>
pub aws_account_id: ::std::option::Option<::std::string::String>,
/// <p>The identifier for the user whose identity context you want to retrieve.</p>
pub user_identifier: ::std::option::Option<crate::types::UserIdentifier>,
/// <p>The namespace of the user that you want to get identity context for. This parameter is required when the UserIdentifier is specified using Email or UserName.</p>
pub namespace: ::std::option::Option<::std::string::String>,
/// <p>The timestamp at which the session will expire.</p>
pub session_expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The region in which the context is to be used. Use this parameter to obtain an identity context for cross-region use.</p>
/// <p>The specified region must meet the following conditions:</p>
/// <ul>
/// <li>
/// <p>The region must be in the same Amazon Web Services partition as the region you are calling from. Cross-partition requests are not supported. For example, you cannot specify a region in the <code>aws-cn</code> partition when calling from a region in the <code>aws</code> partition.</p></li>
/// <li>
/// <p>It must be a valid Amazon QuickSight supported region.</p></li>
/// <li>
/// <p>The calling customer account must be enabled in the specified context region.</p></li>
/// <li>
/// <p>This parameter is not supported when calling from an opt-in region.</p></li>
/// </ul>
pub context_region: ::std::option::Option<::std::string::String>,
}
impl GetIdentityContextInput {
/// <p>The ID for the Amazon Web Services account that the user whose identity context you want to retrieve is in. Currently, you use the ID for the Amazon Web Services account that contains your Quick Sight account.</p>
pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
self.aws_account_id.as_deref()
}
/// <p>The identifier for the user whose identity context you want to retrieve.</p>
pub fn user_identifier(&self) -> ::std::option::Option<&crate::types::UserIdentifier> {
self.user_identifier.as_ref()
}
/// <p>The namespace of the user that you want to get identity context for. This parameter is required when the UserIdentifier is specified using Email or UserName.</p>
pub fn namespace(&self) -> ::std::option::Option<&str> {
self.namespace.as_deref()
}
/// <p>The timestamp at which the session will expire.</p>
pub fn session_expires_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.session_expires_at.as_ref()
}
/// <p>The region in which the context is to be used. Use this parameter to obtain an identity context for cross-region use.</p>
/// <p>The specified region must meet the following conditions:</p>
/// <ul>
/// <li>
/// <p>The region must be in the same Amazon Web Services partition as the region you are calling from. Cross-partition requests are not supported. For example, you cannot specify a region in the <code>aws-cn</code> partition when calling from a region in the <code>aws</code> partition.</p></li>
/// <li>
/// <p>It must be a valid Amazon QuickSight supported region.</p></li>
/// <li>
/// <p>The calling customer account must be enabled in the specified context region.</p></li>
/// <li>
/// <p>This parameter is not supported when calling from an opt-in region.</p></li>
/// </ul>
pub fn context_region(&self) -> ::std::option::Option<&str> {
self.context_region.as_deref()
}
}
impl GetIdentityContextInput {
/// Creates a new builder-style object to manufacture [`GetIdentityContextInput`](crate::operation::get_identity_context::GetIdentityContextInput).
pub fn builder() -> crate::operation::get_identity_context::builders::GetIdentityContextInputBuilder {
crate::operation::get_identity_context::builders::GetIdentityContextInputBuilder::default()
}
}
/// A builder for [`GetIdentityContextInput`](crate::operation::get_identity_context::GetIdentityContextInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetIdentityContextInputBuilder {
pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
pub(crate) user_identifier: ::std::option::Option<crate::types::UserIdentifier>,
pub(crate) namespace: ::std::option::Option<::std::string::String>,
pub(crate) session_expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) context_region: ::std::option::Option<::std::string::String>,
}
impl GetIdentityContextInputBuilder {
/// <p>The ID for the Amazon Web Services account that the user whose identity context you want to retrieve is in. Currently, you use the ID for the Amazon Web Services account that contains your Quick Sight account.</p>
/// This field is required.
pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.aws_account_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID for the Amazon Web Services account that the user whose identity context you want to retrieve is in. Currently, you use the ID for the Amazon Web Services account that contains your Quick Sight account.</p>
pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.aws_account_id = input;
self
}
/// <p>The ID for the Amazon Web Services account that the user whose identity context you want to retrieve is in. Currently, you use the ID for the Amazon Web Services account that contains your Quick Sight account.</p>
pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.aws_account_id
}
/// <p>The identifier for the user whose identity context you want to retrieve.</p>
/// This field is required.
pub fn user_identifier(mut self, input: crate::types::UserIdentifier) -> Self {
self.user_identifier = ::std::option::Option::Some(input);
self
}
/// <p>The identifier for the user whose identity context you want to retrieve.</p>
pub fn set_user_identifier(mut self, input: ::std::option::Option<crate::types::UserIdentifier>) -> Self {
self.user_identifier = input;
self
}
/// <p>The identifier for the user whose identity context you want to retrieve.</p>
pub fn get_user_identifier(&self) -> &::std::option::Option<crate::types::UserIdentifier> {
&self.user_identifier
}
/// <p>The namespace of the user that you want to get identity context for. This parameter is required when the UserIdentifier is specified using Email or UserName.</p>
pub fn namespace(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.namespace = ::std::option::Option::Some(input.into());
self
}
/// <p>The namespace of the user that you want to get identity context for. This parameter is required when the UserIdentifier is specified using Email or UserName.</p>
pub fn set_namespace(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.namespace = input;
self
}
/// <p>The namespace of the user that you want to get identity context for. This parameter is required when the UserIdentifier is specified using Email or UserName.</p>
pub fn get_namespace(&self) -> &::std::option::Option<::std::string::String> {
&self.namespace
}
/// <p>The timestamp at which the session will expire.</p>
pub fn session_expires_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.session_expires_at = ::std::option::Option::Some(input);
self
}
/// <p>The timestamp at which the session will expire.</p>
pub fn set_session_expires_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.session_expires_at = input;
self
}
/// <p>The timestamp at which the session will expire.</p>
pub fn get_session_expires_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.session_expires_at
}
/// <p>The region in which the context is to be used. Use this parameter to obtain an identity context for cross-region use.</p>
/// <p>The specified region must meet the following conditions:</p>
/// <ul>
/// <li>
/// <p>The region must be in the same Amazon Web Services partition as the region you are calling from. Cross-partition requests are not supported. For example, you cannot specify a region in the <code>aws-cn</code> partition when calling from a region in the <code>aws</code> partition.</p></li>
/// <li>
/// <p>It must be a valid Amazon QuickSight supported region.</p></li>
/// <li>
/// <p>The calling customer account must be enabled in the specified context region.</p></li>
/// <li>
/// <p>This parameter is not supported when calling from an opt-in region.</p></li>
/// </ul>
pub fn context_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.context_region = ::std::option::Option::Some(input.into());
self
}
/// <p>The region in which the context is to be used. Use this parameter to obtain an identity context for cross-region use.</p>
/// <p>The specified region must meet the following conditions:</p>
/// <ul>
/// <li>
/// <p>The region must be in the same Amazon Web Services partition as the region you are calling from. Cross-partition requests are not supported. For example, you cannot specify a region in the <code>aws-cn</code> partition when calling from a region in the <code>aws</code> partition.</p></li>
/// <li>
/// <p>It must be a valid Amazon QuickSight supported region.</p></li>
/// <li>
/// <p>The calling customer account must be enabled in the specified context region.</p></li>
/// <li>
/// <p>This parameter is not supported when calling from an opt-in region.</p></li>
/// </ul>
pub fn set_context_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.context_region = input;
self
}
/// <p>The region in which the context is to be used. Use this parameter to obtain an identity context for cross-region use.</p>
/// <p>The specified region must meet the following conditions:</p>
/// <ul>
/// <li>
/// <p>The region must be in the same Amazon Web Services partition as the region you are calling from. Cross-partition requests are not supported. For example, you cannot specify a region in the <code>aws-cn</code> partition when calling from a region in the <code>aws</code> partition.</p></li>
/// <li>
/// <p>It must be a valid Amazon QuickSight supported region.</p></li>
/// <li>
/// <p>The calling customer account must be enabled in the specified context region.</p></li>
/// <li>
/// <p>This parameter is not supported when calling from an opt-in region.</p></li>
/// </ul>
pub fn get_context_region(&self) -> &::std::option::Option<::std::string::String> {
&self.context_region
}
/// Consumes the builder and constructs a [`GetIdentityContextInput`](crate::operation::get_identity_context::GetIdentityContextInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::get_identity_context::GetIdentityContextInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::get_identity_context::GetIdentityContextInput {
aws_account_id: self.aws_account_id,
user_identifier: self.user_identifier,
namespace: self.namespace,
session_expires_at: self.session_expires_at,
context_region: self.context_region,
})
}
}