UpdateStorageLensGroupCommand

Updates the existing Storage Lens group.

To use this operation, you must have the permission to perform the s3:UpdateStorageLensGroup action. For more information about the required Storage Lens Groups permissions, see Setting account permissions to use S3 Storage Lens groups .

For information about Storage Lens groups errors, see List of Amazon S3 Storage Lens error codes .

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { S3ControlClient, UpdateStorageLensGroupCommand } from "@aws-sdk/client-s3-control"; // ES Modules import
// const { S3ControlClient, UpdateStorageLensGroupCommand } = require("@aws-sdk/client-s3-control"); // CommonJS import
const client = new S3ControlClient(config);
const input = { // UpdateStorageLensGroupRequest
  Name: "STRING_VALUE", // required
  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",
  },
};
const command = new UpdateStorageLensGroupCommand(input);
const response = await client.send(command);
// {};

UpdateStorageLensGroupCommand Input

Parameter
Type
Description
Name
Required
string | undefined

The name of the Storage Lens group that you want to update.

StorageLensGroup
Required
StorageLensGroup | undefined

The JSON file that contains the Storage Lens group configuration.

AccountId
string | undefined

The Amazon Web Services account ID of the Storage Lens group owner.

UpdateStorageLensGroupCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
S3ControlServiceException
Base exception class for all service exceptions from S3Control service.