# PEDMデプロイコマンド

### 概要

ここでは、PEDMエージェントのデプロイを管理するKeeperコマンダーのコマンドを扱います。デプロイはエージェントのデプロイ構成を表し、エンドポイントでPEDMエージェントをインストールして登録するために必要なトークンを取得できます。これらのコマンドで、デプロイ構成の作成・表示・更新・削除が行えます。

このセクションで扱うコマンドは以下のとおりです。

* [**デプロイ一覧コマンド**](#deployment-list-command)
* [**デプロイ追加コマンド**](#deployment-add-command)
* [**デプロイ編集コマンド**](#deployment-edit-command)
* [**デプロイ削除コマンド**](#deployment-delete-command)
* [**デプロイトークン取得コマンド**](#deployment-download-command)

### 使い方

`pedm deployment command [--options]` または `pedm d command [--options]`

**エイリアス:** `d`

***

### デプロイ一覧コマンド <a href="#deployment-list-command" id="deployment-list-command"></a>

すべてのPEDMデプロイを、デプロイUID、名前、状態、作成日、関連エージェント数を含む詳細とともに表示します。組織全体にわたる複数のデプロイ構成の監視・管理に役立ちます。

<details>

<summary>DotNet CLI</summary>

**コマンド:** 近日公開

</details>

<details>

<summary>DotNet SDK</summary>

**関数:** 近日公開

</details>

<details>

<summary>Power Commander</summary>

**コマンド:** 近日公開

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
from keepersdk.plugins.pedm import admin_plugin

plugin = admin_plugin.PedmPlugin(enterprise_loader)
deployments = plugin.deployments.get_all_entities()
```

</details>

### デプロイ追加コマンド <a href="#deployment-add-command" id="deployment-add-command"></a>

新しいPEDMデプロイ構成を作成します。エンドポイントでPEDMエージェントをインストールして登録するために利用できる、固有のデプロイトークンを生成します。デプロイ単位でエージェントを論理的にまとめられます。

<details>

<summary>DotNet CLI</summary>

**コマンド:** 近日公開

</details>

<details>

<summary>DotNet SDK</summary>

**関数:** 近日公開

</details>

<details>

<summary>Power Commander</summary>

**コマンド:** 近日公開

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
from keepersdk.plugins.pedm import admin_plugin

deployment_name = 'deployment name'
plugin = admin_plugin.PedmPlugin(enterprise_loader)

ec_public_key = crypto.unload_ec_public_key(enterprise_data.enterprise_info.ec_public_key)
agent_info = pedm_shared.DeploymentAgentInformation(hash_key=plugin.agent_key, peer_public_key=ec_public_key)
spiffe_cert = cert.public_bytes(serialization.Encoding.DER)

add_rq = admin_types.AddDeployment(name=deployment_name, spiffe_cert=spiffe_cert, agent_info=agent_info)
response = plugin.modify_deployments(add_deployments=[add_rq])
```

</details>

### デプロイ編集コマンド <a href="#deployment-edit-command" id="deployment-edit-command"></a>

既存のPEDMデプロイの設定 (名前や有効/無効の状態など)を変更します。デプロイを作り直さずに、管理者がデプロイ構成を更新できます。

<details>

<summary>DotNet CLI</summary>

**コマンド:** 近日公開

</details>

<details>

<summary>DotNet SDK</summary>

**関数:** 近日公開

</details>

<details>

<summary>Power Commander</summary>

**コマンド:** 近日公開

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
from keepersdk.plugins.pedm import admin_plugin

deployment_name = 'deployment name'
plugin = admin_plugin.PedmPlugin(enterprise_loader)

deployment = plugin.deployments.get_entity(deployment_name)
spiffe_cert = cert.public_bytes(serialization.Encoding.DER)

name= 'new name'
disable = True ## or false
update_rq = admin_types.UpdateDeployment(
            deployment_uid=deployment.deployment_uid, name=name, disabled=disabled, spiffe_cert=spiffe_cert)
response = plugin.modify_deployments(update_deployments=[update_rq])
```

</details>

### デプロイ削除コマンド <a href="#deployment-delete-command" id="deployment-delete-command"></a>

システムから1つ以上のPEDMデプロイを削除します。デプロイ構成を恒久削除するコマンドのため、特にデプロイにエージェントがまだ紐づいている場合は注意して使用してください。

<details>

<summary>DotNet CLI</summary>

**コマンド:** 近日公開

</details>

<details>

<summary>DotNet SDK</summary>

**関数:** 近日公開

</details>

<details>

<summary>Power Commander</summary>

**コマンド:** 近日公開

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
from keepersdk.plugins.pedm import admin_plugin

deployment_name = 'deployment name'
plugin = admin_plugin.PedmPlugin(enterprise_loader)

deployment = plugin.deployments.get_entity(deployment_name)
response = plugin.modify_deployments(remove_deployments=[deployment.uid])
```

</details>

### デプロイトークン取得コマンド <a href="#deployment-download-command" id="deployment-download-command"></a>

PEDMエージェントのインストールに必要なデプロイトークンを取得します。トークンを画面に表示したりファイルに保存したりでき、必要に応じてWindows、MacOS、Linux向けエージェントインストールパッケージのダウンロードURLも表示できます。

<details>

<summary>DotNet CLI</summary>

**コマンド:** 近日公開

</details>

<details>

<summary>DotNet SDK</summary>

**関数:** 非対応

</details>

<details>

<summary>Power Commander</summary>

**コマンド:** 近日公開

</details>

<details>

<summary>Python SDK</summary>

**関数:** 非対応

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/pedm-commands/pedm-deployment-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
