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.ApiMappingresource.
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
new DomainName(name: string, args: DomainNameArgs, opts?: CustomResourceOptions);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.
- Domain
Name DomainConfiguration Name Domain Name Configuration Args The domain name configuration.
- Dictionary<string, string>
A map of tags to assign to the domain name.
- Domain
Name string The domain name.
- Domain
Name DomainConfiguration Name Domain Name Configuration The domain name configuration.
- map[string]string
A map of tags to assign to the domain name.
- domain
Name string The domain name.
- domain
Name DomainConfiguration Name Domain Name Configuration The domain name configuration.
- {[key: string]: string}
A map of tags to assign to the domain name.
- domain_
name str The domain name.
- domain_
name_ Dict[Domainconfiguration Name Domain Name Configuration] The domain name configuration.
- 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:
- Api
Mapping stringSelection Expression 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 stringSelection Expression 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 stringSelection Expression 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_ strselection_ expression 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): DomainNamestatic 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:
- Api
Mapping stringSelection Expression The API mapping selection expression for the domain name.
- Arn string
The ARN of the domain name.
- Domain string
The domain name.
- Domain
Name DomainConfiguration Name Domain Name Configuration Args The domain name configuration.
- Dictionary<string, string>
A map of tags to assign to the domain name.
- Api
Mapping stringSelection Expression The API mapping selection expression for the domain name.
- Arn string
The ARN of the domain name.
- Domain
Name string The domain name.
- Domain
Name DomainConfiguration Name Domain Name Configuration The domain name configuration.
- map[string]string
A map of tags to assign to the domain name.
- api
Mapping stringSelection Expression The API mapping selection expression for the domain name.
- arn string
The ARN of the domain name.
- domain
Name string The domain name.
- domain
Name DomainConfiguration Name Domain Name Configuration The domain name configuration.
- {[key: string]: string}
A map of tags to assign to the domain name.
- api_
mapping_ strselection_ expression 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_ Dict[Domainconfiguration Name Domain Name Configuration] The domain name configuration.
- Dict[str, str]
A map of tags to assign to the domain name.
Supporting Types
DomainNameDomainNameConfiguration
- Certificate
Arn 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.Certificateresource to configure an ACM certificate.- Endpoint
Type string The endpoint type. Valid values:
REGIONAL.- Security
Policy string The Transport Layer Security (TLS) version of the security policy for the domain name. Valid values:
TLS_1_2.- Hosted
Zone stringId The Amazon Route 53 Hosted Zone ID of the endpoint.
- Target
Domain stringName The target domain name.
- Certificate
Arn 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.Certificateresource to configure an ACM certificate.- Endpoint
Type string The endpoint type. Valid values:
REGIONAL.- Security
Policy string The Transport Layer Security (TLS) version of the security policy for the domain name. Valid values:
TLS_1_2.- Hosted
Zone stringId The Amazon Route 53 Hosted Zone ID of the endpoint.
- Target
Domain stringName The target domain name.
- certificate
Arn 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.Certificateresource to configure an ACM certificate.- endpoint
Type string The endpoint type. Valid values:
REGIONAL.- security
Policy string The Transport Layer Security (TLS) version of the security policy for the domain name. Valid values:
TLS_1_2.- hosted
Zone stringId The Amazon Route 53 Hosted Zone ID of the endpoint.
- target
Domain stringName 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.Certificateresource 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_ strid The Amazon Route 53 Hosted Zone ID of the endpoint.
- target
Domain strName 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
awsTerraform Provider.