@@ -96,89 +96,87 @@ export interface CheckAccessNotGrantedCommandOutput extends CheckAccessNotGrante
96
96
* @throws {@link AccessAnalyzerServiceException }
97
97
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
98
98
*
99
- * @public
99
+ *
100
100
* @example Passing check. Restrictive identity policy.
101
101
* ```javascript
102
102
* //
103
103
* const input = {
104
- * " access" : [
104
+ * access: [
105
105
* {
106
- * " actions" : [
106
+ * actions: [
107
107
* "s3:PutObject"
108
108
* ]
109
109
* }
110
110
* ],
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"
113
113
* };
114
114
* const command = new CheckAccessNotGrantedCommand(input);
115
115
* const response = await client.send(command);
116
- * /* response ==
116
+ * /* response is
117
117
* {
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"
120
120
* }
121
121
* *\/
122
- * // example id: example-1
123
122
* ```
124
123
*
125
124
* @example Passing check. Restrictive S3 Bucket resource policy.
126
125
* ```javascript
127
126
* //
128
127
* const input = {
129
- * " access" : [
128
+ * access: [
130
129
* {
131
- * " resources" : [
130
+ * resources: [
132
131
* "arn:aws:s3:::sensitive-bucket/*"
133
132
* ]
134
133
* }
135
134
* ],
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"
138
137
* };
139
138
* const command = new CheckAccessNotGrantedCommand(input);
140
139
* const response = await client.send(command);
141
- * /* response ==
140
+ * /* response is
142
141
* {
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"
145
144
* }
146
145
* *\/
147
- * // example id: example-2
148
146
* ```
149
147
*
150
148
* @example Failing check. Permissive S3 Bucket resource policy.
151
149
* ```javascript
152
150
* //
153
151
* const input = {
154
- * " access" : [
152
+ * access: [
155
153
* {
156
- * " resources" : [
154
+ * resources: [
157
155
* "arn:aws:s3:::my-bucket/*"
158
156
* ]
159
157
* }
160
158
* ],
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"
163
161
* };
164
162
* const command = new CheckAccessNotGrantedCommand(input);
165
163
* const response = await client.send(command);
166
- * /* response ==
164
+ * /* response is
167
165
* {
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: [
170
168
* {
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
174
172
* }
175
173
* ],
176
- * " result" : "FAIL"
174
+ * result: "FAIL"
177
175
* }
178
176
* *\/
179
- * // example id: example-3
180
177
* ```
181
178
*
179
+ * @public
182
180
*/
183
181
export class CheckAccessNotGrantedCommand extends $Command
184
182
. classBuilder <
0 commit comments