CfnTargetGroupPropsMixin
- class aws_cdk.mixins_preview.aws_vpclattice.mixins.CfnTargetGroupPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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:
- 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:
- 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
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- 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:
objectDescribes the health check configuration of a target group.
Health check configurations aren’t used for target groups of type
LAMBDAorALB.- 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 isHTTP/1.1orHTTP/2, specify a valid URI (for example,/path?query). The default path is/. Health checks are not supported if the protocol version isgRPC, however, you can chooseHTTP/1.1orHTTP/2and 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 areHTTPandHTTPS. The default isHTTP.protocol_version (
Optional[str]) – The protocol version used when performing health checks on targets. The possible protocol versions areHTTP1andHTTP2.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:
- 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.
- 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.
- 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.
- 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.
- matcher
The codes to use when checking for a successful response from a target.
- path
The destination for health checks on the targets.
If the protocol version is
HTTP/1.1orHTTP/2, specify a valid URI (for example,/path?query). The default path is/. Health checks are not supported if the protocol version isgRPC, however, you can chooseHTTP/1.1orHTTP/2and specify a valid URI.
- port
The port used when performing health checks on targets.
The default setting is the port that a target receives traffic on.
- protocol
The protocol used when performing health checks on targets.
The possible protocols are
HTTPandHTTPS. The default isHTTP.
- protocol_version
The protocol version used when performing health checks on targets.
The possible protocol versions are
HTTP1andHTTP2.
- 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.
MatcherProperty
- class CfnTargetGroupPropsMixin.MatcherProperty(*, http_code=None)
Bases:
objectDescribes 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:
- 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.
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:
objectDescribes 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 isLAMBDAorALB.ip_address_type (
Optional[str]) – The type of IP address used for the target group. Supported only if the target group type isIP. The default isIPV4. 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 isLAMBDA. The default isV1.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 isLAMBDA.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 isLAMBDA.protocol_version (
Optional[str]) – The protocol version. The default isHTTP1. Not supported if the target group type isLAMBDA. Default: - “HTTP1”vpc_identifier (
Optional[str]) – The ID of the VPC. Not supported if the target group type isLAMBDA.
- See:
- 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
LAMBDAorALB.
- ip_address_type
The type of IP address used for the target group.
Supported only if the target group type is
IP. The default isIPV4.
- 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 isV1.
- 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.
- 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.
- protocol_version
The protocol version.
The default is
HTTP1. Not supported if the target group type isLAMBDA.
- vpc_identifier
The ID of the VPC.
Not supported if the target group type is
LAMBDA.
TargetProperty
- class CfnTargetGroupPropsMixin.TargetProperty(*, id=None, port=None)
Bases:
objectDescribes a target.
- Parameters:
id (
Optional[str]) – The ID of the target. If the target group type isINSTANCE, this is an instance ID. If the target group type isIP, this is an IP address. If the target group type isLAMBDA, this is the ARN of a Lambda function. If the target group type isALB, 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:
- 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 isIP, this is an IP address. If the target group type isLAMBDA, this is the ARN of a Lambda function. If the target group type isALB, this is the ARN of an Application Load Balancer.
- port
The port on which the target is listening.
For HTTP, the default is 80. For HTTPS, the default is 443.