aws-sdk-go icon indicating copy to clipboard operation
aws-sdk-go copied to clipboard

aws-sdk-go/service/scheduler DeleteSchedule "ValidationException: ClientToken cannot be empty"

Open dontirun opened this issue 2 years ago • 3 comments

Describe the bug

Using the scheduler DeleteSchedule function without a ClientToken always results in ValidationException: ClientToken cannot be empty.

The DeleteSchedule Command should be auto generating a ClientToken when not specified.

Expected Behavior

The SDK generates a unique ClientToken for me instead of having to specify one

Current Behavior

Using this method without specifying the ClientToken produces a ValidationException.

Reproduction Steps

package main

import (
	"fmt"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/scheduler"
)

func main() {
	mySession := session.Must(session.NewSession())
	sch := scheduler.New(mySession)
	_, err := sch.DeleteSchedule(&scheduler.DeleteScheduleInput{Name: aws.String("foo")})
	if err != nil {
		fmt.Println(err)
	}
}

Possible Solution

No response

Additional Information/Context

Seems related to this https://github.com/aws/aws-sdk-js-v3/issues/4212

SDK version used

v1.44.185

Environment details (Version of Go (go version)? OS name and version, etc.)

go version go1.19 darwin/arm64

dontirun avatar Jan 24 '23 16:01 dontirun

Same error on DeleteScheduleGroup as well

dontirun avatar Jan 24 '23 17:01 dontirun

Thanks for the report. This appears to be a bug affecting both restJson and restXml protocols when the target field location is anything other than the body.

aajtodd avatar Jan 25 '23 18:01 aajtodd

@RanVaknin @aajtodd any update on this?

elia-bracci-hs avatar Oct 24 '23 12:10 elia-bracci-hs

Hi @dontirun ,

I apologize for not getting to this sooner. If this is still an issue with the Go SDK v2, please open a new issue there and we will take a look.

Thanks again, Ran~

RanVaknin avatar May 23 '24 20:05 RanVaknin

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar May 23 '24 20:05 github-actions[bot]