Skip to content

Commit 8bf0c03

Browse files
authored
docs(clients): switch example generation from JS to Smithy, add streaming blob output examples (#6981)
* chore(codegen): sync for smithy example generation * docs: remove JS-based example generation * chore(client-s3): example docgen diff * docs(clients): codegen sync
1 parent d29375d commit 8bf0c03

File tree

16,985 files changed

+48025
-31984
lines changed

Some content is hidden

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

16,985 files changed

+48025
-31984
lines changed

clients/client-accessanalyzer/src/commands/ApplyArchiveRuleCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export interface ApplyArchiveRuleCommandOutput extends __MetadataBearer {}
7171
* @throws {@link AccessAnalyzerServiceException}
7272
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
7373
*
74+
*
7475
* @public
7576
*/
7677
export class ApplyArchiveRuleCommand extends $Command

clients/client-accessanalyzer/src/commands/CancelPolicyGenerationCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export interface CancelPolicyGenerationCommandOutput extends CancelPolicyGenerat
6565
* @throws {@link AccessAnalyzerServiceException}
6666
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
6767
*
68+
*
6869
* @public
6970
*/
7071
export class CancelPolicyGenerationCommand extends $Command

clients/client-accessanalyzer/src/commands/CheckAccessNotGrantedCommand.ts

+27-29
Original file line numberDiff line numberDiff line change
@@ -96,89 +96,87 @@ export interface CheckAccessNotGrantedCommandOutput extends CheckAccessNotGrante
9696
* @throws {@link AccessAnalyzerServiceException}
9797
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
9898
*
99-
* @public
99+
*
100100
* @example Passing check. Restrictive identity policy.
101101
* ```javascript
102102
* //
103103
* const input = {
104-
* "access": [
104+
* access: [
105105
* {
106-
* "actions": [
106+
* actions: [
107107
* "s3:PutObject"
108108
* ]
109109
* }
110110
* ],
111-
* "policyDocument": "{\"Version\":\"2012-10-17\",\"Id\":\"123\",\"Statement\":[{\"Sid\":\"AllowJohnDoe\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:user/JohnDoe\"},\"Action\":\"s3:GetObject\",\"Resource\":\"*\"}]}",
112-
* "policyType": "RESOURCE_POLICY"
111+
* policyDocument: `{"Version":"2012-10-17","Id":"123","Statement":[{"Sid":"AllowJohnDoe","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::123456789012:user/JohnDoe"},"Action":"s3:GetObject","Resource":"*"}]}`,
112+
* policyType: "RESOURCE_POLICY"
113113
* };
114114
* const command = new CheckAccessNotGrantedCommand(input);
115115
* const response = await client.send(command);
116-
* /* response ==
116+
* /* response is
117117
* {
118-
* "message": "The policy document does not grant access to perform the listed actions or resources.",
119-
* "result": "PASS"
118+
* message: "The policy document does not grant access to perform the listed actions or resources.",
119+
* result: "PASS"
120120
* }
121121
* *\/
122-
* // example id: example-1
123122
* ```
124123
*
125124
* @example Passing check. Restrictive S3 Bucket resource policy.
126125
* ```javascript
127126
* //
128127
* const input = {
129-
* "access": [
128+
* access: [
130129
* {
131-
* "resources": [
130+
* resources: [
132131
* "arn:aws:s3:::sensitive-bucket/*"
133132
* ]
134133
* }
135134
* ],
136-
* "policyDocument": "{\"Version\":\"2012-10-17\",\"Id\":\"123\",\"Statement\":[{\"Sid\":\"AllowJohnDoe\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:user/JohnDoe\"},\"Action\":\"s3:PutObject\",\"Resource\":\"arn:aws:s3:::non-sensitive-bucket/*\"}]}",
137-
* "policyType": "RESOURCE_POLICY"
135+
* policyDocument: `{"Version":"2012-10-17","Id":"123","Statement":[{"Sid":"AllowJohnDoe","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::123456789012:user/JohnDoe"},"Action":"s3:PutObject","Resource":"arn:aws:s3:::non-sensitive-bucket/*"}]}`,
136+
* policyType: "RESOURCE_POLICY"
138137
* };
139138
* const command = new CheckAccessNotGrantedCommand(input);
140139
* const response = await client.send(command);
141-
* /* response ==
140+
* /* response is
142141
* {
143-
* "message": "The policy document does not grant access to perform the listed actions or resources.",
144-
* "result": "PASS"
142+
* message: "The policy document does not grant access to perform the listed actions or resources.",
143+
* result: "PASS"
145144
* }
146145
* *\/
147-
* // example id: example-2
148146
* ```
149147
*
150148
* @example Failing check. Permissive S3 Bucket resource policy.
151149
* ```javascript
152150
* //
153151
* const input = {
154-
* "access": [
152+
* access: [
155153
* {
156-
* "resources": [
154+
* resources: [
157155
* "arn:aws:s3:::my-bucket/*"
158156
* ]
159157
* }
160158
* ],
161-
* "policyDocument": "{\"Version\":\"2012-10-17\",\"Id\":\"123\",\"Statement\":[{\"Sid\":\"AllowJohnDoe\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::123456789012:user/JohnDoe\"},\"Action\":\"s3:PutObject\",\"Resource\":\"arn:aws:s3:::my-bucket/*\"}]}",
162-
* "policyType": "RESOURCE_POLICY"
159+
* policyDocument: `{"Version":"2012-10-17","Id":"123","Statement":[{"Sid":"AllowJohnDoe","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::123456789012:user/JohnDoe"},"Action":"s3:PutObject","Resource":"arn:aws:s3:::my-bucket/*"}]}`,
160+
* policyType: "RESOURCE_POLICY"
163161
* };
164162
* const command = new CheckAccessNotGrantedCommand(input);
165163
* const response = await client.send(command);
166-
* /* response ==
164+
* /* response is
167165
* {
168-
* "message": "The policy document grants access to perform one or more of the listed actions or resources.",
169-
* "reasons": [
166+
* message: "The policy document grants access to perform one or more of the listed actions or resources.",
167+
* reasons: [
170168
* {
171-
* "description": "One or more of the listed actions or resources in the statement with sid: AllowJohnDoe.",
172-
* "statementId": "AllowJohnDoe",
173-
* "statementIndex": 0
169+
* description: "One or more of the listed actions or resources in the statement with sid: AllowJohnDoe.",
170+
* statementId: "AllowJohnDoe",
171+
* statementIndex: 0
174172
* }
175173
* ],
176-
* "result": "FAIL"
174+
* result: "FAIL"
177175
* }
178176
* *\/
179-
* // example id: example-3
180177
* ```
181178
*
179+
* @public
182180
*/
183181
export class CheckAccessNotGrantedCommand extends $Command
184182
.classBuilder<

clients/client-accessanalyzer/src/commands/CheckNoNewAccessCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export interface CheckNoNewAccessCommandOutput extends CheckNoNewAccessResponse,
9292
* @throws {@link AccessAnalyzerServiceException}
9393
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
9494
*
95+
*
9596
* @public
9697
*/
9798
export class CheckNoNewAccessCommand extends $Command

clients/client-accessanalyzer/src/commands/CheckNoPublicAccessCommand.ts

+16-17
Original file line numberDiff line numberDiff line change
@@ -87,50 +87,49 @@ export interface CheckNoPublicAccessCommandOutput extends CheckNoPublicAccessRes
8787
* @throws {@link AccessAnalyzerServiceException}
8888
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
8989
*
90-
* @public
90+
*
9191
* @example Passing check. S3 Bucket policy without public access.
9292
* ```javascript
9393
* //
9494
* const input = {
95-
* "policyDocument": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Bob\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::111122223333:user/JohnDoe\"},\"Action\":[\"s3:GetObject\"]}]}",
96-
* "resourceType": "AWS::S3::Bucket"
95+
* policyDocument: `{"Version":"2012-10-17","Statement":[{"Sid":"Bob","Effect":"Allow","Principal":{"AWS":"arn:aws:iam::111122223333:user/JohnDoe"},"Action":["s3:GetObject"]}]}`,
96+
* resourceType: "AWS::S3::Bucket"
9797
* };
9898
* const command = new CheckNoPublicAccessCommand(input);
9999
* const response = await client.send(command);
100-
* /* response ==
100+
* /* response is
101101
* {
102-
* "message": "The resource policy does not grant public access for the given resource type.",
103-
* "result": "PASS"
102+
* message: "The resource policy does not grant public access for the given resource type.",
103+
* result: "PASS"
104104
* }
105105
* *\/
106-
* // example id: example-1
107106
* ```
108107
*
109108
* @example Failing check. S3 Bucket policy with public access.
110109
* ```javascript
111110
* //
112111
* const input = {
113-
* "policyDocument": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"Bob\",\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":[\"s3:GetObject\"]}]}",
114-
* "resourceType": "AWS::S3::Bucket"
112+
* policyDocument: `{"Version":"2012-10-17","Statement":[{"Sid":"Bob","Effect":"Allow","Principal":"*","Action":["s3:GetObject"]}]}`,
113+
* resourceType: "AWS::S3::Bucket"
115114
* };
116115
* const command = new CheckNoPublicAccessCommand(input);
117116
* const response = await client.send(command);
118-
* /* response ==
117+
* /* response is
119118
* {
120-
* "message": "The resource policy grants public access for the given resource type.",
121-
* "reasons": [
119+
* message: "The resource policy grants public access for the given resource type.",
120+
* reasons: [
122121
* {
123-
* "description": "Public access granted in the following statement with sid: Bob.",
124-
* "statementId": "Bob",
125-
* "statementIndex": 0
122+
* description: "Public access granted in the following statement with sid: Bob.",
123+
* statementId: "Bob",
124+
* statementIndex: 0
126125
* }
127126
* ],
128-
* "result": "FAIL"
127+
* result: "FAIL"
129128
* }
130129
* *\/
131-
* // example id: example-2
132130
* ```
133131
*
132+
* @public
134133
*/
135134
export class CheckNoPublicAccessCommand extends $Command
136135
.classBuilder<

clients/client-accessanalyzer/src/commands/CreateAccessPreviewCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ export interface CreateAccessPreviewCommandOutput extends CreateAccessPreviewRes
193193
* @throws {@link AccessAnalyzerServiceException}
194194
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
195195
*
196+
*
196197
* @public
197198
*/
198199
export class CreateAccessPreviewCommand extends $Command

clients/client-accessanalyzer/src/commands/CreateAnalyzerCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export interface CreateAnalyzerCommandOutput extends CreateAnalyzerResponse, __M
116116
* @throws {@link AccessAnalyzerServiceException}
117117
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
118118
*
119+
*
119120
* @public
120121
*/
121122
export class CreateAnalyzerCommand extends $Command

clients/client-accessanalyzer/src/commands/CreateArchiveRuleCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export interface CreateArchiveRuleCommandOutput extends __MetadataBearer {}
9292
* @throws {@link AccessAnalyzerServiceException}
9393
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
9494
*
95+
*
9596
* @public
9697
*/
9798
export class CreateArchiveRuleCommand extends $Command

clients/client-accessanalyzer/src/commands/DeleteAnalyzerCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export interface DeleteAnalyzerCommandOutput extends __MetadataBearer {}
7171
* @throws {@link AccessAnalyzerServiceException}
7272
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
7373
*
74+
*
7475
* @public
7576
*/
7677
export class DeleteAnalyzerCommand extends $Command

clients/client-accessanalyzer/src/commands/DeleteArchiveRuleCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export interface DeleteArchiveRuleCommandOutput extends __MetadataBearer {}
7070
* @throws {@link AccessAnalyzerServiceException}
7171
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
7272
*
73+
*
7374
* @public
7475
*/
7576
export class DeleteArchiveRuleCommand extends $Command

clients/client-accessanalyzer/src/commands/GenerateFindingRecommendationCommand.ts

+14-9
Original file line numberDiff line numberDiff line change
@@ -69,31 +69,36 @@ export interface GenerateFindingRecommendationCommandOutput extends __MetadataBe
6969
* @throws {@link AccessAnalyzerServiceException}
7070
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
7171
*
72-
* @public
72+
*
7373
* @example Successfully started generating finding recommendation
7474
* ```javascript
7575
* //
7676
* const input = {
77-
* "analyzerArn": "arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a",
78-
* "id": "finding-id"
77+
* analyzerArn: "arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a",
78+
* id: "finding-id"
7979
* };
8080
* const command = new GenerateFindingRecommendationCommand(input);
81-
* await client.send(command);
82-
* // example id: example-1
81+
* const response = await client.send(command);
82+
* /* response is
83+
* { /* empty *\/ }
84+
* *\/
8385
* ```
8486
*
8587
* @example Failed field validation for id value
8688
* ```javascript
8789
* //
8890
* const input = {
89-
* "analyzerArn": "arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a",
90-
* "id": "!"
91+
* analyzerArn: "arn:aws:access-analyzer:us-east-1:111122223333:analyzer/a",
92+
* id: "!"
9193
* };
9294
* const command = new GenerateFindingRecommendationCommand(input);
93-
* await client.send(command);
94-
* // example id: example-2
95+
* const response = await client.send(command);
96+
* /* response is
97+
* { /* metadata only *\/ }
98+
* *\/
9599
* ```
96100
*
101+
* @public
97102
*/
98103
export class GenerateFindingRecommendationCommand extends $Command
99104
.classBuilder<

clients/client-accessanalyzer/src/commands/GetAccessPreviewCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ export interface GetAccessPreviewCommandOutput extends GetAccessPreviewResponse,
194194
* @throws {@link AccessAnalyzerServiceException}
195195
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
196196
*
197+
*
197198
* @public
198199
*/
199200
export class GetAccessPreviewCommand extends $Command

clients/client-accessanalyzer/src/commands/GetAnalyzedResourceCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ export interface GetAnalyzedResourceCommandOutput extends GetAnalyzedResourceRes
8787
* @throws {@link AccessAnalyzerServiceException}
8888
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
8989
*
90+
*
9091
* @public
9192
*/
9293
export class GetAnalyzedResourceCommand extends $Command

clients/client-accessanalyzer/src/commands/GetAnalyzerCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export interface GetAnalyzerCommandOutput extends GetAnalyzerResponse, __Metadat
103103
* @throws {@link AccessAnalyzerServiceException}
104104
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
105105
*
106+
*
106107
* @public
107108
*/
108109
export class GetAnalyzerCommand extends $Command

clients/client-accessanalyzer/src/commands/GetArchiveRuleCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export interface GetArchiveRuleCommandOutput extends GetArchiveRuleResponse, __M
9090
* @throws {@link AccessAnalyzerServiceException}
9191
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
9292
*
93+
*
9394
* @public
9495
*/
9596
export class GetArchiveRuleCommand extends $Command

clients/client-accessanalyzer/src/commands/GetFindingCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export interface GetFindingCommandOutput extends GetFindingResponse, __MetadataB
104104
* @throws {@link AccessAnalyzerServiceException}
105105
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
106106
*
107+
*
107108
* @public
108109
*/
109110
export class GetFindingCommand extends $Command

0 commit comments

Comments
 (0)