@aws-sdk/client-s3-control
Version:
AWS SDK for JavaScript S3 Control Client for Node.js, Browser and React Native
100 lines (99 loc) • 4.54 kB
TypeScript
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { GetPublicAccessBlockOutput, GetPublicAccessBlockRequest } from "../models/models_0";
import { S3ControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3ControlClient";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link GetPublicAccessBlockCommand}.
*/
export interface GetPublicAccessBlockCommandInput extends GetPublicAccessBlockRequest {
}
/**
* @public
*
* The output of {@link GetPublicAccessBlockCommand}.
*/
export interface GetPublicAccessBlockCommandOutput extends GetPublicAccessBlockOutput, __MetadataBearer {
}
declare const GetPublicAccessBlockCommand_base: {
new (input: GetPublicAccessBlockCommandInput): import("@smithy/smithy-client").CommandImpl<GetPublicAccessBlockCommandInput, GetPublicAccessBlockCommandOutput, S3ControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (...[input]: [] | [GetPublicAccessBlockCommandInput]): import("@smithy/smithy-client").CommandImpl<GetPublicAccessBlockCommandInput, GetPublicAccessBlockCommandOutput, S3ControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <note>
* <p>This operation is not supported by directory buckets.</p>
* </note>
* <p>Retrieves the <code>PublicAccessBlock</code> configuration for an Amazon Web Services account. For
* more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html"> Using Amazon S3 block
* public access</a>.</p>
* <p>Related actions include:</p>
* <ul>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DeletePublicAccessBlock.html">DeletePublicAccessBlock</a>
* </p>
* </li>
* <li>
* <p>
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_PutPublicAccessBlock.html">PutPublicAccessBlock</a>
* </p>
* </li>
* </ul>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { S3ControlClient, GetPublicAccessBlockCommand } from "@aws-sdk/client-s3-control"; // ES Modules import
* // const { S3ControlClient, GetPublicAccessBlockCommand } = require("@aws-sdk/client-s3-control"); // CommonJS import
* const client = new S3ControlClient(config);
* const input = { // GetPublicAccessBlockRequest
* AccountId: "STRING_VALUE",
* };
* const command = new GetPublicAccessBlockCommand(input);
* const response = await client.send(command);
* // { // GetPublicAccessBlockOutput
* // PublicAccessBlockConfiguration: { // PublicAccessBlockConfiguration
* // BlockPublicAcls: true || false,
* // IgnorePublicAcls: true || false,
* // BlockPublicPolicy: true || false,
* // RestrictPublicBuckets: true || false,
* // },
* // };
*
* ```
*
* @param GetPublicAccessBlockCommandInput - {@link GetPublicAccessBlockCommandInput}
* @returns {@link GetPublicAccessBlockCommandOutput}
* @see {@link GetPublicAccessBlockCommandInput} for command's `input` shape.
* @see {@link GetPublicAccessBlockCommandOutput} for command's `response` shape.
* @see {@link S3ControlClientResolvedConfig | config} for S3ControlClient's `config` shape.
*
* @throws {@link NoSuchPublicAccessBlockConfiguration} (client fault)
* <p>Amazon S3 throws this exception if you make a <code>GetPublicAccessBlock</code> request
* against an account that doesn't have a <code>PublicAccessBlockConfiguration</code>
* set.</p>
*
* @throws {@link S3ControlServiceException}
* <p>Base exception class for all service exceptions from S3Control service.</p>
*
* @public
*/
export declare class GetPublicAccessBlockCommand extends GetPublicAccessBlockCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: GetPublicAccessBlockRequest;
output: GetPublicAccessBlockOutput;
};
sdk: {
input: GetPublicAccessBlockCommandInput;
output: GetPublicAccessBlockCommandOutput;
};
};
}