Skip to content

Commit

Permalink
Added Aws::IAM::User#exists?
Browse files Browse the repository at this point in the history
Fixes #840
  • Loading branch information
trevorrowe committed Jun 12, 2015
1 parent 53712d3 commit 63f5bf4
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Unreleased Changes
------------------

* Feature - Aws::IAM - Added `Aws::IAM::User#exists?`.

See [related GitHub issue #840](https://github.com/aws/aws-sdk-ruby/issues/840)

* Feature - REPL - Added a short-cut inside the `aws.rb` REPL
for accessing a resource from a client.

Expand Down
8 changes: 8 additions & 0 deletions aws-sdk-core/apis/iam/2010-05-08/resources-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1497,6 +1497,14 @@
}
}
},
"waiters": {
"Exists": {
"waiterName": "UserExists",
"params": [
{ "target": "UserName", "source": "identifier", "name": "Name" }
]
}
},
"has": {
"AccessKey": {
"resource": {
Expand Down
22 changes: 22 additions & 0 deletions aws-sdk-core/apis/iam/2010-05-08/waiters-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": 2,
"waiters": {
"UserExists": {
"delay": 1,
"operation": "GetUser",
"maxAttempts": 20,
"acceptors": [
{
"state": "success",
"matcher": "status",
"expected": 200
},
{
"state": "retry",
"matcher": "error",
"expected": "NoSuchEntity"
}
]
}
}
}
1 change: 1 addition & 0 deletions aws-sdk-core/lib/aws-sdk-core/iam.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
docs: "#{Aws::API_DIR}/iam/2010-05-08/docs-2.json",
paginators: "#{Aws::API_DIR}/iam/2010-05-08/paginators-1.json",
resources: "#{Aws::API_DIR}/iam/2010-05-08/resources-1.json",
waiters: "#{Aws::API_DIR}/iam/2010-05-08/waiters-2.json",
})

0 comments on commit 63f5bf4

Please sign in to comment.