AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi
aws.apigateway.getDomainName
Explore with Pulumi AI
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:
- Domain
Name string - Fully-qualified domain name to look up. If no domain name is found, an error will be returned.
- Dictionary<string, string>
- Key-value map of tags for the resource.
- Domain
Name string - Fully-qualified domain name to look up. If no domain name is found, an error will be returned.
- map[string]string
- Key-value map of tags for the resource.
- domain
Name String - Fully-qualified domain name to look up. If no domain name is found, an error will be returned.
- Map<String,String>
- Key-value map of tags for the resource.
- domain
Name string - Fully-qualified domain name to look up. If no domain name is found, an error will be returned.
- {[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.
- Mapping[str, str]
- Key-value map of tags for the resource.
- domain
Name String - Fully-qualified domain name to look up. If no domain name is found, an error will be returned.
- 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.
- Certificate
Arn string - ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.
- Certificate
Name string - Name of the certificate that is used by edge-optimized endpoint for this domain name.
- Certificate
Upload stringDate - Upload date associated with the domain certificate.
- Cloudfront
Domain stringName - Hostname created by Cloudfront to represent the distribution that implements this domain name mapping.
- Cloudfront
Zone stringId - For convenience, the hosted zone ID (
Z2FDTNDATAQYW2
) that can be used to create a Route53 alias record for the distribution. - Domain
Name string - Endpoint
Configurations List<GetDomain Name Endpoint Configuration> - List of objects with the endpoint configuration of this domain name.
- Id string
- The provider-assigned unique ID for this managed resource.
- Regional
Certificate stringArn - ARN for an AWS-managed certificate that is used for validating the regional domain name.
- Regional
Certificate stringName - User-friendly name of the certificate that is used by regional endpoint for this domain name.
- Regional
Domain stringName - Hostname for the custom domain's regional endpoint.
- Regional
Zone stringId - Hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.
- Security
Policy string - Security policy for the domain name.
- Dictionary<string, string>
- Key-value map of tags for the resource.
- Arn string
- ARN of the found custom domain name.
- Certificate
Arn string - ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.
- Certificate
Name string - Name of the certificate that is used by edge-optimized endpoint for this domain name.
- Certificate
Upload stringDate - Upload date associated with the domain certificate.
- Cloudfront
Domain stringName - Hostname created by Cloudfront to represent the distribution that implements this domain name mapping.
- Cloudfront
Zone stringId - For convenience, the hosted zone ID (
Z2FDTNDATAQYW2
) that can be used to create a Route53 alias record for the distribution. - Domain
Name string - Endpoint
Configurations []GetDomain Name Endpoint Configuration - List of objects with the endpoint configuration of this domain name.
- Id string
- The provider-assigned unique ID for this managed resource.
- Regional
Certificate stringArn - ARN for an AWS-managed certificate that is used for validating the regional domain name.
- Regional
Certificate stringName - User-friendly name of the certificate that is used by regional endpoint for this domain name.
- Regional
Domain stringName - Hostname for the custom domain's regional endpoint.
- Regional
Zone stringId - Hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.
- Security
Policy string - Security policy for the domain name.
- map[string]string
- Key-value map of tags for the resource.
- arn String
- ARN of the found custom domain name.
- certificate
Arn String - ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.
- certificate
Name String - Name of the certificate that is used by edge-optimized endpoint for this domain name.
- certificate
Upload StringDate - Upload date associated with the domain certificate.
- cloudfront
Domain StringName - Hostname created by Cloudfront to represent the distribution that implements this domain name mapping.
- cloudfront
Zone StringId - For convenience, the hosted zone ID (
Z2FDTNDATAQYW2
) that can be used to create a Route53 alias record for the distribution. - domain
Name String - endpoint
Configurations List<GetDomain Name Endpoint Configuration> - List of objects with the endpoint configuration of this domain name.
- id String
- The provider-assigned unique ID for this managed resource.
- regional
Certificate StringArn - ARN for an AWS-managed certificate that is used for validating the regional domain name.
- regional
Certificate StringName - User-friendly name of the certificate that is used by regional endpoint for this domain name.
- regional
Domain StringName - Hostname for the custom domain's regional endpoint.
- regional
Zone StringId - Hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.
- security
Policy String - Security policy for the domain name.
- Map<String,String>
- Key-value map of tags for the resource.
- arn string
- ARN of the found custom domain name.
- certificate
Arn string - ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.
- certificate
Name string - Name of the certificate that is used by edge-optimized endpoint for this domain name.
- certificate
Upload stringDate - Upload date associated with the domain certificate.
- cloudfront
Domain stringName - Hostname created by Cloudfront to represent the distribution that implements this domain name mapping.
- cloudfront
Zone stringId - For convenience, the hosted zone ID (
Z2FDTNDATAQYW2
) that can be used to create a Route53 alias record for the distribution. - domain
Name string - endpoint
Configurations GetDomain Name Endpoint Configuration[] - List of objects with the endpoint configuration of this domain name.
- id string
- The provider-assigned unique ID for this managed resource.
- regional
Certificate stringArn - ARN for an AWS-managed certificate that is used for validating the regional domain name.
- regional
Certificate stringName - User-friendly name of the certificate that is used by regional endpoint for this domain name.
- regional
Domain stringName - Hostname for the custom domain's regional endpoint.
- regional
Zone stringId - Hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.
- security
Policy string - Security policy for the domain name.
- {[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_ strdate - Upload date associated with the domain certificate.
- cloudfront_
domain_ strname - Hostname created by Cloudfront to represent the distribution that implements this domain name mapping.
- cloudfront_
zone_ strid - 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[GetDomain Name Endpoint Configuration] - List of objects with the endpoint configuration of this domain name.
- id str
- The provider-assigned unique ID for this managed resource.
- regional_
certificate_ strarn - ARN for an AWS-managed certificate that is used for validating the regional domain name.
- regional_
certificate_ strname - User-friendly name of the certificate that is used by regional endpoint for this domain name.
- regional_
domain_ strname - Hostname for the custom domain's regional endpoint.
- regional_
zone_ strid - 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.
- Mapping[str, str]
- Key-value map of tags for the resource.
- arn String
- ARN of the found custom domain name.
- certificate
Arn String - ARN for an AWS-managed certificate that is used by edge-optimized endpoint for this domain name.
- certificate
Name String - Name of the certificate that is used by edge-optimized endpoint for this domain name.
- certificate
Upload StringDate - Upload date associated with the domain certificate.
- cloudfront
Domain StringName - Hostname created by Cloudfront to represent the distribution that implements this domain name mapping.
- cloudfront
Zone StringId - For convenience, the hosted zone ID (
Z2FDTNDATAQYW2
) that can be used to create a Route53 alias record for the distribution. - domain
Name String - endpoint
Configurations 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.
- regional
Certificate StringArn - ARN for an AWS-managed certificate that is used for validating the regional domain name.
- regional
Certificate StringName - User-friendly name of the certificate that is used by regional endpoint for this domain name.
- regional
Domain StringName - Hostname for the custom domain's regional endpoint.
- regional
Zone StringId - Hosted zone ID that can be used to create a Route53 alias record for the regional endpoint.
- security
Policy String - Security policy for the domain name.
- 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.