/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace GameLift { namespace Model { /** *

Represents an EC2 instance of virtual computing resources that hosts one or * more game servers. In Amazon GameLift, a fleet can contain zero or more * instances.

Related actions

See Also:

AWS * API Reference

*/ class Instance { public: AWS_GAMELIFT_API Instance(); AWS_GAMELIFT_API Instance(Aws::Utils::Json::JsonView jsonValue); AWS_GAMELIFT_API Instance& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_GAMELIFT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

A unique identifier for the fleet that the instance is in.

*/ inline const Aws::String& GetFleetId() const{ return m_fleetId; } /** *

A unique identifier for the fleet that the instance is in.

*/ inline bool FleetIdHasBeenSet() const { return m_fleetIdHasBeenSet; } /** *

A unique identifier for the fleet that the instance is in.

*/ inline void SetFleetId(const Aws::String& value) { m_fleetIdHasBeenSet = true; m_fleetId = value; } /** *

A unique identifier for the fleet that the instance is in.

*/ inline void SetFleetId(Aws::String&& value) { m_fleetIdHasBeenSet = true; m_fleetId = std::move(value); } /** *

A unique identifier for the fleet that the instance is in.

*/ inline void SetFleetId(const char* value) { m_fleetIdHasBeenSet = true; m_fleetId.assign(value); } /** *

A unique identifier for the fleet that the instance is in.

*/ inline Instance& WithFleetId(const Aws::String& value) { SetFleetId(value); return *this;} /** *

A unique identifier for the fleet that the instance is in.

*/ inline Instance& WithFleetId(Aws::String&& value) { SetFleetId(std::move(value)); return *this;} /** *

A unique identifier for the fleet that the instance is in.

*/ inline Instance& WithFleetId(const char* value) { SetFleetId(value); return *this;} /** *

The Amazon Resource Name (ARN) * that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. * ARNs are unique across all Regions. Format is * arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

*/ inline const Aws::String& GetFleetArn() const{ return m_fleetArn; } /** *

The Amazon Resource Name (ARN) * that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. * ARNs are unique across all Regions. Format is * arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

*/ inline bool FleetArnHasBeenSet() const { return m_fleetArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) * that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. * ARNs are unique across all Regions. Format is * arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

*/ inline void SetFleetArn(const Aws::String& value) { m_fleetArnHasBeenSet = true; m_fleetArn = value; } /** *

The Amazon Resource Name (ARN) * that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. * ARNs are unique across all Regions. Format is * arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

*/ inline void SetFleetArn(Aws::String&& value) { m_fleetArnHasBeenSet = true; m_fleetArn = std::move(value); } /** *

The Amazon Resource Name (ARN) * that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. * ARNs are unique across all Regions. Format is * arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

*/ inline void SetFleetArn(const char* value) { m_fleetArnHasBeenSet = true; m_fleetArn.assign(value); } /** *

The Amazon Resource Name (ARN) * that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. * ARNs are unique across all Regions. Format is * arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

*/ inline Instance& WithFleetArn(const Aws::String& value) { SetFleetArn(value); return *this;} /** *

The Amazon Resource Name (ARN) * that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. * ARNs are unique across all Regions. Format is * arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

*/ inline Instance& WithFleetArn(Aws::String&& value) { SetFleetArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) * that is assigned to a Amazon GameLift fleet resource and uniquely identifies it. * ARNs are unique across all Regions. Format is * arn:aws:gamelift:<region>::fleet/fleet-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912.

*/ inline Instance& WithFleetArn(const char* value) { SetFleetArn(value); return *this;} /** *

A unique identifier for the instance.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

A unique identifier for the instance.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

A unique identifier for the instance.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

A unique identifier for the instance.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

A unique identifier for the instance.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

A unique identifier for the instance.

*/ inline Instance& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

A unique identifier for the instance.

*/ inline Instance& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

A unique identifier for the instance.

*/ inline Instance& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} /** *

IP address that is assigned to the instance.

*/ inline const Aws::String& GetIpAddress() const{ return m_ipAddress; } /** *

IP address that is assigned to the instance.

*/ inline bool IpAddressHasBeenSet() const { return m_ipAddressHasBeenSet; } /** *

IP address that is assigned to the instance.

*/ inline void SetIpAddress(const Aws::String& value) { m_ipAddressHasBeenSet = true; m_ipAddress = value; } /** *

IP address that is assigned to the instance.

*/ inline void SetIpAddress(Aws::String&& value) { m_ipAddressHasBeenSet = true; m_ipAddress = std::move(value); } /** *

IP address that is assigned to the instance.

*/ inline void SetIpAddress(const char* value) { m_ipAddressHasBeenSet = true; m_ipAddress.assign(value); } /** *

IP address that is assigned to the instance.

*/ inline Instance& WithIpAddress(const Aws::String& value) { SetIpAddress(value); return *this;} /** *

IP address that is assigned to the instance.

*/ inline Instance& WithIpAddress(Aws::String&& value) { SetIpAddress(std::move(value)); return *this;} /** *

IP address that is assigned to the instance.

*/ inline Instance& WithIpAddress(const char* value) { SetIpAddress(value); return *this;} /** *

The DNS identifier assigned to the instance that is running the game session. * Values have the following format:

  • TLS-enabled fleets: * <unique identifier>.<region * identifier>.amazongamelift.com.

  • Non-TLS-enabled * fleets: ec2-<unique identifier>.compute.amazonaws.com. (See * Amazon * EC2 Instance IP Addressing.)

When connecting to a game * session that is running on a TLS-enabled fleet, you must use the DNS name, not * the IP address.

*/ inline const Aws::String& GetDnsName() const{ return m_dnsName; } /** *

The DNS identifier assigned to the instance that is running the game session. * Values have the following format:

  • TLS-enabled fleets: * <unique identifier>.<region * identifier>.amazongamelift.com.

  • Non-TLS-enabled * fleets: ec2-<unique identifier>.compute.amazonaws.com. (See * Amazon * EC2 Instance IP Addressing.)

When connecting to a game * session that is running on a TLS-enabled fleet, you must use the DNS name, not * the IP address.

*/ inline bool DnsNameHasBeenSet() const { return m_dnsNameHasBeenSet; } /** *

The DNS identifier assigned to the instance that is running the game session. * Values have the following format:

  • TLS-enabled fleets: * <unique identifier>.<region * identifier>.amazongamelift.com.

  • Non-TLS-enabled * fleets: ec2-<unique identifier>.compute.amazonaws.com. (See * Amazon * EC2 Instance IP Addressing.)

When connecting to a game * session that is running on a TLS-enabled fleet, you must use the DNS name, not * the IP address.

*/ inline void SetDnsName(const Aws::String& value) { m_dnsNameHasBeenSet = true; m_dnsName = value; } /** *

The DNS identifier assigned to the instance that is running the game session. * Values have the following format:

  • TLS-enabled fleets: * <unique identifier>.<region * identifier>.amazongamelift.com.

  • Non-TLS-enabled * fleets: ec2-<unique identifier>.compute.amazonaws.com. (See * Amazon * EC2 Instance IP Addressing.)

When connecting to a game * session that is running on a TLS-enabled fleet, you must use the DNS name, not * the IP address.

*/ inline void SetDnsName(Aws::String&& value) { m_dnsNameHasBeenSet = true; m_dnsName = std::move(value); } /** *

The DNS identifier assigned to the instance that is running the game session. * Values have the following format:

  • TLS-enabled fleets: * <unique identifier>.<region * identifier>.amazongamelift.com.

  • Non-TLS-enabled * fleets: ec2-<unique identifier>.compute.amazonaws.com. (See * Amazon * EC2 Instance IP Addressing.)

When connecting to a game * session that is running on a TLS-enabled fleet, you must use the DNS name, not * the IP address.

*/ inline void SetDnsName(const char* value) { m_dnsNameHasBeenSet = true; m_dnsName.assign(value); } /** *

The DNS identifier assigned to the instance that is running the game session. * Values have the following format:

  • TLS-enabled fleets: * <unique identifier>.<region * identifier>.amazongamelift.com.

  • Non-TLS-enabled * fleets: ec2-<unique identifier>.compute.amazonaws.com. (See * Amazon * EC2 Instance IP Addressing.)

When connecting to a game * session that is running on a TLS-enabled fleet, you must use the DNS name, not * the IP address.

*/ inline Instance& WithDnsName(const Aws::String& value) { SetDnsName(value); return *this;} /** *

The DNS identifier assigned to the instance that is running the game session. * Values have the following format:

  • TLS-enabled fleets: * <unique identifier>.<region * identifier>.amazongamelift.com.

  • Non-TLS-enabled * fleets: ec2-<unique identifier>.compute.amazonaws.com. (See * Amazon * EC2 Instance IP Addressing.)

When connecting to a game * session that is running on a TLS-enabled fleet, you must use the DNS name, not * the IP address.

*/ inline Instance& WithDnsName(Aws::String&& value) { SetDnsName(std::move(value)); return *this;} /** *

The DNS identifier assigned to the instance that is running the game session. * Values have the following format:

  • TLS-enabled fleets: * <unique identifier>.<region * identifier>.amazongamelift.com.

  • Non-TLS-enabled * fleets: ec2-<unique identifier>.compute.amazonaws.com. (See * Amazon * EC2 Instance IP Addressing.)

When connecting to a game * session that is running on a TLS-enabled fleet, you must use the DNS name, not * the IP address.

*/ inline Instance& WithDnsName(const char* value) { SetDnsName(value); return *this;} /** *

Operating system that is running on this instance.

*/ inline const OperatingSystem& GetOperatingSystem() const{ return m_operatingSystem; } /** *

Operating system that is running on this instance.

*/ inline bool OperatingSystemHasBeenSet() const { return m_operatingSystemHasBeenSet; } /** *

Operating system that is running on this instance.

*/ inline void SetOperatingSystem(const OperatingSystem& value) { m_operatingSystemHasBeenSet = true; m_operatingSystem = value; } /** *

Operating system that is running on this instance.

*/ inline void SetOperatingSystem(OperatingSystem&& value) { m_operatingSystemHasBeenSet = true; m_operatingSystem = std::move(value); } /** *

Operating system that is running on this instance.

*/ inline Instance& WithOperatingSystem(const OperatingSystem& value) { SetOperatingSystem(value); return *this;} /** *

Operating system that is running on this instance.

*/ inline Instance& WithOperatingSystem(OperatingSystem&& value) { SetOperatingSystem(std::move(value)); return *this;} /** *

Amazon EC2 instance type that defines the computing resources of this * instance.

*/ inline const EC2InstanceType& GetType() const{ return m_type; } /** *

Amazon EC2 instance type that defines the computing resources of this * instance.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

Amazon EC2 instance type that defines the computing resources of this * instance.

*/ inline void SetType(const EC2InstanceType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

Amazon EC2 instance type that defines the computing resources of this * instance.

*/ inline void SetType(EC2InstanceType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

Amazon EC2 instance type that defines the computing resources of this * instance.

*/ inline Instance& WithType(const EC2InstanceType& value) { SetType(value); return *this;} /** *

Amazon EC2 instance type that defines the computing resources of this * instance.

*/ inline Instance& WithType(EC2InstanceType&& value) { SetType(std::move(value)); return *this;} /** *

Current status of the instance. Possible statuses include the following:

*
  • PENDING -- The instance is in the process of being created * and launching server processes as defined in the fleet's run-time configuration. *

  • ACTIVE -- The instance has been successfully created * and at least one server process has successfully launched and reported back to * Amazon GameLift that it is ready to host a game session. The instance is now * considered ready to host game sessions.

  • TERMINATING * -- 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.

*/ inline const InstanceStatus& GetStatus() const{ return m_status; } /** *

Current status of the instance. Possible statuses include the following:

*
  • PENDING -- The instance is in the process of being created * and launching server processes as defined in the fleet's run-time configuration. *

  • ACTIVE -- The instance has been successfully created * and at least one server process has successfully launched and reported back to * Amazon GameLift that it is ready to host a game session. The instance is now * considered ready to host game sessions.

  • TERMINATING * -- 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.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

Current status of the instance. Possible statuses include the following:

*
  • PENDING -- The instance is in the process of being created * and launching server processes as defined in the fleet's run-time configuration. *

  • ACTIVE -- The instance has been successfully created * and at least one server process has successfully launched and reported back to * Amazon GameLift that it is ready to host a game session. The instance is now * considered ready to host game sessions.

  • TERMINATING * -- 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.

*/ inline void SetStatus(const InstanceStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

Current status of the instance. Possible statuses include the following:

*
  • PENDING -- The instance is in the process of being created * and launching server processes as defined in the fleet's run-time configuration. *

  • ACTIVE -- The instance has been successfully created * and at least one server process has successfully launched and reported back to * Amazon GameLift that it is ready to host a game session. The instance is now * considered ready to host game sessions.

  • TERMINATING * -- 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.

*/ inline void SetStatus(InstanceStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

Current status of the instance. Possible statuses include the following:

*
  • PENDING -- The instance is in the process of being created * and launching server processes as defined in the fleet's run-time configuration. *

  • ACTIVE -- The instance has been successfully created * and at least one server process has successfully launched and reported back to * Amazon GameLift that it is ready to host a game session. The instance is now * considered ready to host game sessions.

  • TERMINATING * -- 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.

*/ inline Instance& WithStatus(const InstanceStatus& value) { SetStatus(value); return *this;} /** *

Current status of the instance. Possible statuses include the following:

*
  • PENDING -- The instance is in the process of being created * and launching server processes as defined in the fleet's run-time configuration. *

  • ACTIVE -- The instance has been successfully created * and at least one server process has successfully launched and reported back to * Amazon GameLift that it is ready to host a game session. The instance is now * considered ready to host game sessions.

  • TERMINATING * -- 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.

*/ inline Instance& WithStatus(InstanceStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

A time stamp indicating when this data object was created. Format is a number * expressed in Unix time as milliseconds (for example * "1469498468.057").

*/ inline const Aws::Utils::DateTime& GetCreationTime() const{ return m_creationTime; } /** *

A time stamp indicating when this data object was created. Format is a number * expressed in Unix time as milliseconds (for example * "1469498468.057").

*/ inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; } /** *

A time stamp indicating when this data object was created. Format is a number * expressed in Unix time as milliseconds (for example * "1469498468.057").

*/ inline void SetCreationTime(const Aws::Utils::DateTime& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; } /** *

A time stamp indicating when this data object was created. Format is a number * expressed in Unix time as milliseconds (for example * "1469498468.057").

*/ inline void SetCreationTime(Aws::Utils::DateTime&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::move(value); } /** *

A time stamp indicating when this data object was created. Format is a number * expressed in Unix time as milliseconds (for example * "1469498468.057").

*/ inline Instance& WithCreationTime(const Aws::Utils::DateTime& value) { SetCreationTime(value); return *this;} /** *

A time stamp indicating when this data object was created. Format is a number * expressed in Unix time as milliseconds (for example * "1469498468.057").

*/ inline Instance& WithCreationTime(Aws::Utils::DateTime&& value) { SetCreationTime(std::move(value)); return *this;} /** *

The fleet location of the instance, expressed as an Amazon Web Services * Region code, such as us-west-2.

*/ inline const Aws::String& GetLocation() const{ return m_location; } /** *

The fleet location of the instance, expressed as an Amazon Web Services * Region code, such as us-west-2.

*/ inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; } /** *

The fleet location of the instance, expressed as an Amazon Web Services * Region code, such as us-west-2.

*/ inline void SetLocation(const Aws::String& value) { m_locationHasBeenSet = true; m_location = value; } /** *

The fleet location of the instance, expressed as an Amazon Web Services * Region code, such as us-west-2.

*/ inline void SetLocation(Aws::String&& value) { m_locationHasBeenSet = true; m_location = std::move(value); } /** *

The fleet location of the instance, expressed as an Amazon Web Services * Region code, such as us-west-2.

*/ inline void SetLocation(const char* value) { m_locationHasBeenSet = true; m_location.assign(value); } /** *

The fleet location of the instance, expressed as an Amazon Web Services * Region code, such as us-west-2.

*/ inline Instance& WithLocation(const Aws::String& value) { SetLocation(value); return *this;} /** *

The fleet location of the instance, expressed as an Amazon Web Services * Region code, such as us-west-2.

*/ inline Instance& WithLocation(Aws::String&& value) { SetLocation(std::move(value)); return *this;} /** *

The fleet location of the instance, expressed as an Amazon Web Services * Region code, such as us-west-2.

*/ inline Instance& WithLocation(const char* value) { SetLocation(value); return *this;} private: Aws::String m_fleetId; bool m_fleetIdHasBeenSet = false; Aws::String m_fleetArn; bool m_fleetArnHasBeenSet = false; Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; Aws::String m_ipAddress; bool m_ipAddressHasBeenSet = false; Aws::String m_dnsName; bool m_dnsNameHasBeenSet = false; OperatingSystem m_operatingSystem; bool m_operatingSystemHasBeenSet = false; EC2InstanceType m_type; bool m_typeHasBeenSet = false; InstanceStatus m_status; bool m_statusHasBeenSet = false; Aws::Utils::DateTime m_creationTime; bool m_creationTimeHasBeenSet = false; Aws::String m_location; bool m_locationHasBeenSet = false; }; } // namespace Model } // namespace GameLift } // namespace Aws