@aws-sdk/client-verifiedpermissions 3.352.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.
Files changed (183) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +461 -0
  3. package/dist-cjs/VerifiedPermissions.js +59 -0
  4. package/dist-cjs/VerifiedPermissionsClient.js +41 -0
  5. package/dist-cjs/commands/CreateIdentitySourceCommand.js +46 -0
  6. package/dist-cjs/commands/CreatePolicyCommand.js +46 -0
  7. package/dist-cjs/commands/CreatePolicyStoreCommand.js +46 -0
  8. package/dist-cjs/commands/CreatePolicyTemplateCommand.js +46 -0
  9. package/dist-cjs/commands/DeleteIdentitySourceCommand.js +46 -0
  10. package/dist-cjs/commands/DeletePolicyCommand.js +46 -0
  11. package/dist-cjs/commands/DeletePolicyStoreCommand.js +46 -0
  12. package/dist-cjs/commands/DeletePolicyTemplateCommand.js +46 -0
  13. package/dist-cjs/commands/GetIdentitySourceCommand.js +46 -0
  14. package/dist-cjs/commands/GetPolicyCommand.js +46 -0
  15. package/dist-cjs/commands/GetPolicyStoreCommand.js +46 -0
  16. package/dist-cjs/commands/GetPolicyTemplateCommand.js +46 -0
  17. package/dist-cjs/commands/GetSchemaCommand.js +46 -0
  18. package/dist-cjs/commands/IsAuthorizedCommand.js +46 -0
  19. package/dist-cjs/commands/IsAuthorizedWithTokenCommand.js +46 -0
  20. package/dist-cjs/commands/ListIdentitySourcesCommand.js +46 -0
  21. package/dist-cjs/commands/ListPoliciesCommand.js +46 -0
  22. package/dist-cjs/commands/ListPolicyStoresCommand.js +46 -0
  23. package/dist-cjs/commands/ListPolicyTemplatesCommand.js +46 -0
  24. package/dist-cjs/commands/PutSchemaCommand.js +46 -0
  25. package/dist-cjs/commands/UpdateIdentitySourceCommand.js +46 -0
  26. package/dist-cjs/commands/UpdatePolicyCommand.js +46 -0
  27. package/dist-cjs/commands/UpdatePolicyStoreCommand.js +46 -0
  28. package/dist-cjs/commands/UpdatePolicyTemplateCommand.js +46 -0
  29. package/dist-cjs/commands/index.js +27 -0
  30. package/dist-cjs/endpoint/EndpointParameters.js +12 -0
  31. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  32. package/dist-cjs/endpoint/ruleset.js +7 -0
  33. package/dist-cjs/index.js +11 -0
  34. package/dist-cjs/models/VerifiedPermissionsServiceException.js +12 -0
  35. package/dist-cjs/models/index.js +4 -0
  36. package/dist-cjs/models/models_0.js +237 -0
  37. package/dist-cjs/pagination/Interfaces.js +2 -0
  38. package/dist-cjs/pagination/ListIdentitySourcesPaginator.js +29 -0
  39. package/dist-cjs/pagination/ListPoliciesPaginator.js +29 -0
  40. package/dist-cjs/pagination/ListPolicyStoresPaginator.js +29 -0
  41. package/dist-cjs/pagination/ListPolicyTemplatesPaginator.js +29 -0
  42. package/dist-cjs/pagination/index.js +8 -0
  43. package/dist-cjs/protocols/Aws_json1_0.js +1772 -0
  44. package/dist-cjs/runtimeConfig.browser.js +39 -0
  45. package/dist-cjs/runtimeConfig.js +48 -0
  46. package/dist-cjs/runtimeConfig.native.js +15 -0
  47. package/dist-cjs/runtimeConfig.shared.js +21 -0
  48. package/dist-es/VerifiedPermissions.js +55 -0
  49. package/dist-es/VerifiedPermissionsClient.js +37 -0
  50. package/dist-es/commands/CreateIdentitySourceCommand.js +42 -0
  51. package/dist-es/commands/CreatePolicyCommand.js +42 -0
  52. package/dist-es/commands/CreatePolicyStoreCommand.js +42 -0
  53. package/dist-es/commands/CreatePolicyTemplateCommand.js +42 -0
  54. package/dist-es/commands/DeleteIdentitySourceCommand.js +42 -0
  55. package/dist-es/commands/DeletePolicyCommand.js +42 -0
  56. package/dist-es/commands/DeletePolicyStoreCommand.js +42 -0
  57. package/dist-es/commands/DeletePolicyTemplateCommand.js +42 -0
  58. package/dist-es/commands/GetIdentitySourceCommand.js +42 -0
  59. package/dist-es/commands/GetPolicyCommand.js +42 -0
  60. package/dist-es/commands/GetPolicyStoreCommand.js +42 -0
  61. package/dist-es/commands/GetPolicyTemplateCommand.js +42 -0
  62. package/dist-es/commands/GetSchemaCommand.js +42 -0
  63. package/dist-es/commands/IsAuthorizedCommand.js +42 -0
  64. package/dist-es/commands/IsAuthorizedWithTokenCommand.js +42 -0
  65. package/dist-es/commands/ListIdentitySourcesCommand.js +42 -0
  66. package/dist-es/commands/ListPoliciesCommand.js +42 -0
  67. package/dist-es/commands/ListPolicyStoresCommand.js +42 -0
  68. package/dist-es/commands/ListPolicyTemplatesCommand.js +42 -0
  69. package/dist-es/commands/PutSchemaCommand.js +42 -0
  70. package/dist-es/commands/UpdateIdentitySourceCommand.js +42 -0
  71. package/dist-es/commands/UpdatePolicyCommand.js +42 -0
  72. package/dist-es/commands/UpdatePolicyStoreCommand.js +42 -0
  73. package/dist-es/commands/UpdatePolicyTemplateCommand.js +42 -0
  74. package/dist-es/commands/index.js +24 -0
  75. package/dist-es/endpoint/EndpointParameters.js +8 -0
  76. package/dist-es/endpoint/endpointResolver.js +8 -0
  77. package/dist-es/endpoint/ruleset.js +4 -0
  78. package/dist-es/index.js +6 -0
  79. package/dist-es/models/VerifiedPermissionsServiceException.js +8 -0
  80. package/dist-es/models/index.js +1 -0
  81. package/dist-es/models/models_0.js +227 -0
  82. package/dist-es/pagination/Interfaces.js +1 -0
  83. package/dist-es/pagination/ListIdentitySourcesPaginator.js +25 -0
  84. package/dist-es/pagination/ListPoliciesPaginator.js +25 -0
  85. package/dist-es/pagination/ListPolicyStoresPaginator.js +25 -0
  86. package/dist-es/pagination/ListPolicyTemplatesPaginator.js +25 -0
  87. package/dist-es/pagination/index.js +5 -0
  88. package/dist-es/protocols/Aws_json1_0.js +1721 -0
  89. package/dist-es/runtimeConfig.browser.js +34 -0
  90. package/dist-es/runtimeConfig.js +43 -0
  91. package/dist-es/runtimeConfig.native.js +11 -0
  92. package/dist-es/runtimeConfig.shared.js +17 -0
  93. package/dist-types/VerifiedPermissions.d.ts +242 -0
  94. package/dist-types/VerifiedPermissionsClient.d.ts +250 -0
  95. package/dist-types/commands/CreateIdentitySourceCommand.d.ts +210 -0
  96. package/dist-types/commands/CreatePolicyCommand.d.ts +222 -0
  97. package/dist-types/commands/CreatePolicyStoreCommand.d.ts +175 -0
  98. package/dist-types/commands/CreatePolicyTemplateCommand.d.ts +184 -0
  99. package/dist-types/commands/DeleteIdentitySourceCommand.d.ts +175 -0
  100. package/dist-types/commands/DeletePolicyCommand.d.ts +174 -0
  101. package/dist-types/commands/DeletePolicyStoreCommand.d.ts +166 -0
  102. package/dist-types/commands/DeletePolicyTemplateCommand.d.ts +177 -0
  103. package/dist-types/commands/GetIdentitySourceCommand.d.ts +182 -0
  104. package/dist-types/commands/GetPolicyCommand.d.ts +199 -0
  105. package/dist-types/commands/GetPolicyStoreCommand.d.ts +175 -0
  106. package/dist-types/commands/GetPolicyTemplateCommand.d.ts +175 -0
  107. package/dist-types/commands/GetSchemaCommand.d.ts +172 -0
  108. package/dist-types/commands/IsAuthorizedCommand.d.ts +239 -0
  109. package/dist-types/commands/IsAuthorizedWithTokenCommand.d.ts +240 -0
  110. package/dist-types/commands/ListIdentitySourcesCommand.d.ts +193 -0
  111. package/dist-types/commands/ListPoliciesCommand.d.ts +222 -0
  112. package/dist-types/commands/ListPolicyStoresCommand.d.ts +174 -0
  113. package/dist-types/commands/ListPolicyTemplatesCommand.d.ts +180 -0
  114. package/dist-types/commands/PutSchemaCommand.d.ts +188 -0
  115. package/dist-types/commands/UpdateIdentitySourceCommand.d.ts +187 -0
  116. package/dist-types/commands/UpdatePolicyCommand.d.ts +202 -0
  117. package/dist-types/commands/UpdatePolicyStoreCommand.d.ts +179 -0
  118. package/dist-types/commands/UpdatePolicyTemplateCommand.d.ts +184 -0
  119. package/dist-types/commands/index.d.ts +24 -0
  120. package/dist-types/endpoint/EndpointParameters.d.ts +20 -0
  121. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  122. package/dist-types/endpoint/ruleset.d.ts +2 -0
  123. package/dist-types/index.d.ts +75 -0
  124. package/dist-types/models/VerifiedPermissionsServiceException.d.ts +13 -0
  125. package/dist-types/models/index.d.ts +1 -0
  126. package/dist-types/models/models_0.d.ts +2456 -0
  127. package/dist-types/pagination/Interfaces.d.ts +8 -0
  128. package/dist-types/pagination/ListIdentitySourcesPaginator.d.ts +7 -0
  129. package/dist-types/pagination/ListPoliciesPaginator.d.ts +7 -0
  130. package/dist-types/pagination/ListPolicyStoresPaginator.d.ts +7 -0
  131. package/dist-types/pagination/ListPolicyTemplatesPaginator.d.ts +7 -0
  132. package/dist-types/pagination/index.d.ts +5 -0
  133. package/dist-types/protocols/Aws_json1_0.d.ts +218 -0
  134. package/dist-types/runtimeConfig.browser.d.ts +42 -0
  135. package/dist-types/runtimeConfig.d.ts +42 -0
  136. package/dist-types/runtimeConfig.native.d.ts +41 -0
  137. package/dist-types/runtimeConfig.shared.d.ts +18 -0
  138. package/dist-types/ts3.4/VerifiedPermissions.d.ts +415 -0
  139. package/dist-types/ts3.4/VerifiedPermissionsClient.d.ts +259 -0
  140. package/dist-types/ts3.4/commands/CreateIdentitySourceCommand.d.ts +42 -0
  141. package/dist-types/ts3.4/commands/CreatePolicyCommand.d.ts +35 -0
  142. package/dist-types/ts3.4/commands/CreatePolicyStoreCommand.d.ts +38 -0
  143. package/dist-types/ts3.4/commands/CreatePolicyTemplateCommand.d.ts +42 -0
  144. package/dist-types/ts3.4/commands/DeleteIdentitySourceCommand.d.ts +42 -0
  145. package/dist-types/ts3.4/commands/DeletePolicyCommand.d.ts +35 -0
  146. package/dist-types/ts3.4/commands/DeletePolicyStoreCommand.d.ts +38 -0
  147. package/dist-types/ts3.4/commands/DeletePolicyTemplateCommand.d.ts +42 -0
  148. package/dist-types/ts3.4/commands/GetIdentitySourceCommand.d.ts +38 -0
  149. package/dist-types/ts3.4/commands/GetPolicyCommand.d.ts +35 -0
  150. package/dist-types/ts3.4/commands/GetPolicyStoreCommand.d.ts +35 -0
  151. package/dist-types/ts3.4/commands/GetPolicyTemplateCommand.d.ts +38 -0
  152. package/dist-types/ts3.4/commands/GetSchemaCommand.d.ts +35 -0
  153. package/dist-types/ts3.4/commands/IsAuthorizedCommand.d.ts +35 -0
  154. package/dist-types/ts3.4/commands/IsAuthorizedWithTokenCommand.d.ts +42 -0
  155. package/dist-types/ts3.4/commands/ListIdentitySourcesCommand.d.ts +39 -0
  156. package/dist-types/ts3.4/commands/ListPoliciesCommand.d.ts +35 -0
  157. package/dist-types/ts3.4/commands/ListPolicyStoresCommand.d.ts +38 -0
  158. package/dist-types/ts3.4/commands/ListPolicyTemplatesCommand.d.ts +39 -0
  159. package/dist-types/ts3.4/commands/PutSchemaCommand.d.ts +35 -0
  160. package/dist-types/ts3.4/commands/UpdateIdentitySourceCommand.d.ts +42 -0
  161. package/dist-types/ts3.4/commands/UpdatePolicyCommand.d.ts +35 -0
  162. package/dist-types/ts3.4/commands/UpdatePolicyStoreCommand.d.ts +38 -0
  163. package/dist-types/ts3.4/commands/UpdatePolicyTemplateCommand.d.ts +42 -0
  164. package/dist-types/ts3.4/commands/index.d.ts +24 -0
  165. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +32 -0
  166. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  167. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  168. package/dist-types/ts3.4/index.d.ts +6 -0
  169. package/dist-types/ts3.4/models/VerifiedPermissionsServiceException.d.ts +8 -0
  170. package/dist-types/ts3.4/models/index.d.ts +1 -0
  171. package/dist-types/ts3.4/models/models_0.d.ts +757 -0
  172. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  173. package/dist-types/ts3.4/pagination/ListIdentitySourcesPaginator.d.ts +11 -0
  174. package/dist-types/ts3.4/pagination/ListPoliciesPaginator.d.ts +11 -0
  175. package/dist-types/ts3.4/pagination/ListPolicyStoresPaginator.d.ts +11 -0
  176. package/dist-types/ts3.4/pagination/ListPolicyTemplatesPaginator.d.ts +11 -0
  177. package/dist-types/ts3.4/pagination/index.d.ts +5 -0
  178. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +293 -0
  179. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +96 -0
  180. package/dist-types/ts3.4/runtimeConfig.d.ts +93 -0
  181. package/dist-types/ts3.4/runtimeConfig.native.d.ts +87 -0
  182. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +20 -0
  183. package/package.json +101 -0
@@ -0,0 +1,172 @@
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { GetSchemaInput, GetSchemaOutput } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, VerifiedPermissionsClientResolvedConfig } from "../VerifiedPermissionsClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link GetSchemaCommand}.
14
+ */
15
+ export interface GetSchemaCommandInput extends GetSchemaInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link GetSchemaCommand}.
21
+ */
22
+ export interface GetSchemaCommandOutput extends GetSchemaOutput, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Retrieve the details for the specified schema in the specified policy store.</p>
27
+ * @example
28
+ * Use a bare-bones client and the command you need to make an API call.
29
+ * ```javascript
30
+ * import { VerifiedPermissionsClient, GetSchemaCommand } from "@aws-sdk/client-verifiedpermissions"; // ES Modules import
31
+ * // const { VerifiedPermissionsClient, GetSchemaCommand } = require("@aws-sdk/client-verifiedpermissions"); // CommonJS import
32
+ * const client = new VerifiedPermissionsClient(config);
33
+ * const input = { // GetSchemaInput
34
+ * policyStoreId: "STRING_VALUE", // required
35
+ * };
36
+ * const command = new GetSchemaCommand(input);
37
+ * const response = await client.send(command);
38
+ * // { // GetSchemaOutput
39
+ * // policyStoreId: "STRING_VALUE", // required
40
+ * // schema: "STRING_VALUE", // required
41
+ * // createdDate: new Date("TIMESTAMP"), // required
42
+ * // lastUpdatedDate: new Date("TIMESTAMP"), // required
43
+ * // };
44
+ *
45
+ * ```
46
+ *
47
+ * @param GetSchemaCommandInput - {@link GetSchemaCommandInput}
48
+ * @returns {@link GetSchemaCommandOutput}
49
+ * @see {@link GetSchemaCommandInput} for command's `input` shape.
50
+ * @see {@link GetSchemaCommandOutput} for command's `response` shape.
51
+ * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
52
+ *
53
+ * @throws {@link ResourceNotFoundException} (client fault)
54
+ * <p>The request failed because it references a resource that doesn't exist.</p>
55
+ *
56
+ * @throws {@link AccessDeniedException} (client fault)
57
+ * <p>You don't have sufficient access to perform this action.</p>
58
+ *
59
+ * @throws {@link InternalServerException} (server fault)
60
+ * <p>The request failed because of an internal error. Try your request again later</p>
61
+ *
62
+ * @throws {@link ThrottlingException} (client fault)
63
+ * <p>The request failed because it exceeded a throttling quota.</p>
64
+ *
65
+ * @throws {@link ValidationException} (client fault)
66
+ * <p>The request failed because one or more input parameters don't satisfy their constraint
67
+ * requirements. The output is provided as a list of fields and a reason for each field that
68
+ * isn't valid.</p>
69
+ * <p>The possible reasons include the following:</p>
70
+ * <ul>
71
+ * <li>
72
+ * <p>
73
+ * <b>UnrecognizedEntityType</b>
74
+ * </p>
75
+ * <p>The policy includes an entity type that isn't found in the schema.</p>
76
+ * </li>
77
+ * <li>
78
+ * <p>
79
+ * <b>UnrecognizedActionId</b>
80
+ * </p>
81
+ * <p>The policy includes an action id that isn't found in the schema.</p>
82
+ * </li>
83
+ * <li>
84
+ * <p>
85
+ * <b>InvalidActionApplication</b>
86
+ * </p>
87
+ * <p>The policy includes an action that, according to the schema, doesn't support
88
+ * the specified principal and resource.</p>
89
+ * </li>
90
+ * <li>
91
+ * <p>
92
+ * <b>UnexpectedType</b>
93
+ * </p>
94
+ * <p>The policy included an operand that isn't a valid type for the specified
95
+ * operation.</p>
96
+ * </li>
97
+ * <li>
98
+ * <p>
99
+ * <b>IncompatibleTypes</b>
100
+ * </p>
101
+ * <p>The types of elements included in a <code>set</code>, or the types of
102
+ * expressions used in an <code>if...then...else</code> clause aren't compatible in
103
+ * this context.</p>
104
+ * </li>
105
+ * <li>
106
+ * <p>
107
+ * <b>MissingAttribute</b>
108
+ * </p>
109
+ * <p>The policy attempts to access a record or entity attribute that isn't
110
+ * specified in the schema. Test for the existence of the attribute first before
111
+ * attempting to access its value. For more information, see the <a href="docs.cedarpolicy.comsyntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the
112
+ * <i>Cedar Policy Language Guide</i>.</p>
113
+ * </li>
114
+ * <li>
115
+ * <p>
116
+ * <b>UnsafeOptionalAttributeAccess</b>
117
+ * </p>
118
+ * <p>The policy attempts to access a record or entity attribute that is optional
119
+ * and isn't guaranteed to be present. Test for the existence of the attribute
120
+ * first before attempting to access its value. For more information, see the
121
+ * <a href="docs.cedarpolicy.comsyntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the
122
+ * <i>Cedar Policy Language Guide</i>.</p>
123
+ * </li>
124
+ * <li>
125
+ * <p>
126
+ * <b>ImpossiblePolicy</b>
127
+ * </p>
128
+ * <p>Cedar has determined that a policy condition always evaluates to false. If
129
+ * the policy is always false, it can never apply to any query, and so it can never
130
+ * affect an authorization decision.</p>
131
+ * </li>
132
+ * <li>
133
+ * <p>
134
+ * <b>WrongNumberArguments</b>
135
+ * </p>
136
+ * <p>The policy references an extension type with the wrong number of
137
+ * arguments.</p>
138
+ * </li>
139
+ * <li>
140
+ * <p>
141
+ * <b>FunctionArgumentValidationError</b>
142
+ * </p>
143
+ * <p>Cedar couldn't parse the argument passed to an extension type. For example,
144
+ * a string that is to be parsed as an IPv4 address can contain only digits and the
145
+ * period character.</p>
146
+ * </li>
147
+ * </ul>
148
+ *
149
+ * @throws {@link VerifiedPermissionsServiceException}
150
+ * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
151
+ *
152
+ */
153
+ export declare class GetSchemaCommand extends $Command<GetSchemaCommandInput, GetSchemaCommandOutput, VerifiedPermissionsClientResolvedConfig> {
154
+ readonly input: GetSchemaCommandInput;
155
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
156
+ /**
157
+ * @public
158
+ */
159
+ constructor(input: GetSchemaCommandInput);
160
+ /**
161
+ * @internal
162
+ */
163
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: VerifiedPermissionsClientResolvedConfig, options?: __HttpHandlerOptions): Handler<GetSchemaCommandInput, GetSchemaCommandOutput>;
164
+ /**
165
+ * @internal
166
+ */
167
+ private serialize;
168
+ /**
169
+ * @internal
170
+ */
171
+ private deserialize;
172
+ }
@@ -0,0 +1,239 @@
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { IsAuthorizedInput, IsAuthorizedOutput } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, VerifiedPermissionsClientResolvedConfig } from "../VerifiedPermissionsClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link IsAuthorizedCommand}.
14
+ */
15
+ export interface IsAuthorizedCommandInput extends IsAuthorizedInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link IsAuthorizedCommand}.
21
+ */
22
+ export interface IsAuthorizedCommandOutput extends IsAuthorizedOutput, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Makes an authorization decision about a service request described in the parameters.
27
+ * The information in the parameters can also define additional context that Verified Permissions can
28
+ * include in the evaluation. The request is evaluated against all matching policies in the
29
+ * specified policy store. The result of the decision is either <code>Allow</code> or
30
+ * <code>Deny</code>, along with a list of the policies that resulted in the
31
+ * decision.</p>
32
+ * @example
33
+ * Use a bare-bones client and the command you need to make an API call.
34
+ * ```javascript
35
+ * import { VerifiedPermissionsClient, IsAuthorizedCommand } from "@aws-sdk/client-verifiedpermissions"; // ES Modules import
36
+ * // const { VerifiedPermissionsClient, IsAuthorizedCommand } = require("@aws-sdk/client-verifiedpermissions"); // CommonJS import
37
+ * const client = new VerifiedPermissionsClient(config);
38
+ * const input = { // IsAuthorizedInput
39
+ * policyStoreId: "STRING_VALUE", // required
40
+ * principal: { // EntityIdentifier
41
+ * entityType: "STRING_VALUE", // required
42
+ * entityId: "STRING_VALUE", // required
43
+ * },
44
+ * action: { // ActionIdentifier
45
+ * actionType: "STRING_VALUE", // required
46
+ * actionId: "STRING_VALUE", // required
47
+ * },
48
+ * resource: {
49
+ * entityType: "STRING_VALUE", // required
50
+ * entityId: "STRING_VALUE", // required
51
+ * },
52
+ * context: { // ContextDefinition Union: only one key present
53
+ * contextMap: { // ContextMap
54
+ * "<keys>": { // AttributeValue Union: only one key present
55
+ * boolean: true || false,
56
+ * entityIdentifier: {
57
+ * entityType: "STRING_VALUE", // required
58
+ * entityId: "STRING_VALUE", // required
59
+ * },
60
+ * long: Number("long"),
61
+ * string: "STRING_VALUE",
62
+ * set: [ // SetAttribute
63
+ * {// Union: only one key present
64
+ * boolean: true || false,
65
+ * entityIdentifier: "<EntityIdentifier>",
66
+ * long: Number("long"),
67
+ * string: "STRING_VALUE",
68
+ * set: [
69
+ * "<AttributeValue>",
70
+ * ],
71
+ * record: { // RecordAttribute
72
+ * "<keys>": "<AttributeValue>",
73
+ * },
74
+ * },
75
+ * ],
76
+ * record: {
77
+ * "<keys>": "<AttributeValue>",
78
+ * },
79
+ * },
80
+ * },
81
+ * },
82
+ * entities: { // EntitiesDefinition Union: only one key present
83
+ * entityList: [ // EntityList
84
+ * { // EntityItem
85
+ * identifier: "<EntityIdentifier>", // required
86
+ * attributes: { // EntityAttributes
87
+ * "<keys>": "<AttributeValue>",
88
+ * },
89
+ * parents: [ // ParentList
90
+ * "<EntityIdentifier>",
91
+ * ],
92
+ * },
93
+ * ],
94
+ * },
95
+ * };
96
+ * const command = new IsAuthorizedCommand(input);
97
+ * const response = await client.send(command);
98
+ * // { // IsAuthorizedOutput
99
+ * // decision: "ALLOW" || "DENY", // required
100
+ * // determiningPolicies: [ // DeterminingPolicyList // required
101
+ * // { // DeterminingPolicyItem
102
+ * // policyId: "STRING_VALUE", // required
103
+ * // },
104
+ * // ],
105
+ * // errors: [ // EvaluationErrorList // required
106
+ * // { // EvaluationErrorItem
107
+ * // errorDescription: "STRING_VALUE", // required
108
+ * // },
109
+ * // ],
110
+ * // };
111
+ *
112
+ * ```
113
+ *
114
+ * @param IsAuthorizedCommandInput - {@link IsAuthorizedCommandInput}
115
+ * @returns {@link IsAuthorizedCommandOutput}
116
+ * @see {@link IsAuthorizedCommandInput} for command's `input` shape.
117
+ * @see {@link IsAuthorizedCommandOutput} for command's `response` shape.
118
+ * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
119
+ *
120
+ * @throws {@link ResourceNotFoundException} (client fault)
121
+ * <p>The request failed because it references a resource that doesn't exist.</p>
122
+ *
123
+ * @throws {@link AccessDeniedException} (client fault)
124
+ * <p>You don't have sufficient access to perform this action.</p>
125
+ *
126
+ * @throws {@link InternalServerException} (server fault)
127
+ * <p>The request failed because of an internal error. Try your request again later</p>
128
+ *
129
+ * @throws {@link ThrottlingException} (client fault)
130
+ * <p>The request failed because it exceeded a throttling quota.</p>
131
+ *
132
+ * @throws {@link ValidationException} (client fault)
133
+ * <p>The request failed because one or more input parameters don't satisfy their constraint
134
+ * requirements. The output is provided as a list of fields and a reason for each field that
135
+ * isn't valid.</p>
136
+ * <p>The possible reasons include the following:</p>
137
+ * <ul>
138
+ * <li>
139
+ * <p>
140
+ * <b>UnrecognizedEntityType</b>
141
+ * </p>
142
+ * <p>The policy includes an entity type that isn't found in the schema.</p>
143
+ * </li>
144
+ * <li>
145
+ * <p>
146
+ * <b>UnrecognizedActionId</b>
147
+ * </p>
148
+ * <p>The policy includes an action id that isn't found in the schema.</p>
149
+ * </li>
150
+ * <li>
151
+ * <p>
152
+ * <b>InvalidActionApplication</b>
153
+ * </p>
154
+ * <p>The policy includes an action that, according to the schema, doesn't support
155
+ * the specified principal and resource.</p>
156
+ * </li>
157
+ * <li>
158
+ * <p>
159
+ * <b>UnexpectedType</b>
160
+ * </p>
161
+ * <p>The policy included an operand that isn't a valid type for the specified
162
+ * operation.</p>
163
+ * </li>
164
+ * <li>
165
+ * <p>
166
+ * <b>IncompatibleTypes</b>
167
+ * </p>
168
+ * <p>The types of elements included in a <code>set</code>, or the types of
169
+ * expressions used in an <code>if...then...else</code> clause aren't compatible in
170
+ * this context.</p>
171
+ * </li>
172
+ * <li>
173
+ * <p>
174
+ * <b>MissingAttribute</b>
175
+ * </p>
176
+ * <p>The policy attempts to access a record or entity attribute that isn't
177
+ * specified in the schema. Test for the existence of the attribute first before
178
+ * attempting to access its value. For more information, see the <a href="docs.cedarpolicy.comsyntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the
179
+ * <i>Cedar Policy Language Guide</i>.</p>
180
+ * </li>
181
+ * <li>
182
+ * <p>
183
+ * <b>UnsafeOptionalAttributeAccess</b>
184
+ * </p>
185
+ * <p>The policy attempts to access a record or entity attribute that is optional
186
+ * and isn't guaranteed to be present. Test for the existence of the attribute
187
+ * first before attempting to access its value. For more information, see the
188
+ * <a href="docs.cedarpolicy.comsyntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the
189
+ * <i>Cedar Policy Language Guide</i>.</p>
190
+ * </li>
191
+ * <li>
192
+ * <p>
193
+ * <b>ImpossiblePolicy</b>
194
+ * </p>
195
+ * <p>Cedar has determined that a policy condition always evaluates to false. If
196
+ * the policy is always false, it can never apply to any query, and so it can never
197
+ * affect an authorization decision.</p>
198
+ * </li>
199
+ * <li>
200
+ * <p>
201
+ * <b>WrongNumberArguments</b>
202
+ * </p>
203
+ * <p>The policy references an extension type with the wrong number of
204
+ * arguments.</p>
205
+ * </li>
206
+ * <li>
207
+ * <p>
208
+ * <b>FunctionArgumentValidationError</b>
209
+ * </p>
210
+ * <p>Cedar couldn't parse the argument passed to an extension type. For example,
211
+ * a string that is to be parsed as an IPv4 address can contain only digits and the
212
+ * period character.</p>
213
+ * </li>
214
+ * </ul>
215
+ *
216
+ * @throws {@link VerifiedPermissionsServiceException}
217
+ * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
218
+ *
219
+ */
220
+ export declare class IsAuthorizedCommand extends $Command<IsAuthorizedCommandInput, IsAuthorizedCommandOutput, VerifiedPermissionsClientResolvedConfig> {
221
+ readonly input: IsAuthorizedCommandInput;
222
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
223
+ /**
224
+ * @public
225
+ */
226
+ constructor(input: IsAuthorizedCommandInput);
227
+ /**
228
+ * @internal
229
+ */
230
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: VerifiedPermissionsClientResolvedConfig, options?: __HttpHandlerOptions): Handler<IsAuthorizedCommandInput, IsAuthorizedCommandOutput>;
231
+ /**
232
+ * @internal
233
+ */
234
+ private serialize;
235
+ /**
236
+ * @internal
237
+ */
238
+ private deserialize;
239
+ }
@@ -0,0 +1,240 @@
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
4
+ import { IsAuthorizedWithTokenInput, IsAuthorizedWithTokenOutput } from "../models/models_0";
5
+ import { ServiceInputTypes, ServiceOutputTypes, VerifiedPermissionsClientResolvedConfig } from "../VerifiedPermissionsClient";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link IsAuthorizedWithTokenCommand}.
14
+ */
15
+ export interface IsAuthorizedWithTokenCommandInput extends IsAuthorizedWithTokenInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link IsAuthorizedWithTokenCommand}.
21
+ */
22
+ export interface IsAuthorizedWithTokenCommandOutput extends IsAuthorizedWithTokenOutput, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Makes an authorization decision about a service request described in the parameters.
27
+ * The principal in this request comes from an external identity source. The information in the
28
+ * parameters can also define additional context that Verified Permissions can include in the evaluation.
29
+ * The request is evaluated against all matching policies in the specified policy store. The result
30
+ * of the decision is either <code>Allow</code> or <code>Deny</code>, along with a list of
31
+ * the policies that resulted in the decision.</p>
32
+ * <important>
33
+ * <p>If you delete a Amazon Cognito user pool or user, tokens from that deleted pool or that deleted user continue to be usable until they expire.</p>
34
+ * </important>
35
+ * @example
36
+ * Use a bare-bones client and the command you need to make an API call.
37
+ * ```javascript
38
+ * import { VerifiedPermissionsClient, IsAuthorizedWithTokenCommand } from "@aws-sdk/client-verifiedpermissions"; // ES Modules import
39
+ * // const { VerifiedPermissionsClient, IsAuthorizedWithTokenCommand } = require("@aws-sdk/client-verifiedpermissions"); // CommonJS import
40
+ * const client = new VerifiedPermissionsClient(config);
41
+ * const input = { // IsAuthorizedWithTokenInput
42
+ * policyStoreId: "STRING_VALUE", // required
43
+ * identityToken: "STRING_VALUE",
44
+ * accessToken: "STRING_VALUE",
45
+ * action: { // ActionIdentifier
46
+ * actionType: "STRING_VALUE", // required
47
+ * actionId: "STRING_VALUE", // required
48
+ * },
49
+ * resource: { // EntityIdentifier
50
+ * entityType: "STRING_VALUE", // required
51
+ * entityId: "STRING_VALUE", // required
52
+ * },
53
+ * context: { // ContextDefinition Union: only one key present
54
+ * contextMap: { // ContextMap
55
+ * "<keys>": { // AttributeValue Union: only one key present
56
+ * boolean: true || false,
57
+ * entityIdentifier: {
58
+ * entityType: "STRING_VALUE", // required
59
+ * entityId: "STRING_VALUE", // required
60
+ * },
61
+ * long: Number("long"),
62
+ * string: "STRING_VALUE",
63
+ * set: [ // SetAttribute
64
+ * {// Union: only one key present
65
+ * boolean: true || false,
66
+ * entityIdentifier: "<EntityIdentifier>",
67
+ * long: Number("long"),
68
+ * string: "STRING_VALUE",
69
+ * set: [
70
+ * "<AttributeValue>",
71
+ * ],
72
+ * record: { // RecordAttribute
73
+ * "<keys>": "<AttributeValue>",
74
+ * },
75
+ * },
76
+ * ],
77
+ * record: {
78
+ * "<keys>": "<AttributeValue>",
79
+ * },
80
+ * },
81
+ * },
82
+ * },
83
+ * entities: { // EntitiesDefinition Union: only one key present
84
+ * entityList: [ // EntityList
85
+ * { // EntityItem
86
+ * identifier: "<EntityIdentifier>", // required
87
+ * attributes: { // EntityAttributes
88
+ * "<keys>": "<AttributeValue>",
89
+ * },
90
+ * parents: [ // ParentList
91
+ * "<EntityIdentifier>",
92
+ * ],
93
+ * },
94
+ * ],
95
+ * },
96
+ * };
97
+ * const command = new IsAuthorizedWithTokenCommand(input);
98
+ * const response = await client.send(command);
99
+ * // { // IsAuthorizedWithTokenOutput
100
+ * // decision: "ALLOW" || "DENY", // required
101
+ * // determiningPolicies: [ // DeterminingPolicyList // required
102
+ * // { // DeterminingPolicyItem
103
+ * // policyId: "STRING_VALUE", // required
104
+ * // },
105
+ * // ],
106
+ * // errors: [ // EvaluationErrorList // required
107
+ * // { // EvaluationErrorItem
108
+ * // errorDescription: "STRING_VALUE", // required
109
+ * // },
110
+ * // ],
111
+ * // };
112
+ *
113
+ * ```
114
+ *
115
+ * @param IsAuthorizedWithTokenCommandInput - {@link IsAuthorizedWithTokenCommandInput}
116
+ * @returns {@link IsAuthorizedWithTokenCommandOutput}
117
+ * @see {@link IsAuthorizedWithTokenCommandInput} for command's `input` shape.
118
+ * @see {@link IsAuthorizedWithTokenCommandOutput} for command's `response` shape.
119
+ * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
120
+ *
121
+ * @throws {@link ResourceNotFoundException} (client fault)
122
+ * <p>The request failed because it references a resource that doesn't exist.</p>
123
+ *
124
+ * @throws {@link AccessDeniedException} (client fault)
125
+ * <p>You don't have sufficient access to perform this action.</p>
126
+ *
127
+ * @throws {@link InternalServerException} (server fault)
128
+ * <p>The request failed because of an internal error. Try your request again later</p>
129
+ *
130
+ * @throws {@link ThrottlingException} (client fault)
131
+ * <p>The request failed because it exceeded a throttling quota.</p>
132
+ *
133
+ * @throws {@link ValidationException} (client fault)
134
+ * <p>The request failed because one or more input parameters don't satisfy their constraint
135
+ * requirements. The output is provided as a list of fields and a reason for each field that
136
+ * isn't valid.</p>
137
+ * <p>The possible reasons include the following:</p>
138
+ * <ul>
139
+ * <li>
140
+ * <p>
141
+ * <b>UnrecognizedEntityType</b>
142
+ * </p>
143
+ * <p>The policy includes an entity type that isn't found in the schema.</p>
144
+ * </li>
145
+ * <li>
146
+ * <p>
147
+ * <b>UnrecognizedActionId</b>
148
+ * </p>
149
+ * <p>The policy includes an action id that isn't found in the schema.</p>
150
+ * </li>
151
+ * <li>
152
+ * <p>
153
+ * <b>InvalidActionApplication</b>
154
+ * </p>
155
+ * <p>The policy includes an action that, according to the schema, doesn't support
156
+ * the specified principal and resource.</p>
157
+ * </li>
158
+ * <li>
159
+ * <p>
160
+ * <b>UnexpectedType</b>
161
+ * </p>
162
+ * <p>The policy included an operand that isn't a valid type for the specified
163
+ * operation.</p>
164
+ * </li>
165
+ * <li>
166
+ * <p>
167
+ * <b>IncompatibleTypes</b>
168
+ * </p>
169
+ * <p>The types of elements included in a <code>set</code>, or the types of
170
+ * expressions used in an <code>if...then...else</code> clause aren't compatible in
171
+ * this context.</p>
172
+ * </li>
173
+ * <li>
174
+ * <p>
175
+ * <b>MissingAttribute</b>
176
+ * </p>
177
+ * <p>The policy attempts to access a record or entity attribute that isn't
178
+ * specified in the schema. Test for the existence of the attribute first before
179
+ * attempting to access its value. For more information, see the <a href="docs.cedarpolicy.comsyntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the
180
+ * <i>Cedar Policy Language Guide</i>.</p>
181
+ * </li>
182
+ * <li>
183
+ * <p>
184
+ * <b>UnsafeOptionalAttributeAccess</b>
185
+ * </p>
186
+ * <p>The policy attempts to access a record or entity attribute that is optional
187
+ * and isn't guaranteed to be present. Test for the existence of the attribute
188
+ * first before attempting to access its value. For more information, see the
189
+ * <a href="docs.cedarpolicy.comsyntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the
190
+ * <i>Cedar Policy Language Guide</i>.</p>
191
+ * </li>
192
+ * <li>
193
+ * <p>
194
+ * <b>ImpossiblePolicy</b>
195
+ * </p>
196
+ * <p>Cedar has determined that a policy condition always evaluates to false. If
197
+ * the policy is always false, it can never apply to any query, and so it can never
198
+ * affect an authorization decision.</p>
199
+ * </li>
200
+ * <li>
201
+ * <p>
202
+ * <b>WrongNumberArguments</b>
203
+ * </p>
204
+ * <p>The policy references an extension type with the wrong number of
205
+ * arguments.</p>
206
+ * </li>
207
+ * <li>
208
+ * <p>
209
+ * <b>FunctionArgumentValidationError</b>
210
+ * </p>
211
+ * <p>Cedar couldn't parse the argument passed to an extension type. For example,
212
+ * a string that is to be parsed as an IPv4 address can contain only digits and the
213
+ * period character.</p>
214
+ * </li>
215
+ * </ul>
216
+ *
217
+ * @throws {@link VerifiedPermissionsServiceException}
218
+ * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
219
+ *
220
+ */
221
+ export declare class IsAuthorizedWithTokenCommand extends $Command<IsAuthorizedWithTokenCommandInput, IsAuthorizedWithTokenCommandOutput, VerifiedPermissionsClientResolvedConfig> {
222
+ readonly input: IsAuthorizedWithTokenCommandInput;
223
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
224
+ /**
225
+ * @public
226
+ */
227
+ constructor(input: IsAuthorizedWithTokenCommandInput);
228
+ /**
229
+ * @internal
230
+ */
231
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: VerifiedPermissionsClientResolvedConfig, options?: __HttpHandlerOptions): Handler<IsAuthorizedWithTokenCommandInput, IsAuthorizedWithTokenCommandOutput>;
232
+ /**
233
+ * @internal
234
+ */
235
+ private serialize;
236
+ /**
237
+ * @internal
238
+ */
239
+ private deserialize;
240
+ }