> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/keeperpam-commands/pam-action-commands.md).

# PAM Actionコマンド

PAMリソースの検出、認証情報のローテーション、サービスアカウント管理

### Action Rotateコマンド <a href="#action-rotate-command" id="action-rotate-command"></a>

Keeperゲートウェイを介して、単一のボルトレコード、またはUIDやタイトルパターンに一致する共有フォルダ内のすべての `pamUser` レコードに対して、オンデマンドで認証情報のローテーションを実行します。この操作はゲートウェイジョブをスケジュールするだけで、ローテーションスケジュール自体の設定は行いません (スケジュールの設定には `pam-rotation edit` を使用)。認証情報のローテーションを許可するエンタープライズ強制設定が必要です。

<details>

<summary>DotNet CLI</summary>

**コマンド**: `pam-action rotate`

**別名**: `pam-act rotate` / `pam-act r`

**パラメーター**:

<table><thead><tr><th width="264">パラメーター</th><th>説明</th></tr></thead><tbody><tr><td><code>--record-uid</code>, <code>-r</code></td><td>ローテーション対象のレコードUID</td></tr><tr><td><code>--folder</code>, <code>-f</code></td><td>共有フォルダのUIDまたはタイトルの正規表現パターン。一致するフォルダ内のすべての<code>pamUser</code>レコードをローテーション</td></tr><tr><td><code>--dry-run</code>, <code>-n</code></td><td>フォルダモード専用。ジョブをスケジュールせずに、ローテーション対象となるフォルダ/レコード数を確認</td></tr></tbody></table>

\*`--record-uid` または `--folder` のいずれかが必須です。

**例**:

{% code expandable="true" %}

```csharp
My Vault> pam-action rotate --record-uid <RECORD_UID>
My Vault> pam-action rotate -r <RECORD_UID>
My Vault> pam-action rotate --folder <SHARED_FOLDER_UID>
My Vault> pam-action rotate -f "Prod.*" --dry-run
My Vault> pam-act r -r <RECORD_UID>
```

{% endcode %}

</details>

<details>

<summary>DotNet SDK</summary>

**関数:**

```csharp
using KeeperSecurity.Plugins.PAM;

// Single-record on-demand rotate
var rotateResult = await ActionUtils.RotateAsync(vault, new PamRotateOptions
{
    RecordUid = "<RECORD_UID>"
});

if (rotateResult.RecordResult?.IsScheduled == true)
{
    var jobId = rotateResult.RecordResult.ConversationId;
    var gatewayUid = rotateResult.RecordResult.GatewayUid;
    Console.WriteLine($"Scheduled action id: {jobId}");

    var job = await ActionUtils.GetJobInfoAsync(vault.Auth, jobId, gatewayUid);
    if (job.JobInfo != null)
    {
        Console.WriteLine($"Status: {job.JobInfo.Status}");
        Console.WriteLine($"Duration: {job.JobInfo.Duration}");
        Console.WriteLine($"Message: {job.JobInfo.ResponseMessage}");
    }
}

// Folder-mode dry run (pamUser records only)
var folderPreview = await ActionUtils.RotateAsync(vault, new PamRotateOptions
{
    Folder = "<SHARED_FOLDER_UID_OR_TITLE_PATTERN>",
    DryRun = true
});
Console.WriteLine(
    $"Folders: {folderPreview.FolderResult.FolderCount}, Records: {folderPreview.FolderResult.RecordCount}");

// Folder-mode live rotate
var folderLive = await ActionUtils.RotateAsync(vault, new PamRotateOptions
{
    Folder = "<SHARED_FOLDER_UID_OR_TITLE_PATTERN>",
    DryRun = false
});
```

</details>

<details>

<summary>Power Commander</summary>

**コマンド**: Invoke-KeeperPamActionRotate

**別名**: `pam-action-rotate`\
**パラメーター**:

<table><thead><tr><th width="264">パラメーター</th><th>説明</th></tr></thead><tbody><tr><td><code>-RecordUid,</code> <code>-r</code></td><td>ローテーション対象のPAMユーザーレコードUID</td></tr><tr><td><code>-Folder, -f</code></td><td>共有フォルダのUIDまたはタイトルパターン (pamUserレコードをローテーション)</td></tr><tr><td><code>-DryRun,</code> <code>-n</code></td><td>フォルダモード専用。ローテーションを実行せずに選択内容を一覧表示</td></tr></tbody></table>

**例**:

```powershell
PS > Invoke-KeeperPamActionRotate -RecordUid "32gU_yrxxWdOCqkiWW4gRw"
Scheduled action id: <conversation-id>
The action has been scheduled, use command 'Get-KeeperPamActionJobInfo -JobId "<conversation-id>"' to get status of the scheduled action

PS > Invoke-KeeperPamActionRotate -Folder "tVjvRq_gbPBRF5kO3noYGw" -DryRun
Selected for rotation - folders: 1, records: 7

PS > pam-action-rotate -r "32gU_yrxxWdOCqkiWW4gRw"

```

</details>

<details>

<summary>Python CLI</summary>

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

</details>

<details>

<summary>Python SDK</summary>

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

</details>

### Action Job-infoコマンド <a href="#action-job-info-command" id="action-job-info-command"></a>

以前にスケジュールされたPAMゲートウェイジョブ (`pam-action rotate` の実行後など) のステータスを確認します。ジョブIDに `/` が含まれる場合は引用符で囲んでください。複数のゲートウェイが稼働している場合は `--gateway` を指定します。

<details>

<summary>DotNet CLI</summary>

**コマンド**: `pam-action job-info`

**別名**: `pam-act job-info` / `pam-act ji`

**パラメーター**:

<table><thead><tr><th width="275">パラメーター</th><th>説明</th></tr></thead><tbody><tr><td><code>&#x3C;job_id></code> (positional)</td><td>rotateなど、他のゲートウェイアクションが返すconversation ID / ジョブID</td></tr><tr><td><code>--gateway</code>, <code>-g</code></td><td>複数のゲートウェイが利用可能な場合のゲートウェイUID</td></tr></tbody></table>

**例**:

{% code expandable="true" %}

```csharp
My Vault> pam-action job-info "<JOB_ID>"
My Vault> pam-action job-info "<JOB_ID>" --gateway <GATEWAY_UID>
My Vault> pam-act ji "<JOB_ID>" -g <GATEWAY_UID>
```

{% endcode %}

</details>

<details>

<summary>DotNet SDK</summary>

**関数:**

```csharp
    public static Dictionary<string, TypedRecord> GetConfigurationRecords(VaultOnline vault)
    {
      if (vault == null)
      {
        return new Dictionary<string, TypedRecord>();
      }

      return vault.KeeperRecords
        .OfType<TypedRecord>()
        .Where(x => PamRecordTypes.Configuration.Contains(x.TypeName ?? ""))
        .ToDictionary(x => x.Uid, x => x);
    }
```

</details>

<details>

<summary>Power Commander</summary>

**コマンド**: `Get-KeeperPamActionJobInfo`

**別名**: `pam-action-job-info`

**パラメーター**:

<table><thead><tr><th width="275">パラメーター</th><th>説明</th></tr></thead><tbody><tr><td><code>-JobId, -j</code></td><td>スケジュール済みアクション / conversation ID (<code>/</code>を含む場合は引用符で囲む)</td></tr><tr><td><code>-Gateway, -g</code></td><td>複数のゲートウェイが存在する場合のゲートウェイUID</td></tr></tbody></table>

**例**:

```powershell
PS > Get-KeeperPamActionJobInfo -JobId "<conversation-id>"
Job id to check [<conversation-id>]
Execution Details
-------------------------
        Status              : finished
        Duration            : 00:00:12
        Response Message    : ...

PS > pam-action-job-info -j "<conversation-id>" -Gateway "9uUuUYaQThmhKSjQ8foCdw"


```

</details>

<details>

<summary>Python CLI</summary>

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

</details>

<details>

<summary>Python SDK</summary>

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

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.keeper.io/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/keeperpam-commands/pam-action-commands.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
