Gets the protection configuration for a bucket.
Use a bare-bones client and the command you need to make an API call.
import { S3Client, GetBucketProtectionConfigurationCommand } from "ibm-cos-sdk-v2"; // ES Modules import// const { S3Client, GetBucketProtectionConfigurationCommand } = require("ibm-cos-sdk-v2"); // CommonJS import// import type { S3ClientConfig } from "ibm-cos-sdk-v2";const config = {}; // type is S3ClientConfigconst client = new S3Client(config);const input = { // GetBucketProtectionConfigurationInput Bucket: "STRING_VALUE", // required};const command = new GetBucketProtectionConfigurationCommand(input);const response = await client.send(command);// { // GetBucketProtectionConfigurationOutput// Status: "STRING_VALUE",// MinimumRetention: { // MinimumRetentionPeriod// Days: Number("int"), // required// },// DefaultRetention: { // DefaultRetentionPeriod// Days: Number("int"), // required// },// MaximumRetention: { // MaximumRetentionPeriod// Days: Number("int"), // required// },// EnablePermanentRetention: true || false,// IbmProtectionManagementState: "STRING_VALUE",// }; Copy
import { S3Client, GetBucketProtectionConfigurationCommand } from "ibm-cos-sdk-v2"; // ES Modules import// const { S3Client, GetBucketProtectionConfigurationCommand } = require("ibm-cos-sdk-v2"); // CommonJS import// import type { S3ClientConfig } from "ibm-cos-sdk-v2";const config = {}; // type is S3ClientConfigconst client = new S3Client(config);const input = { // GetBucketProtectionConfigurationInput Bucket: "STRING_VALUE", // required};const command = new GetBucketProtectionConfigurationCommand(input);const response = await client.send(command);// { // GetBucketProtectionConfigurationOutput// Status: "STRING_VALUE",// MinimumRetention: { // MinimumRetentionPeriod// Days: Number("int"), // required// },// DefaultRetention: { // DefaultRetentionPeriod// Days: Number("int"), // required// },// MaximumRetention: { // MaximumRetentionPeriod// Days: Number("int"), // required// },// EnablePermanentRetention: true || false,// IbmProtectionManagementState: "STRING_VALUE",// };
GetBucketProtectionConfigurationCommandInput
GetBucketProtectionConfigurationCommandOutput
input
response
config
S3ServiceException
Base exception class for all service exceptions from S3 service.
Gets the protection configuration for a bucket.
Example
Use a bare-bones client and the command you need to make an API call.
Param: GetBucketProtectionConfigurationCommandInput
GetBucketProtectionConfigurationCommandInput
Returns
GetBucketProtectionConfigurationCommandOutput
See
inputshape.responseshape.configshape.Throws
S3ServiceException
Base exception class for all service exceptions from S3 service.