AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 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/v5/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
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(ApigatewayFunctions.getDomainName(GetDomainNameArgs.builder()
            .domainName("api.example.com")
            .build()));

    }
}
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",
}));
variables:
  example:
    Fn::Invoke:
      Function: aws:apigateway:getDomainName
      Arguments:
        domainName: api.example.com

Using getDomainName

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

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

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

public static class GetDomainName 
{
    public static Task<GetDomainNameResult> InvokeAsync(GetDomainNameArgs args, InvokeOptions? opts = null)
    public static Output<GetDomainNameResult> Invoke(GetDomainNameInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDomainNameResult> getDomainName(GetDomainNameArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:apigateway/getDomainName:getDomainName
  Arguments:
    # Arguments dictionary

The following arguments are supported:

DomainName string

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

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

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

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

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.

domainName String

Fully-qualified domain name to look up. If no domain name is found, an error will be returned.

tags Map<String>

Key-value map of tags for the resource.

getDomainName Result

The following output properties are available:

Arn string

ARN of the found custom domain name.

CertificateArn string

ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.

CertificateName string

Name of the certificate that is used by edge-optimized endpoint for this domain name.

CertificateUploadDate string

Upload date associated with the domain certificate.

CloudfrontDomainName string

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

ARN for an AWS-managed certificate that is used for validating the regional domain name.

RegionalCertificateName string

User-friendly name of the certificate that is used by regional endpoint for this domain name.

RegionalDomainName string

Hostname for the custom domain's regional endpoint.

RegionalZoneId string

Hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.

SecurityPolicy string

Security policy for the domain name.

Tags Dictionary<string, string>

Key-value map of tags for the resource.

Arn string

ARN of the found custom domain name.

CertificateArn string

ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.

CertificateName string

Name of the certificate that is used by edge-optimized endpoint for this domain name.

CertificateUploadDate string

Upload date associated with the domain certificate.

CloudfrontDomainName string

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

ARN for an AWS-managed certificate that is used for validating the regional domain name.

RegionalCertificateName string

User-friendly name of the certificate that is used by regional endpoint for this domain name.

RegionalDomainName string

Hostname for the custom domain's regional endpoint.

RegionalZoneId string

Hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.

SecurityPolicy string

Security policy for the domain name.

Tags map[string]string

Key-value map of tags for the resource.

arn String

ARN of the found custom domain name.

certificateArn String

ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.

certificateName String

Name of the certificate that is used by edge-optimized endpoint for this domain name.

certificateUploadDate String

Upload date associated with the domain certificate.

cloudfrontDomainName String

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

ARN for an AWS-managed certificate that is used for validating the regional domain name.

regionalCertificateName String

User-friendly name of the certificate that is used by regional endpoint for this domain name.

regionalDomainName String

Hostname for the custom domain's regional endpoint.

regionalZoneId String

Hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.

securityPolicy String

Security policy for the domain name.

tags Map<String,String>

Key-value map of tags for the resource.

arn string

ARN of the found custom domain name.

certificateArn string

ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.

certificateName string

Name of the certificate that is used by edge-optimized endpoint for this domain name.

certificateUploadDate string

Upload date associated with the domain certificate.

cloudfrontDomainName string

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

ARN for an AWS-managed certificate that is used for validating the regional domain name.

regionalCertificateName string

User-friendly name of the certificate that is used by regional endpoint for this domain name.

regionalDomainName string

Hostname for the custom domain's regional endpoint.

regionalZoneId string

Hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.

securityPolicy string

Security policy for the domain name.

tags {[key: string]: string}

Key-value map of tags for the resource.

arn str

ARN of the found custom domain name.

certificate_arn str

ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.

certificate_name str

Name of the certificate that is used by edge-optimized endpoint for this domain name.

certificate_upload_date str

Upload date associated with the domain certificate.

cloudfront_domain_name str

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

ARN for an AWS-managed certificate that is used for validating the regional domain name.

regional_certificate_name str

User-friendly name of the certificate that is used by regional endpoint for this domain name.

regional_domain_name str

Hostname for the custom domain's regional endpoint.

regional_zone_id str

Hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.

security_policy str

Security policy for the domain name.

tags Mapping[str, str]

Key-value map of tags for the resource.

arn String

ARN of the found custom domain name.

certificateArn String

ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.

certificateName String

Name of the certificate that is used by edge-optimized endpoint for this domain name.

certificateUploadDate String

Upload date associated with the domain certificate.

cloudfrontDomainName String

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<Property Map>

List of objects with the endpoint configuration of this domain name.

id String

The provider-assigned unique ID for this managed resource.

regionalCertificateArn String

ARN for an AWS-managed certificate that is used for validating the regional domain name.

regionalCertificateName String

User-friendly name of the certificate that is used by regional endpoint for this domain name.

regionalDomainName String

Hostname for the custom domain's regional endpoint.

regionalZoneId String

Hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.

securityPolicy String

Security policy for the domain name.

tags Map<String>

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 List<String>

List of endpoint types.

types string[]

List of endpoint types.

types Sequence[str]

List of endpoint types.

types List<String>

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.