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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>An action defines the tasks that the extension performs during the AppConfig workflow. Each action includes an action point, as shown in the following list:</p>
/// <ul>
/// <li>
/// <p><code>PRE_CREATE_HOSTED_CONFIGURATION_VERSION</code></p></li>
/// <li>
/// <p><code>PRE_START_DEPLOYMENT</code></p></li>
/// <li>
/// <p><code>AT_DEPLOYMENT_TICK</code></p></li>
/// <li>
/// <p><code>ON_DEPLOYMENT_START</code></p></li>
/// <li>
/// <p><code>ON_DEPLOYMENT_STEP</code></p></li>
/// <li>
/// <p><code>ON_DEPLOYMENT_BAKING</code></p></li>
/// <li>
/// <p><code>ON_DEPLOYMENT_COMPLETE</code></p></li>
/// <li>
/// <p><code>ON_DEPLOYMENT_ROLLED_BACK</code></p></li>
/// </ul>
/// <p>Each action also includes a name, a URI to an Lambda function, and an Amazon Resource Name (ARN) for an Identity and Access Management assume role. You specify the name, URI, and ARN for each <i>action point</i> defined in the extension.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Action {
/// <p>The action name.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>Information about the action.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
pub uri: ::std::option::Option<::std::string::String>,
/// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
pub role_arn: ::std::option::Option<::std::string::String>,
}
impl Action {
/// <p>The action name.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>Information about the action.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
pub fn uri(&self) -> ::std::option::Option<&str> {
self.uri.as_deref()
}
/// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
pub fn role_arn(&self) -> ::std::option::Option<&str> {
self.role_arn.as_deref()
}
}
impl Action {
/// Creates a new builder-style object to manufacture [`Action`](crate::types::Action).
pub fn builder() -> crate::types::builders::ActionBuilder {
crate::types::builders::ActionBuilder::default()
}
}
/// A builder for [`Action`](crate::types::Action).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ActionBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) uri: ::std::option::Option<::std::string::String>,
pub(crate) role_arn: ::std::option::Option<::std::string::String>,
}
impl ActionBuilder {
/// <p>The action name.</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The action name.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The action name.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>Information about the action.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>Information about the action.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>Information about the action.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
pub fn uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.uri = ::std::option::Option::Some(input.into());
self
}
/// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
pub fn set_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.uri = input;
self
}
/// <p>The extension URI associated to the action point in the extension definition. The URI can be an Amazon Resource Name (ARN) for one of the following: an Lambda function, an Amazon Simple Queue Service queue, an Amazon Simple Notification Service topic, or the Amazon EventBridge default event bus.</p>
pub fn get_uri(&self) -> &::std::option::Option<::std::string::String> {
&self.uri
}
/// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</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>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.role_arn = input;
self
}
/// <p>An Amazon Resource Name (ARN) for an Identity and Access Management assume role.</p>
pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.role_arn
}
/// Consumes the builder and constructs a [`Action`](crate::types::Action).
pub fn build(self) -> crate::types::Action {
crate::types::Action {
name: self.name,
description: self.description,
uri: self.uri,
role_arn: self.role_arn,
}
}
}