base_path_mappings
Creates, updates, deletes, gets or lists a base_path_mappings resource.
Overview
| Name | base_path_mappings |
| Type | Resource |
| Id | aws.apigateway.base_path_mappings |
Fields
The following fields are returned by SELECT queries:
- get_base_path_mapping
- get_base_path_mappings
| Name | Datatype | Description |
|---|---|---|
base_path | string | The base path name that callers of the API must provide as part of the URL after the domain name. |
rest_api_id | string | The string identifier of the associated RestApi. |
stage | string | The name of the associated stage. |
| Name | Datatype | Description |
|---|---|---|
base_path | string | The base path name that callers of the API must provide as part of the URL after the domain name. |
rest_api_id | string | The string identifier of the associated RestApi. |
stage | string | The name of the associated stage. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_base_path_mapping | select | domain_name, base_path, region | domainNameId | Describe a BasePathMapping resource. |
get_base_path_mappings | select | domain_name, region | domainNameId, position, limit | Represents a collection of BasePathMapping resources. |
create_base_path_mapping | insert | domain_name, region, restApiId | domainNameId | Creates a new BasePathMapping resource. |
update_base_path_mapping | update | domain_name, base_path, region | domainNameId | Changes information about the BasePathMapping resource. |
delete_base_path_mapping | delete | domain_name, base_path, region | domainNameId | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
base_path | string | The base path name of the BasePathMapping resource to delete. To specify an empty base path, set this parameter to '(none)'. |
domain_name | string | The domain name of the BasePathMapping resource to delete. |
region | string | AWS region (default: us-east-1) |
domainNameId | string | The identifier for the domain name resource. Supported only for private custom domain names. |
limit | integer | The maximum number of returned results per page. The default value is 25 and the maximum value is 500. |
position | string | The current pagination position in the paged result set. |
SELECT examples
- get_base_path_mapping
- get_base_path_mappings
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 }}'
;
Represents a collection of BasePathMapping resources.
SELECT
base_path,
rest_api_id,
stage
FROM aws.apigateway.base_path_mappings
WHERE domain_name = '{{ domain_name }}' -- required
AND region = '{{ region }}' -- required
AND domainNameId = '{{ domainNameId }}'
AND position = '{{ position }}'
AND limit = '{{ limit }}'
;
INSERT examples
- create_base_path_mapping
- Manifest
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
;
# Description fields are for documentation purposes
- name: base_path_mappings
props:
- name: domain_name
value: "{{ domain_name }}"
description: Required parameter for the base_path_mappings resource.
- name: region
value: "{{ region }}"
description: Required parameter for the base_path_mappings resource.
- name: basePath
value: "{{ basePath }}"
- name: restApiId
value: "{{ restApiId }}"
- name: stage
value: "{{ stage }}"
- name: domainNameId
value: "{{ domainNameId }}"
description: The identifier for the domain name resource. Required for private custom domain names.
description: The identifier for the domain name resource. Required for private custom domain names.
UPDATE examples
- update_base_path_mapping
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
- delete_base_path_mapping
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 }}'
;