Class CfnTargetGroup
Specifies a target group for 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 CfnTargetGroup : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnTargetGroup
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
Before you register a Lambda function as a target, you must create a AWS::Lambda::Permission
resource that grants the Elastic Load Balancing service principal permission to invoke the Lambda function.
CloudformationResource: AWS::ElasticLoadBalancingV2::TargetGroup
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 cfnTargetGroup = new CfnTargetGroup(this, "MyCfnTargetGroup", new CfnTargetGroupProps {
HealthCheckEnabled = false,
HealthCheckIntervalSeconds = 123,
HealthCheckPath = "healthCheckPath",
HealthCheckPort = "healthCheckPort",
HealthCheckProtocol = "healthCheckProtocol",
HealthCheckTimeoutSeconds = 123,
HealthyThresholdCount = 123,
IpAddressType = "ipAddressType",
Matcher = new MatcherProperty {
GrpcCode = "grpcCode",
HttpCode = "httpCode"
},
Name = "name",
Port = 123,
Protocol = "protocol",
ProtocolVersion = "protocolVersion",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TargetGroupAttributes = new [] { new TargetGroupAttributeProperty {
Key = "key",
Value = "value"
} },
Targets = new [] { new TargetDescriptionProperty {
Id = "id",
// the properties below are optional
AvailabilityZone = "availabilityZone",
Port = 123
} },
TargetType = "targetType",
UnhealthyThresholdCount = 123,
VpcId = "vpcId"
});
Synopsis
Constructors
CfnTargetGroup(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnTargetGroup(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnTargetGroup(Construct, String, ICfnTargetGroupProps) |
Properties
AttrLoadBalancerArns | The Amazon Resource Name (ARN) of the load balancer that routes traffic to this target group. |
AttrTargetGroupArn | The Amazon Resource Name (ARN) of the target group. |
AttrTargetGroupFullName | The full name of the target group. |
AttrTargetGroupName | The name of the target group. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
HealthCheckEnabled | Indicates whether health checks are enabled. |
HealthCheckIntervalSeconds | The approximate amount of time, in seconds, between health checks of an individual target. |
HealthCheckPath | [HTTP/HTTPS health checks] The destination for health checks on the targets. |
HealthCheckPort | The port the load balancer uses when performing health checks on targets. |
HealthCheckProtocol | The protocol the load balancer uses when performing health checks on targets. |
HealthCheckTimeoutSeconds | The amount of time, in seconds, during which no response from a target means a failed health check. |
HealthyThresholdCount | The number of consecutive health check successes required before considering a target healthy. |
IpAddressType | The type of IP address used for this target group. |
Matcher | [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target. |
Name | The name of the target group. |
Port | The port on which the targets receive traffic. |
Protocol | The protocol to use for routing traffic to the targets. |
ProtocolVersion | [HTTP/HTTPS protocol] The protocol version. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | The tags. |
TargetGroupAttributes | The attributes. |
Targets | The targets. |
TargetType | The type of target that you must specify when registering targets with this target group. |
UnhealthyThresholdCount | The number of consecutive health check failures required before considering a target unhealthy. |
VpcId | The identifier of the virtual private cloud (VPC). |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnTargetGroup(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnTargetGroup(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnTargetGroup(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnTargetGroup(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnTargetGroup(Construct, String, ICfnTargetGroupProps)
public CfnTargetGroup(Construct scope, string id, ICfnTargetGroupProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnTargetGroupProps
Resource properties.
Properties
AttrLoadBalancerArns
The Amazon Resource Name (ARN) of the load balancer that routes traffic to this target group.
public virtual string[] AttrLoadBalancerArns { get; }
Property Value
System.String[]
Remarks
CloudformationAttribute: LoadBalancerArns
AttrTargetGroupArn
The Amazon Resource Name (ARN) of the target group.
public virtual string AttrTargetGroupArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: TargetGroupArn
AttrTargetGroupFullName
The full name of the target group.
public virtual string AttrTargetGroupFullName { get; }
Property Value
System.String
Remarks
For example, targetgroup/my-target-group/cbf133c568e0d028
.
CloudformationAttribute: TargetGroupFullName
AttrTargetGroupName
The name of the target group.
public virtual string AttrTargetGroupName { get; }
Property Value
System.String
Remarks
For example, my-target-group
.
CloudformationAttribute: TargetGroupName
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
HealthCheckEnabled
Indicates whether health checks are enabled.
public virtual object HealthCheckEnabled { get; set; }
Property Value
System.Object
HealthCheckIntervalSeconds
The approximate amount of time, in seconds, between health checks of an individual target.
public virtual Nullable<double> HealthCheckIntervalSeconds { get; set; }
Property Value
System.Nullable<System.Double>
HealthCheckPath
[HTTP/HTTPS health checks] The destination for health checks on the targets.
public virtual string HealthCheckPath { get; set; }
Property Value
System.String
HealthCheckPort
The port the load balancer uses when performing health checks on targets.
public virtual string HealthCheckPort { get; set; }
Property Value
System.String
HealthCheckProtocol
The protocol the load balancer uses when performing health checks on targets.
public virtual string HealthCheckProtocol { get; set; }
Property Value
System.String
HealthCheckTimeoutSeconds
The amount of time, in seconds, during which no response from a target means a failed health check.
public virtual Nullable<double> HealthCheckTimeoutSeconds { get; set; }
Property Value
System.Nullable<System.Double>
HealthyThresholdCount
The number of consecutive health check successes required before considering a target healthy.
public virtual Nullable<double> HealthyThresholdCount { get; set; }
Property Value
System.Nullable<System.Double>
IpAddressType
The type of IP address used for this target group.
public virtual string IpAddressType { get; set; }
Property Value
System.String
Matcher
[HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a successful response from a target.
public virtual object Matcher { get; set; }
Property Value
System.Object
Name
The name of the target group.
public virtual string Name { get; set; }
Property Value
System.String
Port
The port on which the targets receive traffic.
public virtual Nullable<double> Port { get; set; }
Property Value
System.Nullable<System.Double>
Protocol
The protocol to use for routing traffic to the targets.
public virtual string Protocol { get; set; }
Property Value
System.String
ProtocolVersion
[HTTP/HTTPS protocol] The protocol version.
public virtual string ProtocolVersion { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
TargetGroupAttributes
The attributes.
public virtual object TargetGroupAttributes { get; set; }
Property Value
System.Object
Targets
The targets.
public virtual object Targets { get; set; }
Property Value
System.Object
TargetType
The type of target that you must specify when registering targets with this target group.
public virtual string TargetType { get; set; }
Property Value
System.String
UnhealthyThresholdCount
The number of consecutive health check failures required before considering a target unhealthy.
public virtual Nullable<double> UnhealthyThresholdCount { get; set; }
Property Value
System.Nullable<System.Double>
VpcId
The identifier of the virtual private cloud (VPC).
public virtual string VpcId { get; set; }
Property Value
System.String
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.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>