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
// 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 CreateSystemInstanceInput {
/// <p>Metadata, consisting of key-value pairs, that can be used to categorize your system instances.</p>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
/// <p>A document that defines an entity.</p>
pub definition: ::std::option::Option<crate::types::DefinitionDocument>,
/// <p>The target type of the deployment. Valid values are <code>GREENGRASS</code> and <code>CLOUD</code>.</p>
pub target: ::std::option::Option<crate::types::DeploymentTarget>,
/// <p>The name of the Greengrass group where the system instance will be deployed. This value is required if the value of the <code>target</code> parameter is <code>GREENGRASS</code>.</p>
pub greengrass_group_name: ::std::option::Option<::std::string::String>,
/// <p>The name of the Amazon Simple Storage Service bucket that will be used to store and deploy the system instance's resource file. This value is required if the value of the <code>target</code> parameter is <code>GREENGRASS</code>.</p>
pub s3_bucket_name: ::std::option::Option<::std::string::String>,
/// <p>An object that specifies whether cloud metrics are collected in a deployment and, if so, what role is used to collect metrics.</p>
pub metrics_configuration: ::std::option::Option<crate::types::MetricsConfiguration>,
/// <p>The ARN of the IAM role that AWS IoT Things Graph will assume when it executes the flow. This role must have read and write access to AWS Lambda and AWS IoT and any other AWS services that the flow uses when it executes. This value is required if the value of the <code>target</code> parameter is <code>CLOUD</code>.</p>
pub flow_actions_role_arn: ::std::option::Option<::std::string::String>,
}
impl CreateSystemInstanceInput {
/// <p>Metadata, consisting of key-value pairs, that can be used to categorize your system instances.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
/// <p>A document that defines an entity.</p>
pub fn definition(&self) -> ::std::option::Option<&crate::types::DefinitionDocument> {
self.definition.as_ref()
}
/// <p>The target type of the deployment. Valid values are <code>GREENGRASS</code> and <code>CLOUD</code>.</p>
pub fn target(&self) -> ::std::option::Option<&crate::types::DeploymentTarget> {
self.target.as_ref()
}
/// <p>The name of the Greengrass group where the system instance will be deployed. This value is required if the value of the <code>target</code> parameter is <code>GREENGRASS</code>.</p>
pub fn greengrass_group_name(&self) -> ::std::option::Option<&str> {
self.greengrass_group_name.as_deref()
}
/// <p>The name of the Amazon Simple Storage Service bucket that will be used to store and deploy the system instance's resource file. This value is required if the value of the <code>target</code> parameter is <code>GREENGRASS</code>.</p>
pub fn s3_bucket_name(&self) -> ::std::option::Option<&str> {
self.s3_bucket_name.as_deref()
}
/// <p>An object that specifies whether cloud metrics are collected in a deployment and, if so, what role is used to collect metrics.</p>
pub fn metrics_configuration(&self) -> ::std::option::Option<&crate::types::MetricsConfiguration> {
self.metrics_configuration.as_ref()
}
/// <p>The ARN of the IAM role that AWS IoT Things Graph will assume when it executes the flow. This role must have read and write access to AWS Lambda and AWS IoT and any other AWS services that the flow uses when it executes. This value is required if the value of the <code>target</code> parameter is <code>CLOUD</code>.</p>
pub fn flow_actions_role_arn(&self) -> ::std::option::Option<&str> {
self.flow_actions_role_arn.as_deref()
}
}
impl CreateSystemInstanceInput {
/// Creates a new builder-style object to manufacture [`CreateSystemInstanceInput`](crate::operation::create_system_instance::CreateSystemInstanceInput).
pub fn builder() -> crate::operation::create_system_instance::builders::CreateSystemInstanceInputBuilder {
crate::operation::create_system_instance::builders::CreateSystemInstanceInputBuilder::default()
}
}
/// A builder for [`CreateSystemInstanceInput`](crate::operation::create_system_instance::CreateSystemInstanceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSystemInstanceInputBuilder {
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) definition: ::std::option::Option<crate::types::DefinitionDocument>,
pub(crate) target: ::std::option::Option<crate::types::DeploymentTarget>,
pub(crate) greengrass_group_name: ::std::option::Option<::std::string::String>,
pub(crate) s3_bucket_name: ::std::option::Option<::std::string::String>,
pub(crate) metrics_configuration: ::std::option::Option<crate::types::MetricsConfiguration>,
pub(crate) flow_actions_role_arn: ::std::option::Option<::std::string::String>,
}
impl CreateSystemInstanceInputBuilder {
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>Metadata, consisting of key-value pairs, that can be used to categorize your system instances.</p>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>Metadata, consisting of key-value pairs, that can be used to categorize your system instances.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>Metadata, consisting of key-value pairs, that can be used to categorize your system instances.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// <p>A document that defines an entity.</p>
/// This field is required.
pub fn definition(mut self, input: crate::types::DefinitionDocument) -> Self {
self.definition = ::std::option::Option::Some(input);
self
}
/// <p>A document that defines an entity.</p>
pub fn set_definition(mut self, input: ::std::option::Option<crate::types::DefinitionDocument>) -> Self {
self.definition = input;
self
}
/// <p>A document that defines an entity.</p>
pub fn get_definition(&self) -> &::std::option::Option<crate::types::DefinitionDocument> {
&self.definition
}
/// <p>The target type of the deployment. Valid values are <code>GREENGRASS</code> and <code>CLOUD</code>.</p>
/// This field is required.
pub fn target(mut self, input: crate::types::DeploymentTarget) -> Self {
self.target = ::std::option::Option::Some(input);
self
}
/// <p>The target type of the deployment. Valid values are <code>GREENGRASS</code> and <code>CLOUD</code>.</p>
pub fn set_target(mut self, input: ::std::option::Option<crate::types::DeploymentTarget>) -> Self {
self.target = input;
self
}
/// <p>The target type of the deployment. Valid values are <code>GREENGRASS</code> and <code>CLOUD</code>.</p>
pub fn get_target(&self) -> &::std::option::Option<crate::types::DeploymentTarget> {
&self.target
}
/// <p>The name of the Greengrass group where the system instance will be deployed. This value is required if the value of the <code>target</code> parameter is <code>GREENGRASS</code>.</p>
pub fn greengrass_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.greengrass_group_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the Greengrass group where the system instance will be deployed. This value is required if the value of the <code>target</code> parameter is <code>GREENGRASS</code>.</p>
pub fn set_greengrass_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.greengrass_group_name = input;
self
}
/// <p>The name of the Greengrass group where the system instance will be deployed. This value is required if the value of the <code>target</code> parameter is <code>GREENGRASS</code>.</p>
pub fn get_greengrass_group_name(&self) -> &::std::option::Option<::std::string::String> {
&self.greengrass_group_name
}
/// <p>The name of the Amazon Simple Storage Service bucket that will be used to store and deploy the system instance's resource file. This value is required if the value of the <code>target</code> parameter is <code>GREENGRASS</code>.</p>
pub fn s3_bucket_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.s3_bucket_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name of the Amazon Simple Storage Service bucket that will be used to store and deploy the system instance's resource file. This value is required if the value of the <code>target</code> parameter is <code>GREENGRASS</code>.</p>
pub fn set_s3_bucket_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.s3_bucket_name = input;
self
}
/// <p>The name of the Amazon Simple Storage Service bucket that will be used to store and deploy the system instance's resource file. This value is required if the value of the <code>target</code> parameter is <code>GREENGRASS</code>.</p>
pub fn get_s3_bucket_name(&self) -> &::std::option::Option<::std::string::String> {
&self.s3_bucket_name
}
/// <p>An object that specifies whether cloud metrics are collected in a deployment and, if so, what role is used to collect metrics.</p>
pub fn metrics_configuration(mut self, input: crate::types::MetricsConfiguration) -> Self {
self.metrics_configuration = ::std::option::Option::Some(input);
self
}
/// <p>An object that specifies whether cloud metrics are collected in a deployment and, if so, what role is used to collect metrics.</p>
pub fn set_metrics_configuration(mut self, input: ::std::option::Option<crate::types::MetricsConfiguration>) -> Self {
self.metrics_configuration = input;
self
}
/// <p>An object that specifies whether cloud metrics are collected in a deployment and, if so, what role is used to collect metrics.</p>
pub fn get_metrics_configuration(&self) -> &::std::option::Option<crate::types::MetricsConfiguration> {
&self.metrics_configuration
}
/// <p>The ARN of the IAM role that AWS IoT Things Graph will assume when it executes the flow. This role must have read and write access to AWS Lambda and AWS IoT and any other AWS services that the flow uses when it executes. This value is required if the value of the <code>target</code> parameter is <code>CLOUD</code>.</p>
pub fn flow_actions_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.flow_actions_role_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the IAM role that AWS IoT Things Graph will assume when it executes the flow. This role must have read and write access to AWS Lambda and AWS IoT and any other AWS services that the flow uses when it executes. This value is required if the value of the <code>target</code> parameter is <code>CLOUD</code>.</p>
pub fn set_flow_actions_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.flow_actions_role_arn = input;
self
}
/// <p>The ARN of the IAM role that AWS IoT Things Graph will assume when it executes the flow. This role must have read and write access to AWS Lambda and AWS IoT and any other AWS services that the flow uses when it executes. This value is required if the value of the <code>target</code> parameter is <code>CLOUD</code>.</p>
pub fn get_flow_actions_role_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.flow_actions_role_arn
}
/// Consumes the builder and constructs a [`CreateSystemInstanceInput`](crate::operation::create_system_instance::CreateSystemInstanceInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::create_system_instance::CreateSystemInstanceInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::create_system_instance::CreateSystemInstanceInput {
tags: self.tags,
definition: self.definition,
target: self.target,
greengrass_group_name: self.greengrass_group_name,
s3_bucket_name: self.s3_bucket_name,
metrics_configuration: self.metrics_configuration,
flow_actions_role_arn: self.flow_actions_role_arn,
})
}
}