:doc:`EC2 <../../ec2>` / Client / modify_private_dns_name_options

*******************************
modify_private_dns_name_options
*******************************



.. py:method:: EC2.Client.modify_private_dns_name_options(**kwargs)

  

  Modifies the options for instance hostnames for the specified instance.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyPrivateDnsNameOptions>`_  


  **Request Syntax**
  ::

    response = client.modify_private_dns_name_options(
        DryRun=True|False,
        InstanceId='string',
        PrivateDnsHostnameType='ip-name'|'resource-name',
        EnableResourceNameDnsARecord=True|False,
        EnableResourceNameDnsAAAARecord=True|False
    )
    
  :type DryRun: boolean
  :param DryRun: 

    Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is ``DryRunOperation``. Otherwise, it is ``UnauthorizedOperation``.

    

  
  :type InstanceId: string
  :param InstanceId: **[REQUIRED]** 

    The ID of the instance.

    

  
  :type PrivateDnsHostnameType: string
  :param PrivateDnsHostnameType: 

    The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID.

    

  
  :type EnableResourceNameDnsARecord: boolean
  :param EnableResourceNameDnsARecord: 

    Indicates whether to respond to DNS queries for instance hostnames with DNS A records.

    

  
  :type EnableResourceNameDnsAAAARecord: boolean
  :param EnableResourceNameDnsAAAARecord: 

    Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Return': True|False
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Return** *(boolean) --* 

        Returns ``true`` if the request succeeds; otherwise, it returns an error.

        
  