Class CfnLoadBalancer
Specifies an Application Load Balancer, a Network Load Balancer, or a Gateway Load Balancer.
Inherited Members
Namespace: Amazon.CDK.AWS.ElasticLoadBalancingV2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnLoadBalancer : CfnResource, IInspectable, ILoadBalancerRef, IConstruct, IDependable, IEnvironmentAware, ITaggable
Syntax (vb)
Public Class CfnLoadBalancer Inherits CfnResource Implements IInspectable, ILoadBalancerRef, IConstruct, IDependable, IEnvironmentAware, ITaggable
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ElasticLoadBalancingV2;
var cfnLoadBalancer = new CfnLoadBalancer(this, "MyCfnLoadBalancer", new CfnLoadBalancerProps {
EnableCapacityReservationProvisionStabilize = false,
EnablePrefixForIpv6SourceNat = "enablePrefixForIpv6SourceNat",
EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic = "enforceSecurityGroupInboundRulesOnPrivateLinkTraffic",
IpAddressType = "ipAddressType",
Ipv4IpamPoolId = "ipv4IpamPoolId",
LoadBalancerAttributes = new [] { new LoadBalancerAttributeProperty {
Key = "key",
Value = "value"
} },
MinimumLoadBalancerCapacity = new MinimumLoadBalancerCapacityProperty {
CapacityUnits = 123
},
Name = "name",
Scheme = "scheme",
SecurityGroups = new [] { "securityGroups" },
SubnetMappings = new [] { new SubnetMappingProperty {
SubnetId = "subnetId",
// the properties below are optional
AllocationId = "allocationId",
IPv6Address = "iPv6Address",
PrivateIPv4Address = "privateIPv4Address",
SourceNatIpv6Prefix = "sourceNatIpv6Prefix"
} },
Subnets = new [] { "subnets" },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
Type = "type"
});
Synopsis
Constructors
| CfnLoadBalancer(Construct, string, ICfnLoadBalancerProps?) | Create a new |
Properties
| AttrCanonicalHostedZoneId | The ID of the Amazon Route 53 hosted zone associated with the load balancer. |
| AttrDnsName | The DNS name for the load balancer. |
| AttrLoadBalancerArn | The Amazon Resource Name (ARN) of the load balancer. |
| AttrLoadBalancerFullName | The full name of the load balancer. |
| AttrLoadBalancerName | The name of the load balancer. |
| AttrSecurityGroups | The IDs of the security groups for the load balancer. |
| CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
| CfnProperties | Specifies an Application Load Balancer, a Network Load Balancer, or a Gateway Load Balancer. |
| EnableCapacityReservationProvisionStabilize | Indicates whether to enable stabilization when creating or updating an LCU reservation. |
| EnablePrefixForIpv6SourceNat | [Network Load Balancers with UDP listeners] Indicates whether to use an IPv6 prefix from each subnet for source NAT. |
| EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic | Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink . |
| IpAddressType | The IP address type. |
| Ipv4IpamPoolId | The ID of the IPv4 IPAM pool. |
| LoadBalancerAttributes | The load balancer attributes. |
| LoadBalancerRef | A reference to a LoadBalancer resource. |
| MinimumLoadBalancerCapacity | The minimum capacity for a load balancer. |
| Name | The name of the load balancer. |
| Scheme | The nodes of an Internet-facing load balancer have public IP addresses. |
| SecurityGroups | [Application Load Balancers and Network Load Balancers] The IDs of the security groups for the load balancer. |
| SubnetMappings | The IDs of the subnets. |
| Subnets | The IDs of the subnets. |
| Tags | Tag Manager which manages the tags for this resource. |
| TagsRaw | The tags to assign to the load balancer. |
| Type | The type of load balancer. |
Methods
| ArnForLoadBalancer(ILoadBalancerRef) | Specifies an Application Load Balancer, a Network Load Balancer, or a Gateway Load Balancer. |
| Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
| IsCfnLoadBalancer(object) | Checks whether the given object is a CfnLoadBalancer. |
| RenderProperties(IDictionary<string, object>) | Specifies an Application Load Balancer, a Network Load Balancer, or a Gateway Load Balancer. |
Constructors
CfnLoadBalancer(Construct, string, ICfnLoadBalancerProps?)
Create a new AWS::ElasticLoadBalancingV2::LoadBalancer.
public CfnLoadBalancer(Construct scope, string id, ICfnLoadBalancerProps? props = null)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnLoadBalancerProps
Resource properties.
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
Properties
AttrCanonicalHostedZoneId
The ID of the Amazon Route 53 hosted zone associated with the load balancer.
public virtual string AttrCanonicalHostedZoneId { get; }
Property Value
Remarks
For example, Z2P70J7EXAMPLE .
CloudformationAttribute: CanonicalHostedZoneID
AttrDnsName
The DNS name for the load balancer.
public virtual string AttrDnsName { get; }
Property Value
Remarks
For example, my-load-balancer-424835706.us-west-2.elb.amazonaws.com .
CloudformationAttribute: DNSName
AttrLoadBalancerArn
The Amazon Resource Name (ARN) of the load balancer.
public virtual string AttrLoadBalancerArn { get; }
Property Value
Remarks
CloudformationAttribute: LoadBalancerArn
AttrLoadBalancerFullName
The full name of the load balancer.
public virtual string AttrLoadBalancerFullName { get; }
Property Value
Remarks
For example, app/my-load-balancer/50dc6c495c0c9188 .
CloudformationAttribute: LoadBalancerFullName
AttrLoadBalancerName
The name of the load balancer.
public virtual string AttrLoadBalancerName { get; }
Property Value
Remarks
For example, my-load-balancer .
CloudformationAttribute: LoadBalancerName
AttrSecurityGroups
The IDs of the security groups for the load balancer.
public virtual string[] AttrSecurityGroups { get; }
Property Value
string[]
Remarks
CloudformationAttribute: SecurityGroups
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
CfnProperties
Specifies an Application Load Balancer, a Network Load Balancer, or a Gateway Load Balancer.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
EnableCapacityReservationProvisionStabilize
Indicates whether to enable stabilization when creating or updating an LCU reservation.
public virtual object? EnableCapacityReservationProvisionStabilize { get; set; }
Property Value
Remarks
Type union: either bool or IResolvable
EnablePrefixForIpv6SourceNat
[Network Load Balancers with UDP listeners] Indicates whether to use an IPv6 prefix from each subnet for source NAT.
public virtual string? EnablePrefixForIpv6SourceNat { get; set; }
Property Value
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic
Indicates whether to evaluate inbound security group rules for traffic sent to a Network Load Balancer through AWS PrivateLink .
public virtual string? EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic { get; set; }
Property Value
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
IpAddressType
The IP address type.
public virtual string? IpAddressType { get; set; }
Property Value
Remarks
Internal load balancers must use ipv4 .
Ipv4IpamPoolId
The ID of the IPv4 IPAM pool.
public virtual string? Ipv4IpamPoolId { get; set; }
Property Value
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
LoadBalancerAttributes
The load balancer attributes.
public virtual object? LoadBalancerAttributes { get; set; }
Property Value
Remarks
Type union: either IResolvable or (either IResolvable or CfnLoadBalancer.ILoadBalancerAttributeProperty)[]
LoadBalancerRef
A reference to a LoadBalancer resource.
public virtual ILoadBalancerReference LoadBalancerRef { get; }
Property Value
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
MinimumLoadBalancerCapacity
The minimum capacity for a load balancer.
public virtual object? MinimumLoadBalancerCapacity { get; set; }
Property Value
Remarks
Type union: either IResolvable or CfnLoadBalancer.IMinimumLoadBalancerCapacityProperty
Name
The name of the load balancer.
public virtual string? Name { get; set; }
Property Value
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
Scheme
The nodes of an Internet-facing load balancer have public IP addresses.
public virtual string? Scheme { get; set; }
Property Value
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
SecurityGroups
[Application Load Balancers and Network Load Balancers] The IDs of the security groups for the load balancer.
public virtual string[]? SecurityGroups { get; set; }
Property Value
string[]
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
SubnetMappings
The IDs of the subnets.
public virtual object? SubnetMappings { get; set; }
Property Value
Remarks
Type union: either IResolvable or (either IResolvable or CfnLoadBalancer.ISubnetMappingProperty)[]
Subnets
The IDs of the subnets.
public virtual string[]? Subnets { get; set; }
Property Value
string[]
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
TagsRaw
The tags to assign to the load balancer.
public virtual ICfnTag[]? TagsRaw { get; set; }
Property Value
ICfnTag[]
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
Type
The type of load balancer.
public virtual string? Type { get; set; }
Property Value
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
Methods
ArnForLoadBalancer(ILoadBalancerRef)
Specifies an Application Load Balancer, a Network Load Balancer, or a Gateway Load Balancer.
public static string ArnForLoadBalancer(ILoadBalancerRef resource)
Parameters
- resource ILoadBalancerRef
Returns
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ElasticLoadBalancingV2;
var cfnLoadBalancer = new CfnLoadBalancer(this, "MyCfnLoadBalancer", new CfnLoadBalancerProps {
EnableCapacityReservationProvisionStabilize = false,
EnablePrefixForIpv6SourceNat = "enablePrefixForIpv6SourceNat",
EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic = "enforceSecurityGroupInboundRulesOnPrivateLinkTraffic",
IpAddressType = "ipAddressType",
Ipv4IpamPoolId = "ipv4IpamPoolId",
LoadBalancerAttributes = new [] { new LoadBalancerAttributeProperty {
Key = "key",
Value = "value"
} },
MinimumLoadBalancerCapacity = new MinimumLoadBalancerCapacityProperty {
CapacityUnits = 123
},
Name = "name",
Scheme = "scheme",
SecurityGroups = new [] { "securityGroups" },
SubnetMappings = new [] { new SubnetMappingProperty {
SubnetId = "subnetId",
// the properties below are optional
AllocationId = "allocationId",
IPv6Address = "iPv6Address",
PrivateIPv4Address = "privateIPv4Address",
SourceNatIpv6Prefix = "sourceNatIpv6Prefix"
} },
Subnets = new [] { "subnets" },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
Type = "type"
});
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
IsCfnLoadBalancer(object)
Checks whether the given object is a CfnLoadBalancer.
public static bool IsCfnLoadBalancer(object x)
Parameters
- x object
Returns
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
Specifies an Application Load Balancer, a Network Load Balancer, or a Gateway Load Balancer.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
CloudformationResource: AWS::ElasticLoadBalancingV2::LoadBalancer
ExampleMetadata: fixture=_generated