:doc:`Instance <index>` / Attribute / placement

*********
placement
*********



.. py:attribute:: EC2.Instance.placement

  

  - *(dict) --* 

    The location where the instance launched, if applicable.

    
    

    - **AvailabilityZoneId** *(string) --* 

      The ID of the Availability Zone of the instance.

       

      On input, you can specify ``AvailabilityZone`` or ``AvailabilityZoneId``, but not both. If you specify neither one, Amazon EC2 automatically selects an Availability Zone for you.

       

      This parameter is not supported for `CreateFleet <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet>`__.

      
    

    - **Affinity** *(string) --* 

      The affinity setting for the instance on the Dedicated Host.

       

      This parameter is not supported for `CreateFleet <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet>`__ or `ImportInstance <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html>`__.

      
    

    - **GroupName** *(string) --* 

      The name of the placement group that the instance is in.

       

      On input, you can specify ``GroupId`` or ``GroupName``, but not both.

      
    

    - **PartitionNumber** *(integer) --* 

      The number of the partition that the instance is in. Valid only if the placement group strategy is set to ``partition``.

       

      This parameter is not supported for `CreateFleet <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet>`__.

      
    

    - **HostId** *(string) --* 

      The ID of the Dedicated Host on which the instance resides.

       

      This parameter is not supported for `CreateFleet <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet>`__ or `ImportInstance <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html>`__.

      
    

    - **Tenancy** *(string) --* 

      The tenancy of the instance. An instance with a tenancy of ``dedicated`` runs on single-tenant hardware.

       

      This parameter is not supported for `CreateFleet <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet>`__. The ``host`` tenancy is not supported for `ImportInstance <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html>`__ or for T3 instances that are configured for the ``unlimited`` CPU credit option.

      
    

    - **SpreadDomain** *(string) --* 

      Reserved for future use.

      
    

    - **HostResourceGroupArn** *(string) --* 

      The ARN of the host resource group in which to launch the instances.

       

      On input, if you specify this parameter, either omit the **Tenancy** parameter or set it to ``host``.

       

      This parameter is not supported for `CreateFleet <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet>`__.

      
    

    - **GroupId** *(string) --* 

      The ID of the placement group that the instance is in.

       

      On input, you can specify ``GroupId`` or ``GroupName``, but not both.

      
    

    - **AvailabilityZone** *(string) --* 

      The Availability Zone of the instance.

       

      On input, you can specify ``AvailabilityZone`` or ``AvailabilityZoneId``, but not both. If you specify neither one, Amazon EC2 automatically selects an Availability Zone for you.

       

      This parameter is not supported for `CreateFleet <https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet>`__.

      
