DomainName

Manages an Amazon API Gateway Version 2 domain name. More information can be found in the Amazon API Gateway Developer Guide.

Note: This resource establishes ownership of and the TLS settings for a particular domain name. An API stage can be associated with the domain name using the aws.apigatewayv2.ApiMapping resource.

Example Usage

Basic

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.ApiGatewayV2.DomainName("example", new Aws.ApiGatewayV2.DomainNameArgs
        {
            DomainName = "ws-api.example.com",
            DomainNameConfiguration = new Aws.ApiGatewayV2.Inputs.DomainNameDomainNameConfigurationArgs
            {
                CertificateArn = aws_acm_certificate.Example.Arn,
                EndpointType = "REGIONAL",
                SecurityPolicy = "TLS_1_2",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/apigatewayv2"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := apigatewayv2.NewDomainName(ctx, "example", &apigatewayv2.DomainNameArgs{
            DomainName: pulumi.String("ws-api.example.com"),
            DomainNameConfiguration: &apigatewayv2.DomainNameDomainNameConfigurationArgs{
                CertificateArn: pulumi.String(aws_acm_certificate.Example.Arn),
                EndpointType:   pulumi.String("REGIONAL"),
                SecurityPolicy: pulumi.String("TLS_1_2"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.apigatewayv2.DomainName("example",
    domain_name="ws-api.example.com",
    domain_name_configuration={
        "certificate_arn": aws_acm_certificate["example"]["arn"],
        "endpoint_type": "REGIONAL",
        "security_policy": "TLS_1_2",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.apigatewayv2.DomainName("example", {
    domainName: "ws-api.example.com",
    domainNameConfiguration: {
        certificateArn: aws_acm_certificate_example.arn,
        endpointType: "REGIONAL",
        securityPolicy: "TLS_1_2",
    },
});

Create a DomainName Resource

def DomainName(resource_name, opts=None, domain_name=None, domain_name_configuration=None, tags=None, __props__=None);
func NewDomainName(ctx *Context, name string, args DomainNameArgs, opts ...ResourceOption) (*DomainName, error)
public DomainName(string name, DomainNameArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args DomainNameArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DomainNameArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DomainNameArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

DomainName Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The DomainName resource accepts the following input properties:

Domain string

The domain name.

DomainNameConfiguration DomainNameDomainNameConfigurationArgs

The domain name configuration.

Tags Dictionary<string, string>

A map of tags to assign to the domain name.

DomainName string

The domain name.

DomainNameConfiguration DomainNameDomainNameConfiguration

The domain name configuration.

Tags map[string]string

A map of tags to assign to the domain name.

domainName string

The domain name.

domainNameConfiguration DomainNameDomainNameConfiguration

The domain name configuration.

tags {[key: string]: string}

A map of tags to assign to the domain name.

domain_name str

The domain name.

domain_name_configuration Dict[DomainNameDomainNameConfiguration]

The domain name configuration.

tags Dict[str, str]

A map of tags to assign to the domain name.

Outputs

All input properties are implicitly available as output properties. Additionally, the DomainName resource produces the following output properties:

ApiMappingSelectionExpression string

The API mapping selection expression for the domain name.

Arn string

The ARN of the domain name.

Id string
The provider-assigned unique ID for this managed resource.
ApiMappingSelectionExpression string

The API mapping selection expression for the domain name.

Arn string

The ARN of the domain name.

Id string
The provider-assigned unique ID for this managed resource.
apiMappingSelectionExpression string

The API mapping selection expression for the domain name.

arn string

The ARN of the domain name.

id string
The provider-assigned unique ID for this managed resource.
api_mapping_selection_expression str

The API mapping selection expression for the domain name.

arn str

The ARN of the domain name.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing DomainName Resource

Get an existing DomainName resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DomainNameState, opts?: CustomResourceOptions): DomainName
static get(resource_name, id, opts=None, api_mapping_selection_expression=None, arn=None, domain_name=None, domain_name_configuration=None, tags=None, __props__=None);
func GetDomainName(ctx *Context, name string, id IDInput, state *DomainNameState, opts ...ResourceOption) (*DomainName, error)
public static DomainName Get(string name, Input<string> id, DomainNameState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ApiMappingSelectionExpression string

The API mapping selection expression for the domain name.

Arn string

The ARN of the domain name.

Domain string

The domain name.

DomainNameConfiguration DomainNameDomainNameConfigurationArgs

The domain name configuration.

Tags Dictionary<string, string>

A map of tags to assign to the domain name.

ApiMappingSelectionExpression string

The API mapping selection expression for the domain name.

Arn string

The ARN of the domain name.

DomainName string

The domain name.

DomainNameConfiguration DomainNameDomainNameConfiguration

The domain name configuration.

Tags map[string]string

A map of tags to assign to the domain name.

apiMappingSelectionExpression string

The API mapping selection expression for the domain name.

arn string

The ARN of the domain name.

domainName string

The domain name.

domainNameConfiguration DomainNameDomainNameConfiguration

The domain name configuration.

tags {[key: string]: string}

A map of tags to assign to the domain name.

api_mapping_selection_expression str

The API mapping selection expression for the domain name.

arn str

The ARN of the domain name.

domain_name str

The domain name.

domain_name_configuration Dict[DomainNameDomainNameConfiguration]

The domain name configuration.

tags Dict[str, str]

A map of tags to assign to the domain name.

Supporting Types

DomainNameDomainNameConfiguration

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

CertificateArn string

The ARN of an AWS-managed certificate that will be used by the endpoint for the domain name. AWS Certificate Manager is the only supported source. Use the aws.acm.Certificate resource to configure an ACM certificate.

EndpointType string

The endpoint type. Valid values: REGIONAL.

SecurityPolicy string

The Transport Layer Security (TLS) version of the security policy for the domain name. Valid values: TLS_1_2.

HostedZoneId string

The Amazon Route 53 Hosted Zone ID of the endpoint.

TargetDomainName string

The target domain name.

CertificateArn string

The ARN of an AWS-managed certificate that will be used by the endpoint for the domain name. AWS Certificate Manager is the only supported source. Use the aws.acm.Certificate resource to configure an ACM certificate.

EndpointType string

The endpoint type. Valid values: REGIONAL.

SecurityPolicy string

The Transport Layer Security (TLS) version of the security policy for the domain name. Valid values: TLS_1_2.

HostedZoneId string

The Amazon Route 53 Hosted Zone ID of the endpoint.

TargetDomainName string

The target domain name.

certificateArn string

The ARN of an AWS-managed certificate that will be used by the endpoint for the domain name. AWS Certificate Manager is the only supported source. Use the aws.acm.Certificate resource to configure an ACM certificate.

endpointType string

The endpoint type. Valid values: REGIONAL.

securityPolicy string

The Transport Layer Security (TLS) version of the security policy for the domain name. Valid values: TLS_1_2.

hostedZoneId string

The Amazon Route 53 Hosted Zone ID of the endpoint.

targetDomainName string

The target domain name.

certificate_arn str

The ARN of an AWS-managed certificate that will be used by the endpoint for the domain name. AWS Certificate Manager is the only supported source. Use the aws.acm.Certificate resource to configure an ACM certificate.

endpoint_type str

The endpoint type. Valid values: REGIONAL.

security_policy str

The Transport Layer Security (TLS) version of the security policy for the domain name. Valid values: TLS_1_2.

hosted_zone_id str

The Amazon Route 53 Hosted Zone ID of the endpoint.

targetDomainName str

The target domain name.

Package Details

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