:doc:`GameLift <../../gamelift>` / Client / create_location

***************
create_location
***************



.. py:method:: GameLift.Client.create_location(**kwargs)

  

  **This API works with the following fleet types:** Anywhere

   

  Creates a custom location for use in an Anywhere fleet.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/gamelift-2015-10-01/CreateLocation>`_  


  **Request Syntax**
  ::

    response = client.create_location(
        LocationName='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type LocationName: string
  :param LocationName: **[REQUIRED]** 

    A descriptive name for the custom location.

    

  
  :type Tags: list
  :param Tags: 

    A list of labels to assign to the new resource. Tags are developer-defined key-value pairs. Tagging Amazon Web Services resources are useful for resource management, access management, and cost allocation. For more information, see `Tagging Amazon Web Services Resources <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html>`__ in the *Amazon Web Services General Rareference*.

    

  
    - *(dict) --* 

      A label that you can assign to a Amazon GameLift Servers resource.

       

      **Learn more**

       

      `Tagging Amazon Web Services Resources <https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html>`__ in the *Amazon Web Services General Reference*

       

      `Amazon Web Services Tagging Strategies <http://aws.amazon.com/answers/account-management/aws-tagging-strategies/>`__

       

      **Related actions**

       

      `All APIs by task <https://docs.aws.amazon.com/gamelift/latest/developerguide/reference-awssdk.html#reference-awssdk-resources-fleets>`__

      

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

        The key for a developer-defined key value pair for tagging an Amazon Web Services resource.

        

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

        The value for a developer-defined key value pair for tagging an Amazon Web Services resource.

        

      
    

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

    
    ::

      {
          'Location': {
              'LocationName': 'string',
              'LocationArn': 'string',
              'PingBeacon': {
                  'UDPEndpoint': {
                      'Domain': 'string',
                      'Port': 123
                  }
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Location** *(dict) --* 

        The details of the custom location you created.

        
        

        - **LocationName** *(string) --* 

          The location's name.

          
        

        - **LocationArn** *(string) --* 

          The Amazon Resource Name ( `ARN <https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-arn-format.html>`__) that is assigned to a custom location resource and uniquely identifies it. ARNs are unique across all Regions. Format is ``arn:aws:gamelift:<region>::location/location-a1234567-b8c9-0d1e-2fa3-b45c6d7e8912``.

          
        

        - **PingBeacon** *(dict) --* 

          Information about the UDP ping beacon for this location.

          
          

          - **UDPEndpoint** *(dict) --* 

            The domain name and port of the UDP ping beacon.

            
            

            - **Domain** *(string) --* 

              The domain name of the UDP endpoint.

              
            

            - **Port** *(integer) --* 

              The port number of the UDP endpoint.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`GameLift.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`GameLift.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`GameLift.Client.exceptions.LimitExceededException`

  
  *   :py:class:`GameLift.Client.exceptions.ConflictException`

  
  *   :py:class:`GameLift.Client.exceptions.TaggingFailedException`

  
  *   :py:class:`GameLift.Client.exceptions.InternalServiceException`

  