retentionLabel を作成する

名前空間: microsoft.graph.security

重要

Microsoft Graph の /beta バージョンの API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 v1.0 で API を使用できるかどうかを確認するには、Version セレクターを使用します。

新しい retentionLabel オブジェクトを作成します。

廃棄レビュー ステージを作成するには、要求本文に actionAfterRetentionPeriod プロパティを含め、使用可能な値のいずれかを指定します。

この API は、次の国内クラウド展開で使用できます。

グローバル サービス 米国政府機関 L4 米国政府機関 L5 (DOD) 21Vianet が運営する中国

アクセス許可

この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。 アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「 アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、 アクセス許可のリファレンスを参照してください

アクセス許可の種類 最小特権アクセス許可 特権の高いアクセス許可
委任 (職場または学校のアカウント) RecordsManagement.ReadWrite.All 注意事項なし。
委任 (個人用 Microsoft アカウント) サポートされていません。 サポートされていません。
アプリケーション サポートされていません。 サポートされていません。

HTTP 要求

POST /security/labels/retentionLabels

要求ヘッダー

名前 説明
Authorization ベアラー {token}。 必須です。 認証と承認の詳細については、こちらをご覧ください。
Content-Type application/json. 必須です。

要求本文

要求本文で、 retentionLabel オブジェクトの JSON 表現を指定します。

retentionLabel を作成するときに、次のプロパティを指定します。

プロパティ 説明
actionAfterRetentionPeriod microsoft.graph.security.actionAfterRetentionPeriod 保持期間中にこのラベルが適用されたドキュメントに対して実行するアクションを指定します。 使用可能な値: nonedeletestartDispositionReviewunknownFutureValue
behaviorDuringRetentionPeriod microsoft.graph.security.behaviorDuringRetentionPeriod 保持期間中にこのラベルを持つドキュメントの動作を指定します。 使用可能な値: doNotRetainretainretainAsRecordretainAsRegulatoryRecordunknownFutureValue
descriptionForAdmins String 管理者のラベル情報を提供します。省略可能です。
descriptionForUsers String ユーザーのラベル情報を提供します。 省略可能です。
displayName String ラベル名を定義する一意の文字列。
dispositionReviewStages microsoft.graph.security.dispositionReviewStage コレクション 校閲者に通知される段階を確認して、ドキュメントを削除または保持する必要があるかどうかを判断します。
retentionDuration microsoft.graph.security.retentionDuration コンテンツを保持する日数を指定します。
retentionTrigger microsoft.graph.security.retentionTrigger 保持期間をコンテンツの作成日、ラベル付き日付、または最終変更日から計算するかどうかを指定します。 使用可能な値: dateLabeleddateCreateddateModifieddateOfEventunknownFutureValue
defaultRecordBehavior microsoft.graph.security.defaultRecordBehavior レコード ラベルの作成時にロックまたはロック解除された状態を指定します。 使用可能な値: startLockedstartUnlockedunknownFutureValue
labelToBeApplied String 現在のラベルの保持期間が終了した後に自動的に適用される置換ラベルを指定します。

応答

成功した場合、このメソッドは 201 Created 応答コードと、応答本文に microsoft.graph.security.retentionLabel オブジェクトを返します。

要求

要求の例を次に示します。

POST https://graph.microsoft.com/beta/security/labels/retentionLabels
Content-Type: application/json
Content-length: 555

{
  "@odata.type": "#microsoft.graph.security.retentionLabel",
  "displayName": "Retention Schedule 10005",
  "behaviorDuringRetentionPeriod": "retain",
  "actionAfterRetentionPeriod": "startDispositionReview",
  "retentionTrigger": "dateOfEvent",
  "retentionEventType@odata.bind": "https://graph.microsoft.com/beta/security/triggerTypes/retentionEventTypes('e095f4fc-b966-4c40-94de-fb8a383658e4')",
  "retentionDuration": {
    "@odata.type": "microsoft.graph.security.retentionDurationInDays",
    "days": 2555
  },
   "dispositionReviewStages": [
    {
      "stageNumber" : 1,
      "name": "Stage1",
      "reviewersEmailAddresses ": [
        "Admin@contoso.onmicrosoft.com"
      ]
    }
  ],
  "descriptionForAdmins": "retain for 7 years",
  "descriptionForUsers": "retain for 7 years",
  "descriptors": {
    "authorityTemplate@odata.bind" : "https://graph.microsoft.com/beta/security/labels/authorities('fie3f4fc-b966-4c40-94de-fb8a383658e4')",
    "categoryTemplate@odata.bind" : "https://graph.microsoft.com/beta/security/labels/categories('0bjk8-b966-4c40-94de-fb8a383658e4')",
    "citationTemplate@odata.bind" : "https://graph.microsoft.com/beta/security/labels/citations('0e23f4fc-b966-4c40-94de-fb8a383658e4')",
    "departmentTemplate@odata.bind" : "https://graph.microsoft.com/beta/security/labels/departments('p99ef4fc-b966-4c40-94de-fb8a383658e4')",
    "filePlanReferenceTemplate@odata.bind" : "https://graph.microsoft.com/beta/security/labels/filePlanReferences('e095f4fc-b966-4c40-94de-fb8a383658e4')"
  },
  "defaultRecordBehavior":"startLocked",
}

応答

応答の例を下に示します。

注: ここに示す応答オブジェクトは、読みやすさのために短縮されている場合があります。

HTTP/1.1 201 Created
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.security.retentionLabel",
  "id": "64a99fb4-07be-0481-8746-44c15c0eef1f",
  "displayName": "Retention Schedule 10005",
  "behaviorDuringRetentionPeriod": "retain",
  "actionAfterRetentionPeriod": "startDispositionReview",
  "retentionTrigger": "dateOfEvent",
  "retentionDuration": {
    "@odata.type": "microsoft.graph.security.retentionDurationInDays",
    "days": 2555
  },
  "dispositionReviewStages": [
    {
     "stageNumber" : 1,
      "name": "Stage1",
      "reviewersEmailAddresses ": [
        "Admin@contoso.onmicrosoft.com"
      ]
    }
  ],
  "isInUse": true,
  "descriptionForAdmins": "retain for 7 years",
  "descriptionForUsers": "retain for 7 years",
  "defaultRecordBehavior":"startLocked",
  "createdBy": {
   "user": {
      "id": "9563a605-e827-4324-a5a9-09efddff1e90",
      "displayName": "Admin"
    }
  },
  "createdDateTime": "2021-08-23T16:43:55Z",
  "labelToBeApplied": " ",
  "defaultRecordBehavior": "startLocked",
  "descriptors": {
    "authority": {
      "displayName": "Business"
    },
    "category": {
      "displayName": "Accounts Payable",
    },
    "citation": {
      "displayName" : "Contoso Company Policy",
      "citationUrl": "www.citationUrl.com",
      "citationJurisdiction": "Contoso"
    },
    "department": {
      "displayName" : "Finance"
    },
    "filePlanReference": {
      "displayName" : "FIN 01-02-001"
    }
  }
}