aws / aws-sdk-go

AWS SDK for the Go programming language.
http://aws.amazon.com/sdk-for-go/
Apache License 2.0
8.64k stars 2.07k forks source link

kinesis CreateStream response is blank #392

Closed luck02 closed 9 years ago

luck02 commented 9 years ago

When I look at the code it looks intentional.

https://github.com/aws/aws-sdk-go/blob/master/service/kinesis/api.go

output = &CreateStreamOutput{}

Is this just waiting to be implemented or am I missing something fundamental.

IE should I be expecting a non-empty response? Or is the expected behaviour to check for an error and then poll till the stream is ready?

I'm having issues with the AWS console (unrelated to this) and can't see the stream in the console.

But, I can list streams / describe it after creating / deleting.

Response from CreateStream:
{

}

Response from deleteStream
{

}

Response from ListStreams
{
  HasMoreStreams: false,
  StreamNames: ["testStream"]
}
<nil>

Response From Describe stream
{
  StreamDescription: {
    HasMoreShards: false,
    Shards: [],
    StreamARN: "arn:aws:kinesis:us-east-1:99999999999:stream/testStream",
    StreamName: "testStream",
    StreamStatus: "DELETING"
  }
}
<nil>
jasdel commented 9 years ago

Hi @luck02 Correct CreateStreamt response is intentionally empty. Your code should poll for the stream's status to go from CREATING to ACTIVE.

Are you seeing issues with the stream's not becoming active?

luck02 commented 9 years ago

I'm seeing the stream become active, it's the empty response that's confusing me.

I think no response would be more intuitive.

jasdel commented 9 years ago

Thanks for the feedback @luck02. There are a few API operations which use empty structs as request input, or output response. The SDK keeps these structs around so that if optional fields are added in the future to these API operations the SDK would not need to make a breaking change to support them.

jasdel commented 9 years ago

@luck02 I'm going to close this issue since the empty responses are by design, so the SDK can support service APIs returning responses in the future without making breaking changes to the SDK. Please reopen if there is anything we can clarify or, more documentation that could be added.