本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
停用 S3 Storage Lens 的受信任存取權
以委派的管理員身分移除帳戶或停用受信任存取,會限制帳戶擁有者的 S3 Storage Lens 儀表板指標只能在帳戶層級上運作。然後,每個帳戶持有人只能在其帳戶的有限範圍內 (而非整個組織) 看到 S3 Storage Lens 的好處。
當您在 S3 Storage Lens 中停用受信任存取時,任何需要受信任存取的儀表板都不會再更新。建立的任何組織儀表板也不會再更新。反之,您只能在 S3 Storage Lens 儀表板的歷史資料仍然可用時進行查詢。
注意
-
停用 S3 Storage Lens 的受信任存取權也會使所有組織層級儀表板自動停止收集和彙總儲存空間指標。這是因為 S3 Storage Lens 無法再以信任方式存取組織帳戶。
-
您的管理和委派管理員帳戶仍然可以查看任何已停用儀表板的歷史資料,也可以在此歷史資料仍然可用時進行查詢。
停用 S3 Storage Lens 的受信任存取權
登入 AWS Management Console ,並在 https://console.aws.amazon.com/s3/
:// 開啟 Amazon S3 主控台。 -
在左側導覽窗格上,導覽至 Storage Lens。
選擇 AWS Organizations 設定。Storage Lens 的AWS Organizations 存取頁面隨即顯示。
-
在 AWS Organizations 受信任存取下,選擇編輯。
AWS Organizations 存取頁面隨即顯示。
選擇停用以停用 S3 Storage Lens 儀表板的受信任存取。
選擇 Save changes (儲存變更)。
下列範例使用 AWS CLI停用 S3 Storage Lens 的受信任存取。
aws organizations disable-aws-service-access --service-principal storage-lens.s3.amazonaws.com
範例 – 停用 S3 Storage Lens 的 AWS Organizations 受信任存取
下列範例示範如何在適用於 Java 的 SDK 中停用 S3 Storage Lens 的 AWS Organizations 受信任存取。若要使用此範例,請以您自己的資訊取代
。user input
placeholders
import com.amazonaws.AmazonServiceException; import com.amazonaws.SdkClientException; import com.amazonaws.auth.profile.ProfileCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.organizations.AWSOrganizations; import com.amazonaws.services.organizations.AWSOrganizationsClient; import com.amazonaws.services.organizations.model.DisableAWSServiceAccessRequest; public class DisableOrganizationsTrustedAccess { private static final String S3_STORAGE_LENS_SERVICE_PRINCIPAL = "storage-lens.s3.amazonaws.com"; public static void main(String[] args) { try { AWSOrganizations organizationsClient = AWSOrganizationsClient.builder() .withCredentials(new ProfileCredentialsProvider()) .withRegion(Regions.
US_EAST_1
) .build(); // Make sure to remove any existing delegated administrator for S3 Storage Lens // before disabling access; otherwise, the request will fail. organizationsClient.disableAWSServiceAccess(new DisableAWSServiceAccessRequest() .withServicePrincipal(S3_STORAGE_LENS_SERVICE_PRINCIPAL)); } catch (AmazonServiceException e) { // The call was transmitted successfully, but AWS Organizations couldn't process // it and returned an error response. e.printStackTrace(); } catch (SdkClientException e) { // AWS Organizations couldn't be contacted for a response, or the client // couldn't parse the response from AWS Organizations. e.printStackTrace(); } } }