@aws-sdk/client-s3-control
Version:
AWS SDK for JavaScript S3 Control Client for Node.js, Browser and React Native
158 lines (157 loc) • 6.7 kB
TypeScript
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { CreateStorageLensGroupRequest } from "../models/models_0";
import { S3ControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../S3ControlClient";
/**
* @public
*/
export type { __MetadataBearer };
export { $Command };
/**
* @public
*
* The input for {@link CreateStorageLensGroupCommand}.
*/
export interface CreateStorageLensGroupCommandInput extends CreateStorageLensGroupRequest {
}
/**
* @public
*
* The output of {@link CreateStorageLensGroupCommand}.
*/
export interface CreateStorageLensGroupCommandOutput extends __MetadataBearer {
}
declare const CreateStorageLensGroupCommand_base: {
new (input: CreateStorageLensGroupCommandInput): import("@smithy/smithy-client").CommandImpl<CreateStorageLensGroupCommandInput, CreateStorageLensGroupCommandOutput, S3ControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
new (__0_0: CreateStorageLensGroupCommandInput): import("@smithy/smithy-client").CommandImpl<CreateStorageLensGroupCommandInput, CreateStorageLensGroupCommandOutput, S3ControlClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
};
/**
* <p> Creates a new S3 Storage Lens group and associates it with the specified Amazon Web Services account ID. An
* S3 Storage Lens group is a custom grouping of objects based on prefix, suffix, object tags,
* object size, object age, or a combination of these filters. For each Storage Lens group
* that you’ve created, you can also optionally add Amazon Web Services resource tags. For more information
* about S3 Storage Lens groups, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage-lens-groups-overview.html">Working with S3 Storage Lens
* groups</a>.</p>
* <p>To use this operation, you must have the permission to perform the
* <code>s3:CreateStorageLensGroup</code> action. If you’re trying to create a Storage Lens
* group with Amazon Web Services resource tags, you must also have permission to perform the
* <code>s3:TagResource</code> action. For more information about the required Storage Lens
* Groups permissions, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_iam_permissions.html#storage_lens_groups_permissions">Setting account permissions to use S3 Storage Lens groups</a>.</p>
* <p>For information about Storage Lens groups errors, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#S3LensErrorCodeList">List of Amazon S3 Storage
* Lens error codes</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { S3ControlClient, CreateStorageLensGroupCommand } from "@aws-sdk/client-s3-control"; // ES Modules import
* // const { S3ControlClient, CreateStorageLensGroupCommand } = require("@aws-sdk/client-s3-control"); // CommonJS import
* const client = new S3ControlClient(config);
* const input = { // CreateStorageLensGroupRequest
* AccountId: "STRING_VALUE",
* StorageLensGroup: { // StorageLensGroup
* Name: "STRING_VALUE", // required
* Filter: { // StorageLensGroupFilter
* MatchAnyPrefix: [ // MatchAnyPrefix
* "STRING_VALUE",
* ],
* MatchAnySuffix: [ // MatchAnySuffix
* "STRING_VALUE",
* ],
* MatchAnyTag: [ // MatchAnyTag
* { // S3Tag
* Key: "STRING_VALUE", // required
* Value: "STRING_VALUE", // required
* },
* ],
* MatchObjectAge: { // MatchObjectAge
* DaysGreaterThan: Number("int"),
* DaysLessThan: Number("int"),
* },
* MatchObjectSize: { // MatchObjectSize
* BytesGreaterThan: Number("long"),
* BytesLessThan: Number("long"),
* },
* And: { // StorageLensGroupAndOperator
* MatchAnyPrefix: [
* "STRING_VALUE",
* ],
* MatchAnySuffix: [
* "STRING_VALUE",
* ],
* MatchAnyTag: [
* {
* Key: "STRING_VALUE", // required
* Value: "STRING_VALUE", // required
* },
* ],
* MatchObjectAge: {
* DaysGreaterThan: Number("int"),
* DaysLessThan: Number("int"),
* },
* MatchObjectSize: {
* BytesGreaterThan: Number("long"),
* BytesLessThan: Number("long"),
* },
* },
* Or: { // StorageLensGroupOrOperator
* MatchAnyPrefix: [
* "STRING_VALUE",
* ],
* MatchAnySuffix: [
* "STRING_VALUE",
* ],
* MatchAnyTag: [
* {
* Key: "STRING_VALUE", // required
* Value: "STRING_VALUE", // required
* },
* ],
* MatchObjectAge: {
* DaysGreaterThan: Number("int"),
* DaysLessThan: Number("int"),
* },
* MatchObjectSize: {
* BytesGreaterThan: Number("long"),
* BytesLessThan: Number("long"),
* },
* },
* },
* StorageLensGroupArn: "STRING_VALUE",
* },
* Tags: [ // TagList
* { // Tag
* Key: "STRING_VALUE", // required
* Value: "STRING_VALUE", // required
* },
* ],
* };
* const command = new CreateStorageLensGroupCommand(input);
* const response = await client.send(command);
* // {};
*
* ```
*
* @param CreateStorageLensGroupCommandInput - {@link CreateStorageLensGroupCommandInput}
* @returns {@link CreateStorageLensGroupCommandOutput}
* @see {@link CreateStorageLensGroupCommandInput} for command's `input` shape.
* @see {@link CreateStorageLensGroupCommandOutput} for command's `response` shape.
* @see {@link S3ControlClientResolvedConfig | config} for S3ControlClient's `config` shape.
*
* @throws {@link S3ControlServiceException}
* <p>Base exception class for all service exceptions from S3Control service.</p>
*
* @public
*/
export declare class CreateStorageLensGroupCommand extends CreateStorageLensGroupCommand_base {
/** @internal type navigation helper, not in runtime. */
protected static __types: {
api: {
input: CreateStorageLensGroupRequest;
output: {};
};
sdk: {
input: CreateStorageLensGroupCommandInput;
output: CreateStorageLensGroupCommandOutput;
};
};
}