CfnTargetGroupPropsMixin

class aws_cdk.mixins_preview.aws_vpclattice.mixins.CfnTargetGroupPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates a target group.

A target group is a collection of targets, or compute resources, that run your application or service. A target group can only be used by a single service.

For more information, see Target groups in the Amazon VPC Lattice User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-vpclattice-targetgroup.html

CloudformationResource:

AWS::VpcLattice::TargetGroup

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_vpclattice import mixins as vpclattice_mixins

cfn_target_group_props_mixin = vpclattice_mixins.CfnTargetGroupPropsMixin(vpclattice_mixins.CfnTargetGroupMixinProps(
    config=vpclattice_mixins.CfnTargetGroupPropsMixin.TargetGroupConfigProperty(
        health_check=vpclattice_mixins.CfnTargetGroupPropsMixin.HealthCheckConfigProperty(
            enabled=False,
            health_check_interval_seconds=123,
            health_check_timeout_seconds=123,
            healthy_threshold_count=123,
            matcher=vpclattice_mixins.CfnTargetGroupPropsMixin.MatcherProperty(
                http_code="httpCode"
            ),
            path="path",
            port=123,
            protocol="protocol",
            protocol_version="protocolVersion",
            unhealthy_threshold_count=123
        ),
        ip_address_type="ipAddressType",
        lambda_event_structure_version="lambdaEventStructureVersion",
        port=123,
        protocol="protocol",
        protocol_version="protocolVersion",
        vpc_identifier="vpcIdentifier"
    ),
    name="name",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    targets=[vpclattice_mixins.CfnTargetGroupPropsMixin.TargetProperty(
        id="id",
        port=123
    )],
    type="type"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::VpcLattice::TargetGroup.

Parameters:
  • props (Union[CfnTargetGroupMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['config', 'name', 'tags', 'targets', 'type']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

HealthCheckConfigProperty

class CfnTargetGroupPropsMixin.HealthCheckConfigProperty(*, enabled=None, health_check_interval_seconds=None, health_check_timeout_seconds=None, healthy_threshold_count=None, matcher=None, path=None, port=None, protocol=None, protocol_version=None, unhealthy_threshold_count=None)

Bases: object

Describes the health check configuration of a target group.

Health check configurations aren’t used for target groups of type LAMBDA or ALB .

Parameters:
  • enabled (Union[bool, IResolvable, None]) – Indicates whether health checking is enabled.

  • health_check_interval_seconds (Union[int, float, None]) – The approximate amount of time, in seconds, between health checks of an individual target. The range is 5–300 seconds. The default is 30 seconds.

  • health_check_timeout_seconds (Union[int, float, None]) – The amount of time, in seconds, to wait before reporting a target as unhealthy. The range is 1–120 seconds. The default is 5 seconds.

  • healthy_threshold_count (Union[int, float, None]) – The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.

  • matcher (Union[IResolvable, MatcherProperty, Dict[str, Any], None]) – The codes to use when checking for a successful response from a target.

  • path (Optional[str]) – The destination for health checks on the targets. If the protocol version is HTTP/1.1 or HTTP/2 , specify a valid URI (for example, /path?query ). The default path is / . Health checks are not supported if the protocol version is gRPC , however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.

  • port (Union[int, float, None]) – The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.

  • protocol (Optional[str]) – The protocol used when performing health checks on targets. The possible protocols are HTTP and HTTPS . The default is HTTP .

  • protocol_version (Optional[str]) – The protocol version used when performing health checks on targets. The possible protocol versions are HTTP1 and HTTP2 .

  • unhealthy_threshold_count (Union[int, float, None]) – The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-healthcheckconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_vpclattice import mixins as vpclattice_mixins

health_check_config_property = vpclattice_mixins.CfnTargetGroupPropsMixin.HealthCheckConfigProperty(
    enabled=False,
    health_check_interval_seconds=123,
    health_check_timeout_seconds=123,
    healthy_threshold_count=123,
    matcher=vpclattice_mixins.CfnTargetGroupPropsMixin.MatcherProperty(
        http_code="httpCode"
    ),
    path="path",
    port=123,
    protocol="protocol",
    protocol_version="protocolVersion",
    unhealthy_threshold_count=123
)

Attributes

enabled

Indicates whether health checking is enabled.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-healthcheckconfig.html#cfn-vpclattice-targetgroup-healthcheckconfig-enabled

health_check_interval_seconds

The approximate amount of time, in seconds, between health checks of an individual target.

The range is 5–300 seconds. The default is 30 seconds.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-healthcheckconfig.html#cfn-vpclattice-targetgroup-healthcheckconfig-healthcheckintervalseconds

health_check_timeout_seconds

The amount of time, in seconds, to wait before reporting a target as unhealthy.

The range is 1–120 seconds. The default is 5 seconds.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-healthcheckconfig.html#cfn-vpclattice-targetgroup-healthcheckconfig-healthchecktimeoutseconds

healthy_threshold_count

The number of consecutive successful health checks required before considering an unhealthy target healthy.

The range is 2–10. The default is 5.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-healthcheckconfig.html#cfn-vpclattice-targetgroup-healthcheckconfig-healthythresholdcount

matcher

The codes to use when checking for a successful response from a target.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-healthcheckconfig.html#cfn-vpclattice-targetgroup-healthcheckconfig-matcher

path

The destination for health checks on the targets.

If the protocol version is HTTP/1.1 or HTTP/2 , specify a valid URI (for example, /path?query ). The default path is / . Health checks are not supported if the protocol version is gRPC , however, you can choose HTTP/1.1 or HTTP/2 and specify a valid URI.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-healthcheckconfig.html#cfn-vpclattice-targetgroup-healthcheckconfig-path

port

The port used when performing health checks on targets.

The default setting is the port that a target receives traffic on.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-healthcheckconfig.html#cfn-vpclattice-targetgroup-healthcheckconfig-port

protocol

The protocol used when performing health checks on targets.

The possible protocols are HTTP and HTTPS . The default is HTTP .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-healthcheckconfig.html#cfn-vpclattice-targetgroup-healthcheckconfig-protocol

protocol_version

The protocol version used when performing health checks on targets.

The possible protocol versions are HTTP1 and HTTP2 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-healthcheckconfig.html#cfn-vpclattice-targetgroup-healthcheckconfig-protocolversion

unhealthy_threshold_count

The number of consecutive failed health checks required before considering a target unhealthy.

The range is 2–10. The default is 2.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-healthcheckconfig.html#cfn-vpclattice-targetgroup-healthcheckconfig-unhealthythresholdcount

MatcherProperty

class CfnTargetGroupPropsMixin.MatcherProperty(*, http_code=None)

Bases: object

Describes the codes to use when checking for a successful response from a target for health checks.

Parameters:

http_code (Optional[str]) – The HTTP code to use when checking for a successful response from a target.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-matcher.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_vpclattice import mixins as vpclattice_mixins

matcher_property = vpclattice_mixins.CfnTargetGroupPropsMixin.MatcherProperty(
    http_code="httpCode"
)

Attributes

http_code

The HTTP code to use when checking for a successful response from a target.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-matcher.html#cfn-vpclattice-targetgroup-matcher-httpcode

TargetGroupConfigProperty

class CfnTargetGroupPropsMixin.TargetGroupConfigProperty(*, health_check=None, ip_address_type=None, lambda_event_structure_version=None, port=None, protocol=None, protocol_version=None, vpc_identifier=None)

Bases: object

Describes the configuration of a target group.

For more information, see Target groups in the Amazon VPC Lattice User Guide .

Parameters:
  • health_check (Union[IResolvable, HealthCheckConfigProperty, Dict[str, Any], None]) – The health check configuration. Not supported if the target group type is LAMBDA or ALB .

  • ip_address_type (Optional[str]) – The type of IP address used for the target group. Supported only if the target group type is IP . The default is IPV4 . Default: - “IPV4”

  • lambda_event_structure_version (Optional[str]) – The version of the event structure that your Lambda function receives. Supported only if the target group type is LAMBDA . The default is V1 .

  • port (Union[int, float, None]) – The port on which the targets are listening. For HTTP, the default is 80. For HTTPS, the default is 443. Not supported if the target group type is LAMBDA .

  • protocol (Optional[str]) – The protocol to use for routing traffic to the targets. The default is the protocol of the target group. Not supported if the target group type is LAMBDA .

  • protocol_version (Optional[str]) – The protocol version. The default is HTTP1 . Not supported if the target group type is LAMBDA . Default: - “HTTP1”

  • vpc_identifier (Optional[str]) – The ID of the VPC. Not supported if the target group type is LAMBDA .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-targetgroupconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_vpclattice import mixins as vpclattice_mixins

target_group_config_property = vpclattice_mixins.CfnTargetGroupPropsMixin.TargetGroupConfigProperty(
    health_check=vpclattice_mixins.CfnTargetGroupPropsMixin.HealthCheckConfigProperty(
        enabled=False,
        health_check_interval_seconds=123,
        health_check_timeout_seconds=123,
        healthy_threshold_count=123,
        matcher=vpclattice_mixins.CfnTargetGroupPropsMixin.MatcherProperty(
            http_code="httpCode"
        ),
        path="path",
        port=123,
        protocol="protocol",
        protocol_version="protocolVersion",
        unhealthy_threshold_count=123
    ),
    ip_address_type="ipAddressType",
    lambda_event_structure_version="lambdaEventStructureVersion",
    port=123,
    protocol="protocol",
    protocol_version="protocolVersion",
    vpc_identifier="vpcIdentifier"
)

Attributes

health_check

The health check configuration.

Not supported if the target group type is LAMBDA or ALB .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-targetgroupconfig.html#cfn-vpclattice-targetgroup-targetgroupconfig-healthcheck

ip_address_type

The type of IP address used for the target group.

Supported only if the target group type is IP . The default is IPV4 .

Default:
  • “IPV4”

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-targetgroupconfig.html#cfn-vpclattice-targetgroup-targetgroupconfig-ipaddresstype

lambda_event_structure_version

The version of the event structure that your Lambda function receives.

Supported only if the target group type is LAMBDA . The default is V1 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-targetgroupconfig.html#cfn-vpclattice-targetgroup-targetgroupconfig-lambdaeventstructureversion

port

The port on which the targets are listening.

For HTTP, the default is 80. For HTTPS, the default is 443. Not supported if the target group type is LAMBDA .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-targetgroupconfig.html#cfn-vpclattice-targetgroup-targetgroupconfig-port

protocol

The protocol to use for routing traffic to the targets.

The default is the protocol of the target group. Not supported if the target group type is LAMBDA .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-targetgroupconfig.html#cfn-vpclattice-targetgroup-targetgroupconfig-protocol

protocol_version

The protocol version.

The default is HTTP1 . Not supported if the target group type is LAMBDA .

Default:
  • “HTTP1”

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-targetgroupconfig.html#cfn-vpclattice-targetgroup-targetgroupconfig-protocolversion

vpc_identifier

The ID of the VPC.

Not supported if the target group type is LAMBDA .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-targetgroupconfig.html#cfn-vpclattice-targetgroup-targetgroupconfig-vpcidentifier

TargetProperty

class CfnTargetGroupPropsMixin.TargetProperty(*, id=None, port=None)

Bases: object

Describes a target.

Parameters:
  • id (Optional[str]) – The ID of the target. If the target group type is INSTANCE , this is an instance ID. If the target group type is IP , this is an IP address. If the target group type is LAMBDA , this is the ARN of a Lambda function. If the target group type is ALB , this is the ARN of an Application Load Balancer.

  • port (Union[int, float, None]) – The port on which the target is listening. For HTTP, the default is 80. For HTTPS, the default is 443.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-target.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_vpclattice import mixins as vpclattice_mixins

target_property = vpclattice_mixins.CfnTargetGroupPropsMixin.TargetProperty(
    id="id",
    port=123
)

Attributes

id

The ID of the target.

If the target group type is INSTANCE , this is an instance ID. If the target group type is IP , this is an IP address. If the target group type is LAMBDA , this is the ARN of a Lambda function. If the target group type is ALB , this is the ARN of an Application Load Balancer.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-target.html#cfn-vpclattice-targetgroup-target-id

port

The port on which the target is listening.

For HTTP, the default is 80. For HTTPS, the default is 443.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-vpclattice-targetgroup-target.html#cfn-vpclattice-targetgroup-target-port