Class DomainName
Custom domain resource for the API.
Inherited Members
Namespace: Amazon.CDK.AWS.Apigatewayv2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DomainName : Resource, IDomainName, IResource, IConstruct, IDependable
Syntax (vb)
Public Class DomainName Inherits Resource Implements IDomainName, IResource, IConstruct, IDependable
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.S3;
using Amazon.CDK.AWS.CertificateManager;
Bucket bucket;
var certArn = "arn:aws:acm:us-east-1:111111111111:certificate";
var domainName = "example.com";
new DomainName(this, "DomainName", new DomainNameProps {
DomainName = domainName,
Certificate = Certificate.FromCertificateArn(this, "cert", certArn),
Mtls = new MTLSConfig {
Bucket = bucket,
Key = "someca.pem",
Version = "version"
}
});
Synopsis
Constructors
DomainName(Construct, string, IDomainNameProps) | Custom domain resource for the API. |
Properties
Name | The custom domain name. |
PROPERTY_INJECTION_ID | Uniquely identifies this class. |
RegionalDomainName | The domain name associated with the regional endpoint for this custom domain name. |
RegionalHostedZoneId | The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. |
Methods
AddEndpoint(IEndpointOptions) | Adds an endpoint to a domain name. |
FromDomainNameAttributes(Construct, string, IDomainNameAttributes) | Import from attributes. |
Constructors
DomainName(Construct, string, IDomainNameProps)
Custom domain resource for the API.
public DomainName(Construct scope, string id, IDomainNameProps props)
Parameters
- scope Construct
- id string
- props IDomainNameProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.S3;
using Amazon.CDK.AWS.CertificateManager;
Bucket bucket;
var certArn = "arn:aws:acm:us-east-1:111111111111:certificate";
var domainName = "example.com";
new DomainName(this, "DomainName", new DomainNameProps {
DomainName = domainName,
Certificate = Certificate.FromCertificateArn(this, "cert", certArn),
Mtls = new MTLSConfig {
Bucket = bucket,
Key = "someca.pem",
Version = "version"
}
});
Properties
Name
The custom domain name.
public virtual string Name { get; }
Property Value
Remarks
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
ExampleMetadata: infused
RegionalDomainName
The domain name associated with the regional endpoint for this custom domain name.
public virtual string RegionalDomainName { get; }
Property Value
Remarks
ExampleMetadata: infused
RegionalHostedZoneId
The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
public virtual string RegionalHostedZoneId { get; }
Property Value
Remarks
ExampleMetadata: infused
Methods
AddEndpoint(IEndpointOptions)
Adds an endpoint to a domain name.
public virtual void AddEndpoint(IEndpointOptions options)
Parameters
- options IEndpointOptions
domain name endpoint properties to be set.
Remarks
ExampleMetadata: infused
FromDomainNameAttributes(Construct, string, IDomainNameAttributes)
Import from attributes.
public static IDomainName FromDomainNameAttributes(Construct scope, string id, IDomainNameAttributes attrs)
Parameters
- scope Construct
- id string
- attrs IDomainNameAttributes
Returns
Remarks
ExampleMetadata: infused