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
Syntax (vb)
Public Class DomainName
Inherits Resource
Implements IDomainName, IResource
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.CertificateManager;
using Amazon.CDK.AwsApigatewayv2Integrations;
Function handler;
var certArn = "arn:aws:acm:us-east-1:111111111111:certificate";
var domainName = "example.com";
var dn = new DomainName(this, "DN", new DomainNameProps {
DomainName = domainName,
Certificate = Certificate.FromCertificateArn(this, "cert", certArn)
});
var api = new HttpApi(this, "HttpProxyProdApi", new HttpApiProps {
DefaultIntegration = new HttpLambdaIntegration("DefaultIntegration", handler),
// https://${dn.domainName}/foo goes to prodApi $default stage
DefaultDomainMapping = new DomainMappingOptions {
DomainName = dn,
MappingKey = "foo"
}
});
Synopsis
Constructors
DomainName(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
DomainName(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
DomainName(Construct, String, IDomainNameProps) |
Properties
Name | The custom domain name. |
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(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected DomainName(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
DomainName(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected DomainName(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
DomainName(Construct, String, IDomainNameProps)
public DomainName(Construct scope, string id, IDomainNameProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IDomainNameProps
Properties
Name
The custom domain name.
public virtual string Name { get; }
Property Value
System.String
RegionalDomainName
The domain name associated with the regional endpoint for this custom domain name.
public virtual string RegionalDomainName { get; }
Property Value
System.String
RegionalHostedZoneId
The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.
public virtual string RegionalHostedZoneId { get; }
Property Value
System.String
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.
FromDomainNameAttributes(Construct, String, IDomainNameAttributes)
Import from attributes.
public static IDomainName FromDomainNameAttributes(Construct scope, string id, IDomainNameAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IDomainNameAttributes
Returns