Creates a device. Only company-owned device may be created. Note: This method is available only to customers who have one of the following SKUs: Enterprise Standard, Enterprise Plus, Enterprise for Education, and Cloud Identity Premium
Scopes
You will need authorization for the https://www.googleapis.com/auth/cloud-identity.devices scope to make a valid call.
If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-identity.devices.
You can set the scope for this method like this: cloudidentity1 --scope <scope> devices create ...
Required Request Value
The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.
For example, a structure like this:
GoogleAppsCloudidentityDevicesV1Device:
android-specific-attributes:
cts-profile-match: boolean
enabled-unknown-sources: boolean
has-potentially-harmful-apps: boolean
owner-profile-account: boolean
ownership-privilege: string
supports-work-profile: boolean
verified-boot: boolean
verify-apps-enabled: boolean
asset-tag: string
baseband-version: string
bootloader-version: string
brand: string
build-number: string
compromised-state: string
create-time: string
device-id: string
device-type: string
enabled-developer-options: boolean
enabled-usb-debugging: boolean
encryption-state: string
hostname: string
imei: string
kernel-version: string
last-sync-time: string
management-state: string
manufacturer: string
meid: string
model: string
name: string
network-operator: string
os-version: string
other-accounts: [string]
owner-type: string
release-version: string
security-patch-time: string
serial-number: string
wifi-mac-addresses: [string]
can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.
-r .android-specific-attributes cts-profile-match=true
- Whether the device passes Android CTS compliance.
enabled-unknown-sources=false
- Whether applications from unknown sources can be installed on device.
has-potentially-harmful-apps=true
- Whether any potentially harmful apps were detected on the device.
owner-profile-account=true
- Whether this account is on an owner/primary profile. For phones, only true for owner profiles. Android 4+ devices can have secondary or restricted user profiles.
ownership-privilege=duo
- Ownership privileges on device.
supports-work-profile=true
- Whether device supports Android work profiles. If false, this service will not block access to corp data even if an administrator turns on the "Enforce Work Profile" policy.
verified-boot=true
- Whether Android verified boot status is GREEN.
-
verify-apps-enabled=true
- Whether Google Play Protect Verify Apps is enabled.
-
.. asset-tag=gubergren
- Asset tag of the device.
baseband-version=eos
- Output only. Baseband version of the device.
bootloader-version=dolor
- Output only. Device bootloader version. Example: 0.6.7.
brand=ea
- Output only. Device brand. Example: Samsung.
build-number=ipsum
- Output only. Build number of the device.
compromised-state=invidunt
- Output only. Represents whether the Device is compromised.
create-time=amet
- Output only. When the Company-Owned device was imported. This field is empty for BYOD devices.
device-id=duo
- Unique identifier for the device.
device-type=ipsum
- Output only. Type of device.
enabled-developer-options=false
- Output only. Whether developer options is enabled on device.
enabled-usb-debugging=true
- Output only. Whether USB debugging is enabled on device.
encryption-state=ipsum
- Output only. Device encryption state.
hostname=ipsum
- Host name of the device.
imei=est
- Output only. IMEI number of device if GSM device; empty otherwise.
kernel-version=gubergren
- Output only. Kernel version of the device.
last-sync-time=ea
- Most recent time when device synced with this service.
management-state=dolor
- Output only. Management state of the device
manufacturer=lorem
- Output only. Device manufacturer. Example: Motorola.
meid=eos
- Output only. MEID number of device if CDMA device; empty otherwise.
model=labore
- Output only. Model name of device. Example: Pixel 3.
name=sed
- Output only. Resource name of the Device in format:
devices/{device}
, where device is the unique id assigned to the Device.
- Output only. Resource name of the Device in format:
network-operator=duo
- Output only. Mobile or network operator of device, if available.
os-version=sed
- Output only. OS version of the device. Example: Android 8.1.0.
other-accounts=no
- Output only. Domain name for Google accounts on device. Type for other accounts on device. On Android, will only be populated if |ownership_privilege| is |PROFILE_OWNER| or |DEVICE_OWNER|. Does not include the account signed in to the device policy app if that account's domain has only one account. Examples: "com.example", "xyz.com".
- Each invocation of this argument appends the given value to the array.
owner-type=stet
- Output only. Whether the device is owned by the company or an individual
release-version=kasd
- Output only. OS release version. Example: 6.0.
security-patch-time=et
- Output only. OS security patch update time on device.
serial-number=sed
- Serial Number of device. Example: HT82V1A01076.
wifi-mac-addresses=et
- WiFi MAC addresses of device.
- Each invocation of this argument appends the given value to the array.
About Cursors
The cursor position is key to comfortably set complex nested structures. The following rules apply:
- The cursor position is always set relative to the current one, unless the field name starts with the
.
character. Fields can be nested such as in-r f.s.o
. - The cursor position is set relative to the top-level structure if it starts with
.
, e.g.-r .s.s
- You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify
-r struct.sub_struct=bar
. - You can move the cursor one level up by using
..
. Each additional.
moves it up one additional level. E.g....
would go three levels up.
Optional Output Flags
The method's return value a JSON encoded structure, which will be written to standard output by default.
- -o out
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
-
to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
Optional Method Properties
You may set the following properties to further configure the call. Please note that -p
is followed by one
or more key-value-pairs, and is called like this -p k1=v1 k2=v2
even though the listing below repeats the
-p
for completeness.
- -p customer=string
- Optional. Resource name of the customer. If you're using this API for your own organization, use
customers/my_customer
If you're using this API to manage another organization, usecustomers/{customer}
, where customer is the customer to whom the device belongs.
- Optional. Resource name of the customer. If you're using this API for your own organization, use
Optional General Properties
The following properties can configure any call, and are not specific to this method.
-
-p $-xgafv=string
- V1 error format.
-
-p access-token=string
- OAuth access token.
-
-p alt=string
- Data format for response.
-
-p callback=string
- JSONP
-
-p fields=string
- Selector specifying which fields to include in a partial response.
-
-p key=string
- API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
-
-p oauth-token=string
- OAuth 2.0 token for the current user.
-
-p pretty-print=boolean
- Returns response with indentations and line breaks.
-
-p quota-user=string
- Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
-
-p upload-type=string
- Legacy upload protocol for media (e.g. "media", "multipart").
-
-p upload-protocol=string
- Upload protocol for media (e.g. "raw", "multipart").