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

Update resource model format. #51

Merged
merged 3 commits into from
Feb 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changelog
Unreleased
----------

* feature:Resources: Update to the latest resource JSON format.
(`issue 51 <https://github.com/boto/boto3/pull/51>`__)
* feature:Resources: Make ``resource.meta`` a proper object. This allows
you to do things like ``resource.meta.client``. This is a **backward-
incompatible** change.
Expand Down
75 changes: 55 additions & 20 deletions boto3/data/resources/cloudformation-2010-05-15.resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,25 @@
"resource": {
"type": "Stack",
"identifiers": [
{ "target": "Name", "sourceType": "requestParameter", "source": "StackName" }
{ "target": "Name", "source": "requestParameter", "path": "StackName" }
]
}
}
},
"has": {
"Event": {
"resource": {
"type": "Event",
"identifiers": [
{ "target": "Id", "source": "input" }
]
}
},
"Stack": {
"resource": {
"type": "Stack",
"identifiers": [
{ "target": "Name", "source": "input" }
]
}
}
Expand All @@ -17,7 +35,7 @@
"resource": {
"type": "Stack",
"identifiers": [
{ "target": "Name", "sourceType": "responsePath", "source": "Stacks[].StackName" }
{ "target": "Name", "source": "response", "path": "Stacks[].StackName" }
]
}
}
Expand All @@ -39,7 +57,7 @@
"request": {
"operation": "DescribeStacks",
"params": [
{ "target": "StackName", "sourceType": "identifier", "source": "Name" }
{ "target": "StackName", "source": "identifier", "name": "Name" }
]
},
"path": "Stacks[0]"
Expand All @@ -49,23 +67,34 @@
"request": {
"operation": "CancelUpdateStack",
"params": [
{ "target": "StackName", "sourceType": "identifier", "source": "Name" }
{ "target": "StackName", "source": "identifier", "name": "Name" }
]
}
},
"Delete": {
"request": {
"operation": "DeleteStack",
"params": [
{ "target": "StackName", "sourceType": "identifier", "source": "Name" }
{ "target": "StackName", "source": "identifier", "name": "Name" }
]
}
},
"Update": {
"request": {
"operation": "UpdateStack",
"params": [
{ "target": "StackName", "sourceType": "identifier", "source": "Name" }
{ "target": "StackName", "source": "identifier", "name": "Name" }
]
}
}
},
"has": {
"Resource": {
"resource": {
"type": "StackResource",
"identifiers": [
{ "target": "StackName", "source": "identifier", "name": "Name" },
{ "target": "StackName", "source": "input" }
]
}
}
Expand All @@ -75,13 +104,13 @@
"request": {
"operation": "DescribeStackEvents",
"params": [
{ "target": "StackName", "sourceType": "identifier", "source": "Name" }
{ "target": "StackName", "source": "identifier", "name": "Name" }
]
},
"resource": {
"type": "Event",
"identifiers": [
{ "target": "Id", "sourceType": "responsePath", "source": "StackEvents[].EventId" }
{ "target": "Id", "source": "response", "path": "StackEvents[].EventId" }
],
"path": "StackEvents[]"
}
Expand All @@ -90,22 +119,18 @@
"request": {
"operation": "ListStackResources",
"params": [
{ "target": "StackName", "sourceType": "identifier", "source": "Name" }
{ "target": "StackName", "source": "identifier", "name": "Name" }
]
},
"resource": {
"type": "StackResourceSummary",
"identifiers": [
{ "target": "LogicalId", "sourceType": "responsePath", "source": "StackResourceSummaries[].LogicalResourceId" },
{ "target": "StackName", "sourceType": "requestParameter", "source": "StackName" }
{ "target": "LogicalId", "source": "response", "path": "StackResourceSummaries[].LogicalResourceId" },
{ "target": "StackName", "source": "requestParameter", "path": "StackName" }
],
"path": "StackResourceSummaries[]"
}
}
},
"subResources": {
"resources": [ "StackResource" ],
"identifiers": { "Name": "StackName" }
}
},
"StackResource": {
Expand All @@ -118,11 +143,21 @@
"request": {
"operation": "DescribeStackResource",
"params": [
{ "target": "LogicalResourceId", "sourceType": "identifier", "source": "LogicalId" },
{ "target": "StackName", "sourceType": "identifier", "source": "StackName" }
{ "target": "LogicalResourceId", "source": "identifier", "name": "LogicalId" },
{ "target": "StackName", "source": "identifier", "name": "StackName" }
]
},
"path": "StackResourceDetail"
},
"has": {
"Stack": {
"resource": {
"type": "Stack",
"identifiers": [
{ "target": "Name", "source": "identifier", "name": "StackName" }
]
}
}
}
},
"StackResourceSummary": {
Expand All @@ -131,13 +166,13 @@
{ "name": "StackName" }
],
"shape": "StackResourceSummary",
"belongsTo": {
"has": {
"Resource": {
"resource": {
"type": "StackResource",
"identifiers": [
{ "target": "LogicalId", "sourceType": "identifier", "source": "LogicalId" },
{ "target": "StackName", "sourceType": "identifier", "source": "StackName" }
{ "target": "LogicalId", "source": "identifier", "name": "LogicalId" },
{ "target": "StackName", "source": "identifier", "name": "StackName" }
]
}
}
Expand Down
Loading