EVS / Client / create_environment_host

create_environment_host

EVS.Client.create_environment_host(**kwargs)

Creates an ESXi host and adds it to an Amazon EVS environment. Amazon EVS supports 4-16 hosts per environment.

This action can only be used after the Amazon EVS environment is deployed. All Amazon EVS hosts are created with the latest AMI release version for the respective VCF version of the environment.

You can use the dedicatedHostId parameter to specify an Amazon EC2 Dedicated Host for ESXi host creation.

You can use the placementGroupId parameter to specify a cluster or partition placement group to launch EC2 instances into.

Note

You cannot use the dedicatedHostId and placementGroupId parameters together in the same CreateEnvironmentHost action. This results in a ValidationException response.

Note

EC2 instances created through Amazon EVS do not support associating an IAM instance profile.

See also: AWS API Documentation

Request Syntax

response = client.create_environment_host(
    clientToken='string',
    environmentId='string',
    host={
        'hostName': 'string',
        'keyName': 'string',
        'instanceType': 'i4i.metal',
        'placementGroupId': 'string',
        'dedicatedHostId': 'string'
    }
)
Parameters:
  • clientToken (string) –

    Note

    This parameter is not used in Amazon EVS currently. If you supply input for this parameter, it will have no effect.

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the host creation request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.

    This field is autopopulated if not provided.

  • environmentId (string) –

    [REQUIRED]

    A unique ID for the environment that the host is added to.

  • host (dict) –

    [REQUIRED]

    The host that is created and added to the environment.

    • hostName (string) – [REQUIRED]

      The DNS hostname of the host. DNS hostnames for hosts must be unique across Amazon EVS environments and within VCF.

    • keyName (string) – [REQUIRED]

      The name of the SSH key that is used to access the host.

    • instanceType (string) – [REQUIRED]

      The EC2 instance type that represents the host.

    • placementGroupId (string) –

      The unique ID of the placement group where the host is placed.

    • dedicatedHostId (string) –

      The unique ID of the Amazon EC2 Dedicated Host.

Return type:

dict

Returns:

Response Syntax

{
    'environmentSummary': {
        'environmentId': 'string',
        'environmentName': 'string',
        'vcfVersion': 'VCF-5.2.1',
        'environmentStatus': 'PASSED'|'FAILED'|'UNKNOWN',
        'environmentState': 'CREATING'|'CREATED'|'DELETING'|'DELETED'|'CREATE_FAILED',
        'createdAt': datetime(2015, 1, 1),
        'modifiedAt': datetime(2015, 1, 1),
        'environmentArn': 'string'
    },
    'host': {
        'hostName': 'string',
        'ipAddress': 'string',
        'keyName': 'string',
        'instanceType': 'i4i.metal',
        'placementGroupId': 'string',
        'dedicatedHostId': 'string',
        'createdAt': datetime(2015, 1, 1),
        'modifiedAt': datetime(2015, 1, 1),
        'hostState': 'CREATING'|'CREATED'|'UPDATING'|'DELETING'|'DELETED'|'CREATE_FAILED'|'UPDATE_FAILED',
        'stateDetails': 'string',
        'ec2InstanceId': 'string',
        'networkInterfaces': [
            {
                'networkInterfaceId': 'string'
            },
        ]
    }
}

Response Structure

  • (dict) –

    • environmentSummary (dict) –

      A summary of the environment that the host is created in.

      • environmentId (string) –

        A unique ID for the environment.

      • environmentName (string) –

        The name of the environment.

      • vcfVersion (string) –

        The VCF version of the environment.

      • environmentStatus (string) –

        Reports impaired functionality that stems from issues internal to the environment, such as impaired reachability.

      • environmentState (string) –

        The state of an environment.

      • createdAt (datetime) –

        The date and time that the environment was created.

      • modifiedAt (datetime) –

        The date and time that the environment was modified.

      • environmentArn (string) –

        The Amazon Resource Name (ARN) that is associated with the environment.

    • host (dict) –

      A description of the created host.

      • hostName (string) –

        The DNS hostname of the host. DNS hostnames for hosts must be unique across Amazon EVS environments and within VCF.

      • ipAddress (string) –

        The IP address of the host.

      • keyName (string) –

        The name of the SSH key that is used to access the host.

      • instanceType (string) –

        The EC2 instance type of the host.

        Note

        EC2 instances created through Amazon EVS do not support associating an IAM instance profile.

      • placementGroupId (string) –

        The unique ID of the placement group where the host is placed.

      • dedicatedHostId (string) –

        The unique ID of the Amazon EC2 Dedicated Host.

      • createdAt (datetime) –

        The date and time that the host was created.

      • modifiedAt (datetime) –

        The date and time that the host was modified.

      • hostState (string) –

        The state of the host.

      • stateDetails (string) –

        A detailed description of the hostState of a host.

      • ec2InstanceId (string) –

        The unique ID of the EC2 instance that represents the host.

      • networkInterfaces (list) –

        The elastic network interfaces that are attached to the host.

        • (dict) –

          An elastic network interface (ENI) that connects hosts to the VLAN subnets. Amazon EVS provisions two identically configured ENIs in the VMkernel management subnet during host creation. One ENI is active, and the other is in standby mode for automatic switchover during a failure scenario.

          • networkInterfaceId (string) –

            The unique ID of the elastic network interface.

Exceptions