-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Explain about AWS::CDK::Metadata * Explain about logical IDS versus physical names and add link * Add "What Next?" section in the end with suggested next steps * Other minor fixes. Reference: * Changed sidebar title from "Module Reference" to "Reference" * Reduced TOC depth to 1 Misc: * Changed Gitter URL * Extract a `context` topic from `environments`. * Refactored the versioning reporting section. Fixes #451
- Loading branch information
Elad Ben-Israel
authored
Aug 1, 2018
1 parent
e694db1
commit 4afaced
Showing
9 changed files
with
132 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
## AWS Cloud Development Kit for Javascript | ||
This module is part of the [AWS Cloud Development Kit](https://github.com/awslabs/aws-cdk) project. | ||
## AWS Cloud Development Kit Core Library | ||
|
||
This library includes the basic building blocks of | ||
the [AWS Cloud Development Kit](https://github.com/awslabs/aws-cdk) (AWS CDK). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,5 +43,6 @@ as shared class libraries. | |
logical-ids | ||
environments | ||
apps | ||
context | ||
assets | ||
applets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.. Copyright 2010-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 | ||
International License (the "License"). You may not use this file except in compliance with the | ||
License. A copy of the License is located at http://creativecommons.org/licenses/by-nc-sa/4.0/. | ||
This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
either express or implied. See the License for the specific language governing permissions and | ||
limitations under the License. | ||
.. _context: | ||
|
||
##################### | ||
Environmental Context | ||
##################### | ||
|
||
When you synthesize a stack to create a |CFN| template, the |cdk| might need information based on the | ||
environment (account and Region), such as the availability zones or AMIs available in the Region. | ||
To enable this feature, the |toolkit| uses *context providers*, | ||
and saves the context information into |cx-json| | ||
the first time you call |cx-synth-code|. | ||
|
||
The |cdk| currently supports the following context providers. | ||
|
||
:py:class:`AvailabilityZoneProvider <@aws-cdk/cdk.AvailabilityZoneProvider>` | ||
Use this provider to get the list of all supported availability zones in this environment. | ||
For example, the following code iterates over all of the AZs in the current environment. | ||
|
||
.. code:: js | ||
// "this" refers to a parent Construct | ||
const zones: string[] = new AvailabilityZoneProvider(this).availabilityZones; | ||
for (let zone of zones) { | ||
// do somethning for each zone! | ||
} | ||
:py:class:`SSMParameterProvider <@aws-cdk/cdk.SSMParameterProvider>` | ||
Use this provider to read values from the current Region's SSM parameter store. | ||
For example, the follow code returns the value of the 'my-awesome-value' key: | ||
|
||
.. code:: js | ||
const ami: string = new SSMParameterProvider(this).getString('my-awesome-value'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,5 +15,5 @@ Reference | |
######### | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:maxdepth: 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters