java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.elasticloadbalancingv2.BaseLoadBalancer
All Implemented Interfaces:
IConstruct, IDependable, IResource, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct
Direct Known Subclasses:
ApplicationLoadBalancer, NetworkLoadBalancer

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:44.220Z") @Stability(Stable) public abstract class BaseLoadBalancer extends Resource
Base class for both Application and Network Load Balancers.
  • Constructor Details

    • BaseLoadBalancer

      protected BaseLoadBalancer(software.amazon.jsii.JsiiObjectRef objRef)
    • BaseLoadBalancer

      protected BaseLoadBalancer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • BaseLoadBalancer

      @Stability(Stable) protected BaseLoadBalancer(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull BaseLoadBalancerProps baseProps, @NotNull Object additionalProps)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      baseProps - This parameter is required.
      additionalProps - This parameter is required.
  • Method Details

    • logAccessLogs

      @Stability(Stable) public void logAccessLogs(@NotNull IBucket bucket, @Nullable String prefix)
      Enable access logging for this load balancer.

      A region must be specified on the stack containing the load balancer; you cannot enable logging on environment-agnostic stacks. See https://docs.aws.amazon.com/cdk/latest/guide/environments.html

      Parameters:
      bucket - This parameter is required.
      prefix -
    • logAccessLogs

      @Stability(Stable) public void logAccessLogs(@NotNull IBucket bucket)
      Enable access logging for this load balancer.

      A region must be specified on the stack containing the load balancer; you cannot enable logging on environment-agnostic stacks. See https://docs.aws.amazon.com/cdk/latest/guide/environments.html

      Parameters:
      bucket - This parameter is required.
    • removeAttribute

      @Stability(Stable) public void removeAttribute(@NotNull String key)
      Remove an attribute from the load balancer.

      Parameters:
      key - This parameter is required.
    • setAttribute

      @Stability(Stable) public void setAttribute(@NotNull String key, @Nullable String value)
      Set a non-standard attribute on the load balancer.

      Parameters:
      key - This parameter is required.
      value -
      See Also:
    • setAttribute

      @Stability(Stable) public void setAttribute(@NotNull String key)
      Set a non-standard attribute on the load balancer.

      Parameters:
      key - This parameter is required.
      See Also:
    • validate

      @Stability(Stable) @NotNull protected List<String> validate()
      Validate the current construct.

      This method can be implemented by derived constructs in order to perform validation logic. It is called on all constructs before synthesis.

      Overrides:
      validate in class Construct
      Returns:
      An array of validation error messages, or an empty array if the construct is valid.
    • getLoadBalancerArn

      @Stability(Stable) @NotNull public String getLoadBalancerArn()
      The ARN of this load balancer.

      Example value: arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-internal-load-balancer/50dc6c495c0c9188

    • getLoadBalancerCanonicalHostedZoneId

      @Stability(Stable) @NotNull public String getLoadBalancerCanonicalHostedZoneId()
      The canonical hosted zone ID of this load balancer.

      Example value: Z2P70J7EXAMPLE

    • getLoadBalancerDnsName

      @Stability(Stable) @NotNull public String getLoadBalancerDnsName()
      The DNS name of this load balancer.

      Example value: my-load-balancer-424835706.us-west-2.elb.amazonaws.com

    • getLoadBalancerFullName

      @Stability(Stable) @NotNull public String getLoadBalancerFullName()
      The full name of this load balancer.

      Example value: app/my-load-balancer/50dc6c495c0c9188

    • getLoadBalancerName

      @Stability(Stable) @NotNull public String getLoadBalancerName()
      The name of this load balancer.

      Example value: my-load-balancer

    • getLoadBalancerSecurityGroups

      @Stability(Stable) @NotNull public List<String> getLoadBalancerSecurityGroups()
    • getVpc

      @Stability(Stable) @Nullable public IVpc getVpc()
      The VPC this load balancer has been created in.

      This property is always defined (not null or undefined) for sub-classes of BaseLoadBalancer.