@aws-sdk/client-verifiedpermissions 3.540.0 → 3.550.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist-cjs/index.js +165 -6
- package/dist-es/VerifiedPermissions.js +2 -0
- package/dist-es/commands/BatchIsAuthorizedWithTokenCommand.js +25 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +56 -0
- package/dist-es/protocols/Aws_json1_0.js +71 -0
- package/dist-types/VerifiedPermissions.d.ts +7 -0
- package/dist-types/VerifiedPermissionsClient.d.ts +3 -2
- package/dist-types/commands/BatchIsAuthorizedWithTokenCommand.d.ts +285 -0
- package/dist-types/commands/CreateIdentitySourceCommand.d.ts +3 -0
- package/dist-types/commands/GetIdentitySourceCommand.d.ts +3 -0
- package/dist-types/commands/IsAuthorizedWithTokenCommand.d.ts +4 -9
- package/dist-types/commands/ListIdentitySourcesCommand.d.ts +3 -0
- package/dist-types/commands/UpdateIdentitySourceCommand.d.ts +3 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +267 -12
- package/dist-types/protocols/Aws_json1_0.d.ts +9 -0
- package/dist-types/ts3.4/VerifiedPermissions.d.ts +17 -0
- package/dist-types/ts3.4/VerifiedPermissionsClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/BatchIsAuthorizedWithTokenCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +63 -0
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +12 -0
- package/package.json +6 -6
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import { BatchIsAuthorizedWithTokenInput, BatchIsAuthorizedWithTokenOutput } from "../models/models_0";
|
|
4
|
+
import { ServiceInputTypes, ServiceOutputTypes, VerifiedPermissionsClientResolvedConfig } from "../VerifiedPermissionsClient";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export { __MetadataBearer, $Command };
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
*
|
|
12
|
+
* The input for {@link BatchIsAuthorizedWithTokenCommand}.
|
|
13
|
+
*/
|
|
14
|
+
export interface BatchIsAuthorizedWithTokenCommandInput extends BatchIsAuthorizedWithTokenInput {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @public
|
|
18
|
+
*
|
|
19
|
+
* The output of {@link BatchIsAuthorizedWithTokenCommand}.
|
|
20
|
+
*/
|
|
21
|
+
export interface BatchIsAuthorizedWithTokenCommandOutput extends BatchIsAuthorizedWithTokenOutput, __MetadataBearer {
|
|
22
|
+
}
|
|
23
|
+
declare const BatchIsAuthorizedWithTokenCommand_base: {
|
|
24
|
+
new (input: BatchIsAuthorizedWithTokenCommandInput): import("@smithy/smithy-client").CommandImpl<BatchIsAuthorizedWithTokenCommandInput, BatchIsAuthorizedWithTokenCommandOutput, VerifiedPermissionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
25
|
+
new (__0_0: BatchIsAuthorizedWithTokenCommandInput): import("@smithy/smithy-client").CommandImpl<BatchIsAuthorizedWithTokenCommandInput, BatchIsAuthorizedWithTokenCommandOutput, VerifiedPermissionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* <p>Makes a series of decisions about multiple authorization requests for one token. The
|
|
30
|
+
* principal in this request comes from an external identity source in the form of an identity or
|
|
31
|
+
* access token, formatted as a <a href="https://wikipedia.org/wiki/JSON_Web_Token">JSON
|
|
32
|
+
* web token (JWT)</a>. The information in the parameters can also define
|
|
33
|
+
* additional context that Verified Permissions can include in the evaluations.</p>
|
|
34
|
+
* <p>The request is evaluated against all policies in the specified policy store that match the
|
|
35
|
+
* entities that you provide in the entities declaration and in the token. The result of
|
|
36
|
+
* the decisions is a series of <code>Allow</code> or <code>Deny</code> responses, along
|
|
37
|
+
* with the IDs of the policies that produced each decision.</p>
|
|
38
|
+
* <p>The <code>entities</code> of a <code>BatchIsAuthorizedWithToken</code> API request can
|
|
39
|
+
* contain up to 100 resources and up to 99 user groups. The <code>requests</code> of a
|
|
40
|
+
* <code>BatchIsAuthorizedWithToken</code> API request can contain up to 30
|
|
41
|
+
* requests.</p>
|
|
42
|
+
* <note>
|
|
43
|
+
* <p>The <code>BatchIsAuthorizedWithToken</code> operation doesn't have its own
|
|
44
|
+
* IAM permission. To authorize this operation for Amazon Web Services principals, include the
|
|
45
|
+
* permission <code>verifiedpermissions:IsAuthorizedWithToken</code> in their IAM
|
|
46
|
+
* policies.</p>
|
|
47
|
+
* </note>
|
|
48
|
+
* @example
|
|
49
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
50
|
+
* ```javascript
|
|
51
|
+
* import { VerifiedPermissionsClient, BatchIsAuthorizedWithTokenCommand } from "@aws-sdk/client-verifiedpermissions"; // ES Modules import
|
|
52
|
+
* // const { VerifiedPermissionsClient, BatchIsAuthorizedWithTokenCommand } = require("@aws-sdk/client-verifiedpermissions"); // CommonJS import
|
|
53
|
+
* const client = new VerifiedPermissionsClient(config);
|
|
54
|
+
* const input = { // BatchIsAuthorizedWithTokenInput
|
|
55
|
+
* policyStoreId: "STRING_VALUE", // required
|
|
56
|
+
* identityToken: "STRING_VALUE",
|
|
57
|
+
* accessToken: "STRING_VALUE",
|
|
58
|
+
* entities: { // EntitiesDefinition Union: only one key present
|
|
59
|
+
* entityList: [ // EntityList
|
|
60
|
+
* { // EntityItem
|
|
61
|
+
* identifier: { // EntityIdentifier
|
|
62
|
+
* entityType: "STRING_VALUE", // required
|
|
63
|
+
* entityId: "STRING_VALUE", // required
|
|
64
|
+
* },
|
|
65
|
+
* attributes: { // EntityAttributes
|
|
66
|
+
* "<keys>": { // AttributeValue Union: only one key present
|
|
67
|
+
* boolean: true || false,
|
|
68
|
+
* entityIdentifier: {
|
|
69
|
+
* entityType: "STRING_VALUE", // required
|
|
70
|
+
* entityId: "STRING_VALUE", // required
|
|
71
|
+
* },
|
|
72
|
+
* long: Number("long"),
|
|
73
|
+
* string: "STRING_VALUE",
|
|
74
|
+
* set: [ // SetAttribute
|
|
75
|
+
* {// Union: only one key present
|
|
76
|
+
* boolean: true || false,
|
|
77
|
+
* entityIdentifier: "<EntityIdentifier>",
|
|
78
|
+
* long: Number("long"),
|
|
79
|
+
* string: "STRING_VALUE",
|
|
80
|
+
* set: [
|
|
81
|
+
* "<AttributeValue>",
|
|
82
|
+
* ],
|
|
83
|
+
* record: { // RecordAttribute
|
|
84
|
+
* "<keys>": "<AttributeValue>",
|
|
85
|
+
* },
|
|
86
|
+
* },
|
|
87
|
+
* ],
|
|
88
|
+
* record: {
|
|
89
|
+
* "<keys>": "<AttributeValue>",
|
|
90
|
+
* },
|
|
91
|
+
* },
|
|
92
|
+
* },
|
|
93
|
+
* parents: [ // ParentList
|
|
94
|
+
* "<EntityIdentifier>",
|
|
95
|
+
* ],
|
|
96
|
+
* },
|
|
97
|
+
* ],
|
|
98
|
+
* },
|
|
99
|
+
* requests: [ // BatchIsAuthorizedWithTokenInputList // required
|
|
100
|
+
* { // BatchIsAuthorizedWithTokenInputItem
|
|
101
|
+
* action: { // ActionIdentifier
|
|
102
|
+
* actionType: "STRING_VALUE", // required
|
|
103
|
+
* actionId: "STRING_VALUE", // required
|
|
104
|
+
* },
|
|
105
|
+
* resource: "<EntityIdentifier>",
|
|
106
|
+
* context: { // ContextDefinition Union: only one key present
|
|
107
|
+
* contextMap: { // ContextMap
|
|
108
|
+
* "<keys>": "<AttributeValue>",
|
|
109
|
+
* },
|
|
110
|
+
* },
|
|
111
|
+
* },
|
|
112
|
+
* ],
|
|
113
|
+
* };
|
|
114
|
+
* const command = new BatchIsAuthorizedWithTokenCommand(input);
|
|
115
|
+
* const response = await client.send(command);
|
|
116
|
+
* // { // BatchIsAuthorizedWithTokenOutput
|
|
117
|
+
* // principal: { // EntityIdentifier
|
|
118
|
+
* // entityType: "STRING_VALUE", // required
|
|
119
|
+
* // entityId: "STRING_VALUE", // required
|
|
120
|
+
* // },
|
|
121
|
+
* // results: [ // BatchIsAuthorizedWithTokenOutputList // required
|
|
122
|
+
* // { // BatchIsAuthorizedWithTokenOutputItem
|
|
123
|
+
* // request: { // BatchIsAuthorizedWithTokenInputItem
|
|
124
|
+
* // action: { // ActionIdentifier
|
|
125
|
+
* // actionType: "STRING_VALUE", // required
|
|
126
|
+
* // actionId: "STRING_VALUE", // required
|
|
127
|
+
* // },
|
|
128
|
+
* // resource: {
|
|
129
|
+
* // entityType: "STRING_VALUE", // required
|
|
130
|
+
* // entityId: "STRING_VALUE", // required
|
|
131
|
+
* // },
|
|
132
|
+
* // context: { // ContextDefinition Union: only one key present
|
|
133
|
+
* // contextMap: { // ContextMap
|
|
134
|
+
* // "<keys>": { // AttributeValue Union: only one key present
|
|
135
|
+
* // boolean: true || false,
|
|
136
|
+
* // entityIdentifier: "<EntityIdentifier>",
|
|
137
|
+
* // long: Number("long"),
|
|
138
|
+
* // string: "STRING_VALUE",
|
|
139
|
+
* // set: [ // SetAttribute
|
|
140
|
+
* // {// Union: only one key present
|
|
141
|
+
* // boolean: true || false,
|
|
142
|
+
* // entityIdentifier: "<EntityIdentifier>",
|
|
143
|
+
* // long: Number("long"),
|
|
144
|
+
* // string: "STRING_VALUE",
|
|
145
|
+
* // set: [
|
|
146
|
+
* // "<AttributeValue>",
|
|
147
|
+
* // ],
|
|
148
|
+
* // record: { // RecordAttribute
|
|
149
|
+
* // "<keys>": "<AttributeValue>",
|
|
150
|
+
* // },
|
|
151
|
+
* // },
|
|
152
|
+
* // ],
|
|
153
|
+
* // record: {
|
|
154
|
+
* // "<keys>": "<AttributeValue>",
|
|
155
|
+
* // },
|
|
156
|
+
* // },
|
|
157
|
+
* // },
|
|
158
|
+
* // },
|
|
159
|
+
* // },
|
|
160
|
+
* // decision: "ALLOW" || "DENY", // required
|
|
161
|
+
* // determiningPolicies: [ // DeterminingPolicyList // required
|
|
162
|
+
* // { // DeterminingPolicyItem
|
|
163
|
+
* // policyId: "STRING_VALUE", // required
|
|
164
|
+
* // },
|
|
165
|
+
* // ],
|
|
166
|
+
* // errors: [ // EvaluationErrorList // required
|
|
167
|
+
* // { // EvaluationErrorItem
|
|
168
|
+
* // errorDescription: "STRING_VALUE", // required
|
|
169
|
+
* // },
|
|
170
|
+
* // ],
|
|
171
|
+
* // },
|
|
172
|
+
* // ],
|
|
173
|
+
* // };
|
|
174
|
+
*
|
|
175
|
+
* ```
|
|
176
|
+
*
|
|
177
|
+
* @param BatchIsAuthorizedWithTokenCommandInput - {@link BatchIsAuthorizedWithTokenCommandInput}
|
|
178
|
+
* @returns {@link BatchIsAuthorizedWithTokenCommandOutput}
|
|
179
|
+
* @see {@link BatchIsAuthorizedWithTokenCommandInput} for command's `input` shape.
|
|
180
|
+
* @see {@link BatchIsAuthorizedWithTokenCommandOutput} for command's `response` shape.
|
|
181
|
+
* @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
|
|
182
|
+
*
|
|
183
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
184
|
+
* <p>The request failed because it references a resource that doesn't exist.</p>
|
|
185
|
+
*
|
|
186
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
187
|
+
* <p>You don't have sufficient access to perform this action.</p>
|
|
188
|
+
*
|
|
189
|
+
* @throws {@link InternalServerException} (server fault)
|
|
190
|
+
* <p>The request failed because of an internal error. Try your request again later</p>
|
|
191
|
+
*
|
|
192
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
193
|
+
* <p>The request failed because it exceeded a throttling quota.</p>
|
|
194
|
+
*
|
|
195
|
+
* @throws {@link ValidationException} (client fault)
|
|
196
|
+
* <p>The request failed because one or more input parameters don't satisfy their constraint
|
|
197
|
+
* requirements. The output is provided as a list of fields and a reason for each field that
|
|
198
|
+
* isn't valid.</p>
|
|
199
|
+
* <p>The possible reasons include the following:</p>
|
|
200
|
+
* <ul>
|
|
201
|
+
* <li>
|
|
202
|
+
* <p>
|
|
203
|
+
* <b>UnrecognizedEntityType</b>
|
|
204
|
+
* </p>
|
|
205
|
+
* <p>The policy includes an entity type that isn't found in the schema.</p>
|
|
206
|
+
* </li>
|
|
207
|
+
* <li>
|
|
208
|
+
* <p>
|
|
209
|
+
* <b>UnrecognizedActionId</b>
|
|
210
|
+
* </p>
|
|
211
|
+
* <p>The policy includes an action id that isn't found in the schema.</p>
|
|
212
|
+
* </li>
|
|
213
|
+
* <li>
|
|
214
|
+
* <p>
|
|
215
|
+
* <b>InvalidActionApplication</b>
|
|
216
|
+
* </p>
|
|
217
|
+
* <p>The policy includes an action that, according to the schema, doesn't support
|
|
218
|
+
* the specified principal and resource.</p>
|
|
219
|
+
* </li>
|
|
220
|
+
* <li>
|
|
221
|
+
* <p>
|
|
222
|
+
* <b>UnexpectedType</b>
|
|
223
|
+
* </p>
|
|
224
|
+
* <p>The policy included an operand that isn't a valid type for the specified
|
|
225
|
+
* operation.</p>
|
|
226
|
+
* </li>
|
|
227
|
+
* <li>
|
|
228
|
+
* <p>
|
|
229
|
+
* <b>IncompatibleTypes</b>
|
|
230
|
+
* </p>
|
|
231
|
+
* <p>The types of elements included in a <code>set</code>, or the types of
|
|
232
|
+
* expressions used in an <code>if...then...else</code> clause aren't compatible in
|
|
233
|
+
* this context.</p>
|
|
234
|
+
* </li>
|
|
235
|
+
* <li>
|
|
236
|
+
* <p>
|
|
237
|
+
* <b>MissingAttribute</b>
|
|
238
|
+
* </p>
|
|
239
|
+
* <p>The policy attempts to access a record or entity attribute that isn't
|
|
240
|
+
* specified in the schema. Test for the existence of the attribute first before
|
|
241
|
+
* attempting to access its value. For more information, see the <a href="https://docs.cedarpolicy.com/policies/syntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the
|
|
242
|
+
* <i>Cedar Policy Language Guide</i>.</p>
|
|
243
|
+
* </li>
|
|
244
|
+
* <li>
|
|
245
|
+
* <p>
|
|
246
|
+
* <b>UnsafeOptionalAttributeAccess</b>
|
|
247
|
+
* </p>
|
|
248
|
+
* <p>The policy attempts to access a record or entity attribute that is optional
|
|
249
|
+
* and isn't guaranteed to be present. Test for the existence of the attribute
|
|
250
|
+
* first before attempting to access its value. For more information, see the
|
|
251
|
+
* <a href="https://docs.cedarpolicy.com/policies/syntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the
|
|
252
|
+
* <i>Cedar Policy Language Guide</i>.</p>
|
|
253
|
+
* </li>
|
|
254
|
+
* <li>
|
|
255
|
+
* <p>
|
|
256
|
+
* <b>ImpossiblePolicy</b>
|
|
257
|
+
* </p>
|
|
258
|
+
* <p>Cedar has determined that a policy condition always evaluates to false. If
|
|
259
|
+
* the policy is always false, it can never apply to any query, and so it can never
|
|
260
|
+
* affect an authorization decision.</p>
|
|
261
|
+
* </li>
|
|
262
|
+
* <li>
|
|
263
|
+
* <p>
|
|
264
|
+
* <b>WrongNumberArguments</b>
|
|
265
|
+
* </p>
|
|
266
|
+
* <p>The policy references an extension type with the wrong number of
|
|
267
|
+
* arguments.</p>
|
|
268
|
+
* </li>
|
|
269
|
+
* <li>
|
|
270
|
+
* <p>
|
|
271
|
+
* <b>FunctionArgumentValidationError</b>
|
|
272
|
+
* </p>
|
|
273
|
+
* <p>Cedar couldn't parse the argument passed to an extension type. For example,
|
|
274
|
+
* a string that is to be parsed as an IPv4 address can contain only digits and the
|
|
275
|
+
* period character.</p>
|
|
276
|
+
* </li>
|
|
277
|
+
* </ul>
|
|
278
|
+
*
|
|
279
|
+
* @throws {@link VerifiedPermissionsServiceException}
|
|
280
|
+
* <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
|
|
281
|
+
*
|
|
282
|
+
* @public
|
|
283
|
+
*/
|
|
284
|
+
export declare class BatchIsAuthorizedWithTokenCommand extends BatchIsAuthorizedWithTokenCommand_base {
|
|
285
|
+
}
|
|
@@ -73,6 +73,9 @@ declare const CreateIdentitySourceCommand_base: {
|
|
|
73
73
|
* clientIds: [ // ClientIds
|
|
74
74
|
* "STRING_VALUE",
|
|
75
75
|
* ],
|
|
76
|
+
* groupConfiguration: { // CognitoGroupConfiguration
|
|
77
|
+
* groupEntityType: "STRING_VALUE", // required
|
|
78
|
+
* },
|
|
76
79
|
* },
|
|
77
80
|
* },
|
|
78
81
|
* principalEntityType: "STRING_VALUE",
|
|
@@ -60,6 +60,9 @@ declare const GetIdentitySourceCommand_base: {
|
|
|
60
60
|
* // "STRING_VALUE",
|
|
61
61
|
* // ],
|
|
62
62
|
* // issuer: "STRING_VALUE", // required
|
|
63
|
+
* // groupConfiguration: { // CognitoGroupConfigurationDetail
|
|
64
|
+
* // groupEntityType: "STRING_VALUE",
|
|
65
|
+
* // },
|
|
63
66
|
* // },
|
|
64
67
|
* // },
|
|
65
68
|
* // };
|
|
@@ -34,15 +34,6 @@ declare const IsAuthorizedWithTokenCommand_base: {
|
|
|
34
34
|
* matching policies in the specified policy store. The result of the decision is either
|
|
35
35
|
* <code>Allow</code> or <code>Deny</code>, along with a list of the policies that
|
|
36
36
|
* resulted in the decision.</p>
|
|
37
|
-
* <important>
|
|
38
|
-
* <p>If you specify the <code>identityToken</code> parameter, then this operation
|
|
39
|
-
* derives the principal from that token. You must not also include that principal in
|
|
40
|
-
* the <code>entities</code> parameter or the operation fails and reports a conflict
|
|
41
|
-
* between the two entity sources.</p>
|
|
42
|
-
* <p>If you provide only an <code>accessToken</code>, then you can include the entity
|
|
43
|
-
* as part of the <code>entities</code> parameter to provide additional
|
|
44
|
-
* attributes.</p>
|
|
45
|
-
* </important>
|
|
46
37
|
* <p>At this time, Verified Permissions accepts tokens from only Amazon Cognito.</p>
|
|
47
38
|
* <p>Verified Permissions validates each token that is specified in a request by checking its expiration
|
|
48
39
|
* date and its signature.</p>
|
|
@@ -125,6 +116,10 @@ declare const IsAuthorizedWithTokenCommand_base: {
|
|
|
125
116
|
* // errorDescription: "STRING_VALUE", // required
|
|
126
117
|
* // },
|
|
127
118
|
* // ],
|
|
119
|
+
* // principal: { // EntityIdentifier
|
|
120
|
+
* // entityType: "STRING_VALUE", // required
|
|
121
|
+
* // entityId: "STRING_VALUE", // required
|
|
122
|
+
* // },
|
|
128
123
|
* // };
|
|
129
124
|
*
|
|
130
125
|
* ```
|
|
@@ -69,6 +69,9 @@ declare const ListIdentitySourcesCommand_base: {
|
|
|
69
69
|
* // "STRING_VALUE",
|
|
70
70
|
* // ],
|
|
71
71
|
* // issuer: "STRING_VALUE", // required
|
|
72
|
+
* // groupConfiguration: { // CognitoGroupConfigurationItem
|
|
73
|
+
* // groupEntityType: "STRING_VALUE",
|
|
74
|
+
* // },
|
|
72
75
|
* // },
|
|
73
76
|
* // },
|
|
74
77
|
* // },
|
|
@@ -49,6 +49,9 @@ declare const UpdateIdentitySourceCommand_base: {
|
|
|
49
49
|
* clientIds: [ // ClientIds
|
|
50
50
|
* "STRING_VALUE",
|
|
51
51
|
* ],
|
|
52
|
+
* groupConfiguration: { // UpdateCognitoGroupConfiguration
|
|
53
|
+
* groupEntityType: "STRING_VALUE", // required
|
|
54
|
+
* },
|
|
52
55
|
* },
|
|
53
56
|
* },
|
|
54
57
|
* principalEntityType: "STRING_VALUE",
|