blob: e52425698dd58f090cfffa1fe75e62b537663e81 [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="androidmanagement_v1.html">Android Management API</a> . <a href="androidmanagement_v1.enterprises.html">enterprises</a> . <a href="androidmanagement_v1.enterprises.enrollmentTokens.html">enrollmentTokens</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Creates an enrollment token for a given enterprise.</p>
<p class="toc_element">
<code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
<p class="firstline">Deletes an enrollment token. This operation invalidates the token, preventing its future use.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
<pre>Creates an enrollment token for a given enterprise.
Args:
parent: string, The name of the enterprise in the form enterprises/{enterpriseId}. (required)
body: object, The request body.
The object takes the form of:
{ # An enrollment token.
&quot;policyName&quot;: &quot;A String&quot;, # The name of the policy initially applied to the enrolled device, in the form enterprises/{enterpriseId}/policies/{policyId}. If not specified, the policy_name for the device’s user is applied. If user_name is also not specified, enterprises/{enterpriseId}/policies/default is applied by default. When updating this field, you can specify only the policyId as long as the policyId doesn’t contain any slashes. The rest of the policy name will be inferred.
&quot;additionalData&quot;: &quot;A String&quot;, # Optional, arbitrary data associated with the enrollment token. This could contain, for example, the ID of an org unit the device is assigned to after enrollment. After a device enrolls with the token, this data will be exposed in the enrollment_token_data field of the Device resource. The data must be 1024 characters or less; otherwise, the creation request will fail.
&quot;allowPersonalUsage&quot;: &quot;A String&quot;, # Controls personal usage on devices provisioned using this enrollment token.
&quot;expirationTimestamp&quot;: &quot;A String&quot;, # The expiration time of the token. This is a read-only field generated by the server.
&quot;duration&quot;: &quot;A String&quot;, # The length of time the enrollment token is valid, ranging from 1 minute to 30 days. If not specified, the default duration is 1 hour.
&quot;qrCode&quot;: &quot;A String&quot;, # A JSON string whose UTF-8 representation can be used to generate a QR code to enroll a device with this enrollment token. To enroll a device using NFC, the NFC record must contain a serialized java.util.Properties representation of the properties in the JSON.
&quot;user&quot;: { # A user belonging to an enterprise. # The user associated with this enrollment token. If it&#x27;s specified when the enrollment token is created and the user does not exist, the user will be created. This field must not contain personally identifiable information. Only the account_identifier field needs to be set.
&quot;accountIdentifier&quot;: &quot;A String&quot;, # A unique identifier you create for this user, such as user342 or asset#44418. This field must be set when the user is created and can&#x27;t be updated. This field must not contain personally identifiable information (PII). This identifier must be 1024 characters or less; otherwise, the update policy request will fail.
},
&quot;name&quot;: &quot;A String&quot;, # The name of the enrollment token, which is generated by the server during creation, in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}.
&quot;value&quot;: &quot;A String&quot;, # The token value that&#x27;s passed to the device and authorizes the device to enroll. This is a read-only field generated by the server.
&quot;oneTimeOnly&quot;: True or False, # Whether the enrollment token is for one time use only. If the flag is set to true, only one device can use it for registration.
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # An enrollment token.
&quot;policyName&quot;: &quot;A String&quot;, # The name of the policy initially applied to the enrolled device, in the form enterprises/{enterpriseId}/policies/{policyId}. If not specified, the policy_name for the device’s user is applied. If user_name is also not specified, enterprises/{enterpriseId}/policies/default is applied by default. When updating this field, you can specify only the policyId as long as the policyId doesn’t contain any slashes. The rest of the policy name will be inferred.
&quot;additionalData&quot;: &quot;A String&quot;, # Optional, arbitrary data associated with the enrollment token. This could contain, for example, the ID of an org unit the device is assigned to after enrollment. After a device enrolls with the token, this data will be exposed in the enrollment_token_data field of the Device resource. The data must be 1024 characters or less; otherwise, the creation request will fail.
&quot;allowPersonalUsage&quot;: &quot;A String&quot;, # Controls personal usage on devices provisioned using this enrollment token.
&quot;expirationTimestamp&quot;: &quot;A String&quot;, # The expiration time of the token. This is a read-only field generated by the server.
&quot;duration&quot;: &quot;A String&quot;, # The length of time the enrollment token is valid, ranging from 1 minute to 30 days. If not specified, the default duration is 1 hour.
&quot;qrCode&quot;: &quot;A String&quot;, # A JSON string whose UTF-8 representation can be used to generate a QR code to enroll a device with this enrollment token. To enroll a device using NFC, the NFC record must contain a serialized java.util.Properties representation of the properties in the JSON.
&quot;user&quot;: { # A user belonging to an enterprise. # The user associated with this enrollment token. If it&#x27;s specified when the enrollment token is created and the user does not exist, the user will be created. This field must not contain personally identifiable information. Only the account_identifier field needs to be set.
&quot;accountIdentifier&quot;: &quot;A String&quot;, # A unique identifier you create for this user, such as user342 or asset#44418. This field must be set when the user is created and can&#x27;t be updated. This field must not contain personally identifiable information (PII). This identifier must be 1024 characters or less; otherwise, the update policy request will fail.
},
&quot;name&quot;: &quot;A String&quot;, # The name of the enrollment token, which is generated by the server during creation, in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}.
&quot;value&quot;: &quot;A String&quot;, # The token value that&#x27;s passed to the device and authorizes the device to enroll. This is a read-only field generated by the server.
&quot;oneTimeOnly&quot;: True or False, # Whether the enrollment token is for one time use only. If the flag is set to true, only one device can use it for registration.
}</pre>
</div>
<div class="method">
<code class="details" id="delete">delete(name, x__xgafv=None)</code>
<pre>Deletes an enrollment token. This operation invalidates the token, preventing its future use.
Args:
name: string, The name of the enrollment token in the form enterprises/{enterpriseId}/enrollmentTokens/{enrollmentTokenId}. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:
# service Foo {
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
# }
# The JSON representation for Empty is empty JSON object {}.
}</pre>
</div>
</body></html>