Class Accelerator
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.globalaccelerator.Accelerator
- All Implemented Interfaces:
IEnvironmentAware,IResource,IAccelerator,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:06.703Z")
@Stability(Stable)
public class Accelerator
extends Resource
implements IAccelerator
The Accelerator construct.
Example:
// Create an Accelerator
Accelerator accelerator = new Accelerator(this, "Accelerator");
// Create a Listener
Listener listener = accelerator.addListener("Listener", ListenerOptions.builder()
.portRanges(List.of(PortRange.builder().fromPort(80).build(), PortRange.builder().fromPort(443).build()))
.build());
// Import the Load Balancers
INetworkLoadBalancer nlb1 = NetworkLoadBalancer.fromNetworkLoadBalancerAttributes(this, "NLB1", NetworkLoadBalancerAttributes.builder()
.loadBalancerArn("arn:aws:elasticloadbalancing:us-west-2:111111111111:loadbalancer/app/my-load-balancer1/e16bef66805b")
.build());
INetworkLoadBalancer nlb2 = NetworkLoadBalancer.fromNetworkLoadBalancerAttributes(this, "NLB2", NetworkLoadBalancerAttributes.builder()
.loadBalancerArn("arn:aws:elasticloadbalancing:ap-south-1:111111111111:loadbalancer/app/my-load-balancer2/5513dc2ea8a1")
.build());
// Add one EndpointGroup for each Region we are targeting
listener.addEndpointGroup("Group1", EndpointGroupOptions.builder()
.endpoints(List.of(new NetworkLoadBalancerEndpoint(nlb1)))
.build());
listener.addEndpointGroup("Group2", EndpointGroupOptions.builder()
// Imported load balancers automatically calculate their Region from the ARN.
// If you are load balancing to other resources, you must also pass a `region`
// parameter here.
.endpoints(List.of(new NetworkLoadBalancerEndpoint(nlb2)))
.build());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.globalaccelerator.IAccelerator
IAccelerator.Jsii$Default, IAccelerator.Jsii$ProxyNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAccelerator(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedAccelerator(software.amazon.jsii.JsiiObjectRef objRef) Accelerator(software.constructs.Construct scope, String id) Accelerator(software.constructs.Construct scope, String id, AcceleratorProps props) -
Method Summary
Modifier and TypeMethodDescriptionaddListener(String id, ListenerOptions options) Add a listener to the accelerator.static IAcceleratorfromAcceleratorAttributes(software.constructs.Construct scope, String id, AcceleratorAttributes attrs) import from attributes.The ARN of the accelerator.The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses.The DNS name that points to the dual-stack accelerator's four static IP addresses: two IPv4 addresses and two IPv6 addresses.The array of IPv4 addresses in the IP address set.The array of IPv6 addresses in the IP address set.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, 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.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
Accelerator
protected Accelerator(software.amazon.jsii.JsiiObjectRef objRef) -
Accelerator
protected Accelerator(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Accelerator
@Stability(Stable) public Accelerator(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable AcceleratorProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
Accelerator
@Stability(Stable) public Accelerator(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
fromAcceleratorAttributes
@Stability(Stable) @NotNull public static IAccelerator fromAcceleratorAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull AcceleratorAttributes attrs) import from attributes.- Parameters:
scope- This parameter is required.id- This parameter is required.attrs- This parameter is required.
-
addListener
@Stability(Stable) @NotNull public Listener addListener(@NotNull String id, @NotNull ListenerOptions options) Add a listener to the accelerator.- Parameters:
id- This parameter is required.options- This parameter is required.
-
getAcceleratorArn
The ARN of the accelerator.- Specified by:
getAcceleratorArnin interfaceIAccelerator
-
getDnsName
The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses.- Specified by:
getDnsNamein interfaceIAccelerator
-
getDualStackDnsName
The DNS name that points to the dual-stack accelerator's four static IP addresses: two IPv4 addresses and two IPv6 addresses.- Specified by:
getDualStackDnsNamein interfaceIAccelerator
-
getIpv4Addresses
The array of IPv4 addresses in the IP address set.- Specified by:
getIpv4Addressesin interfaceIAccelerator
-
getIpv6Addresses
The array of IPv6 addresses in the IP address set.- Specified by:
getIpv6Addressesin interfaceIAccelerator
-