

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Amazon OpenSearch Service における OpenSearch ユーザーインターフェースの開始方法
<a name="application-getting-started"></a>

Amazon OpenSearch Service では、*アプリケーション*は OpenSearch ユーザーインターフェイス (OpenSearch UI) のインスタンスです。各アプリケーションは複数のデータソースに関連付けることができ、1 つのソースを複数のアプリケーションに関連付けることができます。サポートされているさまざまな認証オプションを使用して、管理者ごとに複数のアプリケーションを作成できます。

このトピックの情報を使用して、 AWS マネジメントコンソール または を使用して OpenSearch UI アプリケーションを作成するプロセスについて説明します AWS CLI。

**Topics**
+ [Amazon OpenSearch Service アプリケーションを作成するために必要なアクセス許可](#application-prerequisite-permissions)
+ [OpenSearch UI アプリケーションの作成](#create-application)
+ [アプリケーション管理者の管理](#managing-application-administrators)

## Amazon OpenSearch Service アプリケーションを作成するために必要なアクセス許可
<a name="application-prerequisite-permissions"></a>

アプリケーションを作成する前に、タスクに必要なアクセス許可が付与されていることを確認します。必要に応じて、アカウント管理者にお問い合わせください。

### 全般的なアクセス許可
<a name="prerequisite-permissions-general"></a>

OpenSearch Service でアプリケーションを使用するには、次のポリシーに示すアクセス許可が必要です。アクセス許可は以下の目的のために設定されます:
+ アプリケーションを作成および管理するには、5 つの `es:*Application` アクセス許可が必要です。
+ アプリケーションからタグを追加、一覧表示、削除するには、3 つの `es:*Tags` アクセス許可が必要です。
+ データソースを関連付けるには `aoss:BatchGetCollection`、`es:DescribeDomain`、`es:GetDirectQueryDataSource` のアクセス許可が必要です。
+ データソースにアクセスするには `aoss:APIAccessAll`、`es:ESHttp*`、および 4 つの `opensearch:*DirectQuery*` のアクセス許可が必要です。
+ `iam:CreateServiceLinkedRole` は、アカウントにサービスにリンクされたロール (SLR) を作成するためのアクセス許可を Amazon OpenSearch Service に提供します。このロールは、OpenSearch UI アプリケーションが Amazon CloudWatch メトリクスをお使いのアカウントに公開できるようにするために使用されます。詳細については、「[サービスにリンクされたロールを使用して、VPC ドメインとダイレクトクエリデータソースを作成する](slr-aos.md)」トピックの「[アクセス許可](slr-aos.md#slr-permissions)」を参照してください。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "es:CreateApplication",
                "es:DeleteApplication",
                "es:GetApplication",
                "es:ListApplications",
                "es:UpdateApplication",
                "es:AddTags",
                "es:ListTags",
                "es:RemoveTags",
                "aoss:APIAccessAll",
                "es:ESHttp*",
                "opensearch:StartDirectQuery",
                "opensearch:GetDirectQuery",
                "opensearch:CancelDirectQuery",
                "opensearch:GetDirectQueryResult",
                "aoss:BatchGetCollection",
                "aoss:ListCollections",
                "es:DescribeDomain",
                "es:DescribeDomains",
                "es:ListDomainNames",
                "es:GetDirectQueryDataSource",
                "es:ListDirectQueryDataSources"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "iam:CreateServiceLinkedRole",
            "Resource": "arn:aws:iam::*:role/aws-service-role/opensearchservice.amazonaws.com/AWSServiceRoleForAmazonOpenSearchService"
        }
    ]
}
```

------

### IAM Identity Center 認証を使用するアプリケーションを作成するアクセス許可 (オプション)
<a name="prerequisite-permissions-idc"></a>

デフォルトでは、ダッシュボードアプリケーションは AWS Identity and Access Management (IAM) を使用して認証され、 AWS リソースユーザーのアクセス許可を管理します。ただし、IAM Identity Center を使用してシングルサインオンエクスペリエンスを提供することを選択できます。これにより、既存の ID プロバイダーを使用して OpenSearch UI アプリケーションにログインできます。この場合、このトピックの後半の手順で **[IAM Identity Center による認証]** オプションを選択し、OpenSearch UI アプリケーションにアクセスするために必要なアクセス許可を IAM Identity Center ユーザーに付与します)。

IAM Identity Center 認証を使用するアプリケーションを作成するには、次のアクセス許可が必要です。{{プレースホルダー値}}を、ユーザー自身の情報に置き換えます。必要に応じて、アカウント管理者にお問い合わせください。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "IDCPermissions",
            "Effect": "Allow",
            "Action": [
                "es:CreateApplication",
                "es:DeleteApplication",
                "es:GetApplication",
                "es:ListApplications",
                "es:UpdateApplication",
                "es:AddTags",
                "es:ListTags",
                "es:RemoveTags",
                "aoss:BatchGetCollection",
                "aoss:ListCollections",
                "es:DescribeDomain",
                "es:DescribeDomains",
                "es:ListDomainNames",
                "es:GetDirectQueryDataSource",
                "es:ListDirectQueryDataSources",
                "sso:CreateApplication",  
                "sso:DeleteApplication",  
                "sso:PutApplicationGrant",  
                "sso:PutApplicationAccessScope",  
                "sso:PutApplicationAuthenticationMethod",  
                "sso:ListInstances",  
                "sso:DescribeApplicationAssignment",  
                "sso:DescribeApplication",  
                "sso:CreateApplicationAssignment",  
                "sso:ListApplicationAssignments",  
                "sso:DeleteApplicationAssignment",
                "sso-directory:SearchGroups",
                "sso-directory:SearchUsers",
                "sso:ListDirectoryAssociations",
                "identitystore:DescribeUser",
                "identitystore:DescribeGroup",
                "iam:ListRoles"
            ],
            "Resource": "*"
        },
        {
            "Sid": "SLRPermission",
            "Effect": "Allow",
            "Action": "iam:CreateServiceLinkedRole",
            "Resource": "arn:aws:iam::*:role/aws-service-role/opensearchservice.amazonaws.com/AWSServiceRoleForAmazonOpenSearchService"
        },
        {
            "Sid": "PassRolePermission",
            "Effect": "Allow",
            "Action": "iam:PassRole",
            "Resource": "arn:aws:iam::{{111122223333}}:role/{{iam-role-for-identity-center}}"
        }
    ]
}
```

------

## OpenSearch UI アプリケーションの作成
<a name="create-application"></a>

次のいずれかの手順を使用して、アプリケーション名、認証方法、および管理者を指定するアプリケーションを作成します。

**Topics**
+ [コンソールで IAM 認証を使用する OpenSearch UI アプリケーションの作成](#create-application-iam-authentication-console)
+ [コンソールで AWS IAM アイデンティティセンター 認証を使用する OpenSearch UI アプリケーションを作成する](#create-application-iam-identity-center-authentication-console)
+ [を使用した AWS IAM アイデンティティセンター 認証を使用する OpenSearch UI アプリケーションの作成 AWS CLI](#create-application-iam-identity-center-authentication-cli)

### コンソールで IAM 認証を使用する OpenSearch UI アプリケーションの作成
<a name="create-application-iam-authentication-console"></a>

**コンソールで IAM 認証を使用する OpenSearch UI アプリケーションを作成するには**

1. [https://console.aws.amazon.com/aos/home](https://console.aws.amazon.com/aos/home) で Amazon OpenSearch Service コンソールにサインインします。

1. 左のナビゲーションペインの **[OpenSearch UI (ダッシュボード)]** を選択します。

1. [**アプリケーションを作成**] を選択します。

1. **[アプリケーション名]** に、そのアプリケーションの名前を入力します。

1. **[IAM Identity Center による認証]** チェックボックスをオンにしないでください。認証を使用したアプリケーションの作成については AWS IAM アイデンティティセンター、このトピックの[コンソールで AWS IAM アイデンティティセンター 認証を使用する OpenSearch UI アプリケーションを作成する](#create-application-iam-identity-center-authentication-console)後半の「」を参照してください。

1. (オプション) 作成するアプリケーションの管理者として自動的に追加されます。**[OpenSearch アプリケーション管理者管理]** エリアでは、他のユーザーに管理者権限を付与できます。
**注記**  
OpenSearch UI アプリケーション管理者ロールは、OpenSearch UI アプリケーションを編集および削除する権限を付与します。アプリケーション管理者は、OpenSearch UI アプリケーションでワークスペースを作成、編集、削除することもできます。

   管理者権限を他のユーザーに付与するには、次のいずれかを選択します。
   + **[特定のユーザー (複数可) に管理者の権限を付与]** – **[OpenSearch アプリケーション管理者]** フィールドの **[プロパティ]** ポップアップリストで、**[IAM ユーザー]** または 

     **AWS IAM アイデンティティセンター ユーザー**を選択し、管理者権限を付与する個々のユーザーを選択します。
   + **[すべてのユーザーに管理者権限を付与]** – 組織またはアカウント内のすべてのユーザーに管理者権限が付与されます。

1. (オプション) 暗号化設定を構成します。デフォルトでは、OpenSearch UI メタデータは AWS 所有キーで暗号化されます。暗号化に独自のカスタマーマネージドキー (CMK) を使用するには、「」を参照してください[カスタマーマネージドキーを使用した OpenSearch UI アプリケーションメタデータの暗号化](application-encryption-cmk.md)。

1. (オプション) **[タグ]** エリアで、1 つ以上のタグキーの名前と値のペアをアプリケーションに適用します。

   タグは、リソースに割り当てるオプションのメタデータです。タグを使用すると、目的、所有者、環境などのさまざまな方法でリソースを分類できます。

1. **[作成]** を選択します。

### コンソールで AWS IAM アイデンティティセンター 認証を使用する OpenSearch UI アプリケーションを作成する
<a name="create-application-iam-identity-center-authentication-console"></a>

 AWS IAM アイデンティティセンター 認証を使用する OpenSearch UI アプリケーションを作成するには、[IAM Identity Center 認証を使用するアプリケーションを作成するアクセス許可 (オプション)](#prerequisite-permissions-idc) のこのトピックで前述した IAM アクセス許可が必要です。

**コンソールで AWS IAM アイデンティティセンター 認証を使用する OpenSearch UI アプリケーションを作成するには**

1. [https://console.aws.amazon.com/aos/home](https://console.aws.amazon.com/aos/home) で Amazon OpenSearch Service コンソールにサインインします。

1. 左のナビゲーションペインの **[OpenSearch UI (ダッシュボード)]** を選択します。

1. [**アプリケーションを作成**] を選択します。

1. **[アプリケーション名]** に、そのアプリケーションの名前を入力します。

1. (オプション) 組織またはアカウントのシングルサインオンを有効にするには、次の手順を実行します。

   1. 次の図に示すように、**[IAM Identity Center による認証]** チェックボックスをオンにします。  
![「IAM Identity Center による認証」ボックスが選択された「シングルサインオン認証」領域。](http://docs.aws.amazon.com/ja_jp/opensearch-service/latest/developerguide/images/ui-Single-sign-on-authentication.png)

   1. 次のいずれかを行います。
      + **[Identity Center アプリケーションリストの IAM ロール]** で、IAM Identity Center が OpenSearch UI および関連するデータソースにアクセスするために必要なアクセス許可を提供する既存の IAM ロールを選択します。ロールに必要なアクセス許可については、次の箇条書きのポリシーを参照してください。
      + 必要なアクセス許可を持つ新しいロールを作成します。*IAM ユーザーガイド*の次の手順と、指定されたオプションを使用して新しいロールを作成し、必要なアクセス許可ポリシーと信頼ポリシーを使用します。
        + 手順: [IAM ポリシーを作成する (コンソール)](https://docs.aws.amazon.com/opensearch-service/latest/developerguide/access_policies_create-console.html)

          この手順のステップに従って、次のポリシーをポリシーエディタ **[JSON]** フィールドに貼り付けます:

------
#### [ JSON ]

****  

          ```
          {
              "Version":"2012-10-17",		 	 	 
              "Statement": [
                  {
                      "Sid": "IdentityStoreOpenSearchDomainConnectivity",
                      "Effect": "Allow",
                      "Action": [
                          "identitystore:DescribeUser",
                          "identitystore:ListGroupMembershipsForMember",
                          "identitystore:DescribeGroup"
                      ],
                      "Resource": "*",
                      "Condition": { 
                          "ForAnyValue:StringEquals": {
                              "aws:CalledViaLast": "es.amazonaws.com"
                          }
                      }
                  },
                  {
                      "Sid": "OpenSearchDomain",
                      "Effect": "Allow",
                      "Action": [
                          "es:ESHttp*"
                      ],
                      "Resource": "*"
                  },
                  {
                      "Sid": "OpenSearchServerless",
                      "Effect": "Allow",
                      "Action": [
                          "aoss:APIAccessAll"
                      ],
                      "Resource": "*"
                  }
              ]
          }
          ```

------
        + 手順: [カスタム信頼ポリシーを使用してロールを作成する](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-custom.html)

          この手順のステップに従って、**[カスタム信頼ポリシー]** ボックスのプレースホルダー JSON を次のように置き換えます。
**ヒント**  
既存のロールに信頼ポリシーを追加する場合は、ロールの **[信頼関係]** タブにポリシーを追加します。

------
#### [ JSON ]

****  

          ```
          {
              "Version":"2012-10-17",		 	 	 
              "Statement": [
                  {
                      "Effect": "Allow",
                      "Principal": {
                          "Service": "application.opensearchservice.amazonaws.com"
                      },
                      "Action": "sts:AssumeRole"
                  },
                  {
                      "Effect": "Allow",
                      "Principal": {
                          "Service": "application.opensearchservice.amazonaws.com"
                      },
                      "Action": "sts:SetContext",
                      "Condition": {
                          "ForAllValues:ArnEquals": {
                          "sts:RequestContextProviders": "arn:aws:iam::{{123456789012}}:oidc-provider/portal.sso.{{us-east-1}}.amazonaws.com/apl/{{application-id}}"
                          }
                      }
                  }
              ]
          }
          ```

------

   1. 組織またはアカウントに IAM Identity Center インスタンスがすでに作成されている場合、次の図に示すように、コンソールは Amazon OpenSearch Dashboards が IAM Identity Center の組織インスタンスに既に接続されていることを報告します。  
![「IAM Identity Center のアカウントインスタンスに接続された Amazon OpenSearch Dashboard」エリアには、既存の IAM Identity Center アカウントインスタンスの URL が表示されます。](http://docs.aws.amazon.com/ja_jp/opensearch-service/latest/developerguide/images/ui-connected-instance.png)

      IAM Identity Center が組織またはアカウントでまだ利用できない場合は、ユーザーまたは必要なアクセス許可を持つ管理者が組織インスタンスまたはアカウントインスタンスを作成できます。**[Amazon OpenSearch Dashboards を IAM アイデンティティセンターに接続する]** エリアには、次の図に示すように、両方のオプションがあります。  
![「Amazon OpenSearch Dashboards を IAM アイデンティティセンターに接続する」エリアには、組織インスタンスまたはアカウントインスタンスを作成するためのボタンがあります。](http://docs.aws.amazon.com/ja_jp/opensearch-service/latest/developerguide/images/ui-no-connected-instance.png)

       この場合、IAM アイデンティティセンターでテスト用のアカウントインスタンスを作成するか、管理者が IAM アイデンティティセンターで組織インスタンスを作成するようにリクエストできます。詳細については、「*AWS IAM アイデンティティセンター ユーザーガイド*」の以下のトピックを参照してください。
**注記**  
IAM アイデンティティセンターの組織インスタンス AWS リージョン とは異なる で OpenSearch UI アプリケーションを作成する場合は、[「複数の で IAM アイデンティティセンターを使用する AWS リージョン](https://docs.aws.amazon.com/singlesignon/latest/userguide/multi-region-iam-identity-center.html)」を参照してください。
      + [IAM Identity Center の組織インスタンス](https://docs.aws.amazon.com/singlesignon/latest/userguide/organization-instances-identity-center.html)
      + [IAM アイデンティティセンターのアカウントインスタンス](https://docs.aws.amazon.com/singlesignon/latest/userguide/account-instances-identity-center.html)
      + [有効化 AWS IAM アイデンティティセンター](https://docs.aws.amazon.com/singlesignon/latest/userguide/enable-identity-center.html)

1. (オプション) 作成するアプリケーションの管理者として自動的に追加されます。**[OpenSearch アプリケーションの管理者管理]** エリアでは、次の画像に示すように、管理者権限を他のユーザーに付与できます。  
![「OpenSearch アプリケーションの管理者管理」エリアには、ユーザーまたはすべてのユーザーを選択するアクセス許可を管理者に付与するオプションがあります。](http://docs.aws.amazon.com/ja_jp/opensearch-service/latest/developerguide/images/ui-admins-management.png)
**注記**  
OpenSearch UI アプリケーション管理者ロールは、OpenSearch UI アプリケーションを編集および削除する権限を付与します。アプリケーション管理者は、OpenSearch UI アプリケーションでワークスペースを作成、編集、削除することもできます。

   管理者権限を他のユーザーに付与するには、次のいずれかを選択します。
   + **[特定のユーザー (複数可) に管理者の権限を付与]** – **[OpenSearch アプリケーション管理者]** フィールドの **[プロパティ]** ポップアップリストで、**[IAM ユーザー]** または 

     **AWS IAM アイデンティティセンター ユーザー**を選択し、管理者権限を付与する個々のユーザーを選択します。
   + **[すべてのユーザーに管理者権限を付与]** – 組織またはアカウント内のすべてのユーザーに管理者権限が付与されます。

1. (オプション) **[タグ]** エリアで、1 つ以上のタグキーの名前と値のペアをアプリケーションに適用します。

   タグは、リソースに割り当てるオプションのメタデータです。タグを使用すると、目的、所有者、環境などのさまざまな方法でリソースを分類できます。

1. **[作成]** を選択します。

### を使用した AWS IAM アイデンティティセンター 認証を使用する OpenSearch UI アプリケーションの作成 AWS CLI
<a name="create-application-iam-identity-center-authentication-cli"></a>

を使用して AWS IAM アイデンティティセンター 認証を使用する OpenSearch UI アプリケーションを作成するには AWS CLI、以下のオプションを指定して [create-application](https://docs.aws.amazon.com/cli/latest/reference/opensearch/create-application.html) コマンドを使用します。
+ `--name` – アプリケーションの名前。
+ `--iam-identity-center-options` – (オプション) OpenSearch が認証とアクセスコントロールに使用する IAM Identity Center インスタンスと IAM ロール。

{{プレースホルダー値}}を、ユーザー自身の情報に置き換えます。

```
aws opensearch create-application \
    --name {{application-name}} \
    --iam-identity-center-options "
          {
          \"enabled\":true,
          \"iamIdentityCenterInstanceArn\":\"arn:aws:sso:::instance/{{sso-instance}}\",
          \"iamRoleForIdentityCenterApplicationArn\":\"arn:aws:iam::{{account-id}}:role/{{role-name}}\"
          }
    "
```

## アプリケーション管理者の管理
<a name="managing-application-administrators"></a>

OpenSearch UI アプリケーション管理者は、OpenSearch UI アプリケーションを編集および削除できる権限を持つ定義されたロールです。

デフォルトでは、OpenSearch UI アプリケーションの作成者は、OpenSearch UI アプリケーションの最初の管理者です。

### コンソールを使用した OpenSearch UI 管理者の管理
<a name="managing-application-administrators-console"></a>

 AWS マネジメントコンソールの OpenSearch UI アプリケーションには、アプリケーションの作成ワークフロー中またはアプリケーションの作成後の **[編集]** ページで、管理者を追加できます。

OpenSearch UI アプリケーション管理者ロールは、OpenSearch UI アプリケーションを編集および削除する権限を付与します。アプリケーション管理者は、OpenSearch UI アプリケーションでワークスペースを作成、編集、削除することもできます。

アプリケーションの詳細ページで、IAM プリンシパルの Amazon リソースネーム (ARN) を検索するか、IAM Identity Center のユーザーの名前を検索できます。

**コンソールを使用して OpenSearch UI 管理者を管理するには**

1. [https://console.aws.amazon.com/aos/home](https://console.aws.amazon.com/aos/home) で Amazon OpenSearch Service コンソールにサインインします。

1. 左のナビゲーションペインの **[OpenSearch UI (ダッシュボード)]** を選択します。

1. **[OpenSearch アプリケーション]** エリアで、既存のアプリケーションの名前を選択します。

1. [**編集**] を選択します。

1. 管理者権限を他のユーザーに付与するには、次のいずれかを選択します。
   + **[特定のユーザー (複数可) に管理者の権限を付与]** – **[OpenSearch アプリケーション管理者]** フィールドの **[プロパティ]** ポップアップリストで、**[IAM ユーザー]** または 

     **AWS IAM アイデンティティセンター ユーザー**を選択し、管理者権限を付与する個々のユーザーを選択します。
   + **[すべてのユーザーに管理者権限を付与]** – 組織またはアカウント内のすべてのユーザーに管理者権限が付与されます。

1. **[更新]** を選択します。

追加の管理者を削除できますが、各 OpenSearch UI アプリケーションは少なくとも 1 人の管理者を保持する必要があります。

### を使用した OpenSearch UI 管理者の管理 AWS CLI
<a name="managing-application-administrators-cli"></a>

 AWS CLIを使用して、OpenSearch UI アプリケーション管理者を作成および更新できます。

#### を使用した OpenSearch UI 管理者の作成 AWS CLI
<a name="creating-application-administrators-cli"></a>

OpenSearch UI アプリケーションを作成するときに、IAM プリンシパルと IAM Identity Center ユーザーを管理者として追加する例を次に示します。

##### 例 1: IAM ユーザーを管理者として追加する OpenSearch UI アプリケーションを作成する
<a name="add-admin-examples-iam-user-cli"></a>

次のコマンドを実行して、IAM ユーザーを管理者として追加する OpenSearch UI アプリケーションを作成します。{{プレースホルダー値}}を、ユーザー自身の情報に置き換えます。

```
aws opensearch create-application \
    --name {{application-name}} \
    --app-configs "
        {
        \"key\":\"opensearchDashboards.dashboardAdmin.users\",
        \"value\":\"arn:aws:iam::{{account-id}}:user/{{user-id}}\"
        }
    "
```

##### 例 2: IAM Identity Center を有効にし、OpenSearch Identity Center ユーザー ID を OpenSearch UI アプリケーション管理者として追加する OpenSearch UI アプリケーションを作成する
<a name="add-admin-examples-iam-identify-center-user-cli"></a>

次のコマンドを実行して、IAM Identity Center を有効にし、IAM Identity Center ユーザー ID を OpenSearch UI アプリケーション管理者として追加する OpenSearch UI アプリケーションを作成します。{{プレースホルダー値}}を、ユーザー自身の情報に置き換えます。

`key` は、OpenSearch UI アプリケーションの管理者ロールなど、設定する構成項目を指定します。有効な値は、`opensearchDashboards.dashboardAdmin.users` および `opensearchDashboards.dashboardAdmin.groups` です。

{{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}} は、IAM ユーザーの Amazon リソースネーム (ARN) など、キーに割り当てられた値を表します。

```
aws opensearch create-application \
    --name myapplication \
    --iam-identity-center-options "
        {
        \"enabled\":true,
        \"iamIdentityCenterInstanceArn\":\"arn:aws:sso:::instance/ssoins-{{instance-id}}\",
        \"iamRoleForIdentityCenterApplicationArn\":\"arn:aws:iam::{{account-id}}:role/{{role-name}}\"
        }
    " \
    --app-configs "
        {
        \"key\":\"opensearchDashboards.dashboardAdmin.users\",
        \"value\":\"{{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}}\"
        }
    "
```

#### を使用した OpenSearch UI 管理者の更新 AWS CLI
<a name="updating-application-administrators-cli"></a>

以下は、既存の OpenSearch アプリケーションの管理者として割り当てられた IAM プリンシパルと IAM Identity Center ユーザーを更新する例です。

##### 例 1: 既存の OpenSearch アプリケーションの管理者として IAM ユーザーを追加する
<a name="update-admin-examples-iam-user-cli"></a>

次のコマンドを実行して OpenSearch UI アプリケーションを更新し、IAM ユーザーを管理者として追加します。{{プレースホルダー値}}を、ユーザー自身の情報に置き換えます。

```
aws opensearch update-application \
    --id myapplication \
    --app-configs "
        {
        \"key\":\"opensearchDashboards.dashboardAdmin.users\",
        \"value\":\"arn:aws:iam::{{account-id}}:user/{{user-id}}\"
        }
    "
```

##### 例 2: OpenSearch UI アプリケーションを更新して、IAM Identity Center ユーザー ID を OpenSearch UI アプリケーション管理者として追加する
<a name="update-admin-examples-iam-identify-center-user-cli"></a>

次のコマンドを実行して、OpenSearch UI アプリケーションを更新し、IAM Identity Center ユーザー ID を OpenSearch UI アプリケーション管理者として追加します。{{プレースホルダー値}}を、ユーザー自身の情報に置き換えます。

`key` は、OpenSearch UI アプリケーションの管理者ロールなど、設定する構成項目を指定します。有効な値は、`opensearchDashboards.dashboardAdmin.users` および `opensearchDashboards.dashboardAdmin.groups` です。

{{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}} は、IAM ユーザーの Amazon リソースネーム (ARN) など、キーに割り当てられた値を表します。

```
aws opensearch update-application \
    --id myapplication \
    --app-configs "
        {
        \"key\":\"opensearchDashboards.dashboardAdmin.users\",
        \"value\":\"{{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}}\"
        }
    "
```