update-asset
dci update-asset id
Updates an existing asset, such as G Suite/Workspace or Office 365 subscription, to add or remove licenses.
Request
Content-Type: application/json
Schema
{
"type": "object",
"properties": {
"quantity": {
"type": "integer",
"format": "int64"
}
}
}
Output
OK - Asset updated.
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
id | string | |
properties | object | Additional properties associated with an asset, such as subscription and customer details. |
properties.customerDomain | string | The primary domain of the customer associated with this asset. |
properties.customerID | string | The unique identifier of the customer in the reseller or partner portal. |
properties.reseller | string | The reseller domain through which this asset was provisioned. |
properties.subscription | object | Subscription details for a G Suite or Office 365 asset. |
properties.subscription.billingMethod | string | The billing method, e.g. ONLINE or OFFLINE. |
properties.subscription.creationTime | integer (int64) | The time when the subscription was created, in milliseconds since the epoch. |
properties.subscription.id | string | The unique identifier of the subscription. |
properties.subscription.plan | object | Plan details for a subscription, indicating whether it is a commitment or flexible plan. |
properties.subscription.plan.commitmentInterval | object | The start and end dates of an annual commitment term. Nested fields omitted — see the raw JSON schema. |
properties.subscription.plan.isCommitmentPlan | boolean | Whether this subscription is on an annual commitment plan (true) or a flexible plan (false). |
properties.subscription.plan.planName | string | The name of the plan, e.g. ANNUAL_MONTHLY_PAY, ANNUAL_YEARLY_PAY, FLEXIBLE, or TRIAL. |
properties.subscription.purchaseOrderID | string | The purchase order ID associated with this subscription, if any. |
properties.subscription.renewalSettings | object | Settings that control subscription renewal behavior at the end of a commitment term. |
properties.subscription.renewalSettings.renewalType | string | The type of renewal, e.g. AUTO_RENEW_MONTHLY_PAY, AUTO_RENEW_YEARLY_PAY, RENEW_CURRENT_USERS_MONTHLY_PAY, RENEW_CURRENT_USERS_YEARLY_PAY, SWITCH_TO_PAY_AS_YOU_GO, or CANCEL. |
properties.subscription.resourceUIURL | string | A URL to the subscription management page in the admin console. |
properties.subscription.seats | object | Licensing seat counts for a subscription. |
properties.subscription.seats.licensedNumberOfSeats | integer (int64) | The number of seats that are currently in use or assigned to users. |
properties.subscription.seats.maximumNumberOfSeats | integer (int64) | The maximum number of seats that can be used. Applies to flexible (non-commitment) plans. |
properties.subscription.seats.numberOfSeats | integer (int64) | The number of committed seats. Applies to annual commitment plans. |
properties.subscription.skuID | string | The unique SKU identifier for the subscribed product. |
properties.subscription.skuName | string | A human-readable name for the subscribed product SKU. |
properties.subscription.status | string | The current status of the subscription, e.g. ACTIVE, SUSPENDED, or PENDING. |
type | string |
Raw JSON schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"properties": {
"type": "object",
"description": "Additional properties associated with an asset, such as subscription and customer details.",
"properties": {
"customerDomain": {
"type": "string",
"description": "The primary domain of the customer associated with this asset."
},
"customerID": {
"type": "string",
"description": "The unique identifier of the customer in the reseller or partner portal."
},
"reseller": {
"type": "string",
"description": "The reseller domain through which this asset was provisioned."
},
"subscription": {
"type": "object",
"description": "Subscription details for a G Suite or Office 365 asset.",
"properties": {
"billingMethod": {
"type": "string",
"description": "The billing method, e.g. ONLINE or OFFLINE."
},
"creationTime": {
"type": "integer",
"description": "The time when the subscription was created, in milliseconds since the epoch.",
"format": "int64"
},
"id": {
"type": "string",
"description": "The unique identifier of the subscription."
},
"plan": {
"type": "object",
"description": "Plan details for a subscription, indicating whether it is a commitment or flexible plan.",
"properties": {
"commitmentInterval": {
"type": "object",
"description": "The start and end dates of an annual commitment term.",
"properties": {
"endTime": {
"type": "integer",
"description": "The end time of the commitment interval, in milliseconds since the epoch.",
"format": "int64"
},
"startTime": {
"type": "integer",
"description": "The start time of the commitment interval, in milliseconds since the epoch.",
"format": "int64"
}
}
},
"isCommitmentPlan": {
"type": "boolean",
"description": "Whether this subscription is on an annual commitment plan (true) or a flexible plan (false)."
},
"planName": {
"type": "string",
"description": "The name of the plan, e.g. ANNUAL_MONTHLY_PAY, ANNUAL_YEARLY_PAY, FLEXIBLE, or TRIAL."
}
}
},
"purchaseOrderID": {
"type": "string",
"description": "The purchase order ID associated with this subscription, if any."
},
"renewalSettings": {
"type": "object",
"description": "Settings that control subscription renewal behavior at the end of a commitment term.",
"properties": {
"renewalType": {
"type": "string",
"description": "The type of renewal, e.g. AUTO_RENEW_MONTHLY_PAY, AUTO_RENEW_YEARLY_PAY, RENEW_CURRENT_USERS_MONTHLY_PAY, RENEW_CURRENT_USERS_YEARLY_PAY, SWITCH_TO_PAY_AS_YOU_GO, or CANCEL."
}
}
},
"resourceUIURL": {
"type": "string",
"description": "A URL to the subscription management page in the admin console."
},
"seats": {
"type": "object",
"description": "Licensing seat counts for a subscription.",
"properties": {
"licensedNumberOfSeats": {
"type": "integer",
"description": "The number of seats that are currently in use or assigned to users.",
"format": "int64"
},
"maximumNumberOfSeats": {
"type": "integer",
"description": "The maximum number of seats that can be used. Applies to flexible (non-commitment) plans.",
"format": "int64"
},
"numberOfSeats": {
"type": "integer",
"description": "The number of committed seats. Applies to annual commitment plans.",
"format": "int64"
}
}
},
"skuID": {
"type": "string",
"description": "The unique SKU identifier for the subscribed product."
},
"skuName": {
"type": "string",
"description": "A human-readable name for the subscribed product SKU."
},
"status": {
"type": "string",
"description": "The current status of the subscription, e.g. ACTIVE, SUSPENDED, or PENDING."
}
}
}
}
},
"type": {
"type": "string"
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 404 | 20 | RESOURCE_NOT_FOUND | The requested resource does not exist. Check the identifier argument. |
Aliases: id-of-asset