1. Packages
  2. AWS
  3. API Docs
  4. apigateway
  5. getDomainName
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.apigateway.getDomainName

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.apigateway.getDomainName({
        domainName: "api.example.com",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.apigateway.get_domain_name(domain_name="api.example.com")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.ApiGateway.GetDomainName.Invoke(new()
        {
            DomainName = "api.example.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.apigateway.ApigatewayFunctions;
    import com.pulumi.aws.apigateway.inputs.GetDomainNameArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = ApigatewayFunctions.getDomainName(GetDomainNameArgs.builder()
                .domainName("api.example.com")
                .build());
    
        }
    }
    
    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
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi