ミューテーションの例

Jamf Protect ドキュメント

Solution
Application
Content Type
テクニカル資料
Utilities & Services
ft:locale
ja-JP

createUnifiedLoggingFilter

以下の createUnifiedLoggingFilter ミューテーションでは、Login Events (ログインイベント) と呼ばれる新規の統一ロギングフィルタが作成され、Jamf Protect のコンピュータへの各ユーザのログインが記録されます。

mutation createFilter {
  createUnifiedLoggingFilter(
    input: {
      name: "Login Events"
      description: "A description of the filter"
      filter: "processImagePath contains 'loginwindow` and eventMessage contains `com.apple.sessionDidLogin`"
      enabled: true
      tags: "Login"
    }
  ) {
    uuid
    name
    description
    created
    updated
    filter
    tags
    enabled
  }
}

setComputerPlan

コンピュータのプランを変更するには、setComputerPlan ミューテーションを使用します。以下のミューテーションは、コンピュータ (UUID により定義) を ID「1」を持つプランへと変更し、コンピュータで実行された後に、コンピュータに関する現在の情報を返します。

Note:

この例で返される情報には、コンピュータの現在のプランが含まれます。コンピュータのプランは、コンピュータが Jamf Protect にチェックインするまで変更されません。

mutation changePlan {
  setComputerPlan(
    input: { plan: "1" }
    uuid: "ed6553dd-28e7-4ba6-b6e5-2d58b9b37696"
  ) {
    plan {
      id
      name
      created
    }
    configHash
    hostName
    serial
    uuid
    checkin
  }
}

updateComputer

コンピュータに関連付けられたラベルまたはタグをアップデートできます。

mutation updateComputerLabelandTags {
  updateComputer(
    input: { label: "label_1", tags: ["tag_1", "tag_2", "tag_3"]}
    uuid: "ed6553dd-28e7-4ba6-b6e5-a12b3c456d78"
  ) {
    hostName
    uuid
    insightsUpdated
    label
    tags
  }
}