VPCLattice / Client / update_target_group
update_target_group#
- VPCLattice.Client.update_target_group(**kwargs)#
Updates the specified target group.
See also: AWS API Documentation
Request Syntax
response = client.update_target_group( healthCheck={ 'enabled': True|False, 'healthCheckIntervalSeconds': 123, 'healthCheckTimeoutSeconds': 123, 'healthyThresholdCount': 123, 'matcher': { 'httpCode': 'string' }, 'path': 'string', 'port': 123, 'protocol': 'HTTP'|'HTTPS', 'protocolVersion': 'HTTP1'|'HTTP2', 'unhealthyThresholdCount': 123 }, targetGroupIdentifier='string' )
- Parameters:
healthCheck (dict) –
[REQUIRED]
The health check configuration.
enabled (boolean) –
Indicates whether health checking is enabled.
healthCheckIntervalSeconds (integer) –
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.
healthCheckTimeoutSeconds (integer) –
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.
healthyThresholdCount (integer) –
The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.
matcher (dict) –
The codes to use when checking for a successful response from a target. These are called Success codes in the console.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
httpCode
.httpCode (string) –
The HTTP code to use when checking for a successful response from a target.
path (string) –
The destination for health checks on the targets. If the protocol version is
HTTP/1.1
orHTTP/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.1
orHTTP/2
and specify a valid URI.port (integer) –
The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.
protocol (string) –
The protocol used when performing health checks on targets. The possible protocols are
HTTP
andHTTPS
. The default isHTTP
.protocolVersion (string) –
The protocol version used when performing health checks on targets. The possible protocol versions are
HTTP1
andHTTP2
.unhealthyThresholdCount (integer) –
The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.
targetGroupIdentifier (string) –
[REQUIRED]
The ID or Amazon Resource Name (ARN) of the target group.
- Return type:
dict
- Returns:
Response Syntax
{ 'arn': 'string', 'config': { 'healthCheck': { 'enabled': True|False, 'healthCheckIntervalSeconds': 123, 'healthCheckTimeoutSeconds': 123, 'healthyThresholdCount': 123, 'matcher': { 'httpCode': 'string' }, 'path': 'string', 'port': 123, 'protocol': 'HTTP'|'HTTPS', 'protocolVersion': 'HTTP1'|'HTTP2', 'unhealthyThresholdCount': 123 }, 'ipAddressType': 'IPV4'|'IPV6', 'port': 123, 'protocol': 'HTTP'|'HTTPS', 'protocolVersion': 'HTTP1'|'HTTP2'|'GRPC', 'vpcIdentifier': 'string' }, 'id': 'string', 'name': 'string', 'status': 'CREATE_IN_PROGRESS'|'ACTIVE'|'DELETE_IN_PROGRESS'|'CREATE_FAILED'|'DELETE_FAILED', 'type': 'IP'|'LAMBDA'|'INSTANCE'|'ALB' }
Response Structure
(dict) –
arn (string) –
The Amazon Resource Name (ARN) of the target group.
config (dict) –
The target group configuration.
healthCheck (dict) –
The health check configuration.
enabled (boolean) –
Indicates whether health checking is enabled.
healthCheckIntervalSeconds (integer) –
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.
healthCheckTimeoutSeconds (integer) –
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.
healthyThresholdCount (integer) –
The number of consecutive successful health checks required before considering an unhealthy target healthy. The range is 2–10. The default is 5.
matcher (dict) –
The codes to use when checking for a successful response from a target. These are called Success codes in the console.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set:
httpCode
. If a client receives an unknown member it will setSDK_UNKNOWN_MEMBER
as the top level key, which maps to the name or tag of the unknown member. The structure ofSDK_UNKNOWN_MEMBER
is as follows:'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
httpCode (string) –
The HTTP code to use when checking for a successful response from a target.
path (string) –
The destination for health checks on the targets. If the protocol version is
HTTP/1.1
orHTTP/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.1
orHTTP/2
and specify a valid URI.port (integer) –
The port used when performing health checks on targets. The default setting is the port that a target receives traffic on.
protocol (string) –
The protocol used when performing health checks on targets. The possible protocols are
HTTP
andHTTPS
. The default isHTTP
.protocolVersion (string) –
The protocol version used when performing health checks on targets. The possible protocol versions are
HTTP1
andHTTP2
.unhealthyThresholdCount (integer) –
The number of consecutive failed health checks required before considering a target unhealthy. The range is 2–10. The default is 2.
ipAddressType (string) –
The type of IP address used for the target group. The possible values are
ipv4
andipv6
. This is an optional parameter. If not specified, the IP address type defaults toipv4
.port (integer) –
The port on which the targets are listening. For HTTP, the default is
80
. For HTTPS, the default is443
protocol (string) –
The protocol to use for routing traffic to the targets. Default is the protocol of a target group.
protocolVersion (string) –
The protocol version. Default value is
HTTP1
.vpcIdentifier (string) –
The ID of the VPC.
id (string) –
The ID of the target group.
name (string) –
The name of the target group.
status (string) –
The status.
type (string) –
The target group type.
Exceptions
VPCLattice.Client.exceptions.ValidationException
VPCLattice.Client.exceptions.ThrottlingException
VPCLattice.Client.exceptions.ResourceNotFoundException
VPCLattice.Client.exceptions.ConflictException
VPCLattice.Client.exceptions.InternalServerException