software.amazon.awscdk.services.route53.targets.ApiGateway Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53-targets Show documentation
Show all versions of route53-targets Show documentation
The CDK Construct Library for AWS Route53 Alias Targets
package software.amazon.awscdk.services.route53.targets;
/**
* Defines an API Gateway REST API as the alias target. Requires that the domain name will be defined through `RestApiProps.domainName`.
*
* You can direct the alias to any apigateway.DomainName
resource through the
* ApiGatewayDomain
class.
*
* Example:
*
*
* import software.amazon.awscdk.services.route53.*;
* import software.amazon.awscdk.services.route53.targets.*;
* RestApi api;
* Object hostedZoneForExampleCom;
* ARecord.Builder.create(this, "CustomDomainAliasRecord")
* .zone(hostedZoneForExampleCom)
* .target(RecordTarget.fromAlias(new ApiGateway(api)))
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.71.0 (build f1f58ae)", date = "2022-11-18T02:14:15.628Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.route53.targets.$Module.class, fqn = "@aws-cdk/aws-route53-targets.ApiGateway")
public class ApiGateway extends software.amazon.awscdk.services.route53.targets.ApiGatewayDomain {
protected ApiGateway(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected ApiGateway(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param api This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public ApiGateway(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apigateway.RestApiBase api) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(api, "api is required") });
}
}