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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ScheduleKeyDeletionOutput {
/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key whose deletion is scheduled.</p>
pub key_id: ::std::option::Option<::std::string::String>,
/// <p>The date and time after which KMS deletes the KMS key.</p>
/// <p>If the KMS key is a multi-Region primary key with replica keys, this field does not appear. The deletion date for the primary key isn't known until its last replica key is deleted.</p>
pub deletion_date: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The current status of the KMS key.</p>
/// <p>For more information about how key state affects the use of a KMS key, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
pub key_state: ::std::option::Option<crate::types::KeyState>,
/// <p>The waiting period before the KMS key is deleted.</p>
/// <p>If the KMS key is a multi-Region primary key with replicas, the waiting period begins when the last of its replica keys is deleted. Otherwise, the waiting period begins immediately.</p>
pub pending_window_in_days: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl ScheduleKeyDeletionOutput {
/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key whose deletion is scheduled.</p>
pub fn key_id(&self) -> ::std::option::Option<&str> {
self.key_id.as_deref()
}
/// <p>The date and time after which KMS deletes the KMS key.</p>
/// <p>If the KMS key is a multi-Region primary key with replica keys, this field does not appear. The deletion date for the primary key isn't known until its last replica key is deleted.</p>
pub fn deletion_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.deletion_date.as_ref()
}
/// <p>The current status of the KMS key.</p>
/// <p>For more information about how key state affects the use of a KMS key, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
pub fn key_state(&self) -> ::std::option::Option<&crate::types::KeyState> {
self.key_state.as_ref()
}
/// <p>The waiting period before the KMS key is deleted.</p>
/// <p>If the KMS key is a multi-Region primary key with replicas, the waiting period begins when the last of its replica keys is deleted. Otherwise, the waiting period begins immediately.</p>
pub fn pending_window_in_days(&self) -> ::std::option::Option<i32> {
self.pending_window_in_days
}
}
impl ::aws_types::request_id::RequestId for ScheduleKeyDeletionOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl ScheduleKeyDeletionOutput {
/// Creates a new builder-style object to manufacture [`ScheduleKeyDeletionOutput`](crate::operation::schedule_key_deletion::ScheduleKeyDeletionOutput).
pub fn builder() -> crate::operation::schedule_key_deletion::builders::ScheduleKeyDeletionOutputBuilder {
crate::operation::schedule_key_deletion::builders::ScheduleKeyDeletionOutputBuilder::default()
}
}
/// A builder for [`ScheduleKeyDeletionOutput`](crate::operation::schedule_key_deletion::ScheduleKeyDeletionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ScheduleKeyDeletionOutputBuilder {
pub(crate) key_id: ::std::option::Option<::std::string::String>,
pub(crate) deletion_date: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) key_state: ::std::option::Option<crate::types::KeyState>,
pub(crate) pending_window_in_days: ::std::option::Option<i32>,
_request_id: Option<String>,
}
impl ScheduleKeyDeletionOutputBuilder {
/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key whose deletion is scheduled.</p>
pub fn key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.key_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key whose deletion is scheduled.</p>
pub fn set_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.key_id = input;
self
}
/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN">key ARN</a>) of the KMS key whose deletion is scheduled.</p>
pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> {
&self.key_id
}
/// <p>The date and time after which KMS deletes the KMS key.</p>
/// <p>If the KMS key is a multi-Region primary key with replica keys, this field does not appear. The deletion date for the primary key isn't known until its last replica key is deleted.</p>
pub fn deletion_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.deletion_date = ::std::option::Option::Some(input);
self
}
/// <p>The date and time after which KMS deletes the KMS key.</p>
/// <p>If the KMS key is a multi-Region primary key with replica keys, this field does not appear. The deletion date for the primary key isn't known until its last replica key is deleted.</p>
pub fn set_deletion_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.deletion_date = input;
self
}
/// <p>The date and time after which KMS deletes the KMS key.</p>
/// <p>If the KMS key is a multi-Region primary key with replica keys, this field does not appear. The deletion date for the primary key isn't known until its last replica key is deleted.</p>
pub fn get_deletion_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.deletion_date
}
/// <p>The current status of the KMS key.</p>
/// <p>For more information about how key state affects the use of a KMS key, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
pub fn key_state(mut self, input: crate::types::KeyState) -> Self {
self.key_state = ::std::option::Option::Some(input);
self
}
/// <p>The current status of the KMS key.</p>
/// <p>For more information about how key state affects the use of a KMS key, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
pub fn set_key_state(mut self, input: ::std::option::Option<crate::types::KeyState>) -> Self {
self.key_state = input;
self
}
/// <p>The current status of the KMS key.</p>
/// <p>For more information about how key state affects the use of a KMS key, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
pub fn get_key_state(&self) -> &::std::option::Option<crate::types::KeyState> {
&self.key_state
}
/// <p>The waiting period before the KMS key is deleted.</p>
/// <p>If the KMS key is a multi-Region primary key with replicas, the waiting period begins when the last of its replica keys is deleted. Otherwise, the waiting period begins immediately.</p>
pub fn pending_window_in_days(mut self, input: i32) -> Self {
self.pending_window_in_days = ::std::option::Option::Some(input);
self
}
/// <p>The waiting period before the KMS key is deleted.</p>
/// <p>If the KMS key is a multi-Region primary key with replicas, the waiting period begins when the last of its replica keys is deleted. Otherwise, the waiting period begins immediately.</p>
pub fn set_pending_window_in_days(mut self, input: ::std::option::Option<i32>) -> Self {
self.pending_window_in_days = input;
self
}
/// <p>The waiting period before the KMS key is deleted.</p>
/// <p>If the KMS key is a multi-Region primary key with replicas, the waiting period begins when the last of its replica keys is deleted. Otherwise, the waiting period begins immediately.</p>
pub fn get_pending_window_in_days(&self) -> &::std::option::Option<i32> {
&self.pending_window_in_days
}
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 [`ScheduleKeyDeletionOutput`](crate::operation::schedule_key_deletion::ScheduleKeyDeletionOutput).
pub fn build(self) -> crate::operation::schedule_key_deletion::ScheduleKeyDeletionOutput {
crate::operation::schedule_key_deletion::ScheduleKeyDeletionOutput {
key_id: self.key_id,
deletion_date: self.deletion_date,
key_state: self.key_state,
pending_window_in_days: self.pending_window_in_days,
_request_id: self._request_id,
}
}
}