註冊 S3 Storage Lens 的委派管理員 - Amazon Simple Storage Service

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

註冊 S3 Storage Lens 的委派管理員

您可以使用組織的管理帳戶或委派管理員帳戶,來建立組織層級儀表板。委派管理員帳戶允許管理帳戶以外的其他帳戶建立組織層級儀表板。僅組織的管理帳戶可以將其他帳戶註冊為組織的委派管理員,以及取消註冊委派管理員。

啟用受信任存取後,您可以使用 AWS Organizations REST API 或管理帳戶中SDKs AWS CLI來註冊組織中帳戶的委派管理員存取。(如需詳細資訊,請參閱AWS Organizations API 參考中的RegisterDelegatedAdministrator)。當帳戶註冊為委派管理員時,帳戶會收到存取所有唯讀 AWS Organizations API 操作的授權。此授權會提供組織成員和結構的可見性,讓他們可以代表您建立 S3 Storage Lens 儀表板。

注意

您必須先呼叫 EnableAWSOrganizationsAccess操作 AWS CLI,才能使用 AWS Organizations REST API 或 SDKs 指定委派管理員。

註冊 S3 Storage Lens 的委派管理員
  1. 登入 AWS Management Console 並開啟位於 https://https://console.aws.amazon.com/s3/ 的 Amazon S3 主控台。

  2. 在左側導覽窗格上,導覽至 Storage Lens

  3. 選擇 AWS Organizations 設定

  4. 委派的管理員下,選擇註冊帳戶

  5. 新增 AWS 帳戶 ID 以將帳戶註冊為委派管理員。委派的管理員能夠為組織中的所有帳戶和儲存體建立組織層級儀表板。

  6. 選擇註冊帳戶

下列範例示範如何使用 AWS CLI註冊 S3 Storage Lens 的 Organizations 委派管理員。若要使用此範例,請以您自己的資訊取代 user input placeholders

aws organizations register-delegated-administrator --service-principal storage-lens.s3.amazonaws.com --account-id 111122223333
範例 – 註冊 S3 Storage Lens 的 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.RegisterDelegatedAdministratorRequest; public class RegisterOrganizationsDelegatedAdministrator { private static final String S3_STORAGE_LENS_SERVICE_PRINCIPAL = "storage-lens.s3.amazonaws.com"; public static void main(String[] args) { try { String delegatedAdminAccountId = "111122223333"; // Account Id for the delegated administrator. AWSOrganizations organizationsClient = AWSOrganizationsClient.builder() .withCredentials(new ProfileCredentialsProvider()) .withRegion(Regions.US_EAST_1) .build(); organizationsClient.registerDelegatedAdministrator(new RegisterDelegatedAdministratorRequest() .withAccountId(delegatedAdminAccountId) .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(); } } }