Modifies the specified attributes of the specified target group.
Parameters:
Raises:
Examples:
To modify the deregistration delay timeout
This example sets the deregistration delay timeout to the specified value for the specified target group.
>>> await client.modify_target_group_attributes(target_group_arn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', attributes=[{'Key': 'deregistration_delay.timeout_seconds', 'Value': '600'}])
Source code in docs_src/capo_elastic_load_balancing_v2/_services/async_elastic_load_balancingv2.py
| async def modify_target_group_attributes(
self,
*,
config_overrides: Optional[AsyncElasticLoadBalancingv2ClientConfig] = None,
target_group_arn: Optional[
"capo_elastic_load_balancing_v2.types.target_group_arn.TargetGroupArn"
] = None,
attributes: Optional[
"capo_elastic_load_balancing_v2.types.target_group_attributes.TargetGroupAttributes"
] = None,
) -> "capo_elastic_load_balancing_v2.types.modify_target_group_attributes_output.ModifyTargetGroupAttributesOutput":
"""<p>Modifies the specified attributes of the specified target group.</p>
Args:
target_group_arn: <p>The Amazon Resource Name (ARN) of the target group.</p>
attributes: <p>The target group attributes.</p>
Raises:
capo_elastic_load_balancing_v2.errors.invalid_configuration_request_exception.InvalidConfigurationRequestException: <p>The requested configuration is not valid.</p>
capo_elastic_load_balancing_v2.errors.target_group_not_found_exception.TargetGroupNotFoundException: <p>The specified target group does not exist.</p>
capo_elastic_load_balancing_v2.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To modify the deregistration delay timeout
This example sets the deregistration delay timeout to the specified value for the specified target group.
>>> await client.modify_target_group_attributes(target_group_arn='arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067', attributes=[{'Key': 'deregistration_delay.timeout_seconds', 'Value': '600'}])
"""
async def _handler(
req: "AsyncOperationRequest[capo_elastic_load_balancing_v2.types.modify_target_group_attributes_input.ModifyTargetGroupAttributesInput]",
) -> AsyncOperationResponse[
"capo_elastic_load_balancing_v2.types.modify_target_group_attributes_output.ModifyTargetGroupAttributesOutput"
]:
import capo_elastic_load_balancing_v2._operations.elastic_load_balancing_v10.modify_target_group_attributes
(
output,
http_response,
) = await capo_elastic_load_balancing_v2._operations.elastic_load_balancing_v10.modify_target_group_attributes.async_modify_target_group_attributes(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ModifyTargetGroupAttributes")
)
input_: capo_elastic_load_balancing_v2.types.modify_target_group_attributes_input.ModifyTargetGroupAttributesInput = {}
if target_group_arn is not None:
input_["target_group_arn"] = target_group_arn
if attributes is not None:
input_["attributes"] = attributes
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|