-
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 #6056 from elysahall/awsdocs-03-31
New CLI examples for codecommit, ec2, elasticache, securityhub, iot, …
- Loading branch information
Showing
71 changed files
with
1,756 additions
and
681 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
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 |
---|---|---|
@@ -1,39 +1,39 @@ | ||
**To view details about multiple repositories** | ||
|
||
This example shows details about multiple AWS CodeCommit repositories. | ||
This example shows details about multiple AWS CodeCommit repositories. :: | ||
|
||
Command:: | ||
|
||
aws codecommit batch-get-repositories --repository-names MyDemoRepo MyOtherDemoRepo | ||
aws codecommit batch-get-repositories \ | ||
--repository-names MyDemoRepo MyOtherDemoRepo | ||
|
||
Output:: | ||
|
||
{ | ||
{ | ||
"repositoriesNotFound": [], | ||
"repositories": [ | ||
{ | ||
"creationDate": 1429203623.625, | ||
"defaultBranch": "master", | ||
"defaultBranch": "main", | ||
"repositoryName": "MyDemoRepo", | ||
"cloneUrlSsh": "ssh://ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos//v1/repos/MyDemoRepo", | ||
"cloneUrlSsh": "ssh://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo", | ||
"lastModifiedDate": 1430783812.0869999, | ||
"repositoryDescription": "My demonstration repository", | ||
"cloneUrlHttp": "https://codecommit.us-east-1.amazonaws.com/v1/repos/MyDemoRepo", | ||
"cloneUrlHttp": "https://codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo", | ||
"repositoryId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE", | ||
"Arn": "arn:aws:codecommit:us-east-1:111111111111EXAMPLE:MyDemoRepo", | ||
"Arn": "arn:aws:codecommit:us-east-2:111111111111:MyDemoRepo" | ||
"accountId": "111111111111" | ||
}, | ||
{ | ||
"creationDate": 1429203623.627, | ||
"defaultBranch": "master", | ||
"defaultBranch": "main", | ||
"repositoryName": "MyOtherDemoRepo", | ||
"cloneUrlSsh": "ssh://ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos//v1/repos/MyOtherDemoRepo", | ||
"cloneUrlSsh": "ssh://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyOtherDemoRepo", | ||
"lastModifiedDate": 1430783812.0889999, | ||
"repositoryDescription": "My other demonstration repository", | ||
"cloneUrlHttp": "https://codecommit.us-east-1.amazonaws.com/v1/repos/MyOtherDemoRepo", | ||
"cloneUrlHttp": "https://codecommit.us-east-2.amazonaws.com/v1/repos/MyOtherDemoRepo", | ||
"repositoryId": "cfc29ac4-b0cb-44dc-9990-f6f51EXAMPLE", | ||
"Arn": "arn:aws:codecommit:us-east-1:111111111111EXAMPLE:MyOtherDemoRepo", | ||
"Arn": "arn:aws:codecommit:us-east-2:111111111111:MyOtherDemoRepo" | ||
"accountId": "111111111111" | ||
} | ||
], | ||
"repositoriesNotFound": [] | ||
} | ||
} |
16 changes: 8 additions & 8 deletions
16
awscli/examples/codecommit/create-approval-rule-template.rst
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,25 +1,25 @@ | ||
**To create an approval rule template** | ||
|
||
The following ``create-approval-rule-template`` example creates an approval rule template named ``2-approver-rule-for-master ``. The template requires two users who assume the role of ``CodeCommitReview`` to approve any pull request before it can be merged to the ``master`` branch. :: | ||
The following ``create-approval-rule-template`` example creates an approval rule template named ``2-approver-rule-for-main ``. The template requires two users who assume the role of ``CodeCommitReview`` to approve any pull request before it can be merged to the ``main`` branch. :: | ||
|
||
aws codecommit create-approval-rule-template \ | ||
--approval-rule-template-name 2-approver-rule-for-master \ | ||
--approval-rule-template-description "Requires two developers from the team to approve the pull request if the destination branch is master" \ | ||
--approval-rule-template-content "{\"Version\": \"2018-11-08\",\"DestinationReferences\": [\"refs/heads/master\"],\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}" | ||
--approval-rule-template-name 2-approver-rule-for-main \ | ||
--approval-rule-template-description "Requires two developers from the team to approve the pull request if the destination branch is main" \ | ||
--approval-rule-template-content "{\"Version\": \"2018-11-08\",\"DestinationReferences\": [\"refs/heads/main\"],\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}" | ||
|
||
Output:: | ||
|
||
{ | ||
"approvalRuleTemplate": { | ||
"approvalRuleTemplateName": "2-approver-rule-for-master", | ||
"approvalRuleTemplateName": "2-approver-rule-for-main", | ||
"creationDate": 1571356106.936, | ||
"approvalRuleTemplateId": "dd8b17fe-EXAMPLE", | ||
"approvalRuleTemplateContent": "{\"Version\": \"2018-11-08\",\"DestinationReferences\": [\"refs/heads/master\"],\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}", | ||
"approvalRuleTemplateContent": "{\"Version\": \"2018-11-08\",\"DestinationReferences\": [\"refs/heads/main\"],\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}", | ||
"lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major", | ||
"approvalRuleTemplateDescription": "Requires two developers from the team to approve the pull request if the destination branch is master", | ||
"approvalRuleTemplateDescription": "Requires two developers from the team to approve the pull request if the destination branch is main", | ||
"lastModifiedDate": 1571356106.936, | ||
"ruleContentSha256": "4711b576EXAMPLE" | ||
} | ||
} | ||
|
||
For more information, see `Create an Approval Rule Template <https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-create-template.html#create-template-cli>`__ in the *AWS CodeCommit User Guide*. | ||
For more information, see `Create an Approval Rule Template <https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-create-template.html#create-template-cli>`__ in the *AWS CodeCommit User 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
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
4 changes: 2 additions & 2 deletions
4
awscli/examples/codecommit/create-unreferenced-merge-commit.rst
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 |
---|---|---|
@@ -1,18 +1,24 @@ | ||
**To delete the content of a comment** | ||
|
||
You can only delete the content of a comment if you created the comment. This example demonstrates how to delete the content of a comment with the system-generated ID of 'ff30b348EXAMPLEb9aa670f':: | ||
You can only delete the content of a comment if you created the comment. This example demonstrates how to delete the content of a comment with the system-generated ID of ``ff30b348EXAMPLEb9aa670f``. :: | ||
|
||
aws codecommit delete-comment-content --comment-id ff30b348EXAMPLEb9aa670f | ||
aws codecommit delete-comment-content \ | ||
--comment-id ff30b348EXAMPLEb9aa670f | ||
|
||
Output:: | ||
|
||
{ | ||
"comment": { | ||
"creationDate": 1508369768.142, | ||
"deleted": true, | ||
"lastModifiedDate": 1508369842.278, | ||
"clientRequestToken": "123Example", | ||
"commentId": "ff30b348EXAMPLEb9aa670f", | ||
"authorArn": "arn:aws:iam::111111111111:user/Li_Juan" | ||
} | ||
} | ||
{ | ||
"comment": { | ||
"creationDate": 1508369768.142, | ||
"deleted": true, | ||
"lastModifiedDate": 1508369842.278, | ||
"clientRequestToken": "123Example", | ||
"commentId": "ff30b348EXAMPLEb9aa670f", | ||
"authorArn": "arn:aws:iam::111111111111:user/Li_Juan", | ||
"callerReactions": [], | ||
"reactionCounts": | ||
{ | ||
"CLAP" : 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
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 |
---|---|---|
@@ -1,20 +1,27 @@ | ||
**To view details of a comment** | ||
|
||
This example demonstrates how to view details of a comment with the system-generated comment ID of 'ff30b348EXAMPLEb9aa670f':: | ||
This example demonstrates how to view details of a comment with the system-generated comment ID of ``ff30b348EXAMPLEb9aa670f``. :: | ||
|
||
aws codecommit get-comment --comment-id ff30b348EXAMPLEb9aa670f | ||
aws codecommit get-comment \ | ||
--comment-id ff30b348EXAMPLEb9aa670f | ||
|
||
Output:: | ||
|
||
{ | ||
"comment": { | ||
"authorArn": "arn:aws:iam::111111111111:user/Li_Juan", | ||
"clientRequestToken": "123Example", | ||
"commentId": "ff30b348EXAMPLEb9aa670f", | ||
"content": "Whoops - I meant to add this comment to the line, but I don't see how to delete it.", | ||
"creationDate": 1508369768.142, | ||
"deleted": false, | ||
"commentId": "", | ||
"lastModifiedDate": 1508369842.278 | ||
} | ||
} | ||
{ | ||
"comment": { | ||
"authorArn": "arn:aws:iam::111111111111:user/Li_Juan", | ||
"clientRequestToken": "123Example", | ||
"commentId": "ff30b348EXAMPLEb9aa670f", | ||
"content": "Whoops - I meant to add this comment to the line, but I don't see how to delete it.", | ||
"creationDate": 1508369768.142, | ||
"deleted": false, | ||
"commentId": "", | ||
"lastModifiedDate": 1508369842.278, | ||
"callerReactions": [], | ||
"reactionCounts": | ||
{ | ||
"SMILE" : 6, | ||
"THUMBSUP" : 1 | ||
} | ||
} | ||
} |
Oops, something went wrong.