We recommend new projects start with resources from the AWS provider.
aws-native.apigateway.DomainName
Explore with Pulumi AI
We recommend new projects start with resources from the AWS provider.
Resource Type definition for AWS::ApiGateway::DomainName.
Example Usage
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var cfnDomainName = config.Require("cfnDomainName");
var certificateArn = config.Require("certificateArn");
var type = config.Require("type");
var myDomainName = new AwsNative.ApiGateway.DomainName("myDomainName", new()
{
CertificateArn = certificateArn,
DomainNameValue = cfnDomainName,
EndpointConfiguration = new AwsNative.ApiGateway.Inputs.DomainNameEndpointConfigurationArgs
{
Types = new[]
{
type,
},
},
RegionalCertificateArn = certificateArn,
});
return new Dictionary<string, object?>
{
["domainName"] = myDomainName.Id,
};
});
package main
import (
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/apigateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
cfnDomainName := cfg.Require("cfnDomainName")
certificateArn := cfg.Require("certificateArn")
_type := cfg.Require("type")
myDomainName, err := apigateway.NewDomainName(ctx, "myDomainName", &apigateway.DomainNameArgs{
CertificateArn: pulumi.String(certificateArn),
DomainName: pulumi.String(cfnDomainName),
EndpointConfiguration: &apigateway.DomainNameEndpointConfigurationArgs{
Types: pulumi.StringArray{
pulumi.String(_type),
},
},
RegionalCertificateArn: pulumi.String(certificateArn),
})
if err != nil {
return err
}
ctx.Export("domainName", myDomainName.ID())
return nil
})
}
Coming soon!
import pulumi
import pulumi_aws_native as aws_native
config = pulumi.Config()
cfn_domain_name = config.require("cfnDomainName")
certificate_arn = config.require("certificateArn")
type = config.require("type")
my_domain_name = aws_native.apigateway.DomainName("myDomainName",
certificate_arn=certificate_arn,
domain_name=cfn_domain_name,
endpoint_configuration={
"types": [type],
},
regional_certificate_arn=certificate_arn)
pulumi.export("domainName", my_domain_name.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const config = new pulumi.Config();
const cfnDomainName = config.require("cfnDomainName");
const certificateArn = config.require("certificateArn");
const type = config.require("type");
const myDomainName = new aws_native.apigateway.DomainName("myDomainName", {
certificateArn: certificateArn,
domainName: cfnDomainName,
endpointConfiguration: {
types: [type],
},
regionalCertificateArn: certificateArn,
});
export const domainName = myDomainName.id;
Coming soon!
Example
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var cfnDomainName = config.Require("cfnDomainName");
var certificateArn = config.Require("certificateArn");
var type = config.Require("type");
var myDomainName = new AwsNative.ApiGateway.DomainName("myDomainName", new()
{
CertificateArn = certificateArn,
DomainNameValue = cfnDomainName,
EndpointConfiguration = new AwsNative.ApiGateway.Inputs.DomainNameEndpointConfigurationArgs
{
Types = new[]
{
type,
},
},
RegionalCertificateArn = certificateArn,
});
return new Dictionary<string, object?>
{
["domainName"] = myDomainName.Id,
};
});
package main
import (
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/apigateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
cfnDomainName := cfg.Require("cfnDomainName")
certificateArn := cfg.Require("certificateArn")
_type := cfg.Require("type")
myDomainName, err := apigateway.NewDomainName(ctx, "myDomainName", &apigateway.DomainNameArgs{
CertificateArn: pulumi.String(certificateArn),
DomainName: pulumi.String(cfnDomainName),
EndpointConfiguration: &apigateway.DomainNameEndpointConfigurationArgs{
Types: pulumi.StringArray{
pulumi.String(_type),
},
},
RegionalCertificateArn: pulumi.String(certificateArn),
})
if err != nil {
return err
}
ctx.Export("domainName", myDomainName.ID())
return nil
})
}
Coming soon!
import pulumi
import pulumi_aws_native as aws_native
config = pulumi.Config()
cfn_domain_name = config.require("cfnDomainName")
certificate_arn = config.require("certificateArn")
type = config.require("type")
my_domain_name = aws_native.apigateway.DomainName("myDomainName",
certificate_arn=certificate_arn,
domain_name=cfn_domain_name,
endpoint_configuration={
"types": [type],
},
regional_certificate_arn=certificate_arn)
pulumi.export("domainName", my_domain_name.id)
import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";
const config = new pulumi.Config();
const cfnDomainName = config.require("cfnDomainName");
const certificateArn = config.require("certificateArn");
const type = config.require("type");
const myDomainName = new aws_native.apigateway.DomainName("myDomainName", {
certificateArn: certificateArn,
domainName: cfnDomainName,
endpointConfiguration: {
types: [type],
},
regionalCertificateArn: certificateArn,
});
export const domainName = myDomainName.id;
Coming soon!
Create DomainName Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DomainName(name: string, args?: DomainNameArgs, opts?: CustomResourceOptions);
@overload
def DomainName(resource_name: str,
args: Optional[DomainNameArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def DomainName(resource_name: str,
opts: Optional[ResourceOptions] = None,
certificate_arn: Optional[str] = None,
domain_name: Optional[str] = None,
endpoint_configuration: Optional[DomainNameEndpointConfigurationArgs] = None,
mutual_tls_authentication: Optional[DomainNameMutualTlsAuthenticationArgs] = None,
ownership_verification_certificate_arn: Optional[str] = None,
regional_certificate_arn: Optional[str] = None,
security_policy: Optional[str] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
func NewDomainName(ctx *Context, name string, args *DomainNameArgs, opts ...ResourceOption) (*DomainName, error)
public DomainName(string name, DomainNameArgs? args = null, CustomResourceOptions? opts = null)
public DomainName(String name, DomainNameArgs args)
public DomainName(String name, DomainNameArgs args, CustomResourceOptions options)
type: aws-native:apigateway:DomainName
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
- args DomainNameArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args DomainNameArgs
- The arguments to resource properties.
- options 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 Architecture and Concepts docs.
Inputs
The DomainName resource accepts the following input properties:
- Certificate
Arn string - The reference to an AWS -managed certificate that will be used by edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.
- Domain
Name stringValue - The custom domain name as an API host name, for example,
my-api.example.com
. - Endpoint
Configuration Pulumi.Aws Native. Api Gateway. Inputs. Domain Name Endpoint Configuration - The endpoint configuration of this DomainName showing the endpoint types of the domain name.
- Mutual
Tls Pulumi.Authentication Aws Native. Api Gateway. Inputs. Domain Name Mutual Tls Authentication - The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.
- Ownership
Verification stringCertificate Arn - The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the RegionalCertificateArn.
- Regional
Certificate stringArn - The reference to an AWS -managed certificate that will be used for validating the regional domain name. AWS Certificate Manager is the only supported source.
- Security
Policy string - The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are
TLS_1_0
andTLS_1_2
. - List<Pulumi.
Aws Native. Inputs. Tag> - The collection of tags. Each tag element is associated with a given resource.
- Certificate
Arn string - The reference to an AWS -managed certificate that will be used by edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.
- Domain
Name string - The custom domain name as an API host name, for example,
my-api.example.com
. - Endpoint
Configuration DomainName Endpoint Configuration Args - The endpoint configuration of this DomainName showing the endpoint types of the domain name.
- Mutual
Tls DomainAuthentication Name Mutual Tls Authentication Args - The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.
- Ownership
Verification stringCertificate Arn - The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the RegionalCertificateArn.
- Regional
Certificate stringArn - The reference to an AWS -managed certificate that will be used for validating the regional domain name. AWS Certificate Manager is the only supported source.
- Security
Policy string - The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are
TLS_1_0
andTLS_1_2
. - Tag
Args - The collection of tags. Each tag element is associated with a given resource.
- certificate
Arn String - The reference to an AWS -managed certificate that will be used by edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.
- domain
Name String - The custom domain name as an API host name, for example,
my-api.example.com
. - endpoint
Configuration DomainName Endpoint Configuration - The endpoint configuration of this DomainName showing the endpoint types of the domain name.
- mutual
Tls DomainAuthentication Name Mutual Tls Authentication - The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.
- ownership
Verification StringCertificate Arn - The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the RegionalCertificateArn.
- regional
Certificate StringArn - The reference to an AWS -managed certificate that will be used for validating the regional domain name. AWS Certificate Manager is the only supported source.
- security
Policy String - The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are
TLS_1_0
andTLS_1_2
. - List<Tag>
- The collection of tags. Each tag element is associated with a given resource.
- certificate
Arn string - The reference to an AWS -managed certificate that will be used by edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.
- domain
Name string - The custom domain name as an API host name, for example,
my-api.example.com
. - endpoint
Configuration DomainName Endpoint Configuration - The endpoint configuration of this DomainName showing the endpoint types of the domain name.
- mutual
Tls DomainAuthentication Name Mutual Tls Authentication - The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.
- ownership
Verification stringCertificate Arn - The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the RegionalCertificateArn.
- regional
Certificate stringArn - The reference to an AWS -managed certificate that will be used for validating the regional domain name. AWS Certificate Manager is the only supported source.
- security
Policy string - The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are
TLS_1_0
andTLS_1_2
. - Tag[]
- The collection of tags. Each tag element is associated with a given resource.
- certificate_
arn str - The reference to an AWS -managed certificate that will be used by edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.
- domain_
name str - The custom domain name as an API host name, for example,
my-api.example.com
. - endpoint_
configuration DomainName Endpoint Configuration Args - The endpoint configuration of this DomainName showing the endpoint types of the domain name.
- mutual_
tls_ Domainauthentication Name Mutual Tls Authentication Args - The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.
- ownership_
verification_ strcertificate_ arn - The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the RegionalCertificateArn.
- regional_
certificate_ strarn - The reference to an AWS -managed certificate that will be used for validating the regional domain name. AWS Certificate Manager is the only supported source.
- security_
policy str - The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are
TLS_1_0
andTLS_1_2
. - Sequence[Tag
Args] - The collection of tags. Each tag element is associated with a given resource.
- certificate
Arn String - The reference to an AWS -managed certificate that will be used by edge-optimized endpoint for this domain name. AWS Certificate Manager is the only supported source.
- domain
Name String - The custom domain name as an API host name, for example,
my-api.example.com
. - endpoint
Configuration Property Map - The endpoint configuration of this DomainName showing the endpoint types of the domain name.
- mutual
Tls Property MapAuthentication - The mutual TLS authentication configuration for a custom domain name. If specified, API Gateway performs two-way authentication between the client and the server. Clients must present a trusted certificate to access your API.
- ownership
Verification StringCertificate Arn - The ARN of the public certificate issued by ACM to validate ownership of your custom domain. Only required when configuring mutual TLS and using an ACM imported or private CA certificate ARN as the RegionalCertificateArn.
- regional
Certificate StringArn - The reference to an AWS -managed certificate that will be used for validating the regional domain name. AWS Certificate Manager is the only supported source.
- security
Policy String - The Transport Layer Security (TLS) version + cipher suite for this DomainName. The valid values are
TLS_1_0
andTLS_1_2
. - List<Property Map>
- The collection of tags. Each tag element is associated with a given resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the DomainName resource produces the following output properties:
- Distribution
Domain stringName The Amazon CloudFront distribution domain name that's mapped to the custom domain name. This is only applicable for endpoints whose type is
EDGE
.Example:
d111111abcdef8.cloudfront.net
- Distribution
Hosted stringZone Id - The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The only valid value is
Z2FDTNDATAQYW2
for all regions. - Id string
- The provider-assigned unique ID for this managed resource.
- Regional
Domain stringName - The domain name associated with the regional endpoint for this custom domain name. You set up this association by adding a DNS record that points the custom domain name to this regional domain name.
- Regional
Hosted stringZone Id - The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
- Distribution
Domain stringName The Amazon CloudFront distribution domain name that's mapped to the custom domain name. This is only applicable for endpoints whose type is
EDGE
.Example:
d111111abcdef8.cloudfront.net
- Distribution
Hosted stringZone Id - The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The only valid value is
Z2FDTNDATAQYW2
for all regions. - Id string
- The provider-assigned unique ID for this managed resource.
- Regional
Domain stringName - The domain name associated with the regional endpoint for this custom domain name. You set up this association by adding a DNS record that points the custom domain name to this regional domain name.
- Regional
Hosted stringZone Id - The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
- distribution
Domain StringName The Amazon CloudFront distribution domain name that's mapped to the custom domain name. This is only applicable for endpoints whose type is
EDGE
.Example:
d111111abcdef8.cloudfront.net
- distribution
Hosted StringZone Id - The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The only valid value is
Z2FDTNDATAQYW2
for all regions. - id String
- The provider-assigned unique ID for this managed resource.
- regional
Domain StringName - The domain name associated with the regional endpoint for this custom domain name. You set up this association by adding a DNS record that points the custom domain name to this regional domain name.
- regional
Hosted StringZone Id - The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
- distribution
Domain stringName The Amazon CloudFront distribution domain name that's mapped to the custom domain name. This is only applicable for endpoints whose type is
EDGE
.Example:
d111111abcdef8.cloudfront.net
- distribution
Hosted stringZone Id - The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The only valid value is
Z2FDTNDATAQYW2
for all regions. - id string
- The provider-assigned unique ID for this managed resource.
- regional
Domain stringName - The domain name associated with the regional endpoint for this custom domain name. You set up this association by adding a DNS record that points the custom domain name to this regional domain name.
- regional
Hosted stringZone Id - The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
- distribution_
domain_ strname The Amazon CloudFront distribution domain name that's mapped to the custom domain name. This is only applicable for endpoints whose type is
EDGE
.Example:
d111111abcdef8.cloudfront.net
- distribution_
hosted_ strzone_ id - The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The only valid value is
Z2FDTNDATAQYW2
for all regions. - id str
- The provider-assigned unique ID for this managed resource.
- regional_
domain_ strname - The domain name associated with the regional endpoint for this custom domain name. You set up this association by adding a DNS record that points the custom domain name to this regional domain name.
- regional_
hosted_ strzone_ id - The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
- distribution
Domain StringName The Amazon CloudFront distribution domain name that's mapped to the custom domain name. This is only applicable for endpoints whose type is
EDGE
.Example:
d111111abcdef8.cloudfront.net
- distribution
Hosted StringZone Id - The region-agnostic Amazon Route 53 Hosted Zone ID of the edge-optimized endpoint. The only valid value is
Z2FDTNDATAQYW2
for all regions. - id String
- The provider-assigned unique ID for this managed resource.
- regional
Domain StringName - The domain name associated with the regional endpoint for this custom domain name. You set up this association by adding a DNS record that points the custom domain name to this regional domain name.
- regional
Hosted StringZone Id - The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
Supporting Types
DomainNameEndpointConfiguration, DomainNameEndpointConfigurationArgs
- Types List<string>
- A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is
"EDGE"
. For a regional API and its custom domain name, the endpoint type isREGIONAL
. For a private API, the endpoint type isPRIVATE
.
- Types []string
- A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is
"EDGE"
. For a regional API and its custom domain name, the endpoint type isREGIONAL
. For a private API, the endpoint type isPRIVATE
.
- types List<String>
- A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is
"EDGE"
. For a regional API and its custom domain name, the endpoint type isREGIONAL
. For a private API, the endpoint type isPRIVATE
.
- types string[]
- A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is
"EDGE"
. For a regional API and its custom domain name, the endpoint type isREGIONAL
. For a private API, the endpoint type isPRIVATE
.
- types Sequence[str]
- A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is
"EDGE"
. For a regional API and its custom domain name, the endpoint type isREGIONAL
. For a private API, the endpoint type isPRIVATE
.
- types List<String>
- A list of endpoint types of an API (RestApi) or its custom domain name (DomainName). For an edge-optimized API and its custom domain name, the endpoint type is
"EDGE"
. For a regional API and its custom domain name, the endpoint type isREGIONAL
. For a private API, the endpoint type isPRIVATE
.
DomainNameMutualTlsAuthentication, DomainNameMutualTlsAuthenticationArgs
- Truststore
Uri string - An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example
s3://bucket-name/key-name
. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object. - Truststore
Version string - The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.
- Truststore
Uri string - An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example
s3://bucket-name/key-name
. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object. - Truststore
Version string - The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.
- truststore
Uri String - An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example
s3://bucket-name/key-name
. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object. - truststore
Version String - The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.
- truststore
Uri string - An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example
s3://bucket-name/key-name
. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object. - truststore
Version string - The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.
- truststore_
uri str - An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example
s3://bucket-name/key-name
. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object. - truststore_
version str - The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.
- truststore
Uri String - An Amazon S3 URL that specifies the truststore for mutual TLS authentication, for example
s3://bucket-name/key-name
. The truststore can contain certificates from public or private certificate authorities. To update the truststore, upload a new version to S3, and then update your custom domain name to use the new version. To update the truststore, you must have permissions to access the S3 object. - truststore
Version String - The version of the S3 object that contains your truststore. To specify a version, you must have versioning enabled for the S3 bucket.
Tag, TagArgs
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
We recommend new projects start with resources from the AWS provider.