@aws-sdk/client-verifiedpermissions 3.682.0 → 3.686.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 +9 -1
- package/dist-cjs/index.js +165 -73
- package/dist-es/VerifiedPermissions.js +2 -0
- package/dist-es/commands/BatchGetPolicyCommand.js +23 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +76 -56
- package/dist-es/protocols/Aws_json1_0.js +54 -3
- package/dist-types/VerifiedPermissions.d.ts +7 -0
- package/dist-types/VerifiedPermissionsClient.d.ts +3 -2
- package/dist-types/commands/BatchGetPolicyCommand.d.ts +277 -0
- package/dist-types/commands/BatchIsAuthorizedCommand.d.ts +8 -0
- package/dist-types/commands/BatchIsAuthorizedWithTokenCommand.d.ts +8 -0
- package/dist-types/commands/IsAuthorizedCommand.d.ts +4 -0
- package/dist-types/commands/IsAuthorizedWithTokenCommand.d.ts +4 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +343 -158
- 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/BatchGetPolicyCommand.d.ts +47 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +151 -74
- package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +12 -0
- package/package.json +35 -35
|
@@ -4,6 +4,12 @@ import { _json, collectBody, decorateServiceException as __decorateServiceExcept
|
|
|
4
4
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
5
|
import { AccessDeniedException, AttributeValue, ConflictException, ContextDefinition, EntitiesDefinition, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
|
|
6
6
|
import { VerifiedPermissionsServiceException as __BaseException } from "../models/VerifiedPermissionsServiceException";
|
|
7
|
+
export const se_BatchGetPolicyCommand = async (input, context) => {
|
|
8
|
+
const headers = sharedHeaders("BatchGetPolicy");
|
|
9
|
+
let body;
|
|
10
|
+
body = JSON.stringify(_json(input));
|
|
11
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
12
|
+
};
|
|
7
13
|
export const se_BatchIsAuthorizedCommand = async (input, context) => {
|
|
8
14
|
const headers = sharedHeaders("BatchIsAuthorized");
|
|
9
15
|
let body;
|
|
@@ -160,6 +166,19 @@ export const se_UpdatePolicyTemplateCommand = async (input, context) => {
|
|
|
160
166
|
body = JSON.stringify(_json(input));
|
|
161
167
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
162
168
|
};
|
|
169
|
+
export const de_BatchGetPolicyCommand = async (output, context) => {
|
|
170
|
+
if (output.statusCode >= 300) {
|
|
171
|
+
return de_CommandError(output, context);
|
|
172
|
+
}
|
|
173
|
+
const data = await parseBody(output.body, context);
|
|
174
|
+
let contents = {};
|
|
175
|
+
contents = de_BatchGetPolicyOutput(data, context);
|
|
176
|
+
const response = {
|
|
177
|
+
$metadata: deserializeMetadata(output),
|
|
178
|
+
...contents,
|
|
179
|
+
};
|
|
180
|
+
return response;
|
|
181
|
+
};
|
|
163
182
|
export const de_BatchIsAuthorizedCommand = async (output, context) => {
|
|
164
183
|
if (output.statusCode >= 300) {
|
|
165
184
|
return de_CommandError(output, context);
|
|
@@ -511,15 +530,15 @@ const de_CommandError = async (output, context) => {
|
|
|
511
530
|
case "InternalServerException":
|
|
512
531
|
case "com.amazonaws.verifiedpermissions#InternalServerException":
|
|
513
532
|
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
514
|
-
case "ResourceNotFoundException":
|
|
515
|
-
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
516
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
517
533
|
case "ThrottlingException":
|
|
518
534
|
case "com.amazonaws.verifiedpermissions#ThrottlingException":
|
|
519
535
|
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
520
536
|
case "ValidationException":
|
|
521
537
|
case "com.amazonaws.verifiedpermissions#ValidationException":
|
|
522
538
|
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
539
|
+
case "ResourceNotFoundException":
|
|
540
|
+
case "com.amazonaws.verifiedpermissions#ResourceNotFoundException":
|
|
541
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
523
542
|
case "ConflictException":
|
|
524
543
|
case "com.amazonaws.verifiedpermissions#ConflictException":
|
|
525
544
|
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
@@ -601,7 +620,9 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
601
620
|
const se_AttributeValue = (input, context) => {
|
|
602
621
|
return AttributeValue.visit(input, {
|
|
603
622
|
boolean: (value) => ({ boolean: value }),
|
|
623
|
+
decimal: (value) => ({ decimal: value }),
|
|
604
624
|
entityIdentifier: (value) => ({ entityIdentifier: _json(value) }),
|
|
625
|
+
ipaddr: (value) => ({ ipaddr: value }),
|
|
605
626
|
long: (value) => ({ long: value }),
|
|
606
627
|
record: (value) => ({ record: se_RecordAttribute(value, context) }),
|
|
607
628
|
set: (value) => ({ set: se_SetAttribute(value, context) }),
|
|
@@ -769,11 +790,17 @@ const de_AttributeValue = (output, context) => {
|
|
|
769
790
|
if (__expectBoolean(output.boolean) !== undefined) {
|
|
770
791
|
return { boolean: __expectBoolean(output.boolean) };
|
|
771
792
|
}
|
|
793
|
+
if (__expectString(output.decimal) !== undefined) {
|
|
794
|
+
return { decimal: __expectString(output.decimal) };
|
|
795
|
+
}
|
|
772
796
|
if (output.entityIdentifier != null) {
|
|
773
797
|
return {
|
|
774
798
|
entityIdentifier: _json(output.entityIdentifier),
|
|
775
799
|
};
|
|
776
800
|
}
|
|
801
|
+
if (__expectString(output.ipaddr) !== undefined) {
|
|
802
|
+
return { ipaddr: __expectString(output.ipaddr) };
|
|
803
|
+
}
|
|
777
804
|
if (__expectLong(output.long) !== undefined) {
|
|
778
805
|
return { long: __expectLong(output.long) };
|
|
779
806
|
}
|
|
@@ -792,6 +819,30 @@ const de_AttributeValue = (output, context) => {
|
|
|
792
819
|
}
|
|
793
820
|
return { $unknown: Object.entries(output)[0] };
|
|
794
821
|
};
|
|
822
|
+
const de_BatchGetPolicyOutput = (output, context) => {
|
|
823
|
+
return take(output, {
|
|
824
|
+
errors: _json,
|
|
825
|
+
results: (_) => de_BatchGetPolicyOutputList(_, context),
|
|
826
|
+
});
|
|
827
|
+
};
|
|
828
|
+
const de_BatchGetPolicyOutputItem = (output, context) => {
|
|
829
|
+
return take(output, {
|
|
830
|
+
createdDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
831
|
+
definition: (_) => _json(__expectUnion(_)),
|
|
832
|
+
lastUpdatedDate: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
833
|
+
policyId: __expectString,
|
|
834
|
+
policyStoreId: __expectString,
|
|
835
|
+
policyType: __expectString,
|
|
836
|
+
});
|
|
837
|
+
};
|
|
838
|
+
const de_BatchGetPolicyOutputList = (output, context) => {
|
|
839
|
+
const retVal = (output || [])
|
|
840
|
+
.filter((e) => e != null)
|
|
841
|
+
.map((entry) => {
|
|
842
|
+
return de_BatchGetPolicyOutputItem(entry, context);
|
|
843
|
+
});
|
|
844
|
+
return retVal;
|
|
845
|
+
};
|
|
795
846
|
const de_BatchIsAuthorizedInputItem = (output, context) => {
|
|
796
847
|
return take(output, {
|
|
797
848
|
action: _json,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
|
+
import { BatchGetPolicyCommandInput, BatchGetPolicyCommandOutput } from "./commands/BatchGetPolicyCommand";
|
|
2
3
|
import { BatchIsAuthorizedCommandInput, BatchIsAuthorizedCommandOutput } from "./commands/BatchIsAuthorizedCommand";
|
|
3
4
|
import { BatchIsAuthorizedWithTokenCommandInput, BatchIsAuthorizedWithTokenCommandOutput } from "./commands/BatchIsAuthorizedWithTokenCommand";
|
|
4
5
|
import { CreateIdentitySourceCommandInput, CreateIdentitySourceCommandOutput } from "./commands/CreateIdentitySourceCommand";
|
|
@@ -27,6 +28,12 @@ import { UpdatePolicyStoreCommandInput, UpdatePolicyStoreCommandOutput } from ".
|
|
|
27
28
|
import { UpdatePolicyTemplateCommandInput, UpdatePolicyTemplateCommandOutput } from "./commands/UpdatePolicyTemplateCommand";
|
|
28
29
|
import { VerifiedPermissionsClient } from "./VerifiedPermissionsClient";
|
|
29
30
|
export interface VerifiedPermissions {
|
|
31
|
+
/**
|
|
32
|
+
* @see {@link BatchGetPolicyCommand}
|
|
33
|
+
*/
|
|
34
|
+
batchGetPolicy(args: BatchGetPolicyCommandInput, options?: __HttpHandlerOptions): Promise<BatchGetPolicyCommandOutput>;
|
|
35
|
+
batchGetPolicy(args: BatchGetPolicyCommandInput, cb: (err: any, data?: BatchGetPolicyCommandOutput) => void): void;
|
|
36
|
+
batchGetPolicy(args: BatchGetPolicyCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: BatchGetPolicyCommandOutput) => void): void;
|
|
30
37
|
/**
|
|
31
38
|
* @see {@link BatchIsAuthorizedCommand}
|
|
32
39
|
*/
|
|
@@ -7,6 +7,7 @@ import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol
|
|
|
7
7
|
import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
|
|
8
8
|
import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
9
9
|
import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
10
|
+
import { BatchGetPolicyCommandInput, BatchGetPolicyCommandOutput } from "./commands/BatchGetPolicyCommand";
|
|
10
11
|
import { BatchIsAuthorizedCommandInput, BatchIsAuthorizedCommandOutput } from "./commands/BatchIsAuthorizedCommand";
|
|
11
12
|
import { BatchIsAuthorizedWithTokenCommandInput, BatchIsAuthorizedWithTokenCommandOutput } from "./commands/BatchIsAuthorizedWithTokenCommand";
|
|
12
13
|
import { CreateIdentitySourceCommandInput, CreateIdentitySourceCommandOutput } from "./commands/CreateIdentitySourceCommand";
|
|
@@ -39,11 +40,11 @@ export { __Client };
|
|
|
39
40
|
/**
|
|
40
41
|
* @public
|
|
41
42
|
*/
|
|
42
|
-
export type ServiceInputTypes = BatchIsAuthorizedCommandInput | BatchIsAuthorizedWithTokenCommandInput | CreateIdentitySourceCommandInput | CreatePolicyCommandInput | CreatePolicyStoreCommandInput | CreatePolicyTemplateCommandInput | DeleteIdentitySourceCommandInput | DeletePolicyCommandInput | DeletePolicyStoreCommandInput | DeletePolicyTemplateCommandInput | GetIdentitySourceCommandInput | GetPolicyCommandInput | GetPolicyStoreCommandInput | GetPolicyTemplateCommandInput | GetSchemaCommandInput | IsAuthorizedCommandInput | IsAuthorizedWithTokenCommandInput | ListIdentitySourcesCommandInput | ListPoliciesCommandInput | ListPolicyStoresCommandInput | ListPolicyTemplatesCommandInput | PutSchemaCommandInput | UpdateIdentitySourceCommandInput | UpdatePolicyCommandInput | UpdatePolicyStoreCommandInput | UpdatePolicyTemplateCommandInput;
|
|
43
|
+
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 | PutSchemaCommandInput | UpdateIdentitySourceCommandInput | UpdatePolicyCommandInput | UpdatePolicyStoreCommandInput | UpdatePolicyTemplateCommandInput;
|
|
43
44
|
/**
|
|
44
45
|
* @public
|
|
45
46
|
*/
|
|
46
|
-
export type ServiceOutputTypes = BatchIsAuthorizedCommandOutput | BatchIsAuthorizedWithTokenCommandOutput | CreateIdentitySourceCommandOutput | CreatePolicyCommandOutput | CreatePolicyStoreCommandOutput | CreatePolicyTemplateCommandOutput | DeleteIdentitySourceCommandOutput | DeletePolicyCommandOutput | DeletePolicyStoreCommandOutput | DeletePolicyTemplateCommandOutput | GetIdentitySourceCommandOutput | GetPolicyCommandOutput | GetPolicyStoreCommandOutput | GetPolicyTemplateCommandOutput | GetSchemaCommandOutput | IsAuthorizedCommandOutput | IsAuthorizedWithTokenCommandOutput | ListIdentitySourcesCommandOutput | ListPoliciesCommandOutput | ListPolicyStoresCommandOutput | ListPolicyTemplatesCommandOutput | PutSchemaCommandOutput | UpdateIdentitySourceCommandOutput | UpdatePolicyCommandOutput | UpdatePolicyStoreCommandOutput | UpdatePolicyTemplateCommandOutput;
|
|
47
|
+
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 | PutSchemaCommandOutput | UpdateIdentitySourceCommandOutput | UpdatePolicyCommandOutput | UpdatePolicyStoreCommandOutput | UpdatePolicyTemplateCommandOutput;
|
|
47
48
|
/**
|
|
48
49
|
* @public
|
|
49
50
|
*/
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import { BatchGetPolicyInput, BatchGetPolicyOutput } from "../models/models_0";
|
|
4
|
+
import { 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 BatchGetPolicyCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface BatchGetPolicyCommandInput extends BatchGetPolicyInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link BatchGetPolicyCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface BatchGetPolicyCommandOutput extends BatchGetPolicyOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const BatchGetPolicyCommand_base: {
|
|
25
|
+
new (input: BatchGetPolicyCommandInput): import("@smithy/smithy-client").CommandImpl<BatchGetPolicyCommandInput, BatchGetPolicyCommandOutput, VerifiedPermissionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: BatchGetPolicyCommandInput): import("@smithy/smithy-client").CommandImpl<BatchGetPolicyCommandInput, BatchGetPolicyCommandOutput, VerifiedPermissionsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Retrieves information about a group (batch) of policies.</p>
|
|
31
|
+
* <note>
|
|
32
|
+
* <p>The <code>BatchGetPolicy</code> operation doesn't have its own IAM
|
|
33
|
+
* permission. To authorize this operation for Amazon Web Services principals, include the permission
|
|
34
|
+
* <code>verifiedpermissions:GetPolicy</code> in their IAM policies.</p>
|
|
35
|
+
* </note>
|
|
36
|
+
* @example
|
|
37
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
38
|
+
* ```javascript
|
|
39
|
+
* import { VerifiedPermissionsClient, BatchGetPolicyCommand } from "@aws-sdk/client-verifiedpermissions"; // ES Modules import
|
|
40
|
+
* // const { VerifiedPermissionsClient, BatchGetPolicyCommand } = require("@aws-sdk/client-verifiedpermissions"); // CommonJS import
|
|
41
|
+
* const client = new VerifiedPermissionsClient(config);
|
|
42
|
+
* const input = { // BatchGetPolicyInput
|
|
43
|
+
* requests: [ // BatchGetPolicyInputList // required
|
|
44
|
+
* { // BatchGetPolicyInputItem
|
|
45
|
+
* policyStoreId: "STRING_VALUE", // required
|
|
46
|
+
* policyId: "STRING_VALUE", // required
|
|
47
|
+
* },
|
|
48
|
+
* ],
|
|
49
|
+
* };
|
|
50
|
+
* const command = new BatchGetPolicyCommand(input);
|
|
51
|
+
* const response = await client.send(command);
|
|
52
|
+
* // { // BatchGetPolicyOutput
|
|
53
|
+
* // results: [ // BatchGetPolicyOutputList // required
|
|
54
|
+
* // { // BatchGetPolicyOutputItem
|
|
55
|
+
* // policyStoreId: "STRING_VALUE", // required
|
|
56
|
+
* // policyId: "STRING_VALUE", // required
|
|
57
|
+
* // policyType: "STATIC" || "TEMPLATE_LINKED", // required
|
|
58
|
+
* // definition: { // PolicyDefinitionDetail Union: only one key present
|
|
59
|
+
* // static: { // StaticPolicyDefinitionDetail
|
|
60
|
+
* // description: "STRING_VALUE",
|
|
61
|
+
* // statement: "STRING_VALUE", // required
|
|
62
|
+
* // },
|
|
63
|
+
* // templateLinked: { // TemplateLinkedPolicyDefinitionDetail
|
|
64
|
+
* // policyTemplateId: "STRING_VALUE", // required
|
|
65
|
+
* // principal: { // EntityIdentifier
|
|
66
|
+
* // entityType: "STRING_VALUE", // required
|
|
67
|
+
* // entityId: "STRING_VALUE", // required
|
|
68
|
+
* // },
|
|
69
|
+
* // resource: {
|
|
70
|
+
* // entityType: "STRING_VALUE", // required
|
|
71
|
+
* // entityId: "STRING_VALUE", // required
|
|
72
|
+
* // },
|
|
73
|
+
* // },
|
|
74
|
+
* // },
|
|
75
|
+
* // createdDate: new Date("TIMESTAMP"), // required
|
|
76
|
+
* // lastUpdatedDate: new Date("TIMESTAMP"), // required
|
|
77
|
+
* // },
|
|
78
|
+
* // ],
|
|
79
|
+
* // errors: [ // BatchGetPolicyErrorList // required
|
|
80
|
+
* // { // BatchGetPolicyErrorItem
|
|
81
|
+
* // code: "POLICY_STORE_NOT_FOUND" || "POLICY_NOT_FOUND", // required
|
|
82
|
+
* // policyStoreId: "STRING_VALUE", // required
|
|
83
|
+
* // policyId: "STRING_VALUE", // required
|
|
84
|
+
* // message: "STRING_VALUE", // required
|
|
85
|
+
* // },
|
|
86
|
+
* // ],
|
|
87
|
+
* // };
|
|
88
|
+
*
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @param BatchGetPolicyCommandInput - {@link BatchGetPolicyCommandInput}
|
|
92
|
+
* @returns {@link BatchGetPolicyCommandOutput}
|
|
93
|
+
* @see {@link BatchGetPolicyCommandInput} for command's `input` shape.
|
|
94
|
+
* @see {@link BatchGetPolicyCommandOutput} for command's `response` shape.
|
|
95
|
+
* @see {@link VerifiedPermissionsClientResolvedConfig | config} for VerifiedPermissionsClient's `config` shape.
|
|
96
|
+
*
|
|
97
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
98
|
+
* <p>You don't have sufficient access to perform this action.</p>
|
|
99
|
+
*
|
|
100
|
+
* @throws {@link InternalServerException} (server fault)
|
|
101
|
+
* <p>The request failed because of an internal error. Try your request again later</p>
|
|
102
|
+
*
|
|
103
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
104
|
+
* <p>The request failed because it exceeded a throttling quota.</p>
|
|
105
|
+
*
|
|
106
|
+
* @throws {@link ValidationException} (client fault)
|
|
107
|
+
* <p>The request failed because one or more input parameters don't satisfy their constraint
|
|
108
|
+
* requirements. The output is provided as a list of fields and a reason for each field that
|
|
109
|
+
* isn't valid.</p>
|
|
110
|
+
* <p>The possible reasons include the following:</p>
|
|
111
|
+
* <ul>
|
|
112
|
+
* <li>
|
|
113
|
+
* <p>
|
|
114
|
+
* <b>UnrecognizedEntityType</b>
|
|
115
|
+
* </p>
|
|
116
|
+
* <p>The policy includes an entity type that isn't found in the schema.</p>
|
|
117
|
+
* </li>
|
|
118
|
+
* <li>
|
|
119
|
+
* <p>
|
|
120
|
+
* <b>UnrecognizedActionId</b>
|
|
121
|
+
* </p>
|
|
122
|
+
* <p>The policy includes an action id that isn't found in the schema.</p>
|
|
123
|
+
* </li>
|
|
124
|
+
* <li>
|
|
125
|
+
* <p>
|
|
126
|
+
* <b>InvalidActionApplication</b>
|
|
127
|
+
* </p>
|
|
128
|
+
* <p>The policy includes an action that, according to the schema, doesn't support
|
|
129
|
+
* the specified principal and resource.</p>
|
|
130
|
+
* </li>
|
|
131
|
+
* <li>
|
|
132
|
+
* <p>
|
|
133
|
+
* <b>UnexpectedType</b>
|
|
134
|
+
* </p>
|
|
135
|
+
* <p>The policy included an operand that isn't a valid type for the specified
|
|
136
|
+
* operation.</p>
|
|
137
|
+
* </li>
|
|
138
|
+
* <li>
|
|
139
|
+
* <p>
|
|
140
|
+
* <b>IncompatibleTypes</b>
|
|
141
|
+
* </p>
|
|
142
|
+
* <p>The types of elements included in a <code>set</code>, or the types of
|
|
143
|
+
* expressions used in an <code>if...then...else</code> clause aren't compatible in
|
|
144
|
+
* this context.</p>
|
|
145
|
+
* </li>
|
|
146
|
+
* <li>
|
|
147
|
+
* <p>
|
|
148
|
+
* <b>MissingAttribute</b>
|
|
149
|
+
* </p>
|
|
150
|
+
* <p>The policy attempts to access a record or entity attribute that isn't
|
|
151
|
+
* specified in the schema. Test for the existence of the attribute first before
|
|
152
|
+
* 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
|
|
153
|
+
* <i>Cedar Policy Language Guide</i>.</p>
|
|
154
|
+
* </li>
|
|
155
|
+
* <li>
|
|
156
|
+
* <p>
|
|
157
|
+
* <b>UnsafeOptionalAttributeAccess</b>
|
|
158
|
+
* </p>
|
|
159
|
+
* <p>The policy attempts to access a record or entity attribute that is optional
|
|
160
|
+
* and isn't guaranteed to be present. Test for the existence of the attribute
|
|
161
|
+
* first before attempting to access its value. For more information, see the
|
|
162
|
+
* <a href="https://docs.cedarpolicy.com/policies/syntax-operators.html#has-presence-of-attribute-test">has (presence of attribute test) operator</a> in the
|
|
163
|
+
* <i>Cedar Policy Language Guide</i>.</p>
|
|
164
|
+
* </li>
|
|
165
|
+
* <li>
|
|
166
|
+
* <p>
|
|
167
|
+
* <b>ImpossiblePolicy</b>
|
|
168
|
+
* </p>
|
|
169
|
+
* <p>Cedar has determined that a policy condition always evaluates to false. If
|
|
170
|
+
* the policy is always false, it can never apply to any query, and so it can never
|
|
171
|
+
* affect an authorization decision.</p>
|
|
172
|
+
* </li>
|
|
173
|
+
* <li>
|
|
174
|
+
* <p>
|
|
175
|
+
* <b>WrongNumberArguments</b>
|
|
176
|
+
* </p>
|
|
177
|
+
* <p>The policy references an extension type with the wrong number of
|
|
178
|
+
* arguments.</p>
|
|
179
|
+
* </li>
|
|
180
|
+
* <li>
|
|
181
|
+
* <p>
|
|
182
|
+
* <b>FunctionArgumentValidationError</b>
|
|
183
|
+
* </p>
|
|
184
|
+
* <p>Cedar couldn't parse the argument passed to an extension type. For example,
|
|
185
|
+
* a string that is to be parsed as an IPv4 address can contain only digits and the
|
|
186
|
+
* period character.</p>
|
|
187
|
+
* </li>
|
|
188
|
+
* </ul>
|
|
189
|
+
*
|
|
190
|
+
* @throws {@link VerifiedPermissionsServiceException}
|
|
191
|
+
* <p>Base exception class for all service exceptions from VerifiedPermissions service.</p>
|
|
192
|
+
*
|
|
193
|
+
* @public
|
|
194
|
+
* @example To retrieve details about a policy
|
|
195
|
+
* ```javascript
|
|
196
|
+
* // The following example retrieves information about the specified policy contained in the specified policy store. In this example, the requested policy is a template-linked policy, so it returns the ID of the policy template, and the specific principal and resource used by this policy.
|
|
197
|
+
* const input = {
|
|
198
|
+
* "requests": [
|
|
199
|
+
* {
|
|
200
|
+
* "policyId": "PWv5M6d5HePx3gVVLKY1nK",
|
|
201
|
+
* "policyStoreId": "ERZeDpRc34dkYZeb6FZRVC"
|
|
202
|
+
* },
|
|
203
|
+
* {
|
|
204
|
+
* "policyId": "LzFn6KgLWvv4Mbegus35jn",
|
|
205
|
+
* "policyStoreId": "ERZeDpRc34dkYZeb6FZRVC"
|
|
206
|
+
* },
|
|
207
|
+
* {
|
|
208
|
+
* "policyId": "77gLjer8H5o3mvrnMGrSL5",
|
|
209
|
+
* "policyStoreId": "ERZeDpRc34dkYZeb6FZRVC"
|
|
210
|
+
* }
|
|
211
|
+
* ]
|
|
212
|
+
* };
|
|
213
|
+
* const command = new BatchGetPolicyCommand(input);
|
|
214
|
+
* const response = await client.send(command);
|
|
215
|
+
* /* response ==
|
|
216
|
+
* {
|
|
217
|
+
* "errors": [],
|
|
218
|
+
* "results": [
|
|
219
|
+
* {
|
|
220
|
+
* "createdDate": "2024-10-18T18:53:39.258153Z",
|
|
221
|
+
* "definition": {
|
|
222
|
+
* "static": {
|
|
223
|
+
* "description": "Users can manage account resources in any account they own",
|
|
224
|
+
* "statement": "permit (principal, action in PhotoFlash::Action::\"ManageAccount\",resource) when { resource in principal.Account };"
|
|
225
|
+
* }
|
|
226
|
+
* },
|
|
227
|
+
* "lastUpdatedDate": "2024-10-18T18:53:39.258153Z",
|
|
228
|
+
* "policyId": "PWv5M6d5HePx3gVVLKY1nK",
|
|
229
|
+
* "policyStoreId": "ERZeDpRc34dkYZeb6FZRVC",
|
|
230
|
+
* "policyType": "STATIC"
|
|
231
|
+
* },
|
|
232
|
+
* {
|
|
233
|
+
* "createdDate": "2024-10-18T18:57:03.305027Z",
|
|
234
|
+
* "definition": {
|
|
235
|
+
* "static": {
|
|
236
|
+
* "description": "User alice can't delete any photos.",
|
|
237
|
+
* "statement": "forbid (principal == PhotoFlash::User::\"alice\", action in [PhotoFlash::Action::\"DeletePhoto\"], resource);"
|
|
238
|
+
* }
|
|
239
|
+
* },
|
|
240
|
+
* "lastUpdatedDate": "2024-10-18T18:57:03.305027Z",
|
|
241
|
+
* "policyId": "LzFn6KgLWvv4Mbegus35jn",
|
|
242
|
+
* "policyStoreId": "ERZeDpRc34dkYZeb6FZRVC",
|
|
243
|
+
* "policyType": "STATIC"
|
|
244
|
+
* },
|
|
245
|
+
* {
|
|
246
|
+
* "createdDate": "2024-10-18T18:57:48.005343Z",
|
|
247
|
+
* "definition": {
|
|
248
|
+
* "static": {
|
|
249
|
+
* "description": "User alice can view and delete photos.",
|
|
250
|
+
* "statement": "permit (principal == PhotoFlash::User::\"alice\", action in [PhotoFlash::Action::\"DeletePhoto\", PhotoFlash::Action::\"ViewPhoto\"], resource);"
|
|
251
|
+
* }
|
|
252
|
+
* },
|
|
253
|
+
* "lastUpdatedDate": "2024-10-18T18:57:48.005343Z",
|
|
254
|
+
* "policyId": "77gLjer8H5o3mvrnMGrSL5",
|
|
255
|
+
* "policyStoreId": "ERZeDpRc34dkYZeb6FZRVC",
|
|
256
|
+
* "policyType": "STATIC"
|
|
257
|
+
* }
|
|
258
|
+
* ]
|
|
259
|
+
* }
|
|
260
|
+
* *\/
|
|
261
|
+
* // example id: example-1
|
|
262
|
+
* ```
|
|
263
|
+
*
|
|
264
|
+
*/
|
|
265
|
+
export declare class BatchGetPolicyCommand extends BatchGetPolicyCommand_base {
|
|
266
|
+
/** @internal type navigation helper, not in runtime. */
|
|
267
|
+
protected static __types: {
|
|
268
|
+
api: {
|
|
269
|
+
input: BatchGetPolicyInput;
|
|
270
|
+
output: BatchGetPolicyOutput;
|
|
271
|
+
};
|
|
272
|
+
sdk: {
|
|
273
|
+
input: BatchGetPolicyCommandInput;
|
|
274
|
+
output: BatchGetPolicyCommandOutput;
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
}
|
|
@@ -84,11 +84,15 @@ declare const BatchIsAuthorizedCommand_base: {
|
|
|
84
84
|
* record: { // RecordAttribute
|
|
85
85
|
* "<keys>": "<AttributeValue>",
|
|
86
86
|
* },
|
|
87
|
+
* ipaddr: "STRING_VALUE",
|
|
88
|
+
* decimal: "STRING_VALUE",
|
|
87
89
|
* },
|
|
88
90
|
* ],
|
|
89
91
|
* record: {
|
|
90
92
|
* "<keys>": "<AttributeValue>",
|
|
91
93
|
* },
|
|
94
|
+
* ipaddr: "STRING_VALUE",
|
|
95
|
+
* decimal: "STRING_VALUE",
|
|
92
96
|
* },
|
|
93
97
|
* },
|
|
94
98
|
* parents: [ // ParentList
|
|
@@ -153,11 +157,15 @@ declare const BatchIsAuthorizedCommand_base: {
|
|
|
153
157
|
* // record: { // RecordAttribute
|
|
154
158
|
* // "<keys>": "<AttributeValue>",
|
|
155
159
|
* // },
|
|
160
|
+
* // ipaddr: "STRING_VALUE",
|
|
161
|
+
* // decimal: "STRING_VALUE",
|
|
156
162
|
* // },
|
|
157
163
|
* // ],
|
|
158
164
|
* // record: {
|
|
159
165
|
* // "<keys>": "<AttributeValue>",
|
|
160
166
|
* // },
|
|
167
|
+
* // ipaddr: "STRING_VALUE",
|
|
168
|
+
* // decimal: "STRING_VALUE",
|
|
161
169
|
* // },
|
|
162
170
|
* // },
|
|
163
171
|
* // },
|
|
@@ -84,11 +84,15 @@ declare const BatchIsAuthorizedWithTokenCommand_base: {
|
|
|
84
84
|
* record: { // RecordAttribute
|
|
85
85
|
* "<keys>": "<AttributeValue>",
|
|
86
86
|
* },
|
|
87
|
+
* ipaddr: "STRING_VALUE",
|
|
88
|
+
* decimal: "STRING_VALUE",
|
|
87
89
|
* },
|
|
88
90
|
* ],
|
|
89
91
|
* record: {
|
|
90
92
|
* "<keys>": "<AttributeValue>",
|
|
91
93
|
* },
|
|
94
|
+
* ipaddr: "STRING_VALUE",
|
|
95
|
+
* decimal: "STRING_VALUE",
|
|
92
96
|
* },
|
|
93
97
|
* },
|
|
94
98
|
* parents: [ // ParentList
|
|
@@ -149,11 +153,15 @@ declare const BatchIsAuthorizedWithTokenCommand_base: {
|
|
|
149
153
|
* // record: { // RecordAttribute
|
|
150
154
|
* // "<keys>": "<AttributeValue>",
|
|
151
155
|
* // },
|
|
156
|
+
* // ipaddr: "STRING_VALUE",
|
|
157
|
+
* // decimal: "STRING_VALUE",
|
|
152
158
|
* // },
|
|
153
159
|
* // ],
|
|
154
160
|
* // record: {
|
|
155
161
|
* // "<keys>": "<AttributeValue>",
|
|
156
162
|
* // },
|
|
163
|
+
* // ipaddr: "STRING_VALUE",
|
|
164
|
+
* // decimal: "STRING_VALUE",
|
|
157
165
|
* // },
|
|
158
166
|
* // },
|
|
159
167
|
* // },
|
|
@@ -75,11 +75,15 @@ declare const IsAuthorizedCommand_base: {
|
|
|
75
75
|
* record: { // RecordAttribute
|
|
76
76
|
* "<keys>": "<AttributeValue>",
|
|
77
77
|
* },
|
|
78
|
+
* ipaddr: "STRING_VALUE",
|
|
79
|
+
* decimal: "STRING_VALUE",
|
|
78
80
|
* },
|
|
79
81
|
* ],
|
|
80
82
|
* record: {
|
|
81
83
|
* "<keys>": "<AttributeValue>",
|
|
82
84
|
* },
|
|
85
|
+
* ipaddr: "STRING_VALUE",
|
|
86
|
+
* decimal: "STRING_VALUE",
|
|
83
87
|
* },
|
|
84
88
|
* },
|
|
85
89
|
* },
|
|
@@ -81,11 +81,15 @@ declare const IsAuthorizedWithTokenCommand_base: {
|
|
|
81
81
|
* record: { // RecordAttribute
|
|
82
82
|
* "<keys>": "<AttributeValue>",
|
|
83
83
|
* },
|
|
84
|
+
* ipaddr: "STRING_VALUE",
|
|
85
|
+
* decimal: "STRING_VALUE",
|
|
84
86
|
* },
|
|
85
87
|
* ],
|
|
86
88
|
* record: {
|
|
87
89
|
* "<keys>": "<AttributeValue>",
|
|
88
90
|
* },
|
|
91
|
+
* ipaddr: "STRING_VALUE",
|
|
92
|
+
* decimal: "STRING_VALUE",
|
|
89
93
|
* },
|
|
90
94
|
* },
|
|
91
95
|
* },
|