Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpsWorks describeStacks for all stacks throws validation exception #77

Closed
brewsteropsdev opened this issue May 30, 2013 · 4 comments
Closed

Comments

@brewsteropsdev
Copy link

A DescribeStacksRequest describeStacks call with no ID's specified throws a validation error. Per the [API](http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/opsworks/model/DescribeStacksRequest.html#withStackIds(java.lang.String...), omitting the withStackIds() parameter should return a description of all stacks.

List result = opsWorksClient.describeStacks(new DescribeStacksRequest()).getStacks();

Exception in thread "main" ValidationException: Status Code: 400, AWS Service: AWSOpsWorks, AWS Request ID: 45957802-c956-11e2-bd64-95797b8784fd, AWS Error Code: ValidationException, AWS Error Message: Please provide no arguments or, one or more stack IDs
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:653)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:347)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:199)
at com.amazonaws.services.opsworks.AWSOpsWorksClient.invoke(AWSOpsWorksClient.java:2039)
at com.amazonaws.services.opsworks.AWSOpsWorksClient.describeStacks(AWSOpsWorksClient.java:1686)

And:

List result = opsWorksClient.describeStacks(new DescribeStacksRequest().withStackIds()).getStacks();

Exception in thread "main" ValidationException: Status Code: 400, AWS Service: AWSOpsWorks, AWS Request ID: 1e5777d7-c958-11e2-9f24-eb40b9de1b03, AWS Error Code: ValidationException, AWS Error Message: Please provide no arguments or, one or more stack IDs
at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:653)
at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:347)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:199)
at com.amazonaws.services.opsworks.AWSOpsWorksClient.invoke(AWSOpsWorksClient.java:2039)
at com.amazonaws.services.opsworks.AWSOpsWorksClient.describeStacks(AWSOpsWorksClient.java:1686)
@yifeireplay
Copy link

Hi, Mbrewster,

Thanks for reporting it. For some reason, we do not have the API describeStacks(). I have reported your issue to the AWS Opsworks team. I will let you when there is any update.

thanks,

Yifei

@brewsteropsdev
Copy link
Author

Thanks Yifei,

As a follow-on I tested the above code against the 1.4.3 API and it seems to work. Looks like it must be a regression bug.

Thanks,

Matt

@yifeireplay
Copy link

Hi, Matt,

The issue has been fixed in AWS Java SDK 1.4.6 which was release today.
Thanks again for your report and help.

Yifei

@brewsteropsdev
Copy link
Author

Thanks Yifei! Have tested and is working against 1.4.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants