Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
New CLI examples (aws#6520)
Browse files Browse the repository at this point in the history
  • Loading branch information
elysahall authored Nov 5, 2021
1 parent 6591f76 commit 39d765a
Show file tree
Hide file tree
Showing 108 changed files with 2,490 additions and 1,099 deletions.
17 changes: 17 additions & 0 deletions awscli/examples/appconfig/create-application.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**To create an application**

The following ``create-application`` example creates an application in AWS AppConfig. ::

aws appconfig create-application \
--name "example-application" \
--description "An application used for creating an example."

Output::

{
"Description": "An application used for creating an example.",
"Id": "339ohji",
"Name": "example-application"
}

For more information, see `Step 1: Creating an AWS AppConfig application <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-application.html>`__ in the *AWS AppConfig User Guide*.
24 changes: 24 additions & 0 deletions awscli/examples/appconfig/create-configuration-profile.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**To create a configuration profile**

The following ``create-configuration-profile`` example creates a configuration profile using a configuration stored in Parameter Store, a capability of Systems Manager. ::

aws appconfig create-configuration-profile \
--application-id "339ohji" \
--name "Example-Configuration-Profile" \
--location-uri "ssm-parameter://Example-Parameter" \
--retrieval-role-arn "arn:aws:iam::111122223333:role/Example-App-Config-Role"

Output::

{
"ApplicationId": "339ohji",
"Description": null,
"Id": "ur8hx2f",
"LocationUri": "ssm-parameter://Example-Parameter",
"Name": "Example-Configuration-Profile",
"RetrievalRoleArn": "arn:aws:iam::111122223333:role/Example-App-Config-Role",
"Type": null,
"Validators": null
}

For more information, see `Step 3: Creating a configuration and a configuration profile <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-configuration-and-profile.html>`__ in the *AWS AppConfig User Guide*.
20 changes: 20 additions & 0 deletions awscli/examples/appconfig/create-environment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
**To create an environment**

The following ``create-environment`` example creates an AWS AppConfig environment named Example-Environment using the application you created using create-application. ::

aws appconfig create-environment \
--application-id "339ohji" \
--name "Example-Environment"

Output::

{
"ApplicationId": "339ohji",
"Description": null,
"Id": "54j1r29",
"Monitors": null,
"Name": "Example-Environment",
"State": "ReadyForDeployment"
}

For more information, see `Step 2: Creating an environment <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html>`__ in the *AWS AppConfig User Guide*.
26 changes: 26 additions & 0 deletions awscli/examples/appconfig/create-hosted-configuration-version.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
**To create a hosted configuration version**

The following ``create-hosted-configuration-version`` example creates a new configuration in the AWS AppConfig hosted configuration store. The configuration content must first be converted to base64. ::

aws appconfig create-hosted-configuration-version \
--application-id "339ohji" \
--configuration-profile-id "ur8hx2f" \
--content eyAiTmFtZSI6ICJFeGFtcGxlQXBwbGljYXRpb24iLCAiSWQiOiBFeGFtcGxlSUQsICJSYW5rIjogNyB9 \
--content-type "application/json" \
configuration_version_output_file

Contents of ``configuration_version_output_file``::

{ "Name": "ExampleApplication", "Id": ExampleID, "Rank": 7 }

Output::

{
"ApplicationId": "339ohji",
"ConfigurationProfileId": "ur8hx2f",
"VersionNumber": "1",
"ContentType": "application/json"
}


For more information, see `About the AWS AppConfig hosted configuration store <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-configuration-and-profile.html#appconfig-creating-configuration-and-profile-about-hosted-store>`__ in the *AWS Appconfig User Guide*.
10 changes: 10 additions & 0 deletions awscli/examples/appconfig/delete-application.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
**To delete an application**

The following ``delete-application`` example deletes the specified application. ::

aws appconfig delete-application \
--application-id 339ohji

This command produces no output.

For more information, see `Step 1: Creating an AWS AppConfig application <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-application.html>`__ in the *AWS AppConfig User Guide*.
11 changes: 11 additions & 0 deletions awscli/examples/appconfig/delete-configuration-profile.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**To delete a configuration profile**

The following ``delete-configuration-profile`` example deletes the specified configuration profile. ::

aws appconfig delete-configuration-profile \
--application-id 339ohji \
--configuration-profile-id ur8hx2f

This command produces no output.

For more information, see `Step 3: Creating a configuration and a configuration profile <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-configuration-and-profile.html>`__ in the *AWS AppConfig User Guide*.
10 changes: 10 additions & 0 deletions awscli/examples/appconfig/delete-deployment-strategy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
**To delete a deployment strategy**

The following ``delete-deployment-strategy`` example deletes the specified deployment strategy. ::

aws appconfig delete-deployment-strategy \
--deployment-strategy-id 1225qzk

This command produces no output.

For more information, see `Step 4: Creating a deployment strategy <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-deployment-strategy.html>`__ in the *AWS AppConfig User Guide*.
11 changes: 11 additions & 0 deletions awscli/examples/appconfig/delete-environment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**To delete an environment**

The following ``delete-environment`` example deletes the specified application environment. ::

aws appconfig delete-environment \
--application-id 339ohji \
--environment-id 54j1r29

This command produces no output.

For more information, see `Step 2: Creating an environment <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html>`__ in the *AWS AppConfig User Guide*.
13 changes: 13 additions & 0 deletions awscli/examples/appconfig/delete-hosted-configuration-version.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**To delete a hosted configuration version**

The following ``delete-hosted-configuration-version`` example deletes a configuration version hosted in the AWS AppConfig hosted configuration store. ::

aws appconfig delete-hosted-configuration-version \
--application-id 339ohji \
--configuration-profile-id ur8hx2f \
--version-number 1

Output::
This command produces no output.

For more information, see `Step 3: Creating a configuration and a configuration profile <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-configuration-and-profile.html>`__ in the *AWS AppConfig User Guide*.
16 changes: 16 additions & 0 deletions awscli/examples/appconfig/get-application.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
**To list details of an application**

The following ``get-application`` example lists the details of the specified application. ::

aws appconfig get-application \
--application-id 339ohji

Output::

{
"Description": "An application used for creating an example.",
"Id": "339ohji",
"Name": "example-application"
}

For more information, see `How AWS AppConfig works <https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html#learn-more-appconfig-how-it-works>`__ in the *AWS AppConfig User Guide*.
19 changes: 19 additions & 0 deletions awscli/examples/appconfig/get-configuration-profile.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
**To retrieve configuration profile details**

The following ``get-configuration-profile`` example returns the details of the specified configuration profile. ::

aws appconfig get-configuration-profile \
--application-id 339ohji \
--configuration-profile-id ur8hx2f

Output::

{
"ApplicationId": "339ohji",
"Id": "ur8hx2f",
"Name": "Example-Configuration-Profile",
"LocationUri": "ssm-parameter://Example-Parameter",
"RetrievalRoleArn": "arn:aws:iam::111122223333:role/Example-App-Config-Role"
}

For more information, see `Step 3: Creating a configuration and a configuration profile <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-configuration-and-profile.html>`__ in the *AWS AppConfig User Guide*.
42 changes: 23 additions & 19 deletions awscli/examples/appconfig/get-configuration.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
**To list the AppConfig applications in your AWS account**

This ``get-configuration`` example lists the applications in your account in the current Region. ::

aws appconfig get-configuration \
--application abc1234 \
--environment 9x8y7z6 \
--configuration 9sd1ukd \
--client-id any-id \
outfile_name

Output::

{
"ConfigurationVersion": "2",
"ContentType": "application/octet-stream"
}

For more information, see `Retrieving the Configuration <https://docs.aws.amazon.com/systems-manager/latest/userguide/appconfig-retrieving-the-configuration.html>`__ in the *AWS Systems Manager User Guide*.
**To retrieve configuration details**

The following ``get-configuration`` example returns the configuration details of the example application. On subsequent calls to get-configuration use the ``client-configuration-version`` parameter to only update the configuration of your application if the version has changed. Only updating the configuration when the version has changed avoids excess charges incurred by calling get-configuration. ::

aws appconfig get-configuration \
--application "example-application" \
--environment "Example-Environment" \
--configuration "Example-Configuration-Profile" \
--client-id "test-id" \
configuration-output-file

Contents of ``configuration-output-file``::

{ "Name": "ExampleApplication", "Id": ExampleID, "Rank": 7 }

Output::

{
"ConfigurationVersion": "1",
"ContentType": "application/json"
}

For more information, see `Step 6: Receiving the configuration <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-retrieving-the-configuration.html>`__ in the *AWS AppConfig User Guide*.
20 changes: 20 additions & 0 deletions awscli/examples/appconfig/get-deployment-strategy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
**To retrieve details of a deployment strategy**

The following ``get-deployment-strategy`` example lists the details of the specified deployment strategy. ::

aws appconfig get-deployment-strategy \
--deployment-strategy-id 1225qzk

Output::

{
"Id": "1225qzk",
"Name": "Example-Deployment",
"DeploymentDurationInMinutes": 15,
"GrowthType": "LINEAR",
"GrowthFactor": 25.0,
"FinalBakeTimeInMinutes": 0,
"ReplicateTo": "SSM_DOCUMENT"
}

For more information, see `Step 4: Creating a deployment strategy <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-deployment-strategy.html>`__ in the *AWS AppConfig User Guide*.
75 changes: 75 additions & 0 deletions awscli/examples/appconfig/get-deployment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
**To retrieve deployment details**

The following ``get-deployment`` example lists details of the deployment to the application in the specified environment and deployment. ::

aws appconfig get-deployment \
--application-id 339ohji \
--environment-id 54j1r29 \
--deployment-number 1

Output::

{
"ApplicationId": "339ohji",
"EnvironmentId": "54j1r29",
"DeploymentStrategyId": "1225qzk",
"ConfigurationProfileId": "ur8hx2f",
"DeploymentNumber": 1,
"ConfigurationName": "Example-Configuration-Profile",
"ConfigurationLocationUri": "ssm-parameter://Example-Parameter",
"ConfigurationVersion": "1",
"DeploymentDurationInMinutes": 15,
"GrowthType": "LINEAR",
"GrowthFactor": 25.0,
"FinalBakeTimeInMinutes": 0,
"State": "COMPLETE",
"EventLog": [
{
"EventType": "DEPLOYMENT_COMPLETED",
"TriggeredBy": "APPCONFIG",
"Description": "Deployment completed",
"OccurredAt": "2021-09-17T21:59:03.888000+00:00"
},
{
"EventType": "BAKE_TIME_STARTED",
"TriggeredBy": "APPCONFIG",
"Description": "Deployment bake time started",
"OccurredAt": "2021-09-17T21:58:57.722000+00:00"
},
{
"EventType": "PERCENTAGE_UPDATED",
"TriggeredBy": "APPCONFIG",
"Description": "Configuration available to 100.00% of clients",
"OccurredAt": "2021-09-17T21:55:56.816000+00:00"
},
{
"EventType": "PERCENTAGE_UPDATED",
"TriggeredBy": "APPCONFIG",
"Description": "Configuration available to 75.00% of clients",
"OccurredAt": "2021-09-17T21:52:56.567000+00:00"
},
{
"EventType": "PERCENTAGE_UPDATED",
"TriggeredBy": "APPCONFIG",
"Description": "Configuration available to 50.00% of clients",
"OccurredAt": "2021-09-17T21:49:55.737000+00:00"
},
{
"EventType": "PERCENTAGE_UPDATED",
"TriggeredBy": "APPCONFIG",
"Description": "Configuration available to 25.00% of clients",
"OccurredAt": "2021-09-17T21:46:55.187000+00:00"
},
{
"EventType": "DEPLOYMENT_STARTED",
"TriggeredBy": "USER",
"Description": "Deployment started",
"OccurredAt": "2021-09-17T21:43:54.205000+00:00"
}
],
"PercentageComplete": 100.0,
"StartedAt": "2021-09-17T21:43:54.205000+00:00",
"CompletedAt": "2021-09-17T21:59:03.888000+00:00"
}

For more information, see `Step 5: Deploying a configuration <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-deploying.html>`__ in the *AWS AppConfig User Guide*.
18 changes: 18 additions & 0 deletions awscli/examples/appconfig/get-environment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
**To retrieve environment details**

The following ``get-environment`` example returns the details and state of the specified environment. ::

aws appconfig get-environment \
--application-id 339ohji \
--environment-id 54j1r29

Output::

{
"ApplicationId": "339ohji",
"Id": "54j1r29",
"Name": "Example-Environment",
"State": "ReadyForDeployment"
}

For more information, see `Step 2: Creating an environment <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html>`__ in the *AWS AppConfig User Guide*.
24 changes: 24 additions & 0 deletions awscli/examples/appconfig/get-hosted-configuration-version.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**To retreive hosted configuration details**

The following ``get-hosted-configuration-version`` example retrieves the configuration details of the AWS AppConfig hosted configuration. ::

aws appconfig get-hosted-configuration-version \
--application-id 339ohji \
--configuration-profile-id ur8hx2f \
--version-number 1 \
hosted-configuration-version-output

Contents of ``hosted-configuration-version-output``::

{ "Name": "ExampleApplication", "Id": ExampleID, "Rank": 7 }

Output::

{
"ApplicationId": "339ohji",
"ConfigurationProfileId": "ur8hx2f",
"VersionNumber": "1",
"ContentType": "application/json"
}

For more information, see `About the AWS AppConfig hosted configuration store <https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-configuration-and-profile.html#appconfig-creating-configuration-and-profile-about-hosted-store>`__ in the *AWS AppConfig User Guide*.
Loading

0 comments on commit 39d765a

Please sign in to comment.