-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9014 from elysahall/awsdocs-10-29-24
CLI examples apigateway, ecr-public, iam, securityhub
- Loading branch information
Showing
7 changed files
with
133 additions
and
28 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,5 +1,11 @@ | ||
**To flush the cache for an API's stage** | ||
|
||
Command:: | ||
The following ``flush-stage-cache`` example flushes the cache of a stage. :: | ||
|
||
aws apigateway flush-stage-cache --rest-api-id 1234123412 --stage-name dev | ||
aws apigateway flush-stage-cache \ | ||
--rest-api-id 1234123412 \ | ||
--stage-name dev | ||
|
||
This command produces no output. | ||
|
||
For more information, see `Flush the API stage cache in API Gateway <https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html#flush-api-caching>`_ in the *Amazon API Gateway Developer Guide*. |
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,26 @@ | ||
**To describe all registries in a public registry** | ||
|
||
The following ``describe-registries`` example describes all registries in your account. :: | ||
|
||
aws ecr-public describe-registries | ||
|
||
Output:: | ||
|
||
{ | ||
"registries": [ | ||
{ | ||
"registryId": "123456789012", | ||
"registryArn": "arn:aws:ecr-public::123456789012:registry/123456789012", | ||
"registryUri": "public.ecr.aws/publicregistrycustomalias", | ||
"verified": false, | ||
"aliases": [ | ||
{ | ||
"name": "publicregistrycustomalias", | ||
"status": "ACTIVE", | ||
"primaryRegistryAlias": true, | ||
"defaultRegistryAlias": true | ||
} | ||
] | ||
} | ||
] | ||
} |
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,43 @@ | ||
**Example 1: To describe a repository in a public registry** | ||
|
||
The following ``describe-repositories`` example describes a repository named ``project-a/nginx-web-app`` in a public registry. :: | ||
|
||
aws ecr-public describe-repositories \ | ||
--repository-name project-a/nginx-web-app | ||
|
||
Output:: | ||
|
||
{ | ||
"repositories": [ | ||
{ | ||
"repositoryArn": "arn:aws:ecr-public::123456789012:repository/project-a/nginx-web-app", | ||
"registryId": "123456789012", | ||
"repositoryName": "project-a/nginx-web-app", | ||
"repositoryUri": "public.ecr.aws/public-registry-custom-alias/project-a/nginx-web-app", | ||
"createdAt": "2024-07-07T00:07:56.526000-05:00" | ||
} | ||
] | ||
} | ||
|
||
**Example 2: To describe all repositories in a public registry in a table** | ||
|
||
The following ``describe-repositories`` example describes all repositories in a public registry and then outputs the repository names into a table format. :: | ||
|
||
aws ecr-public describe-repositories \ | ||
--region us-east-1 \ | ||
--output table \ | ||
--query "repositories[*].repositoryName" | ||
|
||
Output:: | ||
|
||
----------------------------- | ||
| DescribeRepositories | | ||
+---------------------------+ | ||
| project-a/nginx-web-app | | ||
| nginx | | ||
| myfirstrepo1 | | ||
| helm-test-chart | | ||
| test-ecr-public | | ||
| nginx-web-app | | ||
| sample-repo | | ||
+---------------------------+ |
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,27 @@ | ||
**Example 1: To authenticate docker to an Amazon ECR public registry** | ||
|
||
The following ``get-login-password`` example retrieves and displays an authentication token using the GetAuthorizationToken API that you can use to authenticate to an Amazon ECR public registry. :: | ||
|
||
aws ecr-public get-login-password \ | ||
--region us-east-1 | ||
| docker login \ | ||
--username AWS \ | ||
--password-stdin public.ecr.aws | ||
|
||
This command produces no output in the terminal but instead pipes the output to Docker. | ||
|
||
For more information, see `Authenticate to the public registry <https://docs.aws.amazon.com/AmazonECR/latest/public/public-registries.html#public-registry-auth>`__ in the *Amazon ECR Public*. | ||
|
||
**Example 2: To authenticate docker to your own custom AmazonECR public registry** | ||
|
||
The following ``get-login-password`` example retrieves and displays an authentication token using the GetAuthorizationToken API that you can use to authenticate to your own custom Amazon ECR public registry. :: | ||
|
||
aws ecr-public get-login-password \ | ||
--region us-east-1 \ | ||
| docker login \ | ||
--username AWS \ | ||
--password-stdin public.ecr.aws/<your-public-registry-custom-alias> | ||
|
||
This command produces no output in the terminal but insteads pipes the output to Docker. | ||
|
||
For more information, see `Authenticate to your own Amazon ECR Public <https://docs.aws.amazon.com/AmazonECR/latest/public/public-registries.html#public-registry-auth>`__ in the *Amazon ECR Public*. |
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