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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Temporary credentials with authorization to log on to an Amazon Redshift database.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetClusterCredentialsOutput {
/// <p>A database user name that is authorized to log on to the database <code>DbName</code> using the password <code>DbPassword</code>. If the specified DbUser exists in the database, the new user name has the same database permissions as the the user named in DbUser. By default, the user is added to PUBLIC. If the <code>DbGroups</code> parameter is specifed, <code>DbUser</code> is added to the listed groups for any sessions created using these credentials.</p>
pub db_user: ::std::option::Option<::std::string::String>,
/// <p>A temporary password that authorizes the user name returned by <code>DbUser</code> to log on to the database <code>DbName</code>.</p>
pub db_password: ::std::option::Option<::std::string::String>,
/// <p>The date and time the password in <code>DbPassword</code> expires.</p>
pub expiration: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetClusterCredentialsOutput {
/// <p>A database user name that is authorized to log on to the database <code>DbName</code> using the password <code>DbPassword</code>. If the specified DbUser exists in the database, the new user name has the same database permissions as the the user named in DbUser. By default, the user is added to PUBLIC. If the <code>DbGroups</code> parameter is specifed, <code>DbUser</code> is added to the listed groups for any sessions created using these credentials.</p>
pub fn db_user(&self) -> ::std::option::Option<&str> {
self.db_user.as_deref()
}
/// <p>A temporary password that authorizes the user name returned by <code>DbUser</code> to log on to the database <code>DbName</code>.</p>
pub fn db_password(&self) -> ::std::option::Option<&str> {
self.db_password.as_deref()
}
/// <p>The date and time the password in <code>DbPassword</code> expires.</p>
pub fn expiration(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.expiration.as_ref()
}
}
impl ::std::fmt::Debug for GetClusterCredentialsOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetClusterCredentialsOutput");
formatter.field("db_user", &self.db_user);
formatter.field("db_password", &"*** Sensitive Data Redacted ***");
formatter.field("expiration", &self.expiration);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetClusterCredentialsOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetClusterCredentialsOutput {
/// Creates a new builder-style object to manufacture [`GetClusterCredentialsOutput`](crate::operation::get_cluster_credentials::GetClusterCredentialsOutput).
pub fn builder() -> crate::operation::get_cluster_credentials::builders::GetClusterCredentialsOutputBuilder {
crate::operation::get_cluster_credentials::builders::GetClusterCredentialsOutputBuilder::default()
}
}
/// A builder for [`GetClusterCredentialsOutput`](crate::operation::get_cluster_credentials::GetClusterCredentialsOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetClusterCredentialsOutputBuilder {
pub(crate) db_user: ::std::option::Option<::std::string::String>,
pub(crate) db_password: ::std::option::Option<::std::string::String>,
pub(crate) expiration: ::std::option::Option<::aws_smithy_types::DateTime>,
_request_id: Option<String>,
}
impl GetClusterCredentialsOutputBuilder {
/// <p>A database user name that is authorized to log on to the database <code>DbName</code> using the password <code>DbPassword</code>. If the specified DbUser exists in the database, the new user name has the same database permissions as the the user named in DbUser. By default, the user is added to PUBLIC. If the <code>DbGroups</code> parameter is specifed, <code>DbUser</code> is added to the listed groups for any sessions created using these credentials.</p>
pub fn db_user(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.db_user = ::std::option::Option::Some(input.into());
self
}
/// <p>A database user name that is authorized to log on to the database <code>DbName</code> using the password <code>DbPassword</code>. If the specified DbUser exists in the database, the new user name has the same database permissions as the the user named in DbUser. By default, the user is added to PUBLIC. If the <code>DbGroups</code> parameter is specifed, <code>DbUser</code> is added to the listed groups for any sessions created using these credentials.</p>
pub fn set_db_user(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.db_user = input;
self
}
/// <p>A database user name that is authorized to log on to the database <code>DbName</code> using the password <code>DbPassword</code>. If the specified DbUser exists in the database, the new user name has the same database permissions as the the user named in DbUser. By default, the user is added to PUBLIC. If the <code>DbGroups</code> parameter is specifed, <code>DbUser</code> is added to the listed groups for any sessions created using these credentials.</p>
pub fn get_db_user(&self) -> &::std::option::Option<::std::string::String> {
&self.db_user
}
/// <p>A temporary password that authorizes the user name returned by <code>DbUser</code> to log on to the database <code>DbName</code>.</p>
pub fn db_password(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.db_password = ::std::option::Option::Some(input.into());
self
}
/// <p>A temporary password that authorizes the user name returned by <code>DbUser</code> to log on to the database <code>DbName</code>.</p>
pub fn set_db_password(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.db_password = input;
self
}
/// <p>A temporary password that authorizes the user name returned by <code>DbUser</code> to log on to the database <code>DbName</code>.</p>
pub fn get_db_password(&self) -> &::std::option::Option<::std::string::String> {
&self.db_password
}
/// <p>The date and time the password in <code>DbPassword</code> expires.</p>
pub fn expiration(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.expiration = ::std::option::Option::Some(input);
self
}
/// <p>The date and time the password in <code>DbPassword</code> expires.</p>
pub fn set_expiration(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.expiration = input;
self
}
/// <p>The date and time the password in <code>DbPassword</code> expires.</p>
pub fn get_expiration(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.expiration
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`GetClusterCredentialsOutput`](crate::operation::get_cluster_credentials::GetClusterCredentialsOutput).
pub fn build(self) -> crate::operation::get_cluster_credentials::GetClusterCredentialsOutput {
crate::operation::get_cluster_credentials::GetClusterCredentialsOutput {
db_user: self.db_user,
db_password: self.db_password,
expiration: self.expiration,
_request_id: self._request_id,
}
}
}
impl ::std::fmt::Debug for GetClusterCredentialsOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetClusterCredentialsOutputBuilder");
formatter.field("db_user", &self.db_user);
formatter.field("db_password", &"*** Sensitive Data Redacted ***");
formatter.field("expiration", &self.expiration);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}