Skip to main content

base_path_mappings

Creates, updates, deletes, gets or lists a base_path_mappings resource.

Overview

Namebase_path_mappings
TypeResource
Idaws.apigateway.base_path_mappings

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
base_pathstringThe base path name that callers of the API must provide as part of the URL after the domain name.
rest_api_idstringThe string identifier of the associated RestApi.
stagestringThe name of the associated stage.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_base_path_mappingselectdomain_name, base_path, regiondomainNameIdDescribe a BasePathMapping resource.
get_base_path_mappingsselectdomain_name, regiondomainNameId, position, limitRepresents a collection of BasePathMapping resources.
create_base_path_mappinginsertdomain_name, region, restApiIddomainNameIdCreates a new BasePathMapping resource.
update_base_path_mappingupdatedomain_name, base_path, regiondomainNameIdChanges information about the BasePathMapping resource.
delete_base_path_mappingdeletedomain_name, base_path, regiondomainNameIdDeletes the BasePathMapping resource.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
base_pathstringThe base path name of the BasePathMapping resource to delete. To specify an empty base path, set this parameter to '(none)'.
domain_namestringThe domain name of the BasePathMapping resource to delete.
regionstringAWS region (default: us-east-1)
domainNameIdstringThe identifier for the domain name resource. Supported only for private custom domain names.
limitintegerThe maximum number of returned results per page. The default value is 25 and the maximum value is 500.
positionstringThe current pagination position in the paged result set.

SELECT examples

Describe a BasePathMapping resource.

SELECT
base_path,
rest_api_id,
stage
FROM aws.apigateway.base_path_mappings
WHERE domain_name = '{{ domain_name }}' -- required
AND base_path = '{{ base_path }}' -- required
AND region = '{{ region }}' -- required
AND domainNameId = '{{ domainNameId }}'
;

INSERT examples

Creates a new BasePathMapping resource.

INSERT INTO aws.apigateway.base_path_mappings (
basePath,
restApiId,
stage,
domain_name,
region,
domainNameId
)
SELECT
'{{ basePath }}',
'{{ restApiId }}' /* required */,
'{{ stage }}',
'{{ domain_name }}',
'{{ region }}',
'{{ domainNameId }}'
RETURNING
base_path,
rest_api_id,
stage
;

UPDATE examples

Changes information about the BasePathMapping resource.

UPDATE aws.apigateway.base_path_mappings
SET
patchOperations = '{{ patchOperations }}'
WHERE
domain_name = '{{ domain_name }}' --required
AND base_path = '{{ base_path }}' --required
AND region = '{{ region }}' --required
AND domainNameId = '{{ domainNameId}}'
RETURNING
base_path,
rest_api_id,
stage;

DELETE examples

Deletes the BasePathMapping resource.

DELETE FROM aws.apigateway.base_path_mappings
WHERE domain_name = '{{ domain_name }}' --required
AND base_path = '{{ base_path }}' --required
AND region = '{{ region }}' --required
AND domainNameId = '{{ domainNameId }}'
;