BaseLoadBalancer L2 construct
Base class for both Application and Network Load Balancers.
Initializer
new BaseLoadBalancer(scope: Construct, id: string, baseProps: BaseLoadBalancerProps, additionalProps: any)
BaseLoadBalancer(scope: Construct, id: str, base_props: BaseLoadBalancerProps, additional_props: Any)
new BaseLoadBalancer(Construct scope, String id, BaseLoadBalancerProps baseProps, Object additionalProps)
new BaseLoadBalancer(Construct scope, string id, BaseLoadBalancerProps baseProps, object additionalProps)
NewBaseLoadBalancer(Scope Construct, Id *string, BaseProps BaseLoadBalancerProps, AdditionalProps interface{})
Construct Props
crossZoneEnabledoptionalbooleancross_zone_enabledoptionalboolcrossZoneEnabledoptionalBooleanCrossZoneEnabledoptionalboolCrossZoneEnabledoptional*bool#Default: false for Network Load Balancers and true for Application Load Balancers. This can not be false for Application Load Balancers.
deletionProtectionoptionalbooleandeletion_protectionoptionalbooldeletionProtectionoptionalBooleanDeletionProtectionoptionalboolDeletionProtectionoptional*bool= false#denyAllIgwTrafficoptionalbooleandeny_all_igw_trafficoptionalbooldenyAllIgwTrafficoptionalBooleanDenyAllIgwTrafficoptionalboolDenyAllIgwTrafficoptional*bool#Default: false for internet-facing load balancers and true for internal load balancers
internetFacingoptionalbooleaninternet_facingoptionalboolinternetFacingoptionalBooleanInternetFacingoptionalboolInternetFacingoptional*bool= false#loadBalancerNameoptionalstringload_balancer_nameoptionalstrloadBalancerNameoptionalStringLoadBalancerNameoptionalstringLoadBalancerNameoptional*string#Default: Automatically generated name.
minimumCapacityUnitoptionalnumberminimum_capacity_unitoptionalint | floatminimumCapacityUnitoptionalNumberMinimumCapacityUnitoptionaldoubleMinimumCapacityUnitoptional*float64#Default: undefined - ELB default is 0 LCU
vpcSubnetsoptionalSubnetSelectionvpc_subnetsoptionalSubnetSelectionvpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelectionVpcSubnetsoptionalSubnetSelection#Default: the Vpc default strategy.
Properties
envResourceEnvironmentenvResourceEnvironmentenvResourceEnvironmentEnvResourceEnvironmentEnvResourceEnvironment#notes
For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.
loadBalancerArnstringload_balancer_arnstrloadBalancerArnStringLoadBalancerArnstringLoadBalancerArn*string#Example value: arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-internal-load-balancer/50dc6c495c0c9188
loadBalancerCanonicalHostedZoneIdstringload_balancer_canonical_hosted_zone_idstrloadBalancerCanonicalHostedZoneIdStringLoadBalancerCanonicalHostedZoneIdstringLoadBalancerCanonicalHostedZoneId*string#Example value: Z2P70J7EXAMPLE
loadBalancerDnsNamestringload_balancer_dns_namestrloadBalancerDnsNameStringLoadBalancerDnsNamestringLoadBalancerDnsName*string#Example value: my-load-balancer-424835706.us-west-2.elb.amazonaws.com
loadBalancerFullNamestringload_balancer_full_namestrloadBalancerFullNameStringLoadBalancerFullNamestringLoadBalancerFullName*string#Example value: app/my-load-balancer/50dc6c495c0c9188
loadBalancerNamestringload_balancer_namestrloadBalancerNameStringLoadBalancerNamestringLoadBalancerName*string#Example value: my-load-balancer
loadBalancerRefLoadBalancerReferenceload_balancer_refLoadBalancerReferenceloadBalancerRefLoadBalancerReferenceLoadBalancerRefLoadBalancerReferenceLoadBalancerRefLoadBalancerReference#loadBalancerSecurityGroupsstring[]load_balancer_security_groupstyping.List[str]loadBalancerSecurityGroupsList<String>LoadBalancerSecurityGroupsstring[]LoadBalancerSecurityGroups*[]*string#Methods
applyCrossStackReferenceStrength(strength: ReferenceStrength): voiddef apply_cross_stack_reference_strength(self, strength: ReferenceStrength) -> Nonepublic void applyCrossStackReferenceStrength(ReferenceStrength strength)public void ApplyCrossStackReferenceStrength(ReferenceStrength strength)func ApplyCrossStackReferenceStrength(Strength ReferenceStrength)#notes · 1 parameter
When set, any cross-stack reference to this resource will use the specified mechanism instead of the global default determined by the @aws-cdk/core:defaultCrossStackReferences context key. This is useful for selectively weakening specific references to avoid the "deadly embrace" problem without changing the app-wide default.
Parameters
strengthstrengthstrengthstrengthStrength— - The reference strength to use for this resource.
applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#notes
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).
isConstruct(x: any): boolean@staticmethod def is_construct(x: Any) -> boolpublic static Boolean isConstruct(Object x)public static bool IsConstruct(object x)func IsConstruct(X interface{}) *boolstatic#notes · 1 parameter · returns
Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.
Parameters
xxxxX— Any object.
Returns: true if x is an object created from a class which extends Construct.
isOwnedResource(construct: IConstruct): boolean@staticmethod def is_owned_resource(construct: IConstruct) -> boolpublic static Boolean isOwnedResource(IConstruct construct)public static bool IsOwnedResource(IConstruct construct)func IsOwnedResource(Construct IConstruct) *boolstatic#isResource(construct: IConstruct): boolean@staticmethod def is_resource(construct: IConstruct) -> boolpublic static Boolean isResource(IConstruct construct)public static bool IsResource(IConstruct construct)func IsResource(Construct IConstruct) *boolstatic#logAccessLogs(bucket: IBucket, prefix?: string): voiddef log_access_logs(self, bucket: IBucket, prefix: typing.Optional[str] = None) -> Nonepublic void logAccessLogs(IBucket bucket, String prefix)public void LogAccessLogs(IBucket bucket, string? prefix = null)func LogAccessLogs(Bucket IBucket, Prefix *string)#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
removeAttribute(key: string): voiddef remove_attribute(self, key: str) -> Nonepublic void removeAttribute(String key)public void RemoveAttribute(string key)func RemoveAttribute(Key *string)#setAttribute(key: string, value?: string): voiddef set_attribute(self, key: str, value: typing.Optional[str] = None) -> Nonepublic void setAttribute(String key, String value)public void SetAttribute(string key, string? value = null)func SetAttribute(Key *string, Value *string)#toString(): stringdef to_string(self, ) -> strpublic String toString()public string ToString()func ToString() *string#with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.