Skip to main content

environment_hosts

Creates, updates, deletes, gets or lists an environment_hosts resource.

Overview

Nameenvironment_hosts
TypeResource
Idaws.evs.environment_hosts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_atstring (date-time)The date and time that the host was created.
dedicated_host_idstringThe unique ID of the Amazon EC2 Dedicated Host. (pattern: <code>h-[a-f0-9]{8}([a-f0-9]{9})?</code>)
ec_2_instance_idstringThe unique ID of the EC2 instance that represents the host.
host_namestringThe DNS hostname of the host. DNS hostnames for hosts must be unique across Amazon EVS environments and within VCF. (pattern: <code>([a-zA-Z0-9-]*)</code>)
host_statestringThe state of the host. (CREATING, CREATED, UPDATING, DELETING, DELETED, CREATE_FAILED, UPDATE_FAILED)
instance_typestringThe EC2 instance type of the host. EC2 instances created through Amazon EVS do not support associating an IAM instance profile. (i4i.metal, i7i.metal-24xl)
ip_addressstringThe IP address of the host. (pattern: <code>(\d{1,3}.){3}\d{1,3}</code>)
key_namestringThe name of the SSH key that is used to access the host. (pattern: <code>[a-zA-Z0-9_-]+</code>)
modified_atstring (date-time)The date and time that the host was modified.
network_interfacesarrayThe elastic network interfaces that are attached to the host.
placement_group_idstringThe unique ID of the placement group where the host is placed. (pattern: <code>pg-[a-f0-9]{8}([a-f0-9]{9})?</code>)
state_detailsstringA detailed description of the hostState of a host.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_environment_hostsselectregionList the hosts within an environment.
create_environment_hostinsertregion, environmentId, hostCreates an ESX host and adds it to an Amazon EVS environment. This action can only be used after the Amazon EVS environment is deployed. You can use the dedicatedHostId parameter to specify an Amazon EC2 Dedicated Host for ESX host creation. You can use the placementGroupId parameter to specify a cluster or partition placement group to launch EC2 instances into. If you don't specify an ESX version when adding hosts using CreateEnvironmentHost action, Amazon EVS automatically uses the default ESX version for your environment's VCF version. To find the available ESX versions for a particular VCF version, use the GetVersions action. You cannot use the dedicatedHostId and placementGroupId parameters together in the same CreateEnvironmentHost action. This results in a ValidationException response.
delete_environment_hostdeleteregionDeletes a host from an Amazon EVS environment. Before deleting a host, you must unassign and decommission the host from within the SDDC Manager user interface. Not doing so could impact the availability of your virtual machines or result in data loss.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

List the hosts within an environment.

SELECT
created_at,
dedicated_host_id,
ec_2_instance_id,
host_name,
host_state,
instance_type,
ip_address,
key_name,
modified_at,
network_interfaces,
placement_group_id,
state_details
FROM aws.evs.environment_hosts
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an ESX host and adds it to an Amazon EVS environment. This action can only be used after the Amazon EVS environment is deployed. You can use the dedicatedHostId parameter to specify an Amazon EC2 Dedicated Host for ESX host creation. You can use the placementGroupId parameter to specify a cluster or partition placement group to launch EC2 instances into. If you don't specify an ESX version when adding hosts using CreateEnvironmentHost action, Amazon EVS automatically uses the default ESX version for your environment's VCF version. To find the available ESX versions for a particular VCF version, use the GetVersions action. You cannot use the dedicatedHostId and placementGroupId parameters together in the same CreateEnvironmentHost action. This results in a ValidationException response.

INSERT INTO aws.evs.environment_hosts (
clientToken,
environmentId,
host,
esxVersion,
region
)
SELECT
'{{ clientToken }}',
'{{ environmentId }}' /* required */,
'{{ host }}' /* required */,
'{{ esxVersion }}',
'{{ region }}'
RETURNING
environment_summary,
host
;

DELETE examples

Deletes a host from an Amazon EVS environment. Before deleting a host, you must unassign and decommission the host from within the SDDC Manager user interface. Not doing so could impact the availability of your virtual machines or result in data loss.

DELETE FROM aws.evs.environment_hosts
WHERE region = '{{ region }}' --required
;