リソースベースのポリシーの表示 - Amazon Aurora DSQL

リソースベースのポリシーの表示

クラスターにアタッチされたリソースベースのポリシーを表示して、現在のアクセスコントロールを理解できます。

リソースベースのポリシーを表示するには
  1. AWS マネジメントコンソールにサインインして Aurora DSQL コンソール (https://console.aws.amazon.com/dsql/) を開きます。

  2. [クラスターリスト] からクラスターを選択して、クラスターの詳細ページを開きます。

  3. [アクセス許可] タブを選択します。

  4. [リソースベースのポリシー] セクションでアタッチされたポリシーを表示します。

get-cluster-policy コマンドを使用して、クラスターのリソースベースのポリシーを表示します。

aws dsql get-cluster-policy --identifier your_cluster_id
Python
import boto3 import json client = boto3.client('dsql') response = client.get_cluster_policy( identifier='your_cluster_id' ) # Parse and pretty-print the policy policy = json.loads(response['policy']) print(json.dumps(policy, indent=2))
Java
import software.amazon.awssdk.services.dsql.DsqlClient; import software.amazon.awssdk.services.dsql.model.GetClusterPolicyRequest; import software.amazon.awssdk.services.dsql.model.GetClusterPolicyResponse; DsqlClient client = DsqlClient.create(); GetClusterPolicyRequest request = GetClusterPolicyRequest.builder() .identifier("your_cluster_id") .build(); GetClusterPolicyResponse response = client.getClusterPolicy(request); System.out.println("Policy: " + response.policy());