Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

AWS Classic

v4.25.0 published on Friday, Oct 15, 2021 by Pulumi

getDomainName

Use this data source to get the custom domain name for use with AWS API Gateway.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.ApiGateway.GetDomainName.InvokeAsync(new Aws.ApiGateway.GetDomainNameArgs
        {
            DomainName = "api.example.com",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/apigateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := apigateway.LookupDomainName(ctx, &apigateway.LookupDomainNameArgs{
			DomainName: "api.example.com",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

example = aws.apigateway.get_domain_name(domain_name="api.example.com")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.apigateway.getDomainName({
    domainName: "api.example.com",
}));

Using getDomainName

function getDomainName(args: GetDomainNameArgs, opts?: InvokeOptions): Promise<GetDomainNameResult>
def get_domain_name(domain_name: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    opts: Optional[InvokeOptions] = None) -> GetDomainNameResult
func LookupDomainName(ctx *Context, args *LookupDomainNameArgs, opts ...InvokeOption) (*LookupDomainNameResult, error)

Note: This function is named LookupDomainName in the Go SDK.

public static class GetDomainName {
    public static Task<GetDomainNameResult> InvokeAsync(GetDomainNameArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

DomainName string
The fully-qualified domain name to look up. If no domain name is found, an error will be returned.
Tags Dictionary<string, string>
Key-value map of tags for the resource.
DomainName string
The fully-qualified domain name to look up. If no domain name is found, an error will be returned.
Tags map[string]string
Key-value map of tags for the resource.
domainName string
The fully-qualified domain name to look up. If no domain name is found, an error will be returned.
tags {[key: string]: string}
Key-value map of tags for the resource.
domain_name str
The fully-qualified domain name to look up. If no domain name is found, an error will be returned.
tags Mapping[str, str]
Key-value map of tags for the resource.

getDomainName Result

The following output properties are available:

Arn string
The ARN of the found custom domain name.
CertificateArn string
The ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.
CertificateName string
The name of the certificate that is used by edge-optimized endpoint for this domain name.
CertificateUploadDate string
The upload date associated with the domain certificate.
CloudfrontDomainName string
The hostname created by Cloudfront to represent the distribution that implements this domain name mapping.
CloudfrontZoneId string
For convenience, the hosted zone ID (Z2FDTNDATAQYW2) that can be used to create a Route53 alias record for the distribution.
DomainName string
EndpointConfigurations List<GetDomainNameEndpointConfiguration>
List of objects with the endpoint configuration of this domain name.
Id string
The provider-assigned unique ID for this managed resource.
RegionalCertificateArn string
The ARN for an AWS-managed certificate that is used for validating the regional domain name.
RegionalCertificateName string
The user-friendly name of the certificate that is used by regional endpoint for this domain name.
RegionalDomainName string
The hostname for the custom domain’s regional endpoint.
RegionalZoneId string
The hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.
SecurityPolicy string
The security policy for the domain name.
Tags Dictionary<string, string>
Key-value map of tags for the resource.
Arn string
The ARN of the found custom domain name.
CertificateArn string
The ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.
CertificateName string
The name of the certificate that is used by edge-optimized endpoint for this domain name.
CertificateUploadDate string
The upload date associated with the domain certificate.
CloudfrontDomainName string
The hostname created by Cloudfront to represent the distribution that implements this domain name mapping.
CloudfrontZoneId string
For convenience, the hosted zone ID (Z2FDTNDATAQYW2) that can be used to create a Route53 alias record for the distribution.
DomainName string
EndpointConfigurations []GetDomainNameEndpointConfiguration
List of objects with the endpoint configuration of this domain name.
Id string
The provider-assigned unique ID for this managed resource.
RegionalCertificateArn string
The ARN for an AWS-managed certificate that is used for validating the regional domain name.
RegionalCertificateName string
The user-friendly name of the certificate that is used by regional endpoint for this domain name.
RegionalDomainName string
The hostname for the custom domain’s regional endpoint.
RegionalZoneId string
The hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.
SecurityPolicy string
The security policy for the domain name.
Tags map[string]string
Key-value map of tags for the resource.
arn string
The ARN of the found custom domain name.
certificateArn string
The ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.
certificateName string
The name of the certificate that is used by edge-optimized endpoint for this domain name.
certificateUploadDate string
The upload date associated with the domain certificate.
cloudfrontDomainName string
The hostname created by Cloudfront to represent the distribution that implements this domain name mapping.
cloudfrontZoneId string
For convenience, the hosted zone ID (Z2FDTNDATAQYW2) that can be used to create a Route53 alias record for the distribution.
domainName string
endpointConfigurations GetDomainNameEndpointConfiguration[]
List of objects with the endpoint configuration of this domain name.
id string
The provider-assigned unique ID for this managed resource.
regionalCertificateArn string
The ARN for an AWS-managed certificate that is used for validating the regional domain name.
regionalCertificateName string
The user-friendly name of the certificate that is used by regional endpoint for this domain name.
regionalDomainName string
The hostname for the custom domain’s regional endpoint.
regionalZoneId string
The hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.
securityPolicy string
The security policy for the domain name.
tags {[key: string]: string}
Key-value map of tags for the resource.
arn str
The ARN of the found custom domain name.
certificate_arn str
The ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.
certificate_name str
The name of the certificate that is used by edge-optimized endpoint for this domain name.
certificate_upload_date str
The upload date associated with the domain certificate.
cloudfront_domain_name str
The hostname created by Cloudfront to represent the distribution that implements this domain name mapping.
cloudfront_zone_id str
For convenience, the hosted zone ID (Z2FDTNDATAQYW2) that can be used to create a Route53 alias record for the distribution.
domain_name str
endpoint_configurations Sequence[GetDomainNameEndpointConfiguration]
List of objects with the endpoint configuration of this domain name.
id str
The provider-assigned unique ID for this managed resource.
regional_certificate_arn str
The ARN for an AWS-managed certificate that is used for validating the regional domain name.
regional_certificate_name str
The user-friendly name of the certificate that is used by regional endpoint for this domain name.
regional_domain_name str
The hostname for the custom domain’s regional endpoint.
regional_zone_id str
The hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.
security_policy str
The security policy for the domain name.
tags Mapping[str, str]
Key-value map of tags for the resource.

Supporting Types

GetDomainNameEndpointConfiguration

Types List<string>
List of endpoint types.
Types []string
List of endpoint types.
types string[]
List of endpoint types.
types Sequence[str]
List of endpoint types.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.