Creates an entitlement for a customer. Possible error codes: * PERMISSION_DENIED: * The customer doesn't belong to the reseller. * The reseller is not authorized to transact on this Product. See https://support.google.com/channelservices/answer/9759265 * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * There is already a customer entitlement for a SKU from the same product family. * INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support for further troubleshooting. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: * The SKU was already purchased for the customer. * The customer's primary email already exists. Retry after changing the customer's primary contact email. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The domain required for purchasing a SKU has not been verified. * A pre-requisite SKU required to purchase an Add-On SKU is missing. For example, Google Workspace Business Starter is required to purchase Vault or Drive. * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. Return value: The ID of a long-running operation. To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.
Scopes
You will need authorization for the https://www.googleapis.com/auth/apps.order scope to make a valid call.
If unset, the scope for this method defaults to https://www.googleapis.com/auth/apps.order.
You can set the scope for this method like this: cloudchannel1 --scope <scope> accounts customers-entitlements-create ...
Required Scalar Argument
- <parent> (string)
- Required. The resource name of the reseller's customer account in which to create the entitlement. Parent uses the format: accounts/{account_id}/customers/{customer_id}
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:
GoogleCloudChannelV1CreateEntitlementRequest:
entitlement:
association-info:
base-entitlement: string
billing-account: string
commitment-settings:
end-time: string
renewal-settings:
enable-renewal: boolean
payment-cycle:
duration: integer
period-type: string
payment-plan: string
resize-unit-count: boolean
start-time: string
create-time: string
name: string
offer: string
provisioned-service:
product-id: string
provisioning-id: string
sku-id: string
provisioning-state: string
purchase-order-id: string
suspension-reasons: [string]
trial-settings:
end-time: string
trial: boolean
update-time: string
request-id: 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 .entitlement.association-info base-entitlement=lorem
- The name of the base entitlement, for which this entitlement is an add-on.
-
.. billing-account=justo
- Optional. The billing account resource name that is used to pay for this entitlement.
commitment-settings end-time=amet.
- Output only. Commitment end timestamp.
renewal-settings enable-renewal=false
- If false, the plan will be completed at the end date.
payment-cycle duration=58
- Total duration of Period Type defined.
-
period-type=kasd
- Period Type.
-
.. payment-plan=lorem
- Describes how a reseller will be billed.
-
resize-unit-count=true
- If true and enable_renewal = true, the unit (for example seats or licenses) will be set to the number of active units at renewal time.
-
.. start-time=nonumy
- Output only. Commitment start timestamp.
-
.. create-time=rebum.
- Output only. The time at which the entitlement is created.
name=tempor
- Output only. Resource name of an entitlement in the form: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
offer=dolore
- Required. The offer resource name for which the entitlement is to be created. Takes the form: accounts/{account_id}/offers/{offer_id}.
provisioned-service product-id=eos
- Output only. The product pertaining to the provisioning resource as specified in the Offer.
provisioning-id=amet.
- Output only. Provisioning ID of the entitlement. For Google Workspace, this is the underlying Subscription ID. For Google Cloud, this is the Billing Account ID of the billing subaccount.
-
sku-id=dolore
- Output only. The SKU pertaining to the provisioning resource as specified in the Offer.
-
.. provisioning-state=amet
- Output only. Current provisioning state of the entitlement.
purchase-order-id=ut
- Optional. This purchase order (PO) information is for resellers to use for their company tracking usage. If a purchaseOrderId value is given, it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters. This is only supported for Google Workspace entitlements.
suspension-reasons=at
- Output only. Enumerable of all current suspension reasons for an entitlement.
- Each invocation of this argument appends the given value to the array.
trial-settings end-time=sit
- Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.
-
trial=false
- Determines if the entitlement is in a trial or not: *
true
- The entitlement is in trial. *false
- The entitlement is not in trial.
- Determines if the entitlement is in a trial or not: *
-
.. update-time=duo
- Output only. The time at which the entitlement is updated.
-
.. request-id=sadipscing
- Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported (
00000000-0000-0000-0000-000000000000
).
- Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete. For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request. The request ID must be a valid UUID with the exception that zero UUID is not supported (
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 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").