本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
刪除 Amazon S3 Storage Lens 儀表板
您無法刪除預設儀表板。不過,您可以停用它。在刪除您已建立的儀表板之前,請考慮下列事項:
-
除了刪除儀表板之外,您還可以停用儀表板,以便將來可以重新啟用儀表板。如需詳細資訊,請參閱使用 S3 主控台。
-
刪除儀表板會刪除與其相關聯的所有組態設定。
-
刪除儀表板會使所有歷史指標資料無法使用。這些歷史資料仍會保留 15 個月。如果您想要再次存取此資料,請在與已刪除的主要區域相同的主要區域中建立具有相同名稱的儀表板。
您可以從 Amazon S3 主控台刪除 Amazon S3 Storage Lens 儀表板。不過,刪除儀表板可防止未來產生指標。
正在刪除 Amazon S3 Storage Lens 儀表板
登入 AWS Management Console ,並在 https://https://console.aws.amazon.com/s3/
開啟 Amazon S3 主控台。 -
在左導覽窗格中,選擇 Storage Lens、Dashboards (儀表板)。
-
在 Dashboards (儀表板) 清單中,選擇您要刪除的儀表板,然後選擇清單頂端的 Delete (刪除)。
-
在刪除儀表板頁面上,於文字欄位中輸入儀表板名稱,確認您要刪除儀表板。然後選擇 Confirm (確認)。
下列範例會刪除 S3 Storage Lens 組態。若要使用這些範例,請以您自己的資訊取代
。user input placeholders
aws s3control delete-storage-lens-configuration --account-id=
222222222222
--region=us-east-1
--config-id=your-configuration-id
範例 – 刪除 Amazon S3 Storage Lens 儀表板組態
下列範例示範如何使用適用於 Java 的 SDK 刪除 S3 Storage Lens 組態:
package aws.example.s3control; import com.amazonaws.AmazonServiceException; import com.amazonaws.SdkClientException; import com.amazonaws.auth.profile.ProfileCredentialsProvider; import com.amazonaws.services.s3control.AWSS3Control; import com.amazonaws.services.s3control.AWSS3ControlClient; import com.amazonaws.services.s3control.model.DeleteStorageLensConfigurationRequest; import static com.amazonaws.regions.Regions.
US_WEST_2
; public class DeleteDashboard { public static void main(String[] args) { String configurationId = "ConfigurationId
"; String sourceAccountId = "111122223333
"; try { AWSS3Control s3ControlClient = AWSS3ControlClient.builder() .withCredentials(new ProfileCredentialsProvider()) .withRegion(US_WEST_2
) .build(); s3ControlClient.deleteStorageLensConfiguration(new DeleteStorageLensConfigurationRequest() .withAccountId(sourceAccountId) .withConfigId(configurationId) ); } catch (AmazonServiceException e) { // The call was transmitted successfully, but Amazon S3 couldn't process // it and returned an error response. e.printStackTrace(); } catch (SdkClientException e) { // Amazon S3 couldn't be contacted for a response, or the client // couldn't parse the response from Amazon S3. e.printStackTrace(); } } }