We are excited to announce the developer preview of our new API documentation for AWS SDK for JavaScript v3. Please follow instructions on the landing page to leave us your feedback.
Protected
Modifies the specified attributes of the specified target group.
Use a bare-bones client and the command you need to make an API call.
import { ElasticLoadBalancingV2Client, ModifyTargetGroupAttributesCommand } from "@aws-sdk/client-elastic-load-balancing-v2"; // ES Modules import// const { ElasticLoadBalancingV2Client, ModifyTargetGroupAttributesCommand } = require("@aws-sdk/client-elastic-load-balancing-v2"); // CommonJS importconst client = new ElasticLoadBalancingV2Client(config);const input = { // ModifyTargetGroupAttributesInput TargetGroupArn: "STRING_VALUE", // required Attributes: [ // TargetGroupAttributes // required { // TargetGroupAttribute Key: "STRING_VALUE", Value: "STRING_VALUE", }, ],};const command = new ModifyTargetGroupAttributesCommand(input);const response = await client.send(command);// { // ModifyTargetGroupAttributesOutput// Attributes: [ // TargetGroupAttributes// { // TargetGroupAttribute// Key: "STRING_VALUE",// Value: "STRING_VALUE",// },// ],// };
ModifyTargetGroupAttributesCommandInput
ModifyTargetGroupAttributesCommandOutput
input
response
config
InvalidConfigurationRequestException (client fault)
The requested configuration is not valid.
TargetGroupNotFoundException (client fault)
The specified target group does not exist.
ElasticLoadBalancingV2ServiceException
Base exception class for all service exceptions from ElasticLoadBalancingV2 service.
To modify the deregistration delay timeout
// This example sets the deregistration delay timeout to the specified value for the specified target group.const input = { "Attributes": [ { "Key": "deregistration_delay.timeout_seconds", "Value": "600" } ], "TargetGroupArn": "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067"};const command = new ModifyTargetGroupAttributesCommand(input);const response = await client.send(command);/* response =={ "Attributes": [ { "Key": "stickiness.enabled", "Value": "false" }, { "Key": "deregistration_delay.timeout_seconds", "Value": "600" }, { "Key": "stickiness.type", "Value": "lb_cookie" }, { "Key": "stickiness.lb_cookie.duration_seconds", "Value": "86400" } ]}*/// example id: elbv2-modify-target-group-attributes-1
Readonly
Static
Modifies the specified attributes of the specified target group.
Example
Use a bare-bones client and the command you need to make an API call.
Param
ModifyTargetGroupAttributesCommandInput
Returns
ModifyTargetGroupAttributesCommandOutput
See
input
shape.response
shape.config
shape.Throws
InvalidConfigurationRequestException (client fault)
The requested configuration is not valid.
Throws
TargetGroupNotFoundException (client fault)
The specified target group does not exist.
Throws
ElasticLoadBalancingV2ServiceException
Base exception class for all service exceptions from ElasticLoadBalancingV2 service.
Example
To modify the deregistration delay timeout