Skip to content

Commit 158d574

Browse files
authored
add output pane to all aws service docs (#25)
* do a bunch * do another bunch * finish the rest
1 parent 7d8baf0 commit 158d574

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+378
-915
lines changed

src/content/docs/aws/services/account.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ Run the following command to fetch the contact information for your account:
5555
awslocal account get-contact-information
5656
```
5757

58-
The command will return the contact information for your account:
59-
60-
```json
58+
```bash title="Output"
6159
{
6260
"ContactInformation": {
6361
"AddressLine1": "XXXX Main St",

src/content/docs/aws/services/acm.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ awslocal acm request-certificate \
3737

3838
This command will return the Amazon Resource Name (ARN) of the new certificate, which you can use in other ACM commands.
3939

40-
```json
40+
```bash title="Output"
4141
{
4242
"CertificateArn": "arn:aws:acm:<region>:000000000000:certificate/<certificate_ID>"
4343
}

src/content/docs/aws/services/apacheflink.mdx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,7 @@ awslocal kinesisanalyticsv2 add-application-cloud-watch-logging-option \
177177
--cloud-watch-logging-option '{"LogStreamARN": "arn:aws:logs:us-east-1:000000000000:log-group:msaf-log-group:log-stream:msaf-log-stream"}'
178178
```
179179

180-
The response will be similar to:
181-
182-
```json
180+
```bash title="Output"
183181
{
184182
"ApplicationARN": "arn:aws:kinesisanalytics:us-east-1:000000000000:application/msaf-app",
185183
"ApplicationVersionId": 2,
@@ -202,9 +200,7 @@ Configured logging options can be retrieved using [DescribeApplication](https://
202200
awslocal kinesisanalyticsv2 describe-application --application-name msaf-app | jq .ApplicationDetail.CloudWatchLoggingOptionDescriptions
203201
```
204202

205-
The response will be similar to:
206-
207-
```json
203+
```bash title="Output"
208204
[
209205
{
210206
"CloudWatchLoggingOptionId": "1.1",
@@ -242,9 +238,7 @@ awslocal kinesisanalyticsv2 list-tags-for-resource \
242238
--resource-arn arn:aws:kinesisanalytics:us-east-1:000000000000:application/msaf-app
243239
```
244240

245-
The response will be similar to:
246-
247-
```json
241+
```bash title="Output"
248242
{
249243
"Tags": [
250244
{

src/content/docs/aws/services/apigateway.mdx

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,8 @@ awslocal apigateway create-rest-api --name 'API Gateway Lambda integration'
7474
```
7575

7676
This creates a new REST API named `API Gateway Lambda integration`.
77-
The above command returns the following response:
7877

79-
```json
78+
```bash title="Output"
8079
{
8180
"id": "cor3o5oeci",
8281
"name": "API Gateway Lambda integration",
@@ -102,9 +101,7 @@ Use the REST API ID generated in the previous step to fetch the resources for th
102101
awslocal apigateway get-resources --rest-api-id <REST_API_ID>
103102
```
104103

105-
The above command returns the following response:
106-
107-
```json
104+
```bash title="Output"
108105
{
109106
"items": [
110107
{
@@ -130,9 +127,7 @@ awslocal apigateway create-resource \
130127
--path-part "{somethingId}"
131128
```
132129

133-
The above command returns the following response:
134-
135-
```json
130+
```bash title="Output"
136131
{
137132
"id": "zzcvcf56ar",
138133
"parentId": "u53af9hm83",
@@ -158,9 +153,7 @@ awslocal apigateway put-method \
158153
--authorization-type "NONE"
159154
```
160155

161-
The above command returns the following response:
162-
163-
```json
156+
```bash title="Output"
164157
{
165158
"httpMethod": "GET",
166159
"authorizationType": "NONE",
@@ -204,9 +197,7 @@ You can use [curl](https://curl.se/) or any HTTP REST client to invoke the API e
204197
curl -X GET http://<REST_API_ID>.execute-api.localhost.localstack.cloud:4566/dev/test
205198
```
206199

207-
The response would be:
208-
209-
```json
200+
```bash title="Output"
210201
{"message":"Hello World"}
211202
```
212203

@@ -216,9 +207,7 @@ You can also use our [alternative URL format](#alternative-url-format) in case o
216207
curl -X GET http://localhost:4566/_aws/execute-api/<REST_API_ID>/dev/test
217208
```
218209

219-
The response would be:
220-
221-
```json
210+
```bash title="Output"
222211
{"message":"Hello World"}
223212
```
224213

@@ -362,9 +351,7 @@ To retrieve the list of APIs and verify the WebSocket endpoint, you can use the
362351
awslocal apigatewayv2 get-apis
363352
```
364353

365-
The response would be:
366-
367-
```json
354+
```bash title="Output"
368355
{
369356
"Items": [{
370357
"ApiEndpoint": "ws://localhost:4510",
@@ -407,9 +394,7 @@ The following example assigns the custom ID `"myid123"` to the API:
407394
awslocal apigateway create-rest-api --name my-api --tags '{"_custom_id_":"myid123"}'
408395
```
409396

410-
The response would be:
411-
412-
```json
397+
```bash title="Output"
413398
{
414399
"id": "myid123",
415400
....
@@ -496,4 +481,4 @@ The following code snippets and sample applications provide practical examples o
496481

497482
## API Coverage (V2)
498483

499-
<FeatureCoverage service="apigatewayv2" client:load />
484+
<FeatureCoverage service="apigatewayv2" client:load />

src/content/docs/aws/services/appconfig.mdx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ awslocal appconfig create-hosted-configuration-version \
118118
configuration-data.json
119119
```
120120

121-
The following output would be retrieved:
122-
123-
```bash
121+
```bash title="Output"
124122
{
125123
"ApplicationId": "400c285",
126124
"ConfigurationProfileId": "7d748f9",
@@ -143,9 +141,7 @@ awslocal appconfig create-deployment-strategy \
143141
--growth-factor 1.0
144142
```
145143

146-
The following output would be retrieved:
147-
148-
```bash
144+
```bash title="Output"
149145
{
150146
"Id": "f2f2225",
151147
"Name": "my-app-deployment-strategy",
@@ -168,9 +164,7 @@ awslocal appconfig start-deployment \
168164
--description "My application deployment"
169165
```
170166

171-
The following output would be retrieved:
172-
173-
```bash
167+
```bash title="Output"
174168
{
175169
"ApplicationId": "400c285",
176170
"EnvironmentId": "3695ea3",

src/content/docs/aws/services/appsync.mdx

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ Run the following command to list all tables in your running LocalStack containe
4141
awslocal dynamodb list-tables
4242
```
4343

44-
The following output would be retrieved:
45-
46-
```bash
44+
```bash title="Output"
4745
{
4846
"TableNames": [
4947
"DynamoDBNotesTable"
@@ -62,9 +60,7 @@ awslocal appsync create-graphql-api \
6260
--authentication-type API_KEY
6361
```
6462

65-
The following output would be retrieved:
66-
67-
```bash
63+
```bash title="Output"
6864
{
6965
"graphqlApi": {
7066
"name": "NotesApi",
@@ -89,9 +85,7 @@ awslocal appsync create-api-key \
8985
--api-id 014d18d0c2b149ee8b66f39173
9086
```
9187

92-
The following output would be retrieved:
93-
94-
```bash
88+
```bash title="Output"
9589
{
9690
"apiKey": {
9791
"id": "31d94a05",
@@ -137,9 +131,7 @@ awslocal appsync start-schema-creation \
137131
--definition file://schema.graphql
138132
```
139133

140-
The following output would be retrieved:
141-
142-
```bash
134+
```bash title="Output"
143135
{
144136
"status": "ACTIVE"
145137
}
@@ -158,9 +150,7 @@ awslocal appsync create-data-source \
158150
--dynamodb-config tableName=DynamoDBNotesTable,awsRegion=us-east-1
159151
```
160152

161-
The following output would be retrieved:
162-
163-
```bash
153+
```bash title="Output"
164154
{
165155
"dataSource": {
166156
"dataSourceArn": "arn:aws:appsync:us-east-1:000000000000:apis/014d18d0c2b149ee8b66f39173/datasources/AppSyncDB",
@@ -202,9 +192,7 @@ awslocal appsync create-graphql-api \
202192
--tags _custom_id_=faceb00c
203193
```
204194

205-
The following output would be retrieved:
206-
207-
```bash
195+
```bash title="Output"
208196
{
209197
"graphqlApi": {
210198
"name": "my-api",
@@ -266,12 +254,13 @@ See the AWS documentation for [`evaluate-mapping-template`](https://awscli.amazo
266254
awslocal appsync evaluate-mapping-template \
267255
--template '$ctx.result' \
268256
--context '{"result":"ok"}'
269-
<disable-copy>
257+
```
258+
259+
```bash title="Output"
270260
{
271261
"evaluationResult": "ok",
272262
"logs": []
273263
}
274-
</disable-copy>
275264
```
276265

277266
### JavaScript resolvers
@@ -284,9 +273,7 @@ awslocal appsync evaluate-code \
284273
--context '{"result": "ok"}'
285274
```
286275

287-
The following output would be retrieved:
288-
289-
```bash
276+
```bash title="Output"
290277
{
291278
"evaluationResult": "ok",
292279
"logs": []

src/content/docs/aws/services/athena.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ awslocal athena start-query-execution \
6363
--query-string "create external table tbl01 (name STRING, surname STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LOCATION 's3://athena-bucket/data/';" --result-configuration "OutputLocation=s3://athena-bucket/output/"
6464
```
6565

66-
The following output would be retrieved:
67-
68-
```bash
66+
```bash title="Output"
6967
{
7068
"QueryExecutionId": "593acab7"
7169
}
@@ -154,7 +152,7 @@ awslocal athena get-query-results --query-execution-id $queryId
154152

155153
The query should yield a result similar to the output below:
156154

157-
```bash
155+
```bash title="Output"
158156
...
159157
"Rows": [
160158
{

src/content/docs/aws/services/autoscaling.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ awslocal ec2 create-launch-template \
3333
--launch-template-data '{"ImageId":"ami-ff0fea8310f3","InstanceType":"t2.micro"}'
3434
```
3535

36-
The following output is displayed:
37-
38-
```json
36+
```bash title="Output"
3937
{
4038
"LaunchTemplate": {
4139
"LaunchTemplateId": "lt-5ccdf1a84f178ba44",
@@ -79,9 +77,7 @@ Run the following command to describe the Auto Scaling group:
7977
awslocal autoscaling describe-auto-scaling-groups
8078
```
8179

82-
The following output is displayed:
83-
84-
```json
80+
```bash title="Output"
8581
{
8682
"AutoScalingGroups": [
8783
{

src/content/docs/aws/services/backup.mdx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ awslocal backup create-backup-vault \
3434
--backup-vault-name primary
3535
```
3636

37-
The following output would be retrieved:
38-
39-
```bash
37+
```bash title="Output"
4038
{
4139
"BackupVaultName": "primary",
4240
"BackupVaultArn": "arn:aws:backup:us-east-1:000000000000:backup-vault:primary",
@@ -79,9 +77,7 @@ awslocal backup create-backup-plan \
7977
--backup-plan file://backup-plan.json
8078
```
8179

82-
The following output would be retrieved:
83-
84-
```bash
80+
```bash title="Output"
8581
{
8682
"BackupPlanId": "9337aba3",
8783
"BackupPlanArn": "arn:aws:backup:us-east-1:000000000000:backup-plan:testplan",
@@ -119,9 +115,8 @@ awslocal backup create-backup-selection \
119115
```
120116

121117
Replace the `--backup-plan-id` value with the `BackupPlanId` value from the output of the previous command.
122-
The following output would be retrieved:
123118

124-
```bash
119+
```bash title="Output"
125120
{
126121
"SelectionId": "91ce25f8",
127122
"BackupPlanId": "9337aba3",

0 commit comments

Comments
 (0)