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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Access control configuration structures for your resource. You specify the configuration as a type-value pair. You can specify only one type of access control configuration.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub enum Configuration {
/// <p>The access control configuration is for a DynamoDB stream.</p>
DynamodbStream(crate::types::DynamodbStreamConfiguration),
/// <p>The access control configuration is for a DynamoDB table or index.</p>
DynamodbTable(crate::types::DynamodbTableConfiguration),
/// <p>The access control configuration is for an Amazon EBS volume snapshot.</p>
EbsSnapshot(crate::types::EbsSnapshotConfiguration),
/// <p>The access control configuration is for an Amazon ECR repository.</p>
EcrRepository(crate::types::EcrRepositoryConfiguration),
/// <p>The access control configuration is for an Amazon EFS file system.</p>
EfsFileSystem(crate::types::EfsFileSystemConfiguration),
/// <p>The access control configuration is for an IAM role.</p>
IamRole(crate::types::IamRoleConfiguration),
/// <p>The access control configuration is for a KMS key.</p>
KmsKey(crate::types::KmsKeyConfiguration),
/// <p>The access control configuration is for an Amazon RDS DB cluster snapshot.</p>
RdsDbClusterSnapshot(crate::types::RdsDbClusterSnapshotConfiguration),
/// <p>The access control configuration is for an Amazon RDS DB snapshot.</p>
RdsDbSnapshot(crate::types::RdsDbSnapshotConfiguration),
/// <p>The access control configuration is for an Amazon S3 bucket.</p>
S3Bucket(crate::types::S3BucketConfiguration),
/// <p>The access control configuration is for an Amazon S3 directory bucket.</p>
S3ExpressDirectoryBucket(crate::types::S3ExpressDirectoryBucketConfiguration),
/// <p>The access control configuration is for a Secrets Manager secret.</p>
SecretsManagerSecret(crate::types::SecretsManagerSecretConfiguration),
/// <p>The access control configuration is for an Amazon SNS topic</p>
SnsTopic(crate::types::SnsTopicConfiguration),
/// <p>The access control configuration is for an Amazon SQS queue.</p>
SqsQueue(crate::types::SqsQueueConfiguration),
/// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
/// An unknown enum variant
///
/// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
/// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
/// by the client. This can happen when the server adds new functionality, but the client has not been updated.
/// To investigate this, consider turning on debug logging to print the raw HTTP response.
#[non_exhaustive]
Unknown,
}
impl Configuration {
/// Tries to convert the enum instance into [`DynamodbStream`](crate::types::Configuration::DynamodbStream), extracting the inner [`DynamodbStreamConfiguration`](crate::types::DynamodbStreamConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_dynamodb_stream(&self) -> ::std::result::Result<&crate::types::DynamodbStreamConfiguration, &Self> {
if let Configuration::DynamodbStream(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`DynamodbStream`](crate::types::Configuration::DynamodbStream).
pub fn is_dynamodb_stream(&self) -> bool {
self.as_dynamodb_stream().is_ok()
}
/// Tries to convert the enum instance into [`DynamodbTable`](crate::types::Configuration::DynamodbTable), extracting the inner [`DynamodbTableConfiguration`](crate::types::DynamodbTableConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_dynamodb_table(&self) -> ::std::result::Result<&crate::types::DynamodbTableConfiguration, &Self> {
if let Configuration::DynamodbTable(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`DynamodbTable`](crate::types::Configuration::DynamodbTable).
pub fn is_dynamodb_table(&self) -> bool {
self.as_dynamodb_table().is_ok()
}
/// Tries to convert the enum instance into [`EbsSnapshot`](crate::types::Configuration::EbsSnapshot), extracting the inner [`EbsSnapshotConfiguration`](crate::types::EbsSnapshotConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_ebs_snapshot(&self) -> ::std::result::Result<&crate::types::EbsSnapshotConfiguration, &Self> {
if let Configuration::EbsSnapshot(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`EbsSnapshot`](crate::types::Configuration::EbsSnapshot).
pub fn is_ebs_snapshot(&self) -> bool {
self.as_ebs_snapshot().is_ok()
}
/// Tries to convert the enum instance into [`EcrRepository`](crate::types::Configuration::EcrRepository), extracting the inner [`EcrRepositoryConfiguration`](crate::types::EcrRepositoryConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_ecr_repository(&self) -> ::std::result::Result<&crate::types::EcrRepositoryConfiguration, &Self> {
if let Configuration::EcrRepository(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`EcrRepository`](crate::types::Configuration::EcrRepository).
pub fn is_ecr_repository(&self) -> bool {
self.as_ecr_repository().is_ok()
}
/// Tries to convert the enum instance into [`EfsFileSystem`](crate::types::Configuration::EfsFileSystem), extracting the inner [`EfsFileSystemConfiguration`](crate::types::EfsFileSystemConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_efs_file_system(&self) -> ::std::result::Result<&crate::types::EfsFileSystemConfiguration, &Self> {
if let Configuration::EfsFileSystem(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`EfsFileSystem`](crate::types::Configuration::EfsFileSystem).
pub fn is_efs_file_system(&self) -> bool {
self.as_efs_file_system().is_ok()
}
/// Tries to convert the enum instance into [`IamRole`](crate::types::Configuration::IamRole), extracting the inner [`IamRoleConfiguration`](crate::types::IamRoleConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_iam_role(&self) -> ::std::result::Result<&crate::types::IamRoleConfiguration, &Self> {
if let Configuration::IamRole(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`IamRole`](crate::types::Configuration::IamRole).
pub fn is_iam_role(&self) -> bool {
self.as_iam_role().is_ok()
}
/// Tries to convert the enum instance into [`KmsKey`](crate::types::Configuration::KmsKey), extracting the inner [`KmsKeyConfiguration`](crate::types::KmsKeyConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_kms_key(&self) -> ::std::result::Result<&crate::types::KmsKeyConfiguration, &Self> {
if let Configuration::KmsKey(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`KmsKey`](crate::types::Configuration::KmsKey).
pub fn is_kms_key(&self) -> bool {
self.as_kms_key().is_ok()
}
/// Tries to convert the enum instance into [`RdsDbClusterSnapshot`](crate::types::Configuration::RdsDbClusterSnapshot), extracting the inner [`RdsDbClusterSnapshotConfiguration`](crate::types::RdsDbClusterSnapshotConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_rds_db_cluster_snapshot(&self) -> ::std::result::Result<&crate::types::RdsDbClusterSnapshotConfiguration, &Self> {
if let Configuration::RdsDbClusterSnapshot(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`RdsDbClusterSnapshot`](crate::types::Configuration::RdsDbClusterSnapshot).
pub fn is_rds_db_cluster_snapshot(&self) -> bool {
self.as_rds_db_cluster_snapshot().is_ok()
}
/// Tries to convert the enum instance into [`RdsDbSnapshot`](crate::types::Configuration::RdsDbSnapshot), extracting the inner [`RdsDbSnapshotConfiguration`](crate::types::RdsDbSnapshotConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_rds_db_snapshot(&self) -> ::std::result::Result<&crate::types::RdsDbSnapshotConfiguration, &Self> {
if let Configuration::RdsDbSnapshot(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`RdsDbSnapshot`](crate::types::Configuration::RdsDbSnapshot).
pub fn is_rds_db_snapshot(&self) -> bool {
self.as_rds_db_snapshot().is_ok()
}
/// Tries to convert the enum instance into [`S3Bucket`](crate::types::Configuration::S3Bucket), extracting the inner [`S3BucketConfiguration`](crate::types::S3BucketConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_s3_bucket(&self) -> ::std::result::Result<&crate::types::S3BucketConfiguration, &Self> {
if let Configuration::S3Bucket(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`S3Bucket`](crate::types::Configuration::S3Bucket).
pub fn is_s3_bucket(&self) -> bool {
self.as_s3_bucket().is_ok()
}
/// Tries to convert the enum instance into [`S3ExpressDirectoryBucket`](crate::types::Configuration::S3ExpressDirectoryBucket), extracting the inner [`S3ExpressDirectoryBucketConfiguration`](crate::types::S3ExpressDirectoryBucketConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_s3_express_directory_bucket(&self) -> ::std::result::Result<&crate::types::S3ExpressDirectoryBucketConfiguration, &Self> {
if let Configuration::S3ExpressDirectoryBucket(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`S3ExpressDirectoryBucket`](crate::types::Configuration::S3ExpressDirectoryBucket).
pub fn is_s3_express_directory_bucket(&self) -> bool {
self.as_s3_express_directory_bucket().is_ok()
}
/// Tries to convert the enum instance into [`SecretsManagerSecret`](crate::types::Configuration::SecretsManagerSecret), extracting the inner [`SecretsManagerSecretConfiguration`](crate::types::SecretsManagerSecretConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_secrets_manager_secret(&self) -> ::std::result::Result<&crate::types::SecretsManagerSecretConfiguration, &Self> {
if let Configuration::SecretsManagerSecret(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`SecretsManagerSecret`](crate::types::Configuration::SecretsManagerSecret).
pub fn is_secrets_manager_secret(&self) -> bool {
self.as_secrets_manager_secret().is_ok()
}
/// Tries to convert the enum instance into [`SnsTopic`](crate::types::Configuration::SnsTopic), extracting the inner [`SnsTopicConfiguration`](crate::types::SnsTopicConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_sns_topic(&self) -> ::std::result::Result<&crate::types::SnsTopicConfiguration, &Self> {
if let Configuration::SnsTopic(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`SnsTopic`](crate::types::Configuration::SnsTopic).
pub fn is_sns_topic(&self) -> bool {
self.as_sns_topic().is_ok()
}
/// Tries to convert the enum instance into [`SqsQueue`](crate::types::Configuration::SqsQueue), extracting the inner [`SqsQueueConfiguration`](crate::types::SqsQueueConfiguration).
/// Returns `Err(&Self)` if it can't be converted.
pub fn as_sqs_queue(&self) -> ::std::result::Result<&crate::types::SqsQueueConfiguration, &Self> {
if let Configuration::SqsQueue(val) = &self {
::std::result::Result::Ok(val)
} else {
::std::result::Result::Err(self)
}
}
/// Returns true if this is a [`SqsQueue`](crate::types::Configuration::SqsQueue).
pub fn is_sqs_queue(&self) -> bool {
self.as_sqs_queue().is_ok()
}
/// Returns true if the enum instance is the `Unknown` variant.
pub fn is_unknown(&self) -> bool {
matches!(self, Self::Unknown)
}
}