:doc:`MigrationHubConfig <../../migrationhub-config>` / Client / create_home_region_control

**************************
create_home_region_control
**************************



.. py:method:: MigrationHubConfig.Client.create_home_region_control(**kwargs)

  

  This API sets up the home region for the calling account only.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/migrationhub-config-2019-06-30/CreateHomeRegionControl>`_  


  **Request Syntax**
  ::

    response = client.create_home_region_control(
        HomeRegion='string',
        Target={
            'Type': 'ACCOUNT',
            'Id': 'string'
        },
        DryRun=True|False
    )
    
  :type HomeRegion: string
  :param HomeRegion: **[REQUIRED]** 

    The name of the home region of the calling account.

    

  
  :type Target: dict
  :param Target: **[REQUIRED]** 

    The account for which this command sets up a home region control. The ``Target`` is always of type ``ACCOUNT``.

    

  
    - **Type** *(string) --* **[REQUIRED]** 

      The target type is always an ``ACCOUNT``.

      

    
    - **Id** *(string) --* 

      The ``TargetID`` is a 12-character identifier of the ``ACCOUNT`` for which the control was created. (This must be the current account.)

      

    
  
  :type DryRun: boolean
  :param DryRun: 

    Optional Boolean flag to indicate whether any effect should take place. It tests whether the caller has permission to make the call.

    

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

    
    ::

      {
          'HomeRegionControl': {
              'ControlId': 'string',
              'HomeRegion': 'string',
              'Target': {
                  'Type': 'ACCOUNT',
                  'Id': 'string'
              },
              'RequestedTime': datetime(2015, 1, 1)
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **HomeRegionControl** *(dict) --* 

        This object is the ``HomeRegionControl`` object that's returned by a successful call to ``CreateHomeRegionControl``.

        
        

        - **ControlId** *(string) --* 

          A unique identifier that's generated for each home region control. It's always a string that begins with "hrc-" followed by 12 lowercase letters and numbers.

          
        

        - **HomeRegion** *(string) --* 

          The AWS Region that's been set as home region. For example, "us-west-2" or "eu-central-1" are valid home regions.

          
        

        - **Target** *(dict) --* 

          The target parameter specifies the identifier to which the home region is applied, which is always an ``ACCOUNT``. It applies the home region to the current ``ACCOUNT``.

          
          

          - **Type** *(string) --* 

            The target type is always an ``ACCOUNT``.

            
          

          - **Id** *(string) --* 

            The ``TargetID`` is a 12-character identifier of the ``ACCOUNT`` for which the control was created. (This must be the current account.)

            
      
        

        - **RequestedTime** *(datetime) --* 

          A timestamp representing the time when the customer called ``CreateHomeregionControl`` and set the home region for the account.

          
    
  
  **Exceptions**
  
  *   :py:class:`MigrationHubConfig.Client.exceptions.InternalServerError`

  
  *   :py:class:`MigrationHubConfig.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`MigrationHubConfig.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`MigrationHubConfig.Client.exceptions.ThrottlingException`

  
  *   :py:class:`MigrationHubConfig.Client.exceptions.DryRunOperation`

  
  *   :py:class:`MigrationHubConfig.Client.exceptions.InvalidInputException`

  