Data Source: awsService
Use this data source to compose and decompose AWS service DNS names.
Example Usage
Get Service DNS Name
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const dataAwsRegionCurrent = new aws.dataAwsRegion.DataAwsRegion(
this,
"current",
{}
);
new aws.dataAwsService.DataAwsService(this, "test", {
region: dataAwsRegionCurrent.name,
serviceId: "ec2",
});
Use Service Reverse DNS Name to Get Components
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsService.DataAwsService(this, "s3", {
reverseDnsName: "cn.com.amazonaws.cn-north-1.s3",
});
Determine Regional Support for a Service
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsService.DataAwsService(this, "s3", {
reverseDnsName: "com.amazonaws.us-gov-west-1.waf",
});
Argument Reference
The following arguments are optional:
dnsName- (Optional) DNS name of the service (e.g.,rdsUsEast1AmazonawsCom). One ofdnsName,reverseDnsName, orserviceIdis required.partition- (Optional) Partition corresponding to the region.region- (Optional) Region of the service (e.g.,usWest2,apNortheast1).reverseDnsName- (Optional) Reverse DNS name of the service (e.g.,comAmazonawsUsWest2S3). One ofdnsName,reverseDnsName, orserviceIdis required.reverseDnsPrefix- (Optional) Prefix of the service (e.g.,comAmazonawsin AWS Commercial,cnComAmazonawsin AWS China).serviceId- (Optional) Service (e.g.,s3,rds,ec2). One ofdnsName,reverseDnsName, orserviceIdis required.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
supported- Whether the service is supported in the region's partition. New services may not be listed immediately as supported.