Class DomainName_
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
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
RestApi api;
var domainName = DomainName.FromDomainNameAttributes(this, "DomainName", new DomainNameAttributes {
DomainName = "domainName",
DomainNameAliasHostedZoneId = "domainNameAliasHostedZoneId",
DomainNameAliasTarget = "domainNameAliasTarget"
});
new BasePathMapping(this, "BasePathMapping", new BasePathMappingProps {
DomainName = domainName,
RestApi = api
});
Synopsis
Constructors
Domain |
Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Domain |
Used by jsii to construct an instance of this class from DeputyProps |
Domain |
Properties
Domain |
The domain name (e.g. |
Domain |
The Route53 alias target to use in order to connect a record set to this domain through an alias. |
Domain |
The Route53 hosted zone ID to use in order to connect a record set to this domain through an alias. |
Methods
Add |
Maps this domain to an API endpoint. |
Add |
Maps this domain to an API endpoint. |
From |
Imports an existing domain name. |
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. By Ref Value 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. Deputy Base. Deputy Props The deputy props
DomainName_(Construct, String, IDomainNameProps)
public DomainName_(Construct scope, string id, IDomainNameProps props)
Parameters
- scope Constructs.
Construct - id System.
String - props IDomain
Name Props
Properties
DomainName
The domain name (e.g. example.com
).
public virtual string DomainName { get; }
Property Value
System.
DomainNameAliasDomainName
The Route53 alias target to use in order to connect a record set to this domain through an alias.
public virtual string DomainNameAliasDomainName { get; }
Property Value
System.
DomainNameAliasHostedZoneId
The Route53 hosted zone ID to use in order to connect a record set to this domain through an alias.
public virtual string DomainNameAliasHostedZoneId { get; }
Property Value
System.
Methods
AddApiMapping(IStage, IApiMappingOptions)
Maps this domain to an API endpoint.
public virtual void AddApiMapping(IStage targetStage, IApiMappingOptions options = null)
Parameters
- targetStage IStage
the target API stage.
- options IApi
Mapping Options Options for mapping to a stage.
Remarks
This uses the ApiMapping from ApiGatewayV2 which supports multi-level paths, but also only supports:
AddBasePathMapping(IRestApi, IBasePathMappingOptions)
Maps this domain to an API endpoint.
public virtual BasePathMapping AddBasePathMapping(IRestApi targetApi, IBasePathMappingOptions options = null)
Parameters
- targetApi IRest
Api That target API endpoint, requests will be mapped to the deployment stage.
- options IBase
Path Mapping Options Options for mapping to base path with or without a stage.
Returns
Remarks
This uses the BasePathMapping from ApiGateway v1 which does not support multi-level paths.
If you need to create a mapping for a multi-level path use addApiMapping
instead.
FromDomainNameAttributes(Construct, String, IDomainNameAttributes)
Imports an existing domain name.
public static IDomainName FromDomainNameAttributes(Construct scope, string id, IDomainNameAttributes attrs)
Parameters
- scope Constructs.
Construct - id System.
String - attrs IDomain
Name Attributes
Returns