java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.elasticloadbalancingv2.CfnLoadBalancer
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-22T22:42:51.679Z") @Stability(Stable) public class CfnLoadBalancer extends CfnResource implements IInspectable, ITaggable
Specifies an Application Load Balancer, a Network Load Balancer, or a Gateway Load Balancer.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.elasticloadbalancingv2.*;
 CfnLoadBalancer cfnLoadBalancer = CfnLoadBalancer.Builder.create(this, "MyCfnLoadBalancer")
         .enforceSecurityGroupInboundRulesOnPrivateLinkTraffic("enforceSecurityGroupInboundRulesOnPrivateLinkTraffic")
         .ipAddressType("ipAddressType")
         .loadBalancerAttributes(List.of(LoadBalancerAttributeProperty.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .name("name")
         .scheme("scheme")
         .securityGroups(List.of("securityGroups"))
         .subnetMappings(List.of(SubnetMappingProperty.builder()
                 .subnetId("subnetId")
                 // the properties below are optional
                 .allocationId("allocationId")
                 .iPv6Address("iPv6Address")
                 .privateIPv4Address("privateIPv4Address")
                 .build()))
         .subnets(List.of("subnets"))
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .type("type")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnLoadBalancer

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

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

      @Stability(Stable) public CfnLoadBalancer(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnLoadBalancerProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties.
    • CfnLoadBalancer

      @Stability(Stable) public CfnLoadBalancer(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrCanonicalHostedZoneId

      @Stability(Stable) @NotNull public String getAttrCanonicalHostedZoneId()
      The ID of the Amazon Route 53 hosted zone associated with the load balancer.

      For example, Z2P70J7EXAMPLE .

    • getAttrDnsName

      @Stability(Stable) @NotNull public String getAttrDnsName()
      The DNS name for the load balancer.

      For example, my-load-balancer-424835706.us-west-2.elb.amazonaws.com .

    • getAttrLoadBalancerArn

      @Stability(Stable) @NotNull public String getAttrLoadBalancerArn()
      The Amazon Resource Name (ARN) of the load balancer.
    • getAttrLoadBalancerFullName

      @Stability(Stable) @NotNull public String getAttrLoadBalancerFullName()
      The full name of the load balancer.

      For example, app/my-load-balancer/50dc6c495c0c9188 .

    • getAttrLoadBalancerName

      @Stability(Stable) @NotNull public String getAttrLoadBalancerName()
      The name of the load balancer.

      For example, my-load-balancer .

    • getAttrSecurityGroups

      @Stability(Stable) @NotNull public List<String> getAttrSecurityGroups()
      The IDs of the security groups for the load balancer.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic

      @Stability(Stable) @Nullable public String getEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic()
      Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink .
    • setEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic

      @Stability(Stable) public void setEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(@Nullable String value)
      Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink .
    • getIpAddressType

      @Stability(Stable) @Nullable public String getIpAddressType()
      Note: Internal load balancers must use the ipv4 IP address type.
    • setIpAddressType

      @Stability(Stable) public void setIpAddressType(@Nullable String value)
      Note: Internal load balancers must use the ipv4 IP address type.
    • getLoadBalancerAttributes

      @Stability(Stable) @Nullable public Object getLoadBalancerAttributes()
      The load balancer attributes.
    • setLoadBalancerAttributes

      @Stability(Stable) public void setLoadBalancerAttributes(@Nullable IResolvable value)
      The load balancer attributes.
    • setLoadBalancerAttributes

      @Stability(Stable) public void setLoadBalancerAttributes(@Nullable List<Object> value)
      The load balancer attributes.
    • getName

      @Stability(Stable) @Nullable public String getName()
      The name of the load balancer.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The name of the load balancer.
    • getScheme

      @Stability(Stable) @Nullable public String getScheme()
      The nodes of an Internet-facing load balancer have public IP addresses.
    • setScheme

      @Stability(Stable) public void setScheme(@Nullable String value)
      The nodes of an Internet-facing load balancer have public IP addresses.
    • getSecurityGroups

      @Stability(Stable) @Nullable public List<String> getSecurityGroups()
      [Application Load Balancers and Network Load Balancers] The IDs of the security groups for the load balancer.
    • setSecurityGroups

      @Stability(Stable) public void setSecurityGroups(@Nullable List<String> value)
      [Application Load Balancers and Network Load Balancers] The IDs of the security groups for the load balancer.
    • getSubnetMappings

      @Stability(Stable) @Nullable public Object getSubnetMappings()
      The IDs of the subnets.
    • setSubnetMappings

      @Stability(Stable) public void setSubnetMappings(@Nullable IResolvable value)
      The IDs of the subnets.
    • setSubnetMappings

      @Stability(Stable) public void setSubnetMappings(@Nullable List<Object> value)
      The IDs of the subnets.
    • getSubnets

      @Stability(Stable) @Nullable public List<String> getSubnets()
      The IDs of the subnets.
    • setSubnets

      @Stability(Stable) public void setSubnets(@Nullable List<String> value)
      The IDs of the subnets.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The tags to assign to the load balancer.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The tags to assign to the load balancer.
    • getType

      @Stability(Stable) @Nullable public String getType()
      The type of load balancer.
    • setType

      @Stability(Stable) public void setType(@Nullable String value)
      The type of load balancer.