-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-accessanalyzer): IAM Access Analyzer now provides policy …
…recommendations to help resolve unused permissions for IAM roles and users. Additionally, IAM Access Analyzer now extends its custom policy checks to detect when IAM policies grant public access or access to critical resources ahead of deployments.
- Loading branch information
awstools
committed
Jun 11, 2024
1 parent
dde3dbe
commit c5dc054
Showing
13 changed files
with
1,766 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
114 changes: 114 additions & 0 deletions
114
clients/client-accessanalyzer/src/commands/CheckNoPublicAccessCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
// smithy-typescript generated code | ||
import { getEndpointPlugin } from "@smithy/middleware-endpoint"; | ||
import { getSerdePlugin } from "@smithy/middleware-serde"; | ||
import { Command as $Command } from "@smithy/smithy-client"; | ||
import { MetadataBearer as __MetadataBearer } from "@smithy/types"; | ||
|
||
import { AccessAnalyzerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccessAnalyzerClient"; | ||
import { commonParams } from "../endpoint/EndpointParameters"; | ||
import { | ||
CheckNoPublicAccessRequest, | ||
CheckNoPublicAccessRequestFilterSensitiveLog, | ||
CheckNoPublicAccessResponse, | ||
} from "../models/models_0"; | ||
import { de_CheckNoPublicAccessCommand, se_CheckNoPublicAccessCommand } from "../protocols/Aws_restJson1"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export type { __MetadataBearer }; | ||
export { $Command }; | ||
/** | ||
* @public | ||
* | ||
* The input for {@link CheckNoPublicAccessCommand}. | ||
*/ | ||
export interface CheckNoPublicAccessCommandInput extends CheckNoPublicAccessRequest {} | ||
/** | ||
* @public | ||
* | ||
* The output of {@link CheckNoPublicAccessCommand}. | ||
*/ | ||
export interface CheckNoPublicAccessCommandOutput extends CheckNoPublicAccessResponse, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Checks whether a resource policy can grant public access to the specified resource | ||
* type.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { AccessAnalyzerClient, CheckNoPublicAccessCommand } from "@aws-sdk/client-accessanalyzer"; // ES Modules import | ||
* // const { AccessAnalyzerClient, CheckNoPublicAccessCommand } = require("@aws-sdk/client-accessanalyzer"); // CommonJS import | ||
* const client = new AccessAnalyzerClient(config); | ||
* const input = { // CheckNoPublicAccessRequest | ||
* policyDocument: "STRING_VALUE", // required | ||
* resourceType: "STRING_VALUE", // required | ||
* }; | ||
* const command = new CheckNoPublicAccessCommand(input); | ||
* const response = await client.send(command); | ||
* // { // CheckNoPublicAccessResponse | ||
* // result: "STRING_VALUE", | ||
* // message: "STRING_VALUE", | ||
* // reasons: [ // ReasonSummaryList | ||
* // { // ReasonSummary | ||
* // description: "STRING_VALUE", | ||
* // statementIndex: Number("int"), | ||
* // statementId: "STRING_VALUE", | ||
* // }, | ||
* // ], | ||
* // }; | ||
* | ||
* ``` | ||
* | ||
* @param CheckNoPublicAccessCommandInput - {@link CheckNoPublicAccessCommandInput} | ||
* @returns {@link CheckNoPublicAccessCommandOutput} | ||
* @see {@link CheckNoPublicAccessCommandInput} for command's `input` shape. | ||
* @see {@link CheckNoPublicAccessCommandOutput} for command's `response` shape. | ||
* @see {@link AccessAnalyzerClientResolvedConfig | config} for AccessAnalyzerClient's `config` shape. | ||
* | ||
* @throws {@link AccessDeniedException} (client fault) | ||
* <p>You do not have sufficient access to perform this action.</p> | ||
* | ||
* @throws {@link InternalServerException} (server fault) | ||
* <p>Internal server error.</p> | ||
* | ||
* @throws {@link InvalidParameterException} (client fault) | ||
* <p>The specified parameter is invalid.</p> | ||
* | ||
* @throws {@link ThrottlingException} (client fault) | ||
* <p>Throttling limit exceeded error.</p> | ||
* | ||
* @throws {@link UnprocessableEntityException} (client fault) | ||
* <p>The specified entity could not be processed.</p> | ||
* | ||
* @throws {@link ValidationException} (client fault) | ||
* <p>Validation exception error.</p> | ||
* | ||
* @throws {@link AccessAnalyzerServiceException} | ||
* <p>Base exception class for all service exceptions from AccessAnalyzer service.</p> | ||
* | ||
* @public | ||
*/ | ||
export class CheckNoPublicAccessCommand extends $Command | ||
.classBuilder< | ||
CheckNoPublicAccessCommandInput, | ||
CheckNoPublicAccessCommandOutput, | ||
AccessAnalyzerClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes | ||
>() | ||
.ep({ | ||
...commonParams, | ||
}) | ||
.m(function (this: any, Command: any, cs: any, config: AccessAnalyzerClientResolvedConfig, o: any) { | ||
return [ | ||
getSerdePlugin(config, this.serialize, this.deserialize), | ||
getEndpointPlugin(config, Command.getEndpointParameterInstructions()), | ||
]; | ||
}) | ||
.s("AccessAnalyzer", "CheckNoPublicAccess", {}) | ||
.n("AccessAnalyzerClient", "CheckNoPublicAccessCommand") | ||
.f(CheckNoPublicAccessRequestFilterSensitiveLog, void 0) | ||
.ser(se_CheckNoPublicAccessCommand) | ||
.de(de_CheckNoPublicAccessCommand) | ||
.build() {} |
Oops, something went wrong.