domain_names
Creates, updates, deletes or gets a domain_name
resource or lists domain_names
in a region
Overview
Name | domain_names |
Type | Resource |
Description | The AWS::ApiGatewayV2::DomainName resource specifies a custom domain name for your API in Amazon API Gateway (API Gateway). You can use a custom domain name to provide a URL that's more intuitive and easier to recall. For more information about using custom domain names, see [Set up Custom Domain Name for an API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html) in the *API Gateway Developer Guide*. |
Id | aws.apigatewayv2.domain_names |
Fields
Name | Datatype | Description |
---|---|---|
mutual_tls_authentication | object | The mutual TLS authentication configuration for a custom domain name. |
regional_hosted_zone_id | string | |
regional_domain_name | string | |
domain_name | string | The custom domain name for your API in Amazon API Gateway. Uppercase letters are not supported. |
domain_name_configurations | array | The domain name configurations. |
tags | object | The collection of tags associated with a domain name. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | DomainName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all domain_names
in a region.
SELECT
region,
mutual_tls_authentication,
regional_hosted_zone_id,
regional_domain_name,
domain_name,
domain_name_configurations,
tags
FROM aws.apigatewayv2.domain_names
WHERE region = 'us-east-1';
Gets all properties from an individual domain_name
.
SELECT
region,
mutual_tls_authentication,
regional_hosted_zone_id,
regional_domain_name,
domain_name,
domain_name_configurations,
tags
FROM aws.apigatewayv2.domain_names
WHERE region = 'us-east-1' AND data__Identifier = '<DomainName>';
INSERT
example
Use the following StackQL query and manifest file to create a new domain_name
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.apigatewayv2.domain_names (
DomainName,
region
)
SELECT
'{{ DomainName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.apigatewayv2.domain_names (
MutualTlsAuthentication,
DomainName,
DomainNameConfigurations,
Tags,
region
)
SELECT
'{{ MutualTlsAuthentication }}',
'{{ DomainName }}',
'{{ DomainNameConfigurations }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: domain_name
props:
- name: MutualTlsAuthentication
value:
TruststoreVersion: '{{ TruststoreVersion }}'
TruststoreUri: '{{ TruststoreUri }}'
- name: DomainName
value: '{{ DomainName }}'
- name: DomainNameConfigurations
value:
- OwnershipVerificationCertificateArn: '{{ OwnershipVerificationCertificateArn }}'
EndpointType: '{{ EndpointType }}'
CertificateName: '{{ CertificateName }}'
SecurityPolicy: '{{ SecurityPolicy }}'
CertificateArn: '{{ CertificateArn }}'
- name: Tags
value: {}
DELETE
example
/*+ delete */
DELETE FROM aws.apigatewayv2.domain_names
WHERE data__Identifier = '<DomainName>'
AND region = 'us-east-1';
Permissions
To operate on the domain_names
resource, the following permissions are required:
Create
apigateway:POST,
apigateway:GET,
apigateway:PUT
Update
apigateway:PATCH,
apigateway:GET,
apigateway:PUT
Read
apigateway:GET
Delete
apigateway:GET,
apigateway:DELETE
List
apigateway:GET