// To modify the deregistration delay timeout
//
// This example sets the deregistration delay timeout to the specified value for the
// specified target group.
To modify the deregistration delay timeout

This example sets the deregistration delay timeout to the specified value for the
specified target group.
// To modify the deregistration delay timeout // // This example sets the deregistration delay timeout to the specified value for the // specified target group .
func ExampleELBV2_ModifyTargetGroupAttributes_shared00() {
	svc := elbv2.New(session.New())
	input := &elbv2.ModifyTargetGroupAttributesInput{
		Attributes: []*elbv2.TargetGroupAttribute{
			{
				Key:   aws.String("deregistration_delay.timeout_seconds"),
				Value: aws.String("600"),
			},
		},
		TargetGroupArn: aws.String("arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067"),
	}
	result, err := svc.ModifyTargetGroupAttributes(input)
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case elbv2.ErrCodeTargetGroupNotFoundException:
				fmt.Println(elbv2.ErrCodeTargetGroupNotFoundException, aerr.Error())
			case elbv2.ErrCodeInvalidConfigurationRequestException:
				fmt.Println(elbv2.ErrCodeInvalidConfigurationRequestException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			fmt.Println(err.Error())
		}
		return
	}
	fmt.Println(result)
}
func ExampleELBV2_ModifyTargetGroupAttributes_shared00 ( ) { svc := elbv2 . New ( session . New ( ) ) input := & elbv2 . ModifyTargetGroupAttributesInput { Attributes : [ ] * elbv2 . TargetGroupAttribute { { Key : aws . String ( " " ) , Value : aws . String ( " " ) , } , } , TargetGroupArn : aws . String ( " " ) , } result , err := svc . ModifyTargetGroupAttributes ( input ) if err != nil { if aerr , ok := err . ( awserr . Error ) ; ok { switch aerr . Code ( ) { case elbv2 . ErrCodeTargetGroupNotFoundException : fmt . Println ( elbv2 . ErrCodeTargetGroupNotFoundException , aerr . Error ( ) ) case elbv2 . ErrCodeInvalidConfigurationRequestException : fmt . Println ( elbv2 . ErrCodeInvalidConfigurationRequestException , aerr . Error ( ) ) default : fmt . Println ( aerr . Error ( ) ) } } else { fmt . Println ( err . Error ( ) ) } return } fmt . Println ( result ) }
To modify the deregistration delay timeout
To modify the deregistration delay timeout
// Print the error, cast err to awserr.Error to get the Code and // Message from an error.