このリソースのメソッドの一覧は、このページの最後に掲載されています。
リソース表記
Devices リソースは、EMM によって管理され、特定の企業ユーザーに属するモバイル デバイスを表します。
{
  "kind": "androidenterprise#device",
  "androidId": string,
  "managementType": string,
  "policy": {
    "autoUpdatePolicy": string,
    "productAvailabilityPolicy": string,
    "productPolicy": [
      {
        "productId": string,
        "tracks": [
          string
        ],
        "trackIds": [
          string
        ],
        "managedConfiguration": {
          "kind": string,
          "productId": string,
          "managedProperty": [
            {
              "key": string,
              "valueBool": boolean,
              "valueInteger": integer,
              "valueString": string,
              "valueStringArray": [
                string
              ],
              "valueBundle": {
                "managedProperty": [
                  (ManagedProperty)
                ]
              },
              "valueBundleArray": [
                {
                  "managedProperty": [
                    (ManagedProperty)
                  ]
                }
              ]
            }
          ],
          "configurationVariables": {
            "kind": "androidenterprise#configurationVariables",
            "mcmId": string,
            "variableSet": [
              {
                "kind": "androidenterprise#variableSet",
                "placeholder": string,
                "userValue": string
              }
            ]
          }
        },
        "autoInstallPolicy": {
          "autoInstallMode": string,
          "autoInstallPriority": integer,
          "autoInstallConstraint": [
            {
              "networkTypeConstraint": string,
              "chargingStateConstraint": string,
              "deviceIdleStateConstraint": string
            }
          ],
          "minimumVersionCode": integer
        },
        "autoUpdateMode": string,
        "enterpriseAuthenticationAppLinkConfigs": [
          {
            "uri": string
          }
        ]
      }
    ],
    "maintenanceWindow": {
      "startTimeAfterMidnightMs": long,
      "durationMs": long
    },
    "deviceReportPolicy": string,
    "policyId": string
  },
  "report": {
    "lastUpdatedTimestampMillis": long,
    "appState": [
      {
        "packageName": string,
        "keyedAppState": [
          {
            "key": string,
            "stateTimestampMillis": long,
            "severity": string,
            "message": string,
            "data": string
          }
        ]
      }
    ]
  },
  "latestBuildFingerprint": string,
  "sdkVersion": integer,
  "maker": string,
  "model": string,
  "device": string,
  "product": string,
  "retailBrand": string
}| プロパティ名 | 値 | 説明 | メモ | 
|---|---|---|---|
| androidId | string | デバイスの Google Play 開発者サービス Android ID(小文字の 16 進数文字列としてエンコード)。たとえば、 "123456789abcdef0"です。 | |
| device | string | デバイスの内部ハードウェア コードネーム。これは android.os.Build.DEVICEから取得されます。(logs/wireless/android/android_checkin.proto の「device」という名前のフィールド) | |
| kind | string | ||
| latestBuildFingerprint | string | デバイスのビルド フィンガープリント(判明している場合)。 | |
| maker | string | デバイスのメーカー。これは android.os.Build.MANUFACTURERから取得されます。 | |
| managementType | string | さまざまなデプロイ構成で、デバイスが managed Google Play EMM によってどの程度制御されているかを示します。 有効な値は次のとおりです。 
 有効な値は次のとおりです。 
 | |
| model | string | デバイスのモデル名。これは android.os.Build.MODELから取得されます。 | |
| policy | nested object | デバイスに適用されているポリシー。 | |
| policy.autoUpdatePolicy | string | デバイスでアプリの自動更新を適用できるタイミングを制御します。 推奨される代替手段: アプリごとに設定される autoUpdateModeは、更新頻度をより柔軟に設定できます。autoUpdateModeがAUTO_UPDATE_POSTPONEDまたはAUTO_UPDATE_HIGH_PRIORITYに設定されている場合、autoUpdatePolicyは効果がありません。
 有効な値は次のとおりです。 
 | |
| policy.deviceReportPolicy | string | デバイスがアプリの状態を EMM に報告するかどうか。デフォルト値は「deviceReportDisabled」です。 有効な値は次のとおりです。 
 | |
| policy.maintenanceWindow | nested object | フォアグラウンドで実行されているアプリを更新するタイミングを定義するメンテナンスの時間枠。 | |
| policy.maintenanceWindow.durationMs | long | メンテナンス ウィンドウの長さ(ミリ秒単位)。期間は 30 分~ 24 時間の範囲で指定してください。 | |
| policy.maintenanceWindow.startTimeAfterMidnightMs | long | メンテナンスの時間枠の開始時間(デバイスの深夜 0 時からのミリ秒単位)。ウィンドウは午前 0 時をまたぐことができます。 | |
| policy.policyId | string | Google Play ストアから送信されるアプリのインストール フィードバックとともに渡されるポリシーの識別子。 | |
| policy.productAvailabilityPolicy | string | 指定された商品に対してデバイスに付与されている在庫状況。「all」は、承認ステータスに関係なく、デバイスがすべてのプロダクトにアクセスできるようにします。「all」では、「alpha」または「beta」トラックの自動公開は有効になりません。「whitelist」は、productPolicy[] で指定されたプロダクトへのアクセス権をデバイスに付与します。許可リストに登録できるのは、承認されたプロダクト、または企業によって以前に承認されたプロダクト(承認が取り消されたプロダクト)のみです。値を指定しない場合、ユーザーレベルで設定された可用性がデフォルトで適用されます。 有効な値は次のとおりです。 
 | |
| policy.productPolicy[] | list | サービス ポリシーのリスト。商品ポリシーを適用するには、 productAvailabilityPolicyをWHITELISTまたはALLに設定する必要があります。 | |
| policy.productPolicy[].autoInstallPolicy | nested object | プロダクトの自動インストール ポリシー。 | |
| policy.productPolicy[].autoInstallPolicy.autoInstallConstraint[] | list | アプリの自動インストールの制約。制約は最大 1 つ指定できます。 | |
| policy.productPolicy[].autoInstallPolicy.autoInstallConstraint[].chargingStateConstraint | string | 充電状態の制約。 有効な値は次のとおりです。 
 | |
| policy.productPolicy[].autoInstallPolicy.autoInstallConstraint[].deviceIdleStateConstraint | string | デバイスのアイドル状態の制約。 有効な値は次のとおりです。 
 | |
| policy.productPolicy[].autoInstallPolicy.autoInstallConstraint[].networkTypeConstraint | string | ネットワーク タイプの制約。 有効な値は次のとおりです。 
 | |
| policy.productPolicy[].autoInstallPolicy.autoInstallMode | string | 自動インストール モード。設定しない場合、デフォルトは「doNotAutoInstall」です。アプリは、設定されたメンテナンスの時間枠に関係なく自動的にインストールされます。 有効な値は次のとおりです。 
 | |
| policy.productPolicy[].autoInstallPolicy.autoInstallPriority | integer | インストールの優先度(符号なし整数)。値が小さいほど優先度が高くなります。 | |
| policy.productPolicy[].autoInstallPolicy.minimumVersionCode | integer | アプリの最小バージョン。これより前のバージョンがインストールされている場合は、通常の自動更新を待つのではなく、自動インストールの制約に従ってアプリが自動更新されます。デバイスごとに最小バージョン コードを設定できるアプリは 20 個までです。 | |
| policy.productPolicy[].autoUpdateMode | string | 商品の自動更新モード。 autoUpdateModeを使用する場合は、ユーザーが選択した値よりも常に優先されます。そのため、ユーザーがデバイスの設定を手動で変更しても、その変更は無視されます。有効な値は次のとおりです。 
 | |
| policy.productPolicy[].enterpriseAuthenticationAppLinkConfigs[] | list | ID プロバイダの認証システムアプリの認証 URL 構成。これにより、Android WebView を使用した限定公開アプリでの認証中に、ID プロバイダの認証システムアプリを起動できます。認証システム アプリは、デバイス上の認証 URL の デフォルト ハンドラになっている必要があります。 | |
| policy.productPolicy[].enterpriseAuthenticationAppLinkConfigs[].uri | string | 認証 URL。 | |
| policy.productPolicy[].managedConfiguration | nested object | プロダクトの管理対象構成。 | |
| policy.productPolicy[].managedConfiguration.configurationVariables | nested object | 管理対象構成プロファイルの ID と、ユーザーに定義された構成変数のセット(存在する場合)が含まれます。 | |
| policy.productPolicy[].managedConfiguration.configurationVariables.kind | string | ||
| policy.productPolicy[].managedConfiguration.configurationVariables.mcmId | string | 管理対象設定の ID。 | |
| policy.productPolicy[].managedConfiguration.configurationVariables.variableSet[] | list | ユーザーに関連付けられた変数セット。 | |
| policy.productPolicy[].managedConfiguration.configurationVariables.variableSet[].kind | string | ||
| policy.productPolicy[].managedConfiguration.configurationVariables.variableSet[].placeholder | string | プレースホルダ文字列(EMM によって定義)。 | |
| policy.productPolicy[].managedConfiguration.configurationVariables.variableSet[].userValue | string | プレースホルダの値(ユーザー固有)。 | |
| policy.productPolicy[].managedConfiguration.kind | string | 非推奨。 | |
| policy.productPolicy[].managedConfiguration.managedProperty[] | list | この構成の管理対象プロパティのセット。 | |
| policy.productPolicy[].managedConfiguration.managedProperty[].key | string | 宿泊施設を識別する一意のキー。 | |
| policy.productPolicy[].managedConfiguration.managedProperty[].valueBool | boolean | ブール値 - プロパティの型が bool の場合にのみ存在します。 | |
| policy.productPolicy[].managedConfiguration.managedProperty[].valueBundle | nested object | マネージド プロパティのバンドル。プロパティのタイプがバンドルの場合にのみ存在します。 | |
| policy.productPolicy[].managedConfiguration.managedProperty[].valueBundle.managedProperty[] | list | マネージド プロパティのリスト。 | |
| policy.productPolicy[].managedConfiguration.managedProperty[].valueBundleArray[] | list | プロパティのバンドルのリスト。プロパティのタイプが bundle_array の場合にのみ存在します。 | |
| policy.productPolicy[].managedConfiguration.managedProperty[].valueBundleArray[].managedProperty[] | list | マネージド プロパティのリスト。 | |
| policy.productPolicy[].managedConfiguration.managedProperty[].valueInteger | integer | 整数値 - プロパティの型が整数の場合にのみ存在します。 | |
| policy.productPolicy[].managedConfiguration.managedProperty[].valueString | string | 文字列値 - プロパティのタイプが文字列、選択、または非表示の場合にのみ存在します。 | |
| policy.productPolicy[].managedConfiguration.managedProperty[].valueStringArray[] | list | 文字列値のリスト - プロパティのタイプが複数選択の場合にのみ存在します。 | |
| policy.productPolicy[].managedConfiguration.productId | string | 管理対象設定が適用されるプロダクトの ID(例:「app:com.google.android.gm」)。 | |
| policy.productPolicy[].productId | string | 商品の ID。たとえば、 "app:com.google.android.gm"です。 | |
| policy.productPolicy[].trackIds[] | list | trackIdsで指定されたプロダクト リリース トラックへのデバイスの公開を許可します。商品のリリース トラックのリストは、Products.Get を呼び出すことで取得できます。 | |
| policy.productPolicy[].tracks[] | list | 非推奨です。 trackIdsを代わりに使用してください。 | |
| product | string | デバイスのプロダクト名。これは android.os.Build.PRODUCTから取得されます。 | |
| report | nested object | デバイス レポートが最新のアプリの状態に更新されました。 | |
| report.appState[] | list | デバイス上の管理対象アプリによって設定されたアプリの状態のリスト。アプリの状態はアプリのデベロッパーが定義します。このフィールドは常に存在します。 | |
| report.appState[].keyedAppState[] | list | キー付きアプリの状態のリスト。このフィールドは常に存在します。 | |
| report.appState[].keyedAppState[].data | string | 機械で読み取り可能なデータ用の追加フィールド。たとえば、数値や JSON オブジェクトなどです。XSS を防ぐには、データを表示する前にデータから HTML を削除することをおすすめします。 | |
| report.appState[].keyedAppState[].key | string | アプリが状態を提供している対象を示すキー。キーの内容はアプリのデベロッパーが設定します。XSS を防ぐには、キーを表示する前にキーから HTML をすべて削除することをおすすめします。このフィールドは常に存在します。 | |
| report.appState[].keyedAppState[].message | string | アプリの状態を説明する、自由形式の、人が読める形式のメッセージ。たとえば、エラー メッセージなどです。XSS を防ぐため、メッセージを表示する前に HTML を削除することをおすすめします。 | |
| report.appState[].keyedAppState[].severity | string | アプリの状態の重大度。このフィールドは常に存在します。 有効な値は次のとおりです。 
 | |
| report.appState[].keyedAppState[].stateTimestampMillis | long | アプリが状態を設定したとき刻のタイムスタンプ(エポックからのミリ秒数)。このフィールドは常に存在します。 | |
| report.appState[].packageName | string | アプリのパッケージ名。このフィールドは常に存在します。 | |
| report.lastUpdatedTimestampMillis | long | 最終レポート更新のタイムスタンプ(エポックからのミリ秒単位)。このフィールドは常に存在します。 | |
| retailBrand | string | デバイスの小売ブランド(設定されている場合)。 android.os.Build.BRANDに関する説明をご覧ください。 | |
| sdkVersion | integer | API の互換性バージョン。 | 
メソッド
- forceReportUpload
- 前回のレポートの生成以降にデバイス上のアプリの状態に生じた変更を含むレポートをアップロードします。このメソッドは、特定のデバイスに対して 24 時間ごとに最大 3 回呼び出すことができます。
- get
- デバイスの詳細を取得します。
- getState
- デバイスの Google サービスへのアクセスが有効か無効かを取得します。デバイスの状態が有効になるのは、Google 管理コンソールで Android デバイスに対する EMM ポリシーの適用が有効になっている場合のみです。それ以外の場合、デバイスの状態は無視され、すべてのデバイスが Google サービスへのアクセスを許可されます。これは Google 管理のユーザーにのみ対応しています。
- list
- ユーザーのすべてのデバイスの ID を取得します。
- setState
- デバイスの Google サービスへのアクセスを有効または無効にします。デバイスの状態が有効になるのは、Google 管理コンソールで Android デバイスに対する EMM ポリシーの適用が有効になっている場合のみです。それ以外の場合、デバイスの状態は無視され、すべてのデバイスが Google サービスへのアクセスを許可されます。これは Google 管理のユーザーにのみ対応しています。
- update
- デバイス ポリシーを更新します。
 ポリシーが適切に適用されるようにするには、Google Play パッケージの管理対象構成でallowed_accountsを設定して、管理対象外のアカウントが Google Play にアクセスできないようにする必要があります。Google Play でアカウントを制限するをご覧ください。