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
// 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 RevokeSnapshotAccessInput {
/// <p>The identifier of the snapshot that the account can no longer access.</p>
pub snapshot_identifier: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) of the snapshot associated with the message to revoke access.</p>
pub snapshot_arn: ::std::option::Option<::std::string::String>,
/// <p>The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
pub snapshot_cluster_identifier: ::std::option::Option<::std::string::String>,
/// <p>The identifier of the Amazon Web Services account that can no longer restore the specified snapshot.</p>
pub account_with_restore_access: ::std::option::Option<::std::string::String>,
}
impl RevokeSnapshotAccessInput {
/// <p>The identifier of the snapshot that the account can no longer access.</p>
pub fn snapshot_identifier(&self) -> ::std::option::Option<&str> {
self.snapshot_identifier.as_deref()
}
/// <p>The Amazon Resource Name (ARN) of the snapshot associated with the message to revoke access.</p>
pub fn snapshot_arn(&self) -> ::std::option::Option<&str> {
self.snapshot_arn.as_deref()
}
/// <p>The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
pub fn snapshot_cluster_identifier(&self) -> ::std::option::Option<&str> {
self.snapshot_cluster_identifier.as_deref()
}
/// <p>The identifier of the Amazon Web Services account that can no longer restore the specified snapshot.</p>
pub fn account_with_restore_access(&self) -> ::std::option::Option<&str> {
self.account_with_restore_access.as_deref()
}
}
impl RevokeSnapshotAccessInput {
/// Creates a new builder-style object to manufacture [`RevokeSnapshotAccessInput`](crate::operation::revoke_snapshot_access::RevokeSnapshotAccessInput).
pub fn builder() -> crate::operation::revoke_snapshot_access::builders::RevokeSnapshotAccessInputBuilder {
crate::operation::revoke_snapshot_access::builders::RevokeSnapshotAccessInputBuilder::default()
}
}
/// A builder for [`RevokeSnapshotAccessInput`](crate::operation::revoke_snapshot_access::RevokeSnapshotAccessInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RevokeSnapshotAccessInputBuilder {
pub(crate) snapshot_identifier: ::std::option::Option<::std::string::String>,
pub(crate) snapshot_arn: ::std::option::Option<::std::string::String>,
pub(crate) snapshot_cluster_identifier: ::std::option::Option<::std::string::String>,
pub(crate) account_with_restore_access: ::std::option::Option<::std::string::String>,
}
impl RevokeSnapshotAccessInputBuilder {
/// <p>The identifier of the snapshot that the account can no longer access.</p>
pub fn snapshot_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.snapshot_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the snapshot that the account can no longer access.</p>
pub fn set_snapshot_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.snapshot_identifier = input;
self
}
/// <p>The identifier of the snapshot that the account can no longer access.</p>
pub fn get_snapshot_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.snapshot_identifier
}
/// <p>The Amazon Resource Name (ARN) of the snapshot associated with the message to revoke access.</p>
pub fn snapshot_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.snapshot_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) of the snapshot associated with the message to revoke access.</p>
pub fn set_snapshot_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.snapshot_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) of the snapshot associated with the message to revoke access.</p>
pub fn get_snapshot_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.snapshot_arn
}
/// <p>The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
pub fn snapshot_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.snapshot_cluster_identifier = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
pub fn set_snapshot_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.snapshot_cluster_identifier = input;
self
}
/// <p>The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
pub fn get_snapshot_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.snapshot_cluster_identifier
}
/// <p>The identifier of the Amazon Web Services account that can no longer restore the specified snapshot.</p>
/// This field is required.
pub fn account_with_restore_access(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.account_with_restore_access = ::std::option::Option::Some(input.into());
self
}
/// <p>The identifier of the Amazon Web Services account that can no longer restore the specified snapshot.</p>
pub fn set_account_with_restore_access(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.account_with_restore_access = input;
self
}
/// <p>The identifier of the Amazon Web Services account that can no longer restore the specified snapshot.</p>
pub fn get_account_with_restore_access(&self) -> &::std::option::Option<::std::string::String> {
&self.account_with_restore_access
}
/// Consumes the builder and constructs a [`RevokeSnapshotAccessInput`](crate::operation::revoke_snapshot_access::RevokeSnapshotAccessInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::revoke_snapshot_access::RevokeSnapshotAccessInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::revoke_snapshot_access::RevokeSnapshotAccessInput {
snapshot_identifier: self.snapshot_identifier,
snapshot_arn: self.snapshot_arn,
snapshot_cluster_identifier: self.snapshot_cluster_identifier,
account_with_restore_access: self.account_with_restore_access,
})
}
}