@aws-sdk/client-verifiedpermissions 3.1012.0 → 3.1014.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 (56) hide show
  1. package/README.md +28 -0
  2. package/dist-cjs/index.js +67 -0
  3. package/dist-cjs/schemas/schemas_0.js +116 -30
  4. package/dist-es/VerifiedPermissions.js +10 -0
  5. package/dist-es/commands/CreatePolicyStoreAliasCommand.js +16 -0
  6. package/dist-es/commands/DeletePolicyStoreAliasCommand.js +16 -0
  7. package/dist-es/commands/GetPolicyStoreAliasCommand.js +16 -0
  8. package/dist-es/commands/ListPolicyStoreAliasesCommand.js +16 -0
  9. package/dist-es/commands/index.js +4 -0
  10. package/dist-es/models/enums.js +6 -0
  11. package/dist-es/pagination/ListPolicyStoreAliasesPaginator.js +4 -0
  12. package/dist-es/pagination/index.js +1 -0
  13. package/dist-es/schemas/schemas_0.js +112 -26
  14. package/dist-types/VerifiedPermissions.d.ts +36 -0
  15. package/dist-types/VerifiedPermissionsClient.d.ts +6 -2
  16. package/dist-types/commands/BatchGetPolicyCommand.d.ts +58 -1
  17. package/dist-types/commands/CreateIdentitySourceCommand.d.ts +1 -1
  18. package/dist-types/commands/CreatePolicyCommand.d.ts +4 -35
  19. package/dist-types/commands/CreatePolicyStoreAliasCommand.d.ts +118 -0
  20. package/dist-types/commands/CreatePolicyStoreCommand.d.ts +1 -1
  21. package/dist-types/commands/CreatePolicyTemplateCommand.d.ts +3 -1
  22. package/dist-types/commands/DeleteIdentitySourceCommand.d.ts +1 -1
  23. package/dist-types/commands/DeletePolicyCommand.d.ts +1 -1
  24. package/dist-types/commands/DeletePolicyStoreAliasCommand.d.ts +100 -0
  25. package/dist-types/commands/DeletePolicyTemplateCommand.d.ts +1 -1
  26. package/dist-types/commands/GetPolicyCommand.d.ts +32 -0
  27. package/dist-types/commands/GetPolicyStoreAliasCommand.d.ts +112 -0
  28. package/dist-types/commands/GetPolicyTemplateCommand.d.ts +29 -0
  29. package/dist-types/commands/ListPoliciesCommand.d.ts +3 -0
  30. package/dist-types/commands/ListPolicyStoreAliasesCommand.d.ts +166 -0
  31. package/dist-types/commands/ListPolicyTemplatesCommand.d.ts +3 -0
  32. package/dist-types/commands/PutSchemaCommand.d.ts +1 -1
  33. package/dist-types/commands/UpdateIdentitySourceCommand.d.ts +1 -1
  34. package/dist-types/commands/UpdatePolicyCommand.d.ts +3 -1
  35. package/dist-types/commands/UpdatePolicyStoreCommand.d.ts +1 -1
  36. package/dist-types/commands/UpdatePolicyTemplateCommand.d.ts +3 -1
  37. package/dist-types/commands/index.d.ts +4 -0
  38. package/dist-types/models/enums.d.ts +14 -0
  39. package/dist-types/models/errors.d.ts +1 -1
  40. package/dist-types/models/models_0.d.ts +250 -33
  41. package/dist-types/pagination/ListPolicyStoreAliasesPaginator.d.ts +7 -0
  42. package/dist-types/pagination/index.d.ts +1 -0
  43. package/dist-types/schemas/schemas_0.d.ts +14 -0
  44. package/dist-types/ts3.4/VerifiedPermissions.d.ts +76 -0
  45. package/dist-types/ts3.4/VerifiedPermissionsClient.d.ts +24 -0
  46. package/dist-types/ts3.4/commands/CreatePolicyStoreAliasCommand.d.ts +51 -0
  47. package/dist-types/ts3.4/commands/DeletePolicyStoreAliasCommand.d.ts +51 -0
  48. package/dist-types/ts3.4/commands/GetPolicyStoreAliasCommand.d.ts +51 -0
  49. package/dist-types/ts3.4/commands/ListPolicyStoreAliasesCommand.d.ts +51 -0
  50. package/dist-types/ts3.4/commands/index.d.ts +4 -0
  51. package/dist-types/ts3.4/models/enums.d.ts +7 -0
  52. package/dist-types/ts3.4/models/models_0.d.ts +53 -0
  53. package/dist-types/ts3.4/pagination/ListPolicyStoreAliasesPaginator.d.ts +11 -0
  54. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  55. package/dist-types/ts3.4/schemas/schemas_0.d.ts +14 -0
  56. package/package.json +12 -12
@@ -12,14 +12,17 @@ import { BatchIsAuthorizedCommandInput, BatchIsAuthorizedCommandOutput } from ".
12
12
  import { BatchIsAuthorizedWithTokenCommandInput, BatchIsAuthorizedWithTokenCommandOutput } from "./commands/BatchIsAuthorizedWithTokenCommand";
13
13
  import { CreateIdentitySourceCommandInput, CreateIdentitySourceCommandOutput } from "./commands/CreateIdentitySourceCommand";
14
14
  import { CreatePolicyCommandInput, CreatePolicyCommandOutput } from "./commands/CreatePolicyCommand";
15
+ import { CreatePolicyStoreAliasCommandInput, CreatePolicyStoreAliasCommandOutput } from "./commands/CreatePolicyStoreAliasCommand";
15
16
  import { CreatePolicyStoreCommandInput, CreatePolicyStoreCommandOutput } from "./commands/CreatePolicyStoreCommand";
16
17
  import { CreatePolicyTemplateCommandInput, CreatePolicyTemplateCommandOutput } from "./commands/CreatePolicyTemplateCommand";
17
18
  import { DeleteIdentitySourceCommandInput, DeleteIdentitySourceCommandOutput } from "./commands/DeleteIdentitySourceCommand";
18
19
  import { DeletePolicyCommandInput, DeletePolicyCommandOutput } from "./commands/DeletePolicyCommand";
20
+ import { DeletePolicyStoreAliasCommandInput, DeletePolicyStoreAliasCommandOutput } from "./commands/DeletePolicyStoreAliasCommand";
19
21
  import { DeletePolicyStoreCommandInput, DeletePolicyStoreCommandOutput } from "./commands/DeletePolicyStoreCommand";
20
22
  import { DeletePolicyTemplateCommandInput, DeletePolicyTemplateCommandOutput } from "./commands/DeletePolicyTemplateCommand";
21
23
  import { GetIdentitySourceCommandInput, GetIdentitySourceCommandOutput } from "./commands/GetIdentitySourceCommand";
22
24
  import { GetPolicyCommandInput, GetPolicyCommandOutput } from "./commands/GetPolicyCommand";
25
+ import { GetPolicyStoreAliasCommandInput, GetPolicyStoreAliasCommandOutput } from "./commands/GetPolicyStoreAliasCommand";
23
26
  import { GetPolicyStoreCommandInput, GetPolicyStoreCommandOutput } from "./commands/GetPolicyStoreCommand";
24
27
  import { GetPolicyTemplateCommandInput, GetPolicyTemplateCommandOutput } from "./commands/GetPolicyTemplateCommand";
25
28
  import { GetSchemaCommandInput, GetSchemaCommandOutput } from "./commands/GetSchemaCommand";
@@ -27,6 +30,7 @@ import { IsAuthorizedCommandInput, IsAuthorizedCommandOutput } from "./commands/
27
30
  import { IsAuthorizedWithTokenCommandInput, IsAuthorizedWithTokenCommandOutput } from "./commands/IsAuthorizedWithTokenCommand";
28
31
  import { ListIdentitySourcesCommandInput, ListIdentitySourcesCommandOutput } from "./commands/ListIdentitySourcesCommand";
29
32
  import { ListPoliciesCommandInput, ListPoliciesCommandOutput } from "./commands/ListPoliciesCommand";
33
+ import { ListPolicyStoreAliasesCommandInput, ListPolicyStoreAliasesCommandOutput } from "./commands/ListPolicyStoreAliasesCommand";
30
34
  import { ListPolicyStoresCommandInput, ListPolicyStoresCommandOutput } from "./commands/ListPolicyStoresCommand";
31
35
  import { ListPolicyTemplatesCommandInput, ListPolicyTemplatesCommandOutput } from "./commands/ListPolicyTemplatesCommand";
32
36
  import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput } from "./commands/ListTagsForResourceCommand";
@@ -43,11 +47,11 @@ export { __Client };
43
47
  /**
44
48
  * @public
45
49
  */
46
- export type ServiceInputTypes = BatchGetPolicyCommandInput | BatchIsAuthorizedCommandInput | BatchIsAuthorizedWithTokenCommandInput | CreateIdentitySourceCommandInput | CreatePolicyCommandInput | CreatePolicyStoreCommandInput | CreatePolicyTemplateCommandInput | DeleteIdentitySourceCommandInput | DeletePolicyCommandInput | DeletePolicyStoreCommandInput | DeletePolicyTemplateCommandInput | GetIdentitySourceCommandInput | GetPolicyCommandInput | GetPolicyStoreCommandInput | GetPolicyTemplateCommandInput | GetSchemaCommandInput | IsAuthorizedCommandInput | IsAuthorizedWithTokenCommandInput | ListIdentitySourcesCommandInput | ListPoliciesCommandInput | ListPolicyStoresCommandInput | ListPolicyTemplatesCommandInput | ListTagsForResourceCommandInput | PutSchemaCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateIdentitySourceCommandInput | UpdatePolicyCommandInput | UpdatePolicyStoreCommandInput | UpdatePolicyTemplateCommandInput;
50
+ export type ServiceInputTypes = BatchGetPolicyCommandInput | BatchIsAuthorizedCommandInput | BatchIsAuthorizedWithTokenCommandInput | CreateIdentitySourceCommandInput | CreatePolicyCommandInput | CreatePolicyStoreAliasCommandInput | CreatePolicyStoreCommandInput | CreatePolicyTemplateCommandInput | DeleteIdentitySourceCommandInput | DeletePolicyCommandInput | DeletePolicyStoreAliasCommandInput | DeletePolicyStoreCommandInput | DeletePolicyTemplateCommandInput | GetIdentitySourceCommandInput | GetPolicyCommandInput | GetPolicyStoreAliasCommandInput | GetPolicyStoreCommandInput | GetPolicyTemplateCommandInput | GetSchemaCommandInput | IsAuthorizedCommandInput | IsAuthorizedWithTokenCommandInput | ListIdentitySourcesCommandInput | ListPoliciesCommandInput | ListPolicyStoreAliasesCommandInput | ListPolicyStoresCommandInput | ListPolicyTemplatesCommandInput | ListTagsForResourceCommandInput | PutSchemaCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateIdentitySourceCommandInput | UpdatePolicyCommandInput | UpdatePolicyStoreCommandInput | UpdatePolicyTemplateCommandInput;
47
51
  /**
48
52
  * @public
49
53
  */
50
- export type ServiceOutputTypes = BatchGetPolicyCommandOutput | BatchIsAuthorizedCommandOutput | BatchIsAuthorizedWithTokenCommandOutput | CreateIdentitySourceCommandOutput | CreatePolicyCommandOutput | CreatePolicyStoreCommandOutput | CreatePolicyTemplateCommandOutput | DeleteIdentitySourceCommandOutput | DeletePolicyCommandOutput | DeletePolicyStoreCommandOutput | DeletePolicyTemplateCommandOutput | GetIdentitySourceCommandOutput | GetPolicyCommandOutput | GetPolicyStoreCommandOutput | GetPolicyTemplateCommandOutput | GetSchemaCommandOutput | IsAuthorizedCommandOutput | IsAuthorizedWithTokenCommandOutput | ListIdentitySourcesCommandOutput | ListPoliciesCommandOutput | ListPolicyStoresCommandOutput | ListPolicyTemplatesCommandOutput | ListTagsForResourceCommandOutput | PutSchemaCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateIdentitySourceCommandOutput | UpdatePolicyCommandOutput | UpdatePolicyStoreCommandOutput | UpdatePolicyTemplateCommandOutput;
54
+ export type ServiceOutputTypes = BatchGetPolicyCommandOutput | BatchIsAuthorizedCommandOutput | BatchIsAuthorizedWithTokenCommandOutput | CreateIdentitySourceCommandOutput | CreatePolicyCommandOutput | CreatePolicyStoreAliasCommandOutput | CreatePolicyStoreCommandOutput | CreatePolicyTemplateCommandOutput | DeleteIdentitySourceCommandOutput | DeletePolicyCommandOutput | DeletePolicyStoreAliasCommandOutput | DeletePolicyStoreCommandOutput | DeletePolicyTemplateCommandOutput | GetIdentitySourceCommandOutput | GetPolicyCommandOutput | GetPolicyStoreAliasCommandOutput | GetPolicyStoreCommandOutput | GetPolicyTemplateCommandOutput | GetSchemaCommandOutput | IsAuthorizedCommandOutput | IsAuthorizedWithTokenCommandOutput | ListIdentitySourcesCommandOutput | ListPoliciesCommandOutput | ListPolicyStoreAliasesCommandOutput | ListPolicyStoresCommandOutput | ListPolicyTemplatesCommandOutput | ListTagsForResourceCommandOutput | PutSchemaCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateIdentitySourceCommandOutput | UpdatePolicyCommandOutput | UpdatePolicyStoreCommandOutput | UpdatePolicyTemplateCommandOutput;
51
55
  /**
52
56
  * @public
53
57
  */
@@ -71,11 +71,12 @@ declare const BatchGetPolicyCommand_base: {
71
71
  * // },
72
72
  * // createdDate: new Date("TIMESTAMP"), // required
73
73
  * // lastUpdatedDate: new Date("TIMESTAMP"), // required
74
+ * // name: "STRING_VALUE",
74
75
  * // },
75
76
  * // ],
76
77
  * // errors: [ // BatchGetPolicyErrorList // required
77
78
  * // { // BatchGetPolicyErrorItem
78
- * // code: "POLICY_STORE_NOT_FOUND" || "POLICY_NOT_FOUND", // required
79
+ * // code: "POLICY_STORE_NOT_FOUND" || "POLICY_NOT_FOUND" || "POLICY_STORE_ALIAS_NOT_FOUND", // required
79
80
  * // policyStoreId: "STRING_VALUE", // required
80
81
  * // policyId: "STRING_VALUE", // required
81
82
  * // message: "STRING_VALUE", // required
@@ -141,6 +142,7 @@ declare const BatchGetPolicyCommand_base: {
141
142
  * }
142
143
  * },
143
144
  * lastUpdatedDate: "2024-10-18T18:53:39.258153Z",
145
+ * name: "name/example-policy",
144
146
  * policyId: "PWv5M6d5HePx3gVVLKY1nK",
145
147
  * policyStoreId: "ERZeDpRc34dkYZeb6FZRVC",
146
148
  * policyType: "STATIC"
@@ -154,6 +156,7 @@ declare const BatchGetPolicyCommand_base: {
154
156
  * }
155
157
  * },
156
158
  * lastUpdatedDate: "2024-10-18T18:57:03.305027Z",
159
+ * name: "name/example-policy-2",
157
160
  * policyId: "LzFn6KgLWvv4Mbegus35jn",
158
161
  * policyStoreId: "ERZeDpRc34dkYZeb6FZRVC",
159
162
  * policyType: "STATIC"
@@ -176,6 +179,60 @@ declare const BatchGetPolicyCommand_base: {
176
179
  * *\/
177
180
  * ```
178
181
  *
182
+ * @example To retrieve policies by name
183
+ * ```javascript
184
+ * // The following example retrieves information about policies using their names instead of their IDs.
185
+ * const input = {
186
+ * requests: [
187
+ * {
188
+ * policyId: "name/example-policy",
189
+ * policyStoreId: "ERZeDpRc34dkYZeb6FZRVC"
190
+ * },
191
+ * {
192
+ * policyId: "name/example-policy-2",
193
+ * policyStoreId: "ERZeDpRc34dkYZeb6FZRVC"
194
+ * }
195
+ * ]
196
+ * };
197
+ * const command = new BatchGetPolicyCommand(input);
198
+ * const response = await client.send(command);
199
+ * /* response is
200
+ * {
201
+ * errors: [],
202
+ * results: [
203
+ * {
204
+ * createdDate: "2024-10-18T18:53:39.258153Z",
205
+ * definition: {
206
+ * static: {
207
+ * description: "Users can manage account resources in any account they own",
208
+ * statement: `permit (principal, action in PhotoFlash::Action::"ManageAccount",resource) when { resource in principal.Account };`
209
+ * }
210
+ * },
211
+ * lastUpdatedDate: "2024-10-18T18:53:39.258153Z",
212
+ * name: "name/example-policy",
213
+ * policyId: "PWv5M6d5HePx3gVVLKY1nK",
214
+ * policyStoreId: "ERZeDpRc34dkYZeb6FZRVC",
215
+ * policyType: "STATIC"
216
+ * },
217
+ * {
218
+ * createdDate: "2024-10-18T18:57:03.305027Z",
219
+ * definition: {
220
+ * static: {
221
+ * description: "User alice can't delete any photos.",
222
+ * statement: `forbid (principal == PhotoFlash::User::"alice", action in [PhotoFlash::Action::"DeletePhoto"], resource);`
223
+ * }
224
+ * },
225
+ * lastUpdatedDate: "2024-10-18T18:57:03.305027Z",
226
+ * name: "name/example-policy-2",
227
+ * policyId: "LzFn6KgLWvv4Mbegus35jn",
228
+ * policyStoreId: "ERZeDpRc34dkYZeb6FZRVC",
229
+ * policyType: "STATIC"
230
+ * }
231
+ * ]
232
+ * }
233
+ * *\/
234
+ * ```
235
+ *
179
236
  * @public
180
237
  */
181
238
  export declare class BatchGetPolicyCommand extends BatchGetPolicyCommand_base {
@@ -92,7 +92,7 @@ declare const CreateIdentitySourceCommand_base: {
92
92
  * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
93
93
  *
94
94
  * @throws {@link ConflictException} (client fault)
95
- * <p>The request failed because another request to modify a resource occurred at the same.</p>
95
+ * <p>The request failed because another request to modify a resource occurred at the same time.</p>
96
96
  *
97
97
  * @throws {@link ResourceNotFoundException} (client fault)
98
98
  * <p>The request failed because it references a resource that doesn't exist.</p>
@@ -56,6 +56,7 @@ declare const CreatePolicyCommand_base: {
56
56
  * },
57
57
  * },
58
58
  * },
59
+ * name: "STRING_VALUE",
59
60
  * };
60
61
  * const command = new CreatePolicyCommand(input);
61
62
  * const response = await client.send(command);
@@ -91,7 +92,7 @@ declare const CreatePolicyCommand_base: {
91
92
  * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
92
93
  *
93
94
  * @throws {@link ConflictException} (client fault)
94
- * <p>The request failed because another request to modify a resource occurred at the same.</p>
95
+ * <p>The request failed because another request to modify a resource occurred at the same time.</p>
95
96
  *
96
97
  * @throws {@link ResourceNotFoundException} (client fault)
97
98
  * <p>The request failed because it references a resource that doesn't exist.</p>
@@ -126,40 +127,7 @@ declare const CreatePolicyCommand_base: {
126
127
  * statement: `permit( principal in UserGroup::"janeFriends", action, resource in Album::"vacationFolder" );`
127
128
  * }
128
129
  * },
129
- * policyStoreId: "C7v5xMplfFH3i3e4Jrzb1a"
130
- * };
131
- * const command = new CreatePolicyCommand(input);
132
- * const response = await client.send(command);
133
- * /* response is
134
- * {
135
- * createdDate: "2024-08-12T18:20:50.99Z",
136
- * lastUpdatedDate: "2024-08-12T18:20:50.99Z",
137
- * policyId: "9wYxMpljbbZQb5fcZHyJhY",
138
- * policyStoreId: "C7v5xMplfFH3i3e4Jrzb1a",
139
- * policyType: "STATIC",
140
- * principal: {
141
- * entityId: "janeFriends",
142
- * entityType: "UserGroup"
143
- * },
144
- * resource: {
145
- * entityId: "vacationFolder",
146
- * entityType: "Album"
147
- * }
148
- * }
149
- * *\/
150
- * ```
151
- *
152
- * @example To create a static policy
153
- * ```javascript
154
- * // The following example request creates a static policy with a policy scope that specifies both a principal and a resource. The response includes both the Principal and Resource elements because both were specified in the request policy scope.
155
- * const input = {
156
- * clientToken: "a1b2c3d4-e5f6-a1b2-c3d4-TOKEN1111111",
157
- * definition: {
158
- * static: {
159
- * description: "Grant members of janeFriends UserGroup access to the vacationFolder Album",
160
- * statement: `permit( principal in UserGroup::"janeFriends", action, resource in Album::"vacationFolder" );`
161
- * }
162
- * },
130
+ * name: "name/example-policy",
163
131
  * policyStoreId: "C7v5xMplfFH3i3e4Jrzb1a"
164
132
  * };
165
133
  * const command = new CreatePolicyCommand(input);
@@ -197,6 +165,7 @@ declare const CreatePolicyCommand_base: {
197
165
  * }
198
166
  * }
199
167
  * },
168
+ * name: "name/example-template-linked-policy",
200
169
  * policyStoreId: "C7v5xMplfFH3i3e4Jrzb1a"
201
170
  * };
202
171
  * const command = new CreatePolicyCommand(input);
@@ -0,0 +1,118 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { CreatePolicyStoreAliasInput, CreatePolicyStoreAliasOutput } from "../models/models_0";
4
+ import type { ServiceInputTypes, ServiceOutputTypes, VerifiedPermissionsClientResolvedConfig } from "../VerifiedPermissionsClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link CreatePolicyStoreAliasCommand}.
14
+ */
15
+ export interface CreatePolicyStoreAliasCommandInput extends CreatePolicyStoreAliasInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link CreatePolicyStoreAliasCommand}.
21
+ */
22
+ export interface CreatePolicyStoreAliasCommandOutput extends CreatePolicyStoreAliasOutput, __MetadataBearer {
23
+ }
24
+ declare const CreatePolicyStoreAliasCommand_base: {
25
+ new (input: CreatePolicyStoreAliasCommandInput): import("@smithy/smithy-client").CommandImpl<CreatePolicyStoreAliasCommandInput, CreatePolicyStoreAliasCommandOutput, VerifiedPermissionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: CreatePolicyStoreAliasCommandInput): import("@smithy/smithy-client").CommandImpl<CreatePolicyStoreAliasCommandInput, CreatePolicyStoreAliasCommandOutput, VerifiedPermissionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Creates a policy store alias for the specified policy store. A policy store alias is an alternative identifier that you can use to reference a policy store in API operations.</p> <p>This operation is idempotent. If multiple CreatePolicyStoreAlias requests are made where the <code>aliasName</code> and <code>policyStoreId</code> fields are the same between the requests, subsequent requests will be ignored. For each duplicate CreatePolicyStoreAlias request, a Success response will be returned and a new policy store alias will not be created.</p> <note> <p>Verified Permissions is <i> <a href="https://wikipedia.org/wiki/Eventual_consistency">eventually consistent</a> </i>. It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.</p> </note>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { VerifiedPermissionsClient, CreatePolicyStoreAliasCommand } from "@aws-sdk/client-verifiedpermissions"; // ES Modules import
35
+ * // const { VerifiedPermissionsClient, CreatePolicyStoreAliasCommand } = require("@aws-sdk/client-verifiedpermissions"); // CommonJS import
36
+ * // import type { VerifiedPermissionsClientConfig } from "@aws-sdk/client-verifiedpermissions";
37
+ * const config = {}; // type is VerifiedPermissionsClientConfig
38
+ * const client = new VerifiedPermissionsClient(config);
39
+ * const input = { // CreatePolicyStoreAliasInput
40
+ * aliasName: "STRING_VALUE", // required
41
+ * policyStoreId: "STRING_VALUE", // required
42
+ * };
43
+ * const command = new CreatePolicyStoreAliasCommand(input);
44
+ * const response = await client.send(command);
45
+ * // { // CreatePolicyStoreAliasOutput
46
+ * // aliasName: "STRING_VALUE", // required
47
+ * // policyStoreId: "STRING_VALUE", // required
48
+ * // aliasArn: "STRING_VALUE", // required
49
+ * // createdAt: new Date("TIMESTAMP"), // required
50
+ * // };
51
+ *
52
+ * ```
53
+ *
54
+ * @param CreatePolicyStoreAliasCommandInput - {@link CreatePolicyStoreAliasCommandInput}
55
+ * @returns {@link CreatePolicyStoreAliasCommandOutput}
56
+ * @see {@link CreatePolicyStoreAliasCommandInput} for command's `input` shape.
57
+ * @see {@link CreatePolicyStoreAliasCommandOutput} for command's `response` shape.
58
+ * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
59
+ *
60
+ * @throws {@link ConflictException} (client fault)
61
+ * <p>The request failed because another request to modify a resource occurred at the same time.</p>
62
+ *
63
+ * @throws {@link ResourceNotFoundException} (client fault)
64
+ * <p>The request failed because it references a resource that doesn't exist.</p>
65
+ *
66
+ * @throws {@link ServiceQuotaExceededException} (client fault)
67
+ * <p>The request failed because it would cause a service quota to be exceeded.</p>
68
+ *
69
+ * @throws {@link AccessDeniedException} (client fault)
70
+ * <p>You don't have sufficient access to perform this action.</p>
71
+ *
72
+ * @throws {@link InternalServerException} (server fault)
73
+ * <p>The request failed because of an internal error. Try your request again later</p>
74
+ *
75
+ * @throws {@link ThrottlingException} (client fault)
76
+ * <p>The request failed because it exceeded a throttling quota.</p>
77
+ *
78
+ * @throws {@link ValidationException} (client fault)
79
+ * <p>The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.</p> <p>The possible reasons include the following:</p> <ul> <li> <p> <b>UnrecognizedEntityType</b> </p> <p>The policy includes an entity type that isn't found in the schema.</p> </li> <li> <p> <b>UnrecognizedActionId</b> </p> <p>The policy includes an action id that isn't found in the schema.</p> </li> <li> <p> <b>InvalidActionApplication</b> </p> <p>The policy includes an action that, according to the schema, doesn't support the specified principal and resource.</p> </li> <li> <p> <b>UnexpectedType</b> </p> <p>The policy included an operand that isn't a valid type for the specified operation.</p> </li> <li> <p> <b>IncompatibleTypes</b> </p> <p>The types of elements included in a <code>set</code>, or the types of expressions used in an <code>if...then...else</code> clause aren't compatible in this context.</p> </li> <li> <p> <b>MissingAttribute</b> </p> <p>The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before 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 <i>Cedar Policy Language Guide</i>.</p> </li> <li> <p> <b>UnsafeOptionalAttributeAccess</b> </p> <p>The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before 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 <i>Cedar Policy Language Guide</i>.</p> </li> <li> <p> <b>ImpossiblePolicy</b> </p> <p>Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.</p> </li> <li> <p> <b>WrongNumberArguments</b> </p> <p>The policy references an extension type with the wrong number of arguments.</p> </li> <li> <p> <b>FunctionArgumentValidationError</b> </p> <p>Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.</p> </li> </ul>
80
+ *
81
+ * @throws {@link VerifiedPermissionsServiceException}
82
+ * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
83
+ *
84
+ *
85
+ * @example CreatePolicyStoreAlias
86
+ * ```javascript
87
+ * // The following example creates a new policy store alias.
88
+ * const input = {
89
+ * aliasName: "policy-store-alias/example-policy-store",
90
+ * policyStoreId: "C7v5xMplfFH3i3e4Jrzb1a"
91
+ * };
92
+ * const command = new CreatePolicyStoreAliasCommand(input);
93
+ * const response = await client.send(command);
94
+ * /* response is
95
+ * {
96
+ * aliasArn: "arn:aws:verifiedpermissions:us-east-1:123456789012:policy-store-alias/example-policy-store",
97
+ * aliasName: "policy-store-alias/example-policy-store",
98
+ * createdAt: "2024-01-15T12:30:00.52Z",
99
+ * policyStoreId: "C7v5xMplfFH3i3e4Jrzb1a"
100
+ * }
101
+ * *\/
102
+ * ```
103
+ *
104
+ * @public
105
+ */
106
+ export declare class CreatePolicyStoreAliasCommand extends CreatePolicyStoreAliasCommand_base {
107
+ /** @internal type navigation helper, not in runtime. */
108
+ protected static __types: {
109
+ api: {
110
+ input: CreatePolicyStoreAliasInput;
111
+ output: CreatePolicyStoreAliasOutput;
112
+ };
113
+ sdk: {
114
+ input: CreatePolicyStoreAliasCommandInput;
115
+ output: CreatePolicyStoreAliasCommandOutput;
116
+ };
117
+ };
118
+ }
@@ -74,7 +74,7 @@ declare const CreatePolicyStoreCommand_base: {
74
74
  * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
75
75
  *
76
76
  * @throws {@link ConflictException} (client fault)
77
- * <p>The request failed because another request to modify a resource occurred at the same.</p>
77
+ * <p>The request failed because another request to modify a resource occurred at the same time.</p>
78
78
  *
79
79
  * @throws {@link ServiceQuotaExceededException} (client fault)
80
80
  * <p>The request failed because it would cause a service quota to be exceeded.</p>
@@ -41,6 +41,7 @@ declare const CreatePolicyTemplateCommand_base: {
41
41
  * policyStoreId: "STRING_VALUE", // required
42
42
  * description: "STRING_VALUE",
43
43
  * statement: "STRING_VALUE", // required
44
+ * name: "STRING_VALUE",
44
45
  * };
45
46
  * const command = new CreatePolicyTemplateCommand(input);
46
47
  * const response = await client.send(command);
@@ -60,7 +61,7 @@ declare const CreatePolicyTemplateCommand_base: {
60
61
  * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
61
62
  *
62
63
  * @throws {@link ConflictException} (client fault)
63
- * <p>The request failed because another request to modify a resource occurred at the same.</p>
64
+ * <p>The request failed because another request to modify a resource occurred at the same time.</p>
64
65
  *
65
66
  * @throws {@link ResourceNotFoundException} (client fault)
66
67
  * <p>The request failed because it references a resource that doesn't exist.</p>
@@ -90,6 +91,7 @@ declare const CreatePolicyTemplateCommand_base: {
90
91
  * const input = {
91
92
  * clientToken: "a1b2c3d4-e5f6-a1b2-c3d4-TOKEN1111111",
92
93
  * description: "Template for research dept",
94
+ * name: "name/example-policy-template",
93
95
  * policyStoreId: "C7v5xMplfFH3i3e4Jrzb1a",
94
96
  * statement: `"AccessVacation"
95
97
  * permit(
@@ -53,7 +53,7 @@ declare const DeleteIdentitySourceCommand_base: {
53
53
  * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
54
54
  *
55
55
  * @throws {@link ConflictException} (client fault)
56
- * <p>The request failed because another request to modify a resource occurred at the same.</p>
56
+ * <p>The request failed because another request to modify a resource occurred at the same time.</p>
57
57
  *
58
58
  * @throws {@link ResourceNotFoundException} (client fault)
59
59
  * <p>The request failed because it references a resource that doesn't exist.</p>
@@ -53,7 +53,7 @@ declare const DeletePolicyCommand_base: {
53
53
  * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
54
54
  *
55
55
  * @throws {@link ConflictException} (client fault)
56
- * <p>The request failed because another request to modify a resource occurred at the same.</p>
56
+ * <p>The request failed because another request to modify a resource occurred at the same time.</p>
57
57
  *
58
58
  * @throws {@link ResourceNotFoundException} (client fault)
59
59
  * <p>The request failed because it references a resource that doesn't exist.</p>
@@ -0,0 +1,100 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
+ import type { DeletePolicyStoreAliasInput, DeletePolicyStoreAliasOutput } from "../models/models_0";
4
+ import type { ServiceInputTypes, ServiceOutputTypes, VerifiedPermissionsClientResolvedConfig } from "../VerifiedPermissionsClient";
5
+ /**
6
+ * @public
7
+ */
8
+ export type { __MetadataBearer };
9
+ export { $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link DeletePolicyStoreAliasCommand}.
14
+ */
15
+ export interface DeletePolicyStoreAliasCommandInput extends DeletePolicyStoreAliasInput {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link DeletePolicyStoreAliasCommand}.
21
+ */
22
+ export interface DeletePolicyStoreAliasCommandOutput extends DeletePolicyStoreAliasOutput, __MetadataBearer {
23
+ }
24
+ declare const DeletePolicyStoreAliasCommand_base: {
25
+ new (input: DeletePolicyStoreAliasCommandInput): import("@smithy/smithy-client").CommandImpl<DeletePolicyStoreAliasCommandInput, DeletePolicyStoreAliasCommandOutput, VerifiedPermissionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
+ new (input: DeletePolicyStoreAliasCommandInput): import("@smithy/smithy-client").CommandImpl<DeletePolicyStoreAliasCommandInput, DeletePolicyStoreAliasCommandOutput, VerifiedPermissionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
+ getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
28
+ };
29
+ /**
30
+ * <p>Deletes the specified policy store alias.</p> <p>This operation is idempotent. If you specify a policy store alias that does not exist, the request response will still return a successful HTTP 200 status code.</p> <p>When a policy store alias is deleted, it enters the <code>PendingDeletion</code> state. When a policy store alias is in the <code>PendingDeletion</code> state, new policy store aliases cannot be created with the same name. If the policy store alias is used in an API that has a <code>policyStoreId</code> field, the operation will fail with a <code>ResourceNotFound</code> exception.</p>
31
+ * @example
32
+ * Use a bare-bones client and the command you need to make an API call.
33
+ * ```javascript
34
+ * import { VerifiedPermissionsClient, DeletePolicyStoreAliasCommand } from "@aws-sdk/client-verifiedpermissions"; // ES Modules import
35
+ * // const { VerifiedPermissionsClient, DeletePolicyStoreAliasCommand } = require("@aws-sdk/client-verifiedpermissions"); // CommonJS import
36
+ * // import type { VerifiedPermissionsClientConfig } from "@aws-sdk/client-verifiedpermissions";
37
+ * const config = {}; // type is VerifiedPermissionsClientConfig
38
+ * const client = new VerifiedPermissionsClient(config);
39
+ * const input = { // DeletePolicyStoreAliasInput
40
+ * aliasName: "STRING_VALUE", // required
41
+ * };
42
+ * const command = new DeletePolicyStoreAliasCommand(input);
43
+ * const response = await client.send(command);
44
+ * // {};
45
+ *
46
+ * ```
47
+ *
48
+ * @param DeletePolicyStoreAliasCommandInput - {@link DeletePolicyStoreAliasCommandInput}
49
+ * @returns {@link DeletePolicyStoreAliasCommandOutput}
50
+ * @see {@link DeletePolicyStoreAliasCommandInput} for command's `input` shape.
51
+ * @see {@link DeletePolicyStoreAliasCommandOutput} for command's `response` shape.
52
+ * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
53
+ *
54
+ * @throws {@link InvalidStateException} (client fault)
55
+ * <p>The policy store can't be deleted because deletion protection is enabled. To delete this policy store, disable deletion protection.</p>
56
+ *
57
+ * @throws {@link AccessDeniedException} (client fault)
58
+ * <p>You don't have sufficient access to perform this action.</p>
59
+ *
60
+ * @throws {@link InternalServerException} (server fault)
61
+ * <p>The request failed because of an internal error. Try your request again later</p>
62
+ *
63
+ * @throws {@link ThrottlingException} (client fault)
64
+ * <p>The request failed because it exceeded a throttling quota.</p>
65
+ *
66
+ * @throws {@link ValidationException} (client fault)
67
+ * <p>The request failed because one or more input parameters don't satisfy their constraint requirements. The output is provided as a list of fields and a reason for each field that isn't valid.</p> <p>The possible reasons include the following:</p> <ul> <li> <p> <b>UnrecognizedEntityType</b> </p> <p>The policy includes an entity type that isn't found in the schema.</p> </li> <li> <p> <b>UnrecognizedActionId</b> </p> <p>The policy includes an action id that isn't found in the schema.</p> </li> <li> <p> <b>InvalidActionApplication</b> </p> <p>The policy includes an action that, according to the schema, doesn't support the specified principal and resource.</p> </li> <li> <p> <b>UnexpectedType</b> </p> <p>The policy included an operand that isn't a valid type for the specified operation.</p> </li> <li> <p> <b>IncompatibleTypes</b> </p> <p>The types of elements included in a <code>set</code>, or the types of expressions used in an <code>if...then...else</code> clause aren't compatible in this context.</p> </li> <li> <p> <b>MissingAttribute</b> </p> <p>The policy attempts to access a record or entity attribute that isn't specified in the schema. Test for the existence of the attribute first before 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 <i>Cedar Policy Language Guide</i>.</p> </li> <li> <p> <b>UnsafeOptionalAttributeAccess</b> </p> <p>The policy attempts to access a record or entity attribute that is optional and isn't guaranteed to be present. Test for the existence of the attribute first before 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 <i>Cedar Policy Language Guide</i>.</p> </li> <li> <p> <b>ImpossiblePolicy</b> </p> <p>Cedar has determined that a policy condition always evaluates to false. If the policy is always false, it can never apply to any query, and so it can never affect an authorization decision.</p> </li> <li> <p> <b>WrongNumberArguments</b> </p> <p>The policy references an extension type with the wrong number of arguments.</p> </li> <li> <p> <b>FunctionArgumentValidationError</b> </p> <p>Cedar couldn't parse the argument passed to an extension type. For example, a string that is to be parsed as an IPv4 address can contain only digits and the period character.</p> </li> </ul>
68
+ *
69
+ * @throws {@link VerifiedPermissionsServiceException}
70
+ * <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
71
+ *
72
+ *
73
+ * @example DeletePolicyStoreAlias
74
+ * ```javascript
75
+ * // The following example deletes the policy store alias with name example-policy-store.
76
+ * const input = {
77
+ * aliasName: "policy-store-alias/example-policy-store"
78
+ * };
79
+ * const command = new DeletePolicyStoreAliasCommand(input);
80
+ * const response = await client.send(command);
81
+ * /* response is
82
+ * { /* empty *\/ }
83
+ * *\/
84
+ * ```
85
+ *
86
+ * @public
87
+ */
88
+ export declare class DeletePolicyStoreAliasCommand extends DeletePolicyStoreAliasCommand_base {
89
+ /** @internal type navigation helper, not in runtime. */
90
+ protected static __types: {
91
+ api: {
92
+ input: DeletePolicyStoreAliasInput;
93
+ output: {};
94
+ };
95
+ sdk: {
96
+ input: DeletePolicyStoreAliasCommandInput;
97
+ output: DeletePolicyStoreAliasCommandOutput;
98
+ };
99
+ };
100
+ }
@@ -53,7 +53,7 @@ declare const DeletePolicyTemplateCommand_base: {
53
53
  * @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
54
54
  *
55
55
  * @throws {@link ConflictException} (client fault)
56
- * <p>The request failed because another request to modify a resource occurred at the same.</p>
56
+ * <p>The request failed because another request to modify a resource occurred at the same time.</p>
57
57
  *
58
58
  * @throws {@link ResourceNotFoundException} (client fault)
59
59
  * <p>The request failed because it references a resource that doesn't exist.</p>
@@ -80,6 +80,7 @@ declare const GetPolicyCommand_base: {
80
80
  * // createdDate: new Date("TIMESTAMP"), // required
81
81
  * // lastUpdatedDate: new Date("TIMESTAMP"), // required
82
82
  * // effect: "Permit" || "Forbid",
83
+ * // name: "STRING_VALUE",
83
84
  * // };
84
85
  *
85
86
  * ```
@@ -139,6 +140,37 @@ declare const GetPolicyCommand_base: {
139
140
  * *\/
140
141
  * ```
141
142
  *
143
+ * @example To retrieve a policy by name
144
+ * ```javascript
145
+ * // The following example retrieves information about a policy using its name instead of its ID.
146
+ * const input = {
147
+ * policyId: "name/example-policy",
148
+ * policyStoreId: "C7v5xMplfFH3i3e4Jrzb1a"
149
+ * };
150
+ * const command = new GetPolicyCommand(input);
151
+ * const response = await client.send(command);
152
+ * /* response is
153
+ * {
154
+ * createdDate: "2024-08-12T18:20:50.99Z",
155
+ * definition: {
156
+ * static: {
157
+ * description: "Grant everyone of janeFriends UserGroup access to the vacationFolder Album",
158
+ * statement: `permit(principal, action, resource in Album::"publicFolder");`
159
+ * }
160
+ * },
161
+ * lastUpdatedDate: "2024-08-12T18:20:50.99Z",
162
+ * name: "name/example-policy",
163
+ * policyId: "9wYxMpljbbZQb5fcZHyJhY",
164
+ * policyStoreId: "C7v5xMplfFH3i3e4Jrzb1a",
165
+ * policyType: "STATIC",
166
+ * resource: {
167
+ * entityId: "publicFolder",
168
+ * entityType: "Album"
169
+ * }
170
+ * }
171
+ * *\/
172
+ * ```
173
+ *
142
174
  * @public
143
175
  */
144
176
  export declare class GetPolicyCommand extends GetPolicyCommand_base {