Show / Hide Table of Contents

Class CfnLoadBalancer

Specifies a Classic Load Balancer.

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnLoadBalancer
Implements
IInspectable
ITaggable
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
Namespace: Amazon.CDK.AWS.ElasticLoadBalancing
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnLoadBalancer : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnLoadBalancer Inherits CfnResource Implements IInspectable, ITaggable
Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::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.ElasticLoadBalancing;

             var attributes;

             var cfnLoadBalancer = new CfnLoadBalancer(this, "MyCfnLoadBalancer", new CfnLoadBalancerProps {
                 Listeners = new [] { new ListenersProperty {
                     InstancePort = "instancePort",
                     LoadBalancerPort = "loadBalancerPort",
                     Protocol = "protocol",

                     // the properties below are optional
                     InstanceProtocol = "instanceProtocol",
                     PolicyNames = new [] { "policyNames" },
                     SslCertificateId = "sslCertificateId"
                 } },

                 // the properties below are optional
                 AccessLoggingPolicy = new AccessLoggingPolicyProperty {
                     Enabled = false,
                     S3BucketName = "s3BucketName",

                     // the properties below are optional
                     EmitInterval = 123,
                     S3BucketPrefix = "s3BucketPrefix"
                 },
                 AppCookieStickinessPolicy = new [] { new AppCookieStickinessPolicyProperty {
                     CookieName = "cookieName",
                     PolicyName = "policyName"
                 } },
                 AvailabilityZones = new [] { "availabilityZones" },
                 ConnectionDrainingPolicy = new ConnectionDrainingPolicyProperty {
                     Enabled = false,

                     // the properties below are optional
                     Timeout = 123
                 },
                 ConnectionSettings = new ConnectionSettingsProperty {
                     IdleTimeout = 123
                 },
                 CrossZone = false,
                 HealthCheck = new HealthCheckProperty {
                     HealthyThreshold = "healthyThreshold",
                     Interval = "interval",
                     Target = "target",
                     Timeout = "timeout",
                     UnhealthyThreshold = "unhealthyThreshold"
                 },
                 Instances = new [] { "instances" },
                 LbCookieStickinessPolicy = new [] { new LBCookieStickinessPolicyProperty {
                     CookieExpirationPeriod = "cookieExpirationPeriod",
                     PolicyName = "policyName"
                 } },
                 LoadBalancerName = "loadBalancerName",
                 Policies = new [] { new PoliciesProperty {
                     Attributes = new [] { attributes },
                     PolicyName = "policyName",
                     PolicyType = "policyType",

                     // the properties below are optional
                     InstancePorts = new [] { "instancePorts" },
                     LoadBalancerPorts = new [] { "loadBalancerPorts" }
                 } },
                 Scheme = "scheme",
                 SecurityGroups = new [] { "securityGroups" },
                 Subnets = new [] { "subnets" },
                 Tags = new [] { new CfnTag {
                     Key = "key",
                     Value = "value"
                 } }
             });

Synopsis

Constructors

CfnLoadBalancer(Construct, string, ICfnLoadBalancerProps)

Specifies a Classic Load Balancer.

Properties

AccessLoggingPolicy

Information about where and how access logs are stored for the load balancer.

AppCookieStickinessPolicy

Information about a policy for application-controlled session stickiness.

AttrCanonicalHostedZoneName

The name of the Route 53 hosted zone that is associated with the load balancer.

AttrCanonicalHostedZoneNameId

The ID of the Route 53 hosted zone name that is associated with the load balancer.

AttrDnsName

The DNS name for the load balancer.

AttrId

Specifies a Classic Load Balancer.

AttrSourceSecurityGroupGroupName

The name of the security group that you can use as part of your inbound rules for your load balancer's back-end instances.

AttrSourceSecurityGroupOwnerAlias

The owner of the source security group.

AvailabilityZones

The Availability Zones for a load balancer in a default VPC.

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

CfnProperties

Specifies a Classic Load Balancer.

ConnectionDrainingPolicy

If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy instance.

ConnectionSettings

If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration.

CrossZone

If enabled, the load balancer routes the request traffic evenly across all instances regardless of the Availability Zones.

HealthCheck

The health check settings to use when evaluating the health of your EC2 instances.

Instances

The IDs of the instances for the load balancer.

LbCookieStickinessPolicy

Information about a policy for duration-based session stickiness.

Listeners

The listeners for the load balancer.

LoadBalancerName

The name of the load balancer.

Policies

The policies defined for your Classic Load Balancer.

Scheme

The type of load balancer.

SecurityGroups

The security groups for the load balancer.

Subnets

The IDs of the subnets for the load balancer.

Tags

Tag Manager which manages the tags for this resource.

TagsRaw

The tags associated with a load balancer.

Methods

Inspect(TreeInspector)

Examines the CloudFormation resource and discloses attributes.

RenderProperties(IDictionary<string, object>)

Specifies a Classic Load Balancer.

Constructors

CfnLoadBalancer(Construct, string, ICfnLoadBalancerProps)

Specifies a Classic Load Balancer.

public CfnLoadBalancer(Construct scope, string id, ICfnLoadBalancerProps props)
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

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

Properties

AccessLoggingPolicy

Information about where and how access logs are stored for the load balancer.

public virtual object? AccessLoggingPolicy { get; set; }
Property Value

object

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

AppCookieStickinessPolicy

Information about a policy for application-controlled session stickiness.

public virtual object? AppCookieStickinessPolicy { get; set; }
Property Value

object

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

AttrCanonicalHostedZoneName

The name of the Route 53 hosted zone that is associated with the load balancer.

public virtual string AttrCanonicalHostedZoneName { get; }
Property Value

string

Remarks

Internal-facing load balancers don't use this value, use DNSName instead.

CloudformationAttribute: CanonicalHostedZoneName

AttrCanonicalHostedZoneNameId

The ID of the Route 53 hosted zone name that is associated with the load balancer.

public virtual string AttrCanonicalHostedZoneNameId { get; }
Property Value

string

Remarks

CloudformationAttribute: CanonicalHostedZoneNameID

AttrDnsName

The DNS name for the load balancer.

public virtual string AttrDnsName { get; }
Property Value

string

Remarks

CloudformationAttribute: DNSName

AttrId

Specifies a Classic Load Balancer.

public virtual string AttrId { get; }
Property Value

string

Remarks

CloudformationAttribute: Id

AttrSourceSecurityGroupGroupName

The name of the security group that you can use as part of your inbound rules for your load balancer's back-end instances.

public virtual string AttrSourceSecurityGroupGroupName { get; }
Property Value

string

Remarks

CloudformationAttribute: SourceSecurityGroup.GroupName

AttrSourceSecurityGroupOwnerAlias

The owner of the source security group.

public virtual string AttrSourceSecurityGroupOwnerAlias { get; }
Property Value

string

Remarks

CloudformationAttribute: SourceSecurityGroup.OwnerAlias

AvailabilityZones

The Availability Zones for a load balancer in a default VPC.

public virtual string[]? AvailabilityZones { get; set; }
Property Value

string[]

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

CFN_RESOURCE_TYPE_NAME

The CloudFormation resource type name for this resource class.

public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value

string

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

CfnProperties

Specifies a Classic Load Balancer.

protected override IDictionary<string, object> CfnProperties { get; }
Property Value

IDictionary<string, object>

Overrides
CfnResource.CfnProperties
Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

ConnectionDrainingPolicy

If enabled, the load balancer allows existing requests to complete before the load balancer shifts traffic away from a deregistered or unhealthy instance.

public virtual object? ConnectionDrainingPolicy { get; set; }
Property Value

object

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

ConnectionSettings

If enabled, the load balancer allows the connections to remain idle (no data is sent over the connection) for the specified duration.

public virtual object? ConnectionSettings { get; set; }
Property Value

object

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

CrossZone

If enabled, the load balancer routes the request traffic evenly across all instances regardless of the Availability Zones.

public virtual object? CrossZone { get; set; }
Property Value

object

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

HealthCheck

The health check settings to use when evaluating the health of your EC2 instances.

public virtual object? HealthCheck { get; set; }
Property Value

object

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

Instances

The IDs of the instances for the load balancer.

public virtual string[]? Instances { get; set; }
Property Value

string[]

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

LbCookieStickinessPolicy

Information about a policy for duration-based session stickiness.

public virtual object? LbCookieStickinessPolicy { get; set; }
Property Value

object

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

Listeners

The listeners for the load balancer.

public virtual object Listeners { get; set; }
Property Value

object

Remarks

You can specify at most one listener per port.

LoadBalancerName

The name of the load balancer.

public virtual string? LoadBalancerName { get; set; }
Property Value

string

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

Policies

The policies defined for your Classic Load Balancer.

public virtual object? Policies { get; set; }
Property Value

object

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

Scheme

The type of load balancer.

public virtual string? Scheme { get; set; }
Property Value

string

Remarks

Valid only for load balancers in a VPC.

SecurityGroups

The security groups for the load balancer.

public virtual string[]? SecurityGroups { get; set; }
Property Value

string[]

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

Subnets

The IDs of the subnets for the load balancer.

public virtual string[]? Subnets { get; set; }
Property Value

string[]

Remarks

You can specify at most one subnet per Availability Zone.

Tags

Tag Manager which manages the tags for this resource.

public virtual TagManager Tags { get; }
Property Value

TagManager

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

TagsRaw

The tags associated with a load balancer.

public virtual ICfnTag[]? TagsRaw { get; set; }
Property Value

ICfnTag[]

Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

Methods

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

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

RenderProperties(IDictionary<string, object>)

Specifies a Classic Load Balancer.

protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props IDictionary<string, object>
Returns

IDictionary<string, object>

Overrides
CfnResource.RenderProperties(IDictionary<string, object>)
Remarks

If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn attribute to declare a dependency on the VPC-gateway attachment.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancing-loadbalancer.html

CloudformationResource: AWS::ElasticLoadBalancing::LoadBalancer

ExampleMetadata: fixture=_generated

Implements

IInspectable
ITaggable
Back to top Generated by DocFX