Class DomainName
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.apigatewayv2.DomainName
- All Implemented Interfaces:
IConstruct,IDependable,IResource,IDomainName,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:43.241Z")
@Stability(Experimental)
public class DomainName
extends Resource
implements IDomainName
(experimental) Custom domain resource for the API.
Example:
import software.amazon.awscdk.services.certificatemanager.*;
import software.amazon.awscdk.services.apigatewayv2.integrations.HttpLambdaIntegration;
Function handler;
String certArn = "arn:aws:acm:us-east-1:111111111111:certificate";
String domainName = "example.com";
DomainName dn = DomainName.Builder.create(this, "DN")
.domainName(domainName)
.certificate(Certificate.fromCertificateArn(this, "cert", certArn))
.build();
HttpApi api = HttpApi.Builder.create(this, "HttpProxyProdApi")
.defaultIntegration(new HttpLambdaIntegration("DefaultIntegration", handler))
// https://${dn.domainName}/foo goes to prodApi $default stage
.defaultDomainMapping(DomainMappingOptions.builder()
.domainName(dn)
.mappingKey("foo")
.build())
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class(experimental) A fluent builder forDomainName.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.apigatewayv2.IDomainName
IDomainName.Jsii$Default, IDomainName.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDomainName(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedDomainName(software.amazon.jsii.JsiiObjectRef objRef) DomainName(software.constructs.Construct scope, String id, DomainNameProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEndpoint(EndpointOptions options) (experimental) Adds an endpoint to a domain name.static IDomainNamefromDomainNameAttributes(software.constructs.Construct scope, String id, DomainNameAttributes attrs) (experimental) Import from attributes.getName()(experimental) The custom domain name.(experimental) The domain name associated with the regional endpoint for this custom domain name.(experimental) The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourceMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
DomainName
protected DomainName(software.amazon.jsii.JsiiObjectRef objRef) -
DomainName
protected DomainName(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
DomainName
@Stability(Experimental) public DomainName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DomainNameProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromDomainNameAttributes
@Stability(Experimental) @NotNull public static IDomainName fromDomainNameAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DomainNameAttributes attrs) (experimental) Import from attributes.- Parameters:
scope- This parameter is required.id- This parameter is required.attrs- This parameter is required.
-
addEndpoint
(experimental) Adds an endpoint to a domain name.- Parameters:
options- domain name endpoint properties to be set. This parameter is required.
-
getName
(experimental) The custom domain name.- Specified by:
getNamein interfaceIDomainName
-
getRegionalDomainName
(experimental) The domain name associated with the regional endpoint for this custom domain name.- Specified by:
getRegionalDomainNamein interfaceIDomainName
-
getRegionalHostedZoneId
(experimental) The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint.- Specified by:
getRegionalHostedZoneIdin interfaceIDomainName
-