選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

PutStorageLensConfiguration - Amazon Simple Storage Service
此頁面尚未翻譯為您的語言。 請求翻譯

PutStorageLensConfiguration

Note

This operation is not supported by directory buckets.

Puts an Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see Working with Amazon S3 Storage Lens in the Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 Storage Lens metrics glossary in the Amazon S3 User Guide.

Note

To use this action, you must have permission to perform the s3:PutStorageLensConfiguration action. For more information, see Setting permissions to use Amazon S3 Storage Lens in the Amazon S3 User Guide.

Request Syntax

PUT /v20180820/storagelens/storagelensid HTTP/1.1 Host: s3-control.amazonaws.com x-amz-account-id: AccountId <?xml version="1.0" encoding="UTF-8"?> <PutStorageLensConfigurationRequest xmlns="http://awss3control.amazonaws.com/doc/2018-08-20/"> <StorageLensConfiguration> <AccountLevel> <ActivityMetrics> <IsEnabled>boolean</IsEnabled> </ActivityMetrics> <AdvancedCostOptimizationMetrics> <IsEnabled>boolean</IsEnabled> </AdvancedCostOptimizationMetrics> <AdvancedDataProtectionMetrics> <IsEnabled>boolean</IsEnabled> </AdvancedDataProtectionMetrics> <BucketLevel> <ActivityMetrics> <IsEnabled>boolean</IsEnabled> </ActivityMetrics> <AdvancedCostOptimizationMetrics> <IsEnabled>boolean</IsEnabled> </AdvancedCostOptimizationMetrics> <AdvancedDataProtectionMetrics> <IsEnabled>boolean</IsEnabled> </AdvancedDataProtectionMetrics> <DetailedStatusCodesMetrics> <IsEnabled>boolean</IsEnabled> </DetailedStatusCodesMetrics> <PrefixLevel> <StorageMetrics> <IsEnabled>boolean</IsEnabled> <SelectionCriteria> <Delimiter>string</Delimiter> <MaxDepth>integer</MaxDepth> <MinStorageBytesPercentage>double</MinStorageBytesPercentage> </SelectionCriteria> </StorageMetrics> </PrefixLevel> </BucketLevel> <DetailedStatusCodesMetrics> <IsEnabled>boolean</IsEnabled> </DetailedStatusCodesMetrics> <StorageLensGroupLevel> <SelectionCriteria> <Exclude> <Arn>string</Arn> </Exclude> <Include> <Arn>string</Arn> </Include> </SelectionCriteria> </StorageLensGroupLevel> </AccountLevel> <AwsOrg> <Arn>string</Arn> </AwsOrg> <DataExport> <CloudWatchMetrics> <IsEnabled>boolean</IsEnabled> </CloudWatchMetrics> <S3BucketDestination> <AccountId>string</AccountId> <Arn>string</Arn> <Encryption> <SSE-KMS> <KeyId>string</KeyId> </SSE-KMS> <SSE-S3> </SSE-S3> </Encryption> <Format>string</Format> <OutputSchemaVersion>string</OutputSchemaVersion> <Prefix>string</Prefix> </S3BucketDestination> </DataExport> <Exclude> <Buckets> <Arn>string</Arn> </Buckets> <Regions> <Region>string</Region> </Regions> </Exclude> <Id>string</Id> <Include> <Buckets> <Arn>string</Arn> </Buckets> <Regions> <Region>string</Region> </Regions> </Include> <IsEnabled>boolean</IsEnabled> <StorageLensArn>string</StorageLensArn> </StorageLensConfiguration> <Tags> <Tag> <Key>string</Key> <Value>string</Value> </Tag> </Tags> </PutStorageLensConfigurationRequest>

URI Request Parameters

The request uses the following URI parameters.

storagelensid

The ID of the S3 Storage Lens configuration.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-zA-Z0-9\-\_\.]+

Required: Yes

x-amz-account-id

The account ID of the requester.

Length Constraints: Maximum length of 64.

Pattern: ^\d{12}$

Required: Yes

Request Body

The request accepts the following data in XML format.

PutStorageLensConfigurationRequest

Root level tag for the PutStorageLensConfigurationRequest parameters.

Required: Yes

StorageLensConfiguration

The S3 Storage Lens configuration.

Type: StorageLensConfiguration data type

Required: Yes

Tags

The tag set of the S3 Storage Lens configuration.

Note

You can set up to a maximum of 50 tags.

Type: Array of StorageLensTag data types

Required: No

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。