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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Information about an Amazon Web Services Identity and Access Management (IAM) role that is associated with a DB instance.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DbInstanceRole {
    /// <p>The Amazon Resource Name (ARN) of the IAM role that is associated with the DB instance.</p>
    pub role_arn: ::std::option::Option<::std::string::String>,
    /// <p>The name of the feature associated with the Amazon Web Services Identity and Access Management (IAM) role. For information about supported feature names, see <code>DBEngineVersion</code>.</p>
    pub feature_name: ::std::option::Option<::std::string::String>,
    /// <p>Information about the state of association between the IAM role and the DB instance. The Status property returns one of the following values:</p>
    /// <ul>
    /// <li> <p> <code>ACTIVE</code> - the IAM role ARN is associated with the DB instance and can be used to access other Amazon Web Services services on your behalf.</p> </li>
    /// <li> <p> <code>PENDING</code> - the IAM role ARN is being associated with the DB instance.</p> </li>
    /// <li> <p> <code>INVALID</code> - the IAM role ARN is associated with the DB instance, but the DB instance is unable to assume the IAM role in order to access other Amazon Web Services services on your behalf.</p> </li>
    /// </ul>
    pub status: ::std::option::Option<::std::string::String>,
}
impl DbInstanceRole {
    /// <p>The Amazon Resource Name (ARN) of the IAM role that is associated with the DB instance.</p>
    pub fn role_arn(&self) -> ::std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The name of the feature associated with the Amazon Web Services Identity and Access Management (IAM) role. For information about supported feature names, see <code>DBEngineVersion</code>.</p>
    pub fn feature_name(&self) -> ::std::option::Option<&str> {
        self.feature_name.as_deref()
    }
    /// <p>Information about the state of association between the IAM role and the DB instance. The Status property returns one of the following values:</p>
    /// <ul>
    /// <li> <p> <code>ACTIVE</code> - the IAM role ARN is associated with the DB instance and can be used to access other Amazon Web Services services on your behalf.</p> </li>
    /// <li> <p> <code>PENDING</code> - the IAM role ARN is being associated with the DB instance.</p> </li>
    /// <li> <p> <code>INVALID</code> - the IAM role ARN is associated with the DB instance, but the DB instance is unable to assume the IAM role in order to access other Amazon Web Services services on your behalf.</p> </li>
    /// </ul>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
}
impl DbInstanceRole {
    /// Creates a new builder-style object to manufacture [`DbInstanceRole`](crate::types::DbInstanceRole).
    pub fn builder() -> crate::types::builders::DbInstanceRoleBuilder {
        crate::types::builders::DbInstanceRoleBuilder::default()
    }
}

/// A builder for [`DbInstanceRole`](crate::types::DbInstanceRole).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct DbInstanceRoleBuilder {
    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) feature_name: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<::std::string::String>,
}
impl DbInstanceRoleBuilder {
    /// <p>The Amazon Resource Name (ARN) of the IAM role that is associated with the DB instance.</p>
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that is associated with the DB instance.</p>
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that is associated with the DB instance.</p>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// <p>The name of the feature associated with the Amazon Web Services Identity and Access Management (IAM) role. For information about supported feature names, see <code>DBEngineVersion</code>.</p>
    pub fn feature_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.feature_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the feature associated with the Amazon Web Services Identity and Access Management (IAM) role. For information about supported feature names, see <code>DBEngineVersion</code>.</p>
    pub fn set_feature_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.feature_name = input;
        self
    }
    /// <p>The name of the feature associated with the Amazon Web Services Identity and Access Management (IAM) role. For information about supported feature names, see <code>DBEngineVersion</code>.</p>
    pub fn get_feature_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.feature_name
    }
    /// <p>Information about the state of association between the IAM role and the DB instance. The Status property returns one of the following values:</p>
    /// <ul>
    /// <li> <p> <code>ACTIVE</code> - the IAM role ARN is associated with the DB instance and can be used to access other Amazon Web Services services on your behalf.</p> </li>
    /// <li> <p> <code>PENDING</code> - the IAM role ARN is being associated with the DB instance.</p> </li>
    /// <li> <p> <code>INVALID</code> - the IAM role ARN is associated with the DB instance, but the DB instance is unable to assume the IAM role in order to access other Amazon Web Services services on your behalf.</p> </li>
    /// </ul>
    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Information about the state of association between the IAM role and the DB instance. The Status property returns one of the following values:</p>
    /// <ul>
    /// <li> <p> <code>ACTIVE</code> - the IAM role ARN is associated with the DB instance and can be used to access other Amazon Web Services services on your behalf.</p> </li>
    /// <li> <p> <code>PENDING</code> - the IAM role ARN is being associated with the DB instance.</p> </li>
    /// <li> <p> <code>INVALID</code> - the IAM role ARN is associated with the DB instance, but the DB instance is unable to assume the IAM role in order to access other Amazon Web Services services on your behalf.</p> </li>
    /// </ul>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>Information about the state of association between the IAM role and the DB instance. The Status property returns one of the following values:</p>
    /// <ul>
    /// <li> <p> <code>ACTIVE</code> - the IAM role ARN is associated with the DB instance and can be used to access other Amazon Web Services services on your behalf.</p> </li>
    /// <li> <p> <code>PENDING</code> - the IAM role ARN is being associated with the DB instance.</p> </li>
    /// <li> <p> <code>INVALID</code> - the IAM role ARN is associated with the DB instance, but the DB instance is unable to assume the IAM role in order to access other Amazon Web Services services on your behalf.</p> </li>
    /// </ul>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// Consumes the builder and constructs a [`DbInstanceRole`](crate::types::DbInstanceRole).
    pub fn build(self) -> crate::types::DbInstanceRole {
        crate::types::DbInstanceRole {
            role_arn: self.role_arn,
            feature_name: self.feature_name,
            status: self.status,
        }
    }
}