Word.SensitivityLabelUpdateStatus enum

注意

この API は開発者向けにプレビューとして提供されており、寄せられたフィードバックにもとづいて変更される場合があります。 この API は運用環境で使用しないでください。

ドキュメントの秘密度ラベルを更新しようとした結果の状態を表します。

注釈

API セット: WordApi ベータ版 (プレビューのみ)

使用元

例

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/manage-sensitivity-labels.yaml

// Apply the selected sensitivity label to the document.
await Word.run(async (context) => {
  const labelId = (document.getElementById("label-id") as HTMLSelectElement).value;
  if (!labelId) {
    console.warn("Get the available labels, and then select a label to apply.");
    return;
  }

  const wordDocument: Word.Document = context.document;
  const documentLabel: Word.SensitivityLabel = wordDocument.sensitivityLabel;

  const updateResult: OfficeExtension.ClientResult<Word.SensitivityLabelUpdateResult> =
    documentLabel.tryToUpdate(labelId);
  await context.sync();

  if (updateResult.value.status === Word.SensitivityLabelUpdateStatus.success) {
    console.log("Applied the sensitivity label to the document.");
  } else {
    console.error(`The sensitivity label wasn't applied. Status: ${updateResult.value.status}`);
  }
});

フィールド

abacAttributesNotAllowed = "AbacAttributesNotAllowed"

属性ベースのアクセス制御 (ABAC) 属性値が指定されましたが、ターゲット ラベルが ABAC 対応になっていません。

abacAttributesRequired = "AbacAttributesRequired"

ターゲット・ラベルは属性ベースのアクセス制御 (ABAC) に対して有効になり、属性の選択が必要ですが、ABAC 属性値は指定されていません。

crossTenant = "CrossTenant"

ドキュメントがユーザーと同じテナントに属していないため、ラベルを更新できませんでした。

documentReadOnly = "DocumentReadOnly"

ドキュメントは読み取り専用で、変更できません。

insufficientPermission = "InsufficientPermission"

ユーザーには、ラベルを更新するための十分なアクセス許可がありません。

labelDisabled = "LabelDisabled"

指定されたラベルが無効になっているか、ユーザーに適用できないため、ラベルの更新に失敗しました。

labelingDisabled = "LabelingDisabled"

ユーザーまたはインストールされた SKU に対してネイティブ ラベル付けが有効になっていないため、ラベルを更新できませんでした。

labelNotFound = "LabelNotFound"

指定された秘密度ラベルが見つかりませんでした。

parentLabelNotSupported = "ParentLabelNotSupported"

指定されたラベルが適用できない親ラベルであるため、ラベルを更新できませんでした。

removingLabelNotSupported = "RemovingLabelNotSupported"

秘密度ラベルの削除がサポートされていないため、ラベルの更新に失敗しました。

success = "Success"

秘密度ラベルが正常に更新されました。

unspecifiedFailure = "UnspecifiedFailure"

不明なエラーのため、更新に失敗しました。

unsupportedAbac = "UnsupportedAbac"

サポートされていない属性ベースのアクセス制御 (ABAC) 属性値が原因で、ラベルの更新に失敗しました。

unsupportedDoubleKeyEncryption = "UnsupportedDoubleKeyEncryption"

ダブル キー暗号化 (DKE) がサポートされていないため、ラベルを更新できませんでした。

unsupportedUdp = "UnsupportedUdp"

ユーザー定義のアクセス許可 (UDP) がサポートされていないため、ラベルを更新できませんでした。

userNotFound = "UserNotFound"

ラベルの適用中にユーザーの ID が見つからなかったため、ラベルの更新に失敗しました。