# Runbook の命名規則

## Github のファイル名

shared runbook リポジトリ内には、特定のファイル構成と命名規則を想定しています [shared runbook リポジトリ](https://github.com/realmjoin/realmjoin-runbooks). RealmJoin は、GitHub からこれらのフォルダーとファイルを顧客の Azure Automation Account にインポートします。

ダッシュ（"-"）はスペースに変換されます。フォルダーは runbook を「context」と「category」に分けるために使用されます。例： `user\general`. ファイル名はスクリプトの目的を表すものにする必要があります。

インポートされるすべての runbook には次のプレフィックスが付きます `rjgit-`、その後に context が続き、次のいずれかになります `org`, `グループ`, `user` その後に category が続きます。たとえば `_general_`, `_security_`, `_mail_` そして、スクリプト自体の名前。たとえば `add-additional-alias`.

### 例:

Github にある runbook が `user\general` という名前で `add-additional-alias.ps1` は次のように表示されます：

* `rjgit-user_general_add-additional-alias` Azure Automation Account 内で
* ユーザー オブジェクトの runbook カテゴリ「General」にある RealmJoin Portal の「Add Additional Alias」。

一般的なカテゴリ

* 一般
* セキュリティ
* メール
* ユーザー情報

追加のカテゴリは定義できますが、context は定義できません。

### これは何のためですか？

これにより、RealmJoin Portal 内の runbook を自動的に補完して命名できます。また、 `rjgit-` プレフィックスにより、ローカル／顧客固有の runbook との名前の競合を回避できます。このプレフィックスを持たない runbook は、RealmJoin のインポート ロジックでは処理されません。

## プライベート / 顧客固有の Runbook

Azure Automation Account でプライベート（ローカル）runbook をホストできます。これらの runbook は、共有 runbook と同様に RealmJoin Portal に表示されます。ローカル runbook は同期処理の対象にならず、他の顧客からは見えません。

ローカル runbook を作成するには、 `rjgit-` プレフィックスを命名規則から削除し、他の命名構造はそのまま保持します。

例：Azure AD グループの context で「General」カテゴリの runbook「Private Runbook」を提供したい場合、次のように命名します `group_general_private-runbook` Azure Automation Account 内で。

Azure Automation では次のように表示されます：

![GitHub / Azure Automation における runbook 名](/files/87d5953507e2c490b8d688d64eec8f90f3d46022)

RealmJoin Portal では次のように表示されます：

![RealmJoin Portal における runbook 名](/files/1e3c9fcbbeae04b8dfc4097624a4809ae175057c)


---

# 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.realmjoin.com/ja/zi-dong-hua/runbooks/naming-conventions.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.
