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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents an EC2 instance of virtual computing resources that hosts one or more game servers. In GameLift, a fleet can contain zero or more instances.</p>
/// <p> <b>Related actions</b> </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Instance {
/// <p>A unique identifier for the fleet that the instance is in.</p>
#[doc(hidden)]
pub fleet_id: std::option::Option<std::string::String>,
/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:
/// <region>
/// ::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
/// </region></code>.</p>
#[doc(hidden)]
pub fleet_arn: std::option::Option<std::string::String>,
/// <p>A unique identifier for the instance.</p>
#[doc(hidden)]
pub instance_id: std::option::Option<std::string::String>,
/// <p>IP address that is assigned to the instance.</p>
#[doc(hidden)]
pub ip_address: std::option::Option<std::string::String>,
/// <p>The DNS identifier assigned to the instance that is running the game session. Values have the following format:</p>
/// <ul>
/// <li> <p>TLS-enabled fleets: <code>
/// <unique identifier>
/// .
/// <region identifier>
/// .amazongamelift.com
/// </region>
/// </unique></code>.</p> </li>
/// <li> <p>Non-TLS-enabled fleets: <code>ec2-
/// <unique identifier>
/// .compute.amazonaws.com
/// </unique></code>. (See <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#concepts-public-addresses">Amazon EC2 Instance IP Addressing</a>.)</p> </li>
/// </ul>
/// <p>When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.</p>
#[doc(hidden)]
pub dns_name: std::option::Option<std::string::String>,
/// <p>Operating system that is running on this instance. </p>
#[doc(hidden)]
pub operating_system: std::option::Option<crate::types::OperatingSystem>,
/// <p>Amazon EC2 instance type that defines the computing resources of this instance. </p>
#[doc(hidden)]
pub r#type: std::option::Option<crate::types::Ec2InstanceType>,
/// <p>Current status of the instance. Possible statuses include the following:</p>
/// <ul>
/// <li> <p> <b>PENDING</b> -- The instance is in the process of being created and launching server processes as defined in the fleet's run-time configuration. </p> </li>
/// <li> <p> <b>ACTIVE</b> -- The instance has been successfully created and at least one server process has successfully launched and reported back to GameLift that it is ready to host a game session. The instance is now considered ready to host game sessions. </p> </li>
/// <li> <p> <b>TERMINATING</b> -- The instance is in the process of shutting down. This may happen to reduce capacity during a scaling down event or to recycle resources in the event of a problem.</p> </li>
/// </ul>
#[doc(hidden)]
pub status: std::option::Option<crate::types::InstanceStatus>,
/// <p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
#[doc(hidden)]
pub creation_time: std::option::Option<aws_smithy_types::DateTime>,
/// <p>The fleet location of the instance, expressed as an Amazon Web Services Region code, such as <code>us-west-2</code>. </p>
#[doc(hidden)]
pub location: std::option::Option<std::string::String>,
}
impl Instance {
/// <p>A unique identifier for the fleet that the instance is in.</p>
pub fn fleet_id(&self) -> std::option::Option<&str> {
self.fleet_id.as_deref()
}
/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:
/// <region>
/// ::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
/// </region></code>.</p>
pub fn fleet_arn(&self) -> std::option::Option<&str> {
self.fleet_arn.as_deref()
}
/// <p>A unique identifier for the instance.</p>
pub fn instance_id(&self) -> std::option::Option<&str> {
self.instance_id.as_deref()
}
/// <p>IP address that is assigned to the instance.</p>
pub fn ip_address(&self) -> std::option::Option<&str> {
self.ip_address.as_deref()
}
/// <p>The DNS identifier assigned to the instance that is running the game session. Values have the following format:</p>
/// <ul>
/// <li> <p>TLS-enabled fleets: <code>
/// <unique identifier>
/// .
/// <region identifier>
/// .amazongamelift.com
/// </region>
/// </unique></code>.</p> </li>
/// <li> <p>Non-TLS-enabled fleets: <code>ec2-
/// <unique identifier>
/// .compute.amazonaws.com
/// </unique></code>. (See <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#concepts-public-addresses">Amazon EC2 Instance IP Addressing</a>.)</p> </li>
/// </ul>
/// <p>When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.</p>
pub fn dns_name(&self) -> std::option::Option<&str> {
self.dns_name.as_deref()
}
/// <p>Operating system that is running on this instance. </p>
pub fn operating_system(&self) -> std::option::Option<&crate::types::OperatingSystem> {
self.operating_system.as_ref()
}
/// <p>Amazon EC2 instance type that defines the computing resources of this instance. </p>
pub fn r#type(&self) -> std::option::Option<&crate::types::Ec2InstanceType> {
self.r#type.as_ref()
}
/// <p>Current status of the instance. Possible statuses include the following:</p>
/// <ul>
/// <li> <p> <b>PENDING</b> -- The instance is in the process of being created and launching server processes as defined in the fleet's run-time configuration. </p> </li>
/// <li> <p> <b>ACTIVE</b> -- The instance has been successfully created and at least one server process has successfully launched and reported back to GameLift that it is ready to host a game session. The instance is now considered ready to host game sessions. </p> </li>
/// <li> <p> <b>TERMINATING</b> -- The instance is in the process of shutting down. This may happen to reduce capacity during a scaling down event or to recycle resources in the event of a problem.</p> </li>
/// </ul>
pub fn status(&self) -> std::option::Option<&crate::types::InstanceStatus> {
self.status.as_ref()
}
/// <p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
pub fn creation_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.creation_time.as_ref()
}
/// <p>The fleet location of the instance, expressed as an Amazon Web Services Region code, such as <code>us-west-2</code>. </p>
pub fn location(&self) -> std::option::Option<&str> {
self.location.as_deref()
}
}
impl Instance {
/// Creates a new builder-style object to manufacture [`Instance`](crate::types::Instance).
pub fn builder() -> crate::types::builders::InstanceBuilder {
crate::types::builders::InstanceBuilder::default()
}
}
/// A builder for [`Instance`](crate::types::Instance).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct InstanceBuilder {
pub(crate) fleet_id: std::option::Option<std::string::String>,
pub(crate) fleet_arn: std::option::Option<std::string::String>,
pub(crate) instance_id: std::option::Option<std::string::String>,
pub(crate) ip_address: std::option::Option<std::string::String>,
pub(crate) dns_name: std::option::Option<std::string::String>,
pub(crate) operating_system: std::option::Option<crate::types::OperatingSystem>,
pub(crate) r#type: std::option::Option<crate::types::Ec2InstanceType>,
pub(crate) status: std::option::Option<crate::types::InstanceStatus>,
pub(crate) creation_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) location: std::option::Option<std::string::String>,
}
impl InstanceBuilder {
/// <p>A unique identifier for the fleet that the instance is in.</p>
pub fn fleet_id(mut self, input: impl Into<std::string::String>) -> Self {
self.fleet_id = Some(input.into());
self
}
/// <p>A unique identifier for the fleet that the instance is in.</p>
pub fn set_fleet_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.fleet_id = input;
self
}
/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:
/// <region>
/// ::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
/// </region></code>.</p>
pub fn fleet_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.fleet_arn = Some(input.into());
self
}
/// <p>The Amazon Resource Name (<a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html">ARN</a>) that is assigned to a GameLift fleet resource and uniquely identifies it. ARNs are unique across all Regions. Format is <code>arn:aws:gamelift:
/// <region>
/// ::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912
/// </region></code>.</p>
pub fn set_fleet_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.fleet_arn = input;
self
}
/// <p>A unique identifier for the instance.</p>
pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
self.instance_id = Some(input.into());
self
}
/// <p>A unique identifier for the instance.</p>
pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.instance_id = input;
self
}
/// <p>IP address that is assigned to the instance.</p>
pub fn ip_address(mut self, input: impl Into<std::string::String>) -> Self {
self.ip_address = Some(input.into());
self
}
/// <p>IP address that is assigned to the instance.</p>
pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ip_address = input;
self
}
/// <p>The DNS identifier assigned to the instance that is running the game session. Values have the following format:</p>
/// <ul>
/// <li> <p>TLS-enabled fleets: <code>
/// <unique identifier>
/// .
/// <region identifier>
/// .amazongamelift.com
/// </region>
/// </unique></code>.</p> </li>
/// <li> <p>Non-TLS-enabled fleets: <code>ec2-
/// <unique identifier>
/// .compute.amazonaws.com
/// </unique></code>. (See <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#concepts-public-addresses">Amazon EC2 Instance IP Addressing</a>.)</p> </li>
/// </ul>
/// <p>When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.</p>
pub fn dns_name(mut self, input: impl Into<std::string::String>) -> Self {
self.dns_name = Some(input.into());
self
}
/// <p>The DNS identifier assigned to the instance that is running the game session. Values have the following format:</p>
/// <ul>
/// <li> <p>TLS-enabled fleets: <code>
/// <unique identifier>
/// .
/// <region identifier>
/// .amazongamelift.com
/// </region>
/// </unique></code>.</p> </li>
/// <li> <p>Non-TLS-enabled fleets: <code>ec2-
/// <unique identifier>
/// .compute.amazonaws.com
/// </unique></code>. (See <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-instance-addressing.html#concepts-public-addresses">Amazon EC2 Instance IP Addressing</a>.)</p> </li>
/// </ul>
/// <p>When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.</p>
pub fn set_dns_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.dns_name = input;
self
}
/// <p>Operating system that is running on this instance. </p>
pub fn operating_system(mut self, input: crate::types::OperatingSystem) -> Self {
self.operating_system = Some(input);
self
}
/// <p>Operating system that is running on this instance. </p>
pub fn set_operating_system(
mut self,
input: std::option::Option<crate::types::OperatingSystem>,
) -> Self {
self.operating_system = input;
self
}
/// <p>Amazon EC2 instance type that defines the computing resources of this instance. </p>
pub fn r#type(mut self, input: crate::types::Ec2InstanceType) -> Self {
self.r#type = Some(input);
self
}
/// <p>Amazon EC2 instance type that defines the computing resources of this instance. </p>
pub fn set_type(mut self, input: std::option::Option<crate::types::Ec2InstanceType>) -> Self {
self.r#type = input;
self
}
/// <p>Current status of the instance. Possible statuses include the following:</p>
/// <ul>
/// <li> <p> <b>PENDING</b> -- The instance is in the process of being created and launching server processes as defined in the fleet's run-time configuration. </p> </li>
/// <li> <p> <b>ACTIVE</b> -- The instance has been successfully created and at least one server process has successfully launched and reported back to GameLift that it is ready to host a game session. The instance is now considered ready to host game sessions. </p> </li>
/// <li> <p> <b>TERMINATING</b> -- The instance is in the process of shutting down. This may happen to reduce capacity during a scaling down event or to recycle resources in the event of a problem.</p> </li>
/// </ul>
pub fn status(mut self, input: crate::types::InstanceStatus) -> Self {
self.status = Some(input);
self
}
/// <p>Current status of the instance. Possible statuses include the following:</p>
/// <ul>
/// <li> <p> <b>PENDING</b> -- The instance is in the process of being created and launching server processes as defined in the fleet's run-time configuration. </p> </li>
/// <li> <p> <b>ACTIVE</b> -- The instance has been successfully created and at least one server process has successfully launched and reported back to GameLift that it is ready to host a game session. The instance is now considered ready to host game sessions. </p> </li>
/// <li> <p> <b>TERMINATING</b> -- The instance is in the process of shutting down. This may happen to reduce capacity during a scaling down event or to recycle resources in the event of a problem.</p> </li>
/// </ul>
pub fn set_status(mut self, input: std::option::Option<crate::types::InstanceStatus>) -> Self {
self.status = input;
self
}
/// <p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
pub fn creation_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.creation_time = Some(input);
self
}
/// <p>A time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example <code>"1469498468.057"</code>).</p>
pub fn set_creation_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.creation_time = input;
self
}
/// <p>The fleet location of the instance, expressed as an Amazon Web Services Region code, such as <code>us-west-2</code>. </p>
pub fn location(mut self, input: impl Into<std::string::String>) -> Self {
self.location = Some(input.into());
self
}
/// <p>The fleet location of the instance, expressed as an Amazon Web Services Region code, such as <code>us-west-2</code>. </p>
pub fn set_location(mut self, input: std::option::Option<std::string::String>) -> Self {
self.location = input;
self
}
/// Consumes the builder and constructs a [`Instance`](crate::types::Instance).
pub fn build(self) -> crate::types::Instance {
crate::types::Instance {
fleet_id: self.fleet_id,
fleet_arn: self.fleet_arn,
instance_id: self.instance_id,
ip_address: self.ip_address,
dns_name: self.dns_name,
operating_system: self.operating_system,
r#type: self.r#type,
status: self.status,
creation_time: self.creation_time,
location: self.location,
}
}
}