@aws-sdk/client-accessanalyzer 3.1023.0 → 3.1025.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 +49 -0
- package/dist-cjs/index.js +249 -1
- package/dist-cjs/schemas/schemas_0.js +173 -5
- package/dist-es/AccessAnalyzer.js +23 -1
- package/dist-es/commands/CancelPolicyPreviewJobCommand.js +16 -0
- package/dist-es/commands/CreatePolicyPreviewConfigurationCommand.js +16 -0
- package/dist-es/commands/DeletePolicyPreviewConfigurationCommand.js +16 -0
- package/dist-es/commands/GetPolicyPreviewConfigurationCommand.js +16 -0
- package/dist-es/commands/GetPolicyPreviewJobCommand.js +16 -0
- package/dist-es/commands/ListPolicyPreviewJobsCommand.js +16 -0
- package/dist-es/commands/StartPolicyPreviewJobCommand.js +16 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/index.js +1 -0
- package/dist-es/models/enums.js +31 -0
- package/dist-es/pagination/ListPolicyPreviewJobsPaginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/schemas/schemas_0.js +168 -0
- package/dist-es/waiters/index.js +2 -0
- package/dist-es/waiters/waitForPolicyPreviewConfigurationActive.js +54 -0
- package/dist-es/waiters/waitForPolicyPreviewJobCompleted.js +49 -0
- package/dist-types/AccessAnalyzer.d.ts +74 -1
- package/dist-types/AccessAnalyzerClient.d.ts +9 -2
- package/dist-types/commands/CancelPolicyPreviewJobCommand.d.ts +100 -0
- package/dist-types/commands/CreatePolicyPreviewConfigurationCommand.d.ts +109 -0
- package/dist-types/commands/DeletePolicyPreviewConfigurationCommand.d.ts +100 -0
- package/dist-types/commands/GetPolicyPreviewConfigurationCommand.d.ts +114 -0
- package/dist-types/commands/GetPolicyPreviewJobCommand.d.ts +187 -0
- package/dist-types/commands/ListPolicyPreviewJobsCommand.d.ts +137 -0
- package/dist-types/commands/StartPolicyPreviewJobCommand.d.ts +154 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/enums.d.ts +71 -0
- package/dist-types/models/models_0.d.ts +316 -1
- package/dist-types/pagination/ListPolicyPreviewJobsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +26 -0
- package/dist-types/ts3.4/AccessAnalyzer.d.ts +150 -0
- package/dist-types/ts3.4/AccessAnalyzerClient.d.ts +42 -0
- package/dist-types/ts3.4/commands/CancelPolicyPreviewJobCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/CreatePolicyPreviewConfigurationCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DeletePolicyPreviewConfigurationCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetPolicyPreviewConfigurationCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/GetPolicyPreviewJobCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListPolicyPreviewJobsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/StartPolicyPreviewJobCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +7 -0
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/enums.d.ts +41 -0
- package/dist-types/ts3.4/models/models_0.d.ts +83 -0
- package/dist-types/ts3.4/pagination/ListPolicyPreviewJobsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +26 -0
- package/dist-types/ts3.4/waiters/index.d.ts +2 -0
- package/dist-types/ts3.4/waiters/waitForPolicyPreviewConfigurationActive.d.ts +11 -0
- package/dist-types/ts3.4/waiters/waitForPolicyPreviewJobCompleted.d.ts +11 -0
- package/dist-types/waiters/index.d.ts +2 -0
- package/dist-types/waiters/waitForPolicyPreviewConfigurationActive.d.ts +14 -0
- package/dist-types/waiters/waitForPolicyPreviewJobCompleted.d.ts +14 -0
- package/package.json +2 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient";
|
|
4
|
+
import type { GetPolicyPreviewConfigurationRequest, GetPolicyPreviewConfigurationResponse } from "../models/models_0";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link GetPolicyPreviewConfigurationCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetPolicyPreviewConfigurationCommandInput extends GetPolicyPreviewConfigurationRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link GetPolicyPreviewConfigurationCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetPolicyPreviewConfigurationCommandOutput extends GetPolicyPreviewConfigurationResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const GetPolicyPreviewConfigurationCommand_base: {
|
|
25
|
+
new (input: GetPolicyPreviewConfigurationCommandInput): import("@smithy/smithy-client").CommandImpl<GetPolicyPreviewConfigurationCommandInput, GetPolicyPreviewConfigurationCommandOutput, AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (...[input]: [] | [GetPolicyPreviewConfigurationCommandInput]): import("@smithy/smithy-client").CommandImpl<GetPolicyPreviewConfigurationCommandInput, GetPolicyPreviewConfigurationCommandOutput, AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Retrieves the policy preview configuration for your account.</p>
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { AccessAnalyzerClient, GetPolicyPreviewConfigurationCommand } from "@aws-sdk/client-accessanalyzer"; // ES Modules import
|
|
35
|
+
* // const { AccessAnalyzerClient, GetPolicyPreviewConfigurationCommand } = require("@aws-sdk/client-accessanalyzer"); // CommonJS import
|
|
36
|
+
* // import type { AccessAnalyzerClientConfig } from "@aws-sdk/client-accessanalyzer";
|
|
37
|
+
* const config = {}; // type is AccessAnalyzerClientConfig
|
|
38
|
+
* const client = new AccessAnalyzerClient(config);
|
|
39
|
+
* const input = {};
|
|
40
|
+
* const command = new GetPolicyPreviewConfigurationCommand(input);
|
|
41
|
+
* const response = await client.send(command);
|
|
42
|
+
* // { // GetPolicyPreviewConfigurationResponse
|
|
43
|
+
* // policyPreviewConfigurations: [ // PolicyPreviewConfigurationList
|
|
44
|
+
* // { // PolicyPreviewConfiguration
|
|
45
|
+
* // scope: "STRING_VALUE", // required
|
|
46
|
+
* // status: "STRING_VALUE", // required
|
|
47
|
+
* // createdAt: new Date("TIMESTAMP"), // required
|
|
48
|
+
* // updatedAt: new Date("TIMESTAMP"),
|
|
49
|
+
* // },
|
|
50
|
+
* // ],
|
|
51
|
+
* // };
|
|
52
|
+
*
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @param GetPolicyPreviewConfigurationCommandInput - {@link GetPolicyPreviewConfigurationCommandInput}
|
|
56
|
+
* @returns {@link GetPolicyPreviewConfigurationCommandOutput}
|
|
57
|
+
* @see {@link GetPolicyPreviewConfigurationCommandInput} for command's `input` shape.
|
|
58
|
+
* @see {@link GetPolicyPreviewConfigurationCommandOutput} for command's `response` shape.
|
|
59
|
+
* @see {@link AccessAnalyzerClientResolvedConfig | config} for AccessAnalyzerClient's `config` shape.
|
|
60
|
+
*
|
|
61
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
62
|
+
* <p>You do not have sufficient access to perform this action.</p>
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link InternalServerException} (server fault)
|
|
65
|
+
* <p>Internal server error.</p>
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
68
|
+
* <p>The specified resource could not be found.</p>
|
|
69
|
+
*
|
|
70
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
71
|
+
* <p>Throttling limit exceeded error.</p>
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link ValidationException} (client fault)
|
|
74
|
+
* <p>Validation exception error.</p>
|
|
75
|
+
*
|
|
76
|
+
* @throws {@link AccessAnalyzerServiceException}
|
|
77
|
+
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
|
|
78
|
+
*
|
|
79
|
+
*
|
|
80
|
+
* @example Successfully retrieved policy preview configuration
|
|
81
|
+
* ```javascript
|
|
82
|
+
* //
|
|
83
|
+
* const input = { /* empty *\/ };
|
|
84
|
+
* const command = new GetPolicyPreviewConfigurationCommand(input);
|
|
85
|
+
* const response = await client.send(command);
|
|
86
|
+
* /* response is
|
|
87
|
+
* {
|
|
88
|
+
* policyPreviewConfigurations: [
|
|
89
|
+
* {
|
|
90
|
+
* createdAt: "2023-05-01T10:00:00Z",
|
|
91
|
+
* scope: "GLOBAL",
|
|
92
|
+
* status: "ACTIVE",
|
|
93
|
+
* updatedAt: "2023-05-01T10:30:00Z"
|
|
94
|
+
* }
|
|
95
|
+
* ]
|
|
96
|
+
* }
|
|
97
|
+
* *\/
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
export declare class GetPolicyPreviewConfigurationCommand extends GetPolicyPreviewConfigurationCommand_base {
|
|
103
|
+
/** @internal type navigation helper, not in runtime. */
|
|
104
|
+
protected static __types: {
|
|
105
|
+
api: {
|
|
106
|
+
input: {};
|
|
107
|
+
output: GetPolicyPreviewConfigurationResponse;
|
|
108
|
+
};
|
|
109
|
+
sdk: {
|
|
110
|
+
input: GetPolicyPreviewConfigurationCommandInput;
|
|
111
|
+
output: GetPolicyPreviewConfigurationCommandOutput;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient";
|
|
4
|
+
import type { GetPolicyPreviewJobRequest, GetPolicyPreviewJobResponse } from "../models/models_0";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link GetPolicyPreviewJobCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetPolicyPreviewJobCommandInput extends GetPolicyPreviewJobRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link GetPolicyPreviewJobCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetPolicyPreviewJobCommandOutput extends GetPolicyPreviewJobResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const GetPolicyPreviewJobCommand_base: {
|
|
25
|
+
new (input: GetPolicyPreviewJobCommandInput): import("@smithy/smithy-client").CommandImpl<GetPolicyPreviewJobCommandInput, GetPolicyPreviewJobCommandOutput, AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: GetPolicyPreviewJobCommandInput): import("@smithy/smithy-client").CommandImpl<GetPolicyPreviewJobCommandInput, GetPolicyPreviewJobCommandOutput, AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Retrieves the metadata, parameters, and status for a policy preview job. Use this operation to monitor job progress and retrieve the Amazon S3 location of the completed analysis report.</p> <note> <p>Job data has a time-to-live (TTL) of 14 days and will be deleted after expiration.</p> </note>
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { AccessAnalyzerClient, GetPolicyPreviewJobCommand } from "@aws-sdk/client-accessanalyzer"; // ES Modules import
|
|
35
|
+
* // const { AccessAnalyzerClient, GetPolicyPreviewJobCommand } = require("@aws-sdk/client-accessanalyzer"); // CommonJS import
|
|
36
|
+
* // import type { AccessAnalyzerClientConfig } from "@aws-sdk/client-accessanalyzer";
|
|
37
|
+
* const config = {}; // type is AccessAnalyzerClientConfig
|
|
38
|
+
* const client = new AccessAnalyzerClient(config);
|
|
39
|
+
* const input = { // GetPolicyPreviewJobRequest
|
|
40
|
+
* jobId: "STRING_VALUE", // required
|
|
41
|
+
* };
|
|
42
|
+
* const command = new GetPolicyPreviewJobCommand(input);
|
|
43
|
+
* const response = await client.send(command);
|
|
44
|
+
* // { // GetPolicyPreviewJobResponse
|
|
45
|
+
* // jobId: "STRING_VALUE", // required
|
|
46
|
+
* // jobParameters: { // PolicyPreviewJobParameters
|
|
47
|
+
* // startTime: new Date("TIMESTAMP"), // required
|
|
48
|
+
* // endTime: new Date("TIMESTAMP"), // required
|
|
49
|
+
* // policyConfigurations: [ // PolicyConfigurationsList // required
|
|
50
|
+
* // { // PolicyConfiguration
|
|
51
|
+
* // jobType: "STRING_VALUE", // required
|
|
52
|
+
* // targetId: "STRING_VALUE", // required
|
|
53
|
+
* // policyDocumentsList: [ // PolicyDocumentList // required
|
|
54
|
+
* // "STRING_VALUE",
|
|
55
|
+
* // ],
|
|
56
|
+
* // },
|
|
57
|
+
* // ],
|
|
58
|
+
* // },
|
|
59
|
+
* // jobDetails: { // PolicyPreviewJobDetails
|
|
60
|
+
* // jobStatus: "STRING_VALUE", // required
|
|
61
|
+
* // submittedAt: new Date("TIMESTAMP"), // required
|
|
62
|
+
* // startedAt: new Date("TIMESTAMP"),
|
|
63
|
+
* // completedAt: new Date("TIMESTAMP"),
|
|
64
|
+
* // jobError: { // JobError
|
|
65
|
+
* // code: "STRING_VALUE", // required
|
|
66
|
+
* // message: "STRING_VALUE", // required
|
|
67
|
+
* // },
|
|
68
|
+
* // },
|
|
69
|
+
* // outputS3Uri: "STRING_VALUE", // required
|
|
70
|
+
* // };
|
|
71
|
+
*
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* @param GetPolicyPreviewJobCommandInput - {@link GetPolicyPreviewJobCommandInput}
|
|
75
|
+
* @returns {@link GetPolicyPreviewJobCommandOutput}
|
|
76
|
+
* @see {@link GetPolicyPreviewJobCommandInput} for command's `input` shape.
|
|
77
|
+
* @see {@link GetPolicyPreviewJobCommandOutput} for command's `response` shape.
|
|
78
|
+
* @see {@link AccessAnalyzerClientResolvedConfig | config} for AccessAnalyzerClient's `config` shape.
|
|
79
|
+
*
|
|
80
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
81
|
+
* <p>You do not have sufficient access to perform this action.</p>
|
|
82
|
+
*
|
|
83
|
+
* @throws {@link InternalServerException} (server fault)
|
|
84
|
+
* <p>Internal server error.</p>
|
|
85
|
+
*
|
|
86
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
87
|
+
* <p>The specified resource could not be found.</p>
|
|
88
|
+
*
|
|
89
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
90
|
+
* <p>Throttling limit exceeded error.</p>
|
|
91
|
+
*
|
|
92
|
+
* @throws {@link ValidationException} (client fault)
|
|
93
|
+
* <p>Validation exception error.</p>
|
|
94
|
+
*
|
|
95
|
+
* @throws {@link AccessAnalyzerServiceException}
|
|
96
|
+
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
|
|
97
|
+
*
|
|
98
|
+
*
|
|
99
|
+
* @example Successfully fetched completed policy preview job
|
|
100
|
+
* ```javascript
|
|
101
|
+
* //
|
|
102
|
+
* const input = {
|
|
103
|
+
* jobId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
|
|
104
|
+
* };
|
|
105
|
+
* const command = new GetPolicyPreviewJobCommand(input);
|
|
106
|
+
* const response = await client.send(command);
|
|
107
|
+
* /* response is
|
|
108
|
+
* {
|
|
109
|
+
* jobDetails: {
|
|
110
|
+
* completedAt: "2023-05-01T10:30:00Z",
|
|
111
|
+
* jobStatus: "COMPLETED",
|
|
112
|
+
* startedAt: "2023-05-01T10:01:00Z",
|
|
113
|
+
* submittedAt: "2023-05-01T10:00:00Z"
|
|
114
|
+
* },
|
|
115
|
+
* jobId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
116
|
+
* jobParameters: {
|
|
117
|
+
* endTime: "2023-12-31T23:59:59Z",
|
|
118
|
+
* policyConfigurations: [
|
|
119
|
+
* {
|
|
120
|
+
* jobType: "SCP",
|
|
121
|
+
* policyDocumentsList: [
|
|
122
|
+
* `{"Version":"2012-10-17","Statement":[{"Sid":"AllowS3Access","Effect":"Allow","Action":["s3:GetObject","s3:PutObject","s3:ListBucket"],"Resource":["arn:aws:s3:::example-bucket","arn:aws:s3:::example-bucket/*"]}]}`
|
|
123
|
+
* ],
|
|
124
|
+
* targetId: "123456789012"
|
|
125
|
+
* }
|
|
126
|
+
* ],
|
|
127
|
+
* startTime: "2023-01-01T00:00:00Z"
|
|
128
|
+
* },
|
|
129
|
+
* outputS3Uri: "s3://bucket/path"
|
|
130
|
+
* }
|
|
131
|
+
* *\/
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* @example Failed policy preview job
|
|
135
|
+
* ```javascript
|
|
136
|
+
* //
|
|
137
|
+
* const input = {
|
|
138
|
+
* jobId: "b2c3d4e5-f6a7-8901-bcde-f12345678901"
|
|
139
|
+
* };
|
|
140
|
+
* const command = new GetPolicyPreviewJobCommand(input);
|
|
141
|
+
* const response = await client.send(command);
|
|
142
|
+
* /* response is
|
|
143
|
+
* {
|
|
144
|
+
* jobDetails: {
|
|
145
|
+
* completedAt: "2023-05-01T10:05:00Z",
|
|
146
|
+
* jobError: {
|
|
147
|
+
* code: "SERVICE_ERROR",
|
|
148
|
+
* message: "Service error occurred during job execution."
|
|
149
|
+
* },
|
|
150
|
+
* jobStatus: "FAILED",
|
|
151
|
+
* startedAt: "2023-05-01T10:01:00Z",
|
|
152
|
+
* submittedAt: "2023-05-01T10:00:00Z"
|
|
153
|
+
* },
|
|
154
|
+
* jobId: "b2c3d4e5-f6a7-8901-bcde-f12345678901",
|
|
155
|
+
* jobParameters: {
|
|
156
|
+
* endTime: "2023-12-31T23:59:59Z",
|
|
157
|
+
* policyConfigurations: [
|
|
158
|
+
* {
|
|
159
|
+
* jobType: "SCP",
|
|
160
|
+
* policyDocumentsList: [
|
|
161
|
+
* `{"Version":"2012-10-17","Statement":[{"Sid":"AllowS3Access","Effect":"Allow","Action":["s3:GetObject","s3:PutObject","s3:ListBucket"],"Resource":["arn:aws:s3:::example-bucket","arn:aws:s3:::example-bucket/*"]}]}`
|
|
162
|
+
* ],
|
|
163
|
+
* targetId: "123456789012"
|
|
164
|
+
* }
|
|
165
|
+
* ],
|
|
166
|
+
* startTime: "2023-01-01T00:00:00Z"
|
|
167
|
+
* },
|
|
168
|
+
* outputS3Uri: "s3://bucket/path"
|
|
169
|
+
* }
|
|
170
|
+
* *\/
|
|
171
|
+
* ```
|
|
172
|
+
*
|
|
173
|
+
* @public
|
|
174
|
+
*/
|
|
175
|
+
export declare class GetPolicyPreviewJobCommand extends GetPolicyPreviewJobCommand_base {
|
|
176
|
+
/** @internal type navigation helper, not in runtime. */
|
|
177
|
+
protected static __types: {
|
|
178
|
+
api: {
|
|
179
|
+
input: GetPolicyPreviewJobRequest;
|
|
180
|
+
output: GetPolicyPreviewJobResponse;
|
|
181
|
+
};
|
|
182
|
+
sdk: {
|
|
183
|
+
input: GetPolicyPreviewJobCommandInput;
|
|
184
|
+
output: GetPolicyPreviewJobCommandOutput;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient";
|
|
4
|
+
import type { ListPolicyPreviewJobsRequest, ListPolicyPreviewJobsResponse } from "../models/models_0";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link ListPolicyPreviewJobsCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface ListPolicyPreviewJobsCommandInput extends ListPolicyPreviewJobsRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link ListPolicyPreviewJobsCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface ListPolicyPreviewJobsCommandOutput extends ListPolicyPreviewJobsResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const ListPolicyPreviewJobsCommand_base: {
|
|
25
|
+
new (input: ListPolicyPreviewJobsCommandInput): import("@smithy/smithy-client").CommandImpl<ListPolicyPreviewJobsCommandInput, ListPolicyPreviewJobsCommandOutput, AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (...[input]: [] | [ListPolicyPreviewJobsCommandInput]): import("@smithy/smithy-client").CommandImpl<ListPolicyPreviewJobsCommandInput, ListPolicyPreviewJobsCommandOutput, AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Lists all policy preview jobs with optional filtering by job status or target ID. Results are paginated for efficient retrieval of large result sets.</p>
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { AccessAnalyzerClient, ListPolicyPreviewJobsCommand } from "@aws-sdk/client-accessanalyzer"; // ES Modules import
|
|
35
|
+
* // const { AccessAnalyzerClient, ListPolicyPreviewJobsCommand } = require("@aws-sdk/client-accessanalyzer"); // CommonJS import
|
|
36
|
+
* // import type { AccessAnalyzerClientConfig } from "@aws-sdk/client-accessanalyzer";
|
|
37
|
+
* const config = {}; // type is AccessAnalyzerClientConfig
|
|
38
|
+
* const client = new AccessAnalyzerClient(config);
|
|
39
|
+
* const input = { // ListPolicyPreviewJobsRequest
|
|
40
|
+
* filters: { // PolicyPreviewJobFiltersMap
|
|
41
|
+
* "<keys>": "STRING_VALUE",
|
|
42
|
+
* },
|
|
43
|
+
* maxResults: Number("int"),
|
|
44
|
+
* nextToken: "STRING_VALUE",
|
|
45
|
+
* };
|
|
46
|
+
* const command = new ListPolicyPreviewJobsCommand(input);
|
|
47
|
+
* const response = await client.send(command);
|
|
48
|
+
* // { // ListPolicyPreviewJobsResponse
|
|
49
|
+
* // analysisReports: [ // PolicyPreviewAnalysisReports // required
|
|
50
|
+
* // { // PolicyPreviewAnalysisReport
|
|
51
|
+
* // jobId: "STRING_VALUE", // required
|
|
52
|
+
* // status: "STRING_VALUE", // required
|
|
53
|
+
* // submittedAt: new Date("TIMESTAMP"), // required
|
|
54
|
+
* // startedAt: new Date("TIMESTAMP"),
|
|
55
|
+
* // completedAt: new Date("TIMESTAMP"),
|
|
56
|
+
* // outputS3Uri: "STRING_VALUE", // required
|
|
57
|
+
* // },
|
|
58
|
+
* // ],
|
|
59
|
+
* // nextToken: "STRING_VALUE",
|
|
60
|
+
* // };
|
|
61
|
+
*
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @param ListPolicyPreviewJobsCommandInput - {@link ListPolicyPreviewJobsCommandInput}
|
|
65
|
+
* @returns {@link ListPolicyPreviewJobsCommandOutput}
|
|
66
|
+
* @see {@link ListPolicyPreviewJobsCommandInput} for command's `input` shape.
|
|
67
|
+
* @see {@link ListPolicyPreviewJobsCommandOutput} for command's `response` shape.
|
|
68
|
+
* @see {@link AccessAnalyzerClientResolvedConfig | config} for AccessAnalyzerClient's `config` shape.
|
|
69
|
+
*
|
|
70
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
71
|
+
* <p>You do not have sufficient access to perform this action.</p>
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link InternalServerException} (server fault)
|
|
74
|
+
* <p>Internal server error.</p>
|
|
75
|
+
*
|
|
76
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
77
|
+
* <p>Throttling limit exceeded error.</p>
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link ValidationException} (client fault)
|
|
80
|
+
* <p>Validation exception error.</p>
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link AccessAnalyzerServiceException}
|
|
83
|
+
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
|
|
84
|
+
*
|
|
85
|
+
*
|
|
86
|
+
* @example Successfully listed policy preview jobs with filters
|
|
87
|
+
* ```javascript
|
|
88
|
+
* //
|
|
89
|
+
* const input = {
|
|
90
|
+
* filters: {
|
|
91
|
+
* jobStatus: "COMPLETED"
|
|
92
|
+
* },
|
|
93
|
+
* maxResults: 10,
|
|
94
|
+
* nextToken: "token-123"
|
|
95
|
+
* };
|
|
96
|
+
* const command = new ListPolicyPreviewJobsCommand(input);
|
|
97
|
+
* const response = await client.send(command);
|
|
98
|
+
* /* response is
|
|
99
|
+
* {
|
|
100
|
+
* analysisReports: [
|
|
101
|
+
* {
|
|
102
|
+
* completedAt: "2023-05-01T10:30:00Z",
|
|
103
|
+
* jobId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
104
|
+
* outputS3Uri: "s3://bucket/path",
|
|
105
|
+
* startedAt: "2023-05-01T10:01:00Z",
|
|
106
|
+
* status: "COMPLETED",
|
|
107
|
+
* submittedAt: "2023-05-01T10:00:00Z"
|
|
108
|
+
* },
|
|
109
|
+
* {
|
|
110
|
+
* completedAt: "2023-05-02T10:30:00Z",
|
|
111
|
+
* jobId: "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
112
|
+
* outputS3Uri: "s3://bucket/path",
|
|
113
|
+
* startedAt: "2023-05-02T10:01:00Z",
|
|
114
|
+
* status: "COMPLETED",
|
|
115
|
+
* submittedAt: "2023-05-02T10:00:00Z"
|
|
116
|
+
* }
|
|
117
|
+
* ],
|
|
118
|
+
* nextToken: "token-456"
|
|
119
|
+
* }
|
|
120
|
+
* *\/
|
|
121
|
+
* ```
|
|
122
|
+
*
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
export declare class ListPolicyPreviewJobsCommand extends ListPolicyPreviewJobsCommand_base {
|
|
126
|
+
/** @internal type navigation helper, not in runtime. */
|
|
127
|
+
protected static __types: {
|
|
128
|
+
api: {
|
|
129
|
+
input: ListPolicyPreviewJobsRequest;
|
|
130
|
+
output: ListPolicyPreviewJobsResponse;
|
|
131
|
+
};
|
|
132
|
+
sdk: {
|
|
133
|
+
input: ListPolicyPreviewJobsCommandInput;
|
|
134
|
+
output: ListPolicyPreviewJobsCommandOutput;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient";
|
|
4
|
+
import type { StartPolicyPreviewJobRequest, StartPolicyPreviewJobResponse } from "../models/models_0";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link StartPolicyPreviewJobCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface StartPolicyPreviewJobCommandInput extends StartPolicyPreviewJobRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link StartPolicyPreviewJobCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface StartPolicyPreviewJobCommandOutput extends StartPolicyPreviewJobResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const StartPolicyPreviewJobCommand_base: {
|
|
25
|
+
new (input: StartPolicyPreviewJobCommandInput): import("@smithy/smithy-client").CommandImpl<StartPolicyPreviewJobCommandInput, StartPolicyPreviewJobCommandOutput, AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: StartPolicyPreviewJobCommandInput): import("@smithy/smithy-client").CommandImpl<StartPolicyPreviewJobCommandInput, StartPolicyPreviewJobCommandOutput, AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Creates a policy preview analysis job to evaluate the impact of Service Control Policies (SCPs) before deployment. The analysis uses historical CloudTrail authorization events to identify potential access denials, helping you prevent service disruptions.</p> <p>The job analyzes CloudTrail events within a specified time window and generates a report identifying which events would be denied by the proposed policy. The report is stored in the specified Amazon S3 location.</p>
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { AccessAnalyzerClient, StartPolicyPreviewJobCommand } from "@aws-sdk/client-accessanalyzer"; // ES Modules import
|
|
35
|
+
* // const { AccessAnalyzerClient, StartPolicyPreviewJobCommand } = require("@aws-sdk/client-accessanalyzer"); // CommonJS import
|
|
36
|
+
* // import type { AccessAnalyzerClientConfig } from "@aws-sdk/client-accessanalyzer";
|
|
37
|
+
* const config = {}; // type is AccessAnalyzerClientConfig
|
|
38
|
+
* const client = new AccessAnalyzerClient(config);
|
|
39
|
+
* const input = { // StartPolicyPreviewJobRequest
|
|
40
|
+
* policyConfigurations: [ // PolicyConfigurationsList // required
|
|
41
|
+
* { // PolicyConfiguration
|
|
42
|
+
* jobType: "STRING_VALUE", // required
|
|
43
|
+
* targetId: "STRING_VALUE", // required
|
|
44
|
+
* policyDocumentsList: [ // PolicyDocumentList // required
|
|
45
|
+
* "STRING_VALUE",
|
|
46
|
+
* ],
|
|
47
|
+
* },
|
|
48
|
+
* ],
|
|
49
|
+
* startTime: new Date("TIMESTAMP"), // required
|
|
50
|
+
* endTime: new Date("TIMESTAMP"),
|
|
51
|
+
* outputS3Uri: "STRING_VALUE", // required
|
|
52
|
+
* clientToken: "STRING_VALUE",
|
|
53
|
+
* };
|
|
54
|
+
* const command = new StartPolicyPreviewJobCommand(input);
|
|
55
|
+
* const response = await client.send(command);
|
|
56
|
+
* // { // StartPolicyPreviewJobResponse
|
|
57
|
+
* // jobId: "STRING_VALUE", // required
|
|
58
|
+
* // };
|
|
59
|
+
*
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* @param StartPolicyPreviewJobCommandInput - {@link StartPolicyPreviewJobCommandInput}
|
|
63
|
+
* @returns {@link StartPolicyPreviewJobCommandOutput}
|
|
64
|
+
* @see {@link StartPolicyPreviewJobCommandInput} for command's `input` shape.
|
|
65
|
+
* @see {@link StartPolicyPreviewJobCommandOutput} for command's `response` shape.
|
|
66
|
+
* @see {@link AccessAnalyzerClientResolvedConfig | config} for AccessAnalyzerClient's `config` shape.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link AccessDeniedException} (client fault)
|
|
69
|
+
* <p>You do not have sufficient access to perform this action.</p>
|
|
70
|
+
*
|
|
71
|
+
* @throws {@link ConflictException} (client fault)
|
|
72
|
+
* <p>A conflict exception error.</p>
|
|
73
|
+
*
|
|
74
|
+
* @throws {@link InternalServerException} (server fault)
|
|
75
|
+
* <p>Internal server error.</p>
|
|
76
|
+
*
|
|
77
|
+
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
78
|
+
* <p>Service quote met error.</p>
|
|
79
|
+
*
|
|
80
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
81
|
+
* <p>Throttling limit exceeded error.</p>
|
|
82
|
+
*
|
|
83
|
+
* @throws {@link ValidationException} (client fault)
|
|
84
|
+
* <p>Validation exception error.</p>
|
|
85
|
+
*
|
|
86
|
+
* @throws {@link AccessAnalyzerServiceException}
|
|
87
|
+
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p>
|
|
88
|
+
*
|
|
89
|
+
*
|
|
90
|
+
* @example Successfully started policy preview job
|
|
91
|
+
* ```javascript
|
|
92
|
+
* //
|
|
93
|
+
* const input = {
|
|
94
|
+
* clientToken: "unique-token-123",
|
|
95
|
+
* endTime: "2023-12-31T23:59:59Z",
|
|
96
|
+
* outputS3Uri: "s3://bucket/path",
|
|
97
|
+
* policyConfigurations: [
|
|
98
|
+
* {
|
|
99
|
+
* jobType: "SCP",
|
|
100
|
+
* policyDocumentsList: [
|
|
101
|
+
* `{"Version":"2012-10-17","Statement":[{"Sid":"AllowS3Access","Effect":"Allow","Action":["s3:GetObject","s3:PutObject","s3:ListBucket"],"Resource":["arn:aws:s3:::example-bucket","arn:aws:s3:::example-bucket/*"]}]}`
|
|
102
|
+
* ],
|
|
103
|
+
* targetId: "123456789012"
|
|
104
|
+
* }
|
|
105
|
+
* ],
|
|
106
|
+
* startTime: "2023-01-01T00:00:00Z"
|
|
107
|
+
* };
|
|
108
|
+
* const command = new StartPolicyPreviewJobCommand(input);
|
|
109
|
+
* const response = await client.send(command);
|
|
110
|
+
* /* response is
|
|
111
|
+
* {
|
|
112
|
+
* jobId: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
|
|
113
|
+
* }
|
|
114
|
+
* *\/
|
|
115
|
+
* ```
|
|
116
|
+
*
|
|
117
|
+
* @example Failed field validation for invalid targetId
|
|
118
|
+
* ```javascript
|
|
119
|
+
* //
|
|
120
|
+
* const input = {
|
|
121
|
+
* outputS3Uri: "s3://bucket/path",
|
|
122
|
+
* policyConfigurations: [
|
|
123
|
+
* {
|
|
124
|
+
* jobType: "SCP",
|
|
125
|
+
* policyDocumentsList: [
|
|
126
|
+
* `{"Version":"2012-10-17","Statement":[{"Effect":"Deny","Action":"s3:*","Resource":"*"}]}`
|
|
127
|
+
* ],
|
|
128
|
+
* targetId: "invalid"
|
|
129
|
+
* }
|
|
130
|
+
* ],
|
|
131
|
+
* startTime: "2023-01-01T00:00:00Z"
|
|
132
|
+
* };
|
|
133
|
+
* const command = new StartPolicyPreviewJobCommand(input);
|
|
134
|
+
* const response = await client.send(command);
|
|
135
|
+
* /* response is
|
|
136
|
+
* { /* metadata only *\/ }
|
|
137
|
+
* *\/
|
|
138
|
+
* ```
|
|
139
|
+
*
|
|
140
|
+
* @public
|
|
141
|
+
*/
|
|
142
|
+
export declare class StartPolicyPreviewJobCommand extends StartPolicyPreviewJobCommand_base {
|
|
143
|
+
/** @internal type navigation helper, not in runtime. */
|
|
144
|
+
protected static __types: {
|
|
145
|
+
api: {
|
|
146
|
+
input: StartPolicyPreviewJobRequest;
|
|
147
|
+
output: StartPolicyPreviewJobResponse;
|
|
148
|
+
};
|
|
149
|
+
sdk: {
|
|
150
|
+
input: StartPolicyPreviewJobCommandInput;
|
|
151
|
+
output: StartPolicyPreviewJobCommandOutput;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
export * from "./ApplyArchiveRuleCommand";
|
|
2
2
|
export * from "./CancelPolicyGenerationCommand";
|
|
3
|
+
export * from "./CancelPolicyPreviewJobCommand";
|
|
3
4
|
export * from "./CheckAccessNotGrantedCommand";
|
|
4
5
|
export * from "./CheckNoNewAccessCommand";
|
|
5
6
|
export * from "./CheckNoPublicAccessCommand";
|
|
6
7
|
export * from "./CreateAccessPreviewCommand";
|
|
7
8
|
export * from "./CreateAnalyzerCommand";
|
|
8
9
|
export * from "./CreateArchiveRuleCommand";
|
|
10
|
+
export * from "./CreatePolicyPreviewConfigurationCommand";
|
|
9
11
|
export * from "./DeleteAnalyzerCommand";
|
|
10
12
|
export * from "./DeleteArchiveRuleCommand";
|
|
13
|
+
export * from "./DeletePolicyPreviewConfigurationCommand";
|
|
11
14
|
export * from "./GenerateFindingRecommendationCommand";
|
|
12
15
|
export * from "./GetAccessPreviewCommand";
|
|
13
16
|
export * from "./GetAnalyzedResourceCommand";
|
|
@@ -18,6 +21,8 @@ export * from "./GetFindingRecommendationCommand";
|
|
|
18
21
|
export * from "./GetFindingV2Command";
|
|
19
22
|
export * from "./GetFindingsStatisticsCommand";
|
|
20
23
|
export * from "./GetGeneratedPolicyCommand";
|
|
24
|
+
export * from "./GetPolicyPreviewConfigurationCommand";
|
|
25
|
+
export * from "./GetPolicyPreviewJobCommand";
|
|
21
26
|
export * from "./ListAccessPreviewFindingsCommand";
|
|
22
27
|
export * from "./ListAccessPreviewsCommand";
|
|
23
28
|
export * from "./ListAnalyzedResourcesCommand";
|
|
@@ -26,8 +31,10 @@ export * from "./ListArchiveRulesCommand";
|
|
|
26
31
|
export * from "./ListFindingsCommand";
|
|
27
32
|
export * from "./ListFindingsV2Command";
|
|
28
33
|
export * from "./ListPolicyGenerationsCommand";
|
|
34
|
+
export * from "./ListPolicyPreviewJobsCommand";
|
|
29
35
|
export * from "./ListTagsForResourceCommand";
|
|
30
36
|
export * from "./StartPolicyGenerationCommand";
|
|
37
|
+
export * from "./StartPolicyPreviewJobCommand";
|
|
31
38
|
export * from "./StartResourceScanCommand";
|
|
32
39
|
export * from "./TagResourceCommand";
|
|
33
40
|
export * from "./UntagResourceCommand";
|
package/dist-types/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export type { AccessAnalyzerExtensionConfiguration } from "./extensionConfigurat
|
|
|
11
11
|
export * from "./commands";
|
|
12
12
|
export * from "./schemas/schemas_0";
|
|
13
13
|
export * from "./pagination";
|
|
14
|
+
export * from "./waiters";
|
|
14
15
|
export * from "./models/enums";
|
|
15
16
|
export * from "./models/errors";
|
|
16
17
|
export * from "./models/models_0";
|