All Implemented Interfaces:
IResource, IAccelerator,, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.99.0 (build 8f757e4)", date="2024-06-13T18:49:19.496Z") @Stability(Stable) public class Accelerator extends Resource implements IAccelerator
The Accelerator construct.


 // 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()))
 // Import the Load Balancers
 INetworkLoadBalancer nlb1 = NetworkLoadBalancer.fromNetworkLoadBalancerAttributes(this, "NLB1", NetworkLoadBalancerAttributes.builder()
 INetworkLoadBalancer nlb2 = NetworkLoadBalancer.fromNetworkLoadBalancerAttributes(this, "NLB2", NetworkLoadBalancerAttributes.builder()
 // Add one EndpointGroup for each Region we are targeting
 listener.addEndpointGroup("Group1", EndpointGroupOptions.builder()
         .endpoints(List.of(new NetworkLoadBalancerEndpoint(nlb1)))
 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)))
  • Constructor Details

    • Accelerator

      protected Accelerator( objRef)
    • Accelerator

      protected Accelerator( initializationMode)
    • Accelerator

      @Stability(Stable) public Accelerator(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable AcceleratorProps props)
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • Accelerator

      @Stability(Stable) public Accelerator(@NotNull software.constructs.Construct scope, @NotNull String id)
      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.

      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.

      id - This parameter is required.
      options - This parameter is required.
    • getAcceleratorArn

      @Stability(Stable) @NotNull public String getAcceleratorArn()
      The ARN of the accelerator.
      Specified by:
      getAcceleratorArn in interface IAccelerator
    • getDnsName

      @Stability(Stable) @NotNull public String getDnsName()
      The Domain Name System (DNS) name that Global Accelerator creates that points to your accelerator's static IP addresses.
      Specified by:
      getDnsName in interface IAccelerator
    • getDualStackDnsName

      @Stability(Stable) @Nullable public String 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:
      getDualStackDnsName in interface IAccelerator
    • getIpv4Addresses

      @Stability(Stable) @Nullable public List<String> getIpv4Addresses()
      The array of IPv4 addresses in the IP address set.
      Specified by:
      getIpv4Addresses in interface IAccelerator
    • getIpv6Addresses

      @Stability(Stable) @Nullable public List<String> getIpv6Addresses()
      The array of IPv6 addresses in the IP address set.
      Specified by:
      getIpv6Addresses in interface IAccelerator