:doc:`APIGateway <../../apigateway>` / Client / create_base_path_mapping

************************
create_base_path_mapping
************************



.. py:method:: APIGateway.Client.create_base_path_mapping(**kwargs)

  

  Creates a new BasePathMapping resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/apigateway-2015-07-09/CreateBasePathMapping>`_  


  **Request Syntax**
  ::

    response = client.create_base_path_mapping(
        domainName='string',
        domainNameId='string',
        basePath='string',
        restApiId='string',
        stage='string'
    )
    
  :type domainName: string
  :param domainName: **[REQUIRED]** 

    The domain name of the BasePathMapping resource to create.

    

  
  :type domainNameId: string
  :param domainNameId: 

    The identifier for the domain name resource. Required for private custom domain names.

    

  
  :type basePath: string
  :param basePath: 

    The base path name that callers of the API must provide as part of the URL after the domain name. This value must be unique for all of the mappings across a single API. Specify '(none)' if you do not want callers to specify a base path name after the domain name.

    

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

    The string identifier of the associated RestApi.

    

  
  :type stage: string
  :param stage: 

    The name of the API's stage that you want to use for this mapping. Specify '(none)' if you want callers to explicitly specify the stage name after any base path name.

    

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

    
    ::

      {
          'basePath': 'string',
          'restApiId': 'string',
          'stage': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Represents the base path that callers of the API must provide as part of the URL after the domain name.

      
      

      - **basePath** *(string) --* 

        The base path name that callers of the API must provide as part of the URL after the domain name.

        
      

      - **restApiId** *(string) --* 

        The string identifier of the associated RestApi.

        
      

      - **stage** *(string) --* 

        The name of the associated stage.

        
  
  **Exceptions**
  
  *   :py:class:`APIGateway.Client.exceptions.BadRequestException`

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

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

  
  *   :py:class:`APIGateway.Client.exceptions.NotFoundException`

  
  *   :py:class:`APIGateway.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`APIGateway.Client.exceptions.TooManyRequestsException`

  