CloudChannelServiceClient

CloudChannelServiceClient

CloudChannelService enables Google cloud resellers and distributors to manage their customers, channel partners, entitlements and reports.

Using this service:

  1. Resellers or distributors can manage a customer entity.
  2. Distributors can register an authorized reseller in their channel and then enable delegated admin access for the reseller.
  3. Resellers or distributors can manage entitlements for their customers.

The service primarily exposes the following resources:

  • Customers: A Customer represents an entity managed by a reseller or distributor. A customer typically represents an enterprise. In an n-tier resale channel hierarchy, customers are generally represented as leaf nodes. Customers primarily have an Entitlement sub-resource discussed below.

  • Entitlements: An Entitlement represents an entity which provides a customer means to start using a service. Entitlements are created or updated as a result of a successful fulfillment.

  • ChannelPartnerLinks: A ChannelPartnerLink is an entity that identifies links between distributors and their indirect resellers in a channel.

Constructor

new CloudChannelServiceClient(optionsopt)

Construct an instance of CloudChannelServiceClient.

Parameters:
Name Type Attributes Description
options object <optional>

The configuration object. The options accepted by the constructor are described in detail in this document. The common options are:

Properties
Name Type Attributes Description
credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.

port number <optional>

The port on which to connect to the remote host.

projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

apiEndpoint string <optional>

The domain name of the API remote host.

clientConfig gax.ClientConfig <optional>

Client configuration override. Follows the structure of gapicConfig.

fallback boolean <optional>

Use HTTP fallback mode. In fallback mode, a special browser-compatible transport implementation is used instead of gRPC transport. In browser context (if the window object is defined) the fallback mode is enabled automatically; set options.fallback to false if you need to override this behavior.

Members

apiEndpoint

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

port

The port for this API service.

scopes

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

The DNS address for this API service.

Methods

activateEntitlement(request, optionsopt) → {Promise}

Activates a previously suspended entitlement. The entitlement must be in a suspended state for it to be activated. Entitlements suspended for pending ToS acceptance can't be activated using this method. An entitlement activation is a long-running operation and can result in updates to the state of the customer entitlement.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller or if the reseller account making the request and reseller account being queried for are different.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • NOT_FOUND: Entitlement resource not found.
  • SUSPENSION_NOT_RESELLER_INITIATED: Can't activate an entitlement that is pending TOS acceptance. Only reseller initiated suspensions can be activated.
  • NOT_SUSPENDED: Can't activate entitlements that are already in ACTIVE state. Can only activate suspended entitlements.
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.

Return Value:
Long Running Operation ID.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
name string

Required. The resource name of the entitlement to activate. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}

requestId string <optional>

Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where 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 the original operation with the same request ID was received, and if so, 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).

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.activateEntitlement(request);
const [response] = await operation.promise();

cancelEntitlement(request, optionsopt) → {Promise}

Cancels a previously fulfilled entitlement. An entitlement cancellation is a long-running operation.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller or if the reseller account making the request and reseller account being queried for are different.
  • FAILED_PRECONDITION: If there are any Google Cloud projects linked to the Google Cloud entitlement's Cloud Billing subaccount.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • NOT_FOUND: Entitlement resource not found.
  • DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons or entitlements for Google Cloud's development platform.
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.

Return Value:
Long Running Operation ID.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
name string

Required. The resource name of the entitlement to cancel. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}

requestId string <optional>

Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where 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 the original operation with the same request ID was received, and if so, 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).

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.cancelEntitlement(request);
const [response] = await operation.promise();

changeOffer(request, optionsopt) → {Promise}

Updates the Offer for an existing customer entitlement.

An entitlement update is a long-running operation and results in updates to the entitlement as a result of fulfillment.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • NOT_FOUND: Offer or Entitlement resource not found.
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.

Return Value:
Long Running Operation ID.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
name string

Required. The name of the entitlement to update. Format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}

offer string

Required. New Offer. Format: accounts/{account_id}/offers/{offer_id}.

parameters Array.<number> <optional>

Optional. Parameters needed to purchase the Offer.

purchaseOrderId string <optional>

Optional. Purchase order id provided by the reseller.

requestId string <optional>

Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where 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 the original operation with the same request ID was received, and if so, 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).

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.changeOffer(request);
const [response] = await operation.promise();

changeParameters(request, optionsopt) → {Promise}

Change parameters of the entitlement

An entitlement parameters update is a long-running operation and results in updates to the entitlement as a result of fulfillment.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. For example, if the number of seats being changed to is greater than the allowed number of max seats for the resource. Or decreasing seats for a commitment based plan.
  • NOT_FOUND: Entitlement resource not found.
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.

Return Value:
Long Running Operation ID.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
name string

Required. The name of the entitlement to update. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}

parameters Array.<number>

Required. Entitlement parameters to update. Only editable parameters are allowed to be changed.

requestId string <optional>

Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where 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 the original operation with the same request ID was received, and if so, 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).

purchaseOrderId string <optional>

Optional. Purchase order ID provided by the reseller.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.changeParameters(request);
const [response] = await operation.promise();

changeRenewalSettings(request, optionsopt) → {Promise}

Updates the renewal settings for an existing customer entitlement.

An entitlement update is a long-running operation and results in updates to the entitlement as a result of fulfillment.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • NOT_FOUND: Entitlement resource not found.
  • NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't enable or disable renewal for non-commitment plans.
  • INTERNAL: Any non user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
  • UNKNOWN: Any non user error related to a technical issue in the backend. In this case, contact Cloud Channel support.

Return Value:
Long Running Operation ID.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
name string

Required. The name of the entitlement to update. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}

renewalSettings google.cloud.channel.v1.RenewalSettings

Required. New renewal settings.

requestId string <optional>

Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where 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 the original operation with the same request ID was received, and if so, 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).

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.changeRenewalSettings(request);
const [response] = await operation.promise();

(async) checkActivateEntitlementProgress(name) → {Promise}

Check the status of the long running operation returned by activateEntitlement().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkActivateEntitlementProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

(async) checkCancelEntitlementProgress(name) → {Promise}

Check the status of the long running operation returned by cancelEntitlement().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkCancelEntitlementProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

(async) checkChangeOfferProgress(name) → {Promise}

Check the status of the long running operation returned by changeOffer().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkChangeOfferProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

(async) checkChangeParametersProgress(name) → {Promise}

Check the status of the long running operation returned by changeParameters().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkChangeParametersProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

(async) checkChangeRenewalSettingsProgress(name) → {Promise}

Check the status of the long running operation returned by changeRenewalSettings().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkChangeRenewalSettingsProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

checkCloudIdentityAccountsExist(request, optionsopt) → {Promise}

Confirms the existence of Cloud Identity accounts, based on the domain and whether the Cloud Identity accounts are owned by the reseller.

Possible Error Codes:

  • PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • INVALID_VALUE: Invalid domain value in the request.
  • NOT_FOUND: If there is no CloudIdentityCustomerAccount customer for the domain specified in the request.

Return Value:
List of CloudIdentityCustomerAccount resources if any exist for the domain, otherwise an error is returned.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of the reseller account. The parent takes the format: accounts/{account_id}

domain string

Required. Domain for which the Cloud Identity account customer is fetched.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
Example
const [response] = await client.checkCloudIdentityAccountsExist(request);

(async) checkCreateEntitlementProgress(name) → {Promise}

Check the status of the long running operation returned by createEntitlement().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkCreateEntitlementProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

(async) checkProvisionCloudIdentityProgress(name) → {Promise}

Check the status of the long running operation returned by provisionCloudIdentity().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkProvisionCloudIdentityProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

(async) checkStartPaidServiceProgress(name) → {Promise}

Check the status of the long running operation returned by startPaidService().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkStartPaidServiceProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

(async) checkSuspendEntitlementProgress(name) → {Promise}

Check the status of the long running operation returned by suspendEntitlement().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkSuspendEntitlementProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

(async) checkTransferEntitlementsProgress(name) → {Promise}

Check the status of the long running operation returned by transferEntitlements().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkTransferEntitlementsProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

(async) checkTransferEntitlementsToGoogleProgress(name) → {Promise}

Check the status of the long running operation returned by transferEntitlementsToGoogle().

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
Promise
  • The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
Example
const decodedOperation = await checkTransferEntitlementsToGoogleProgress(name);
console.log(decodedOperation.result);
console.log(decodedOperation.done);
console.log(decodedOperation.metadata);

close() → {Promise}

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns:
Type Description
Promise

A promise that resolves when the client is closed.

Initiates a channel partner link between a distributor and a reseller or between resellers in an n-tier reseller channel. To accept the invite, the invited partner should follow the invite_link_uri provided in the response. If the link creation is accepted, a valid link is set up between the two involved parties. To call this method, you must be a distributor.

Possible Error Codes:

  • PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • ALREADY_EXISTS: If the ChannelPartnerLink sent in the request already exists.
  • NOT_FOUND: If no Cloud Identity customer exists for domain provided.
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.

Return Value:
Newly created ChannelPartnerLink resource if successful, otherwise error is returned.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of reseller's account for which to create a channel partner link. The parent takes the format: accounts/{account_id}

channelPartnerLink google.cloud.channel.v1.ChannelPartnerLink

Required. The channel partner link to create. Either channel_partner_link.reseller_cloud_identity_id or domain can be used to create a link.

domain string <optional>

Optional. The invited partner's domain. Either domain or channel_partner_link.reseller_cloud_identity_id can be used to create a link.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing ChannelPartnerLink. Please see the documentation for more details and examples.
const [response] = await client.createChannelPartnerLink(request);

createCustomer(request, optionsopt) → {Promise}

Creates a new Customer resource under the reseller or distributor account.

Possible Error Codes:

  • PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
  • INVALID_ARGUMENT:
    • Missing or invalid required parameters in the request.
    • Domain field value doesn't match the domain specified in primary email.

Return Value:
If successful, the newly created Customer resource, otherwise returns an error.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The resource name of reseller account in which to create the customer. The parent takes the format: accounts/{account_id}

customer google.cloud.channel.v1.Customer

Required. The customer to create.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Customer. Please see the documentation for more details and examples.
Example
const [response] = await client.createCustomer(request);

createEntitlement(request, optionsopt) → {Promise}

Creates an entitlement for a customer.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller.
  • INVALID_ARGUMENT:
    • Missing or invalid required parameters in the request.
    • Cannot purchase an entitlement if there is already an entitlement for customer, for a SKU from the same product family.
    • INVALID_VALUE: Offer passed in isn't valid. Make sure OfferId is valid. If it is valid, then contact Google Channel support for further troubleshooting.
  • NOT_FOUND: If the customer or offer resource is not found for the reseller.
  • ALREADY_EXISTS: This failure can happen in the following cases:
    • If the SKU has been already purchased for the customer.
    • If the customer's primary email already exists. In this case retry after changing the customer's primary contact email.
  • CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following cases:
    • Purchasing a SKU that requires domain verification and the domain has not been verified.
    • Purchasing an Add-On SKU like Vault or Drive without purchasing the pre-requisite SKU, such as Google Workspace Business Starter.
    • Applicable only for developer accounts: reseller and resold domain. Must meet the following domain naming requirements:
      • Domain names must start with goog-test.
      • Resold domain names must include the reseller domain.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel Support in this case.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel Support in this case.

Return Value:
Long Running Operation ID.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of reseller's customer account in which to create the entitlement. The parent takes the format: accounts/{account_id}/customers/{customer_id}

entitlement google.cloud.channel.v1.Entitlement

Required. The entitlement to create.

requestId string <optional>

Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where 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 the original operation with the same request ID was received, and if so, 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).

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.createEntitlement(request);
const [response] = await operation.promise();

customerPath(account, customer) → {string}

Return a fully-qualified customer resource name string.

Parameters:
Name Type Description
account string
customer string
Returns:
Type Description
string

Resource name string.

deleteCustomer(request, optionsopt) → {Promise}

Deletes the given Customer permanently and irreversibly.

Possible Error Codes:

  • PERMISSION_DENIED: If the account making the request does not own this customer.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • FAILED_PRECONDITION: If the customer has existing entitlements.
  • NOT_FOUND: No Customer resource found for the name specified in the request.
Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The resource name of the customer to delete.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.
Example
const [response] = await client.deleteCustomer(request);

entitlementPath(account, customer, entitlement) → {string}

Return a fully-qualified entitlement resource name string.

Parameters:
Name Type Description
account string
customer string
entitlement string
Returns:
Type Description
string

Resource name string.

Returns a requested ChannelPartnerLink resource. To call this method, you must be a distributor.

Possible Error Codes:

  • PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • NOT_FOUND: ChannelPartnerLink resource not found. Results due invalid channel partner link name.

Return Value:
ChannelPartnerLink resource if found, otherwise returns an error.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
name string

Required. The resource name of the channel partner link to retrieve. The name takes the format: accounts/{account_id}/channelPartnerLinks/{id} where {id} is the Cloud Identity ID of the partner.

view google.cloud.channel.v1.ChannelPartnerLinkView <optional>

Optional. The level of granularity the ChannelPartnerLink will display.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing ChannelPartnerLink. Please see the documentation for more details and examples.
const [response] = await client.getChannelPartnerLink(request);

getCustomer(request, optionsopt) → {Promise}

Returns a requested Customer resource.

Possible Error Codes:

  • PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • NOT_FOUND: If the customer resource doesn't exist. Usually the result of an invalid name parameter.

Return Value:
Customer resource if found, error otherwise.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The resource name of the customer to retrieve. The name takes the format: accounts/{account_id}/customers/{customer_id}

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Customer. Please see the documentation for more details and examples.
Example
const [response] = await client.getCustomer(request);

getEntitlement(request, optionsopt) → {Promise}

Returns a requested Entitlement resource.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • NOT_FOUND: If the entitlement is not found for the customer.

Return Value:
If found, the requested Entitlement resource, otherwise returns an error.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The resource name of the entitlement to retrieve. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{id}

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Entitlement. Please see the documentation for more details and examples.
Example
const [response] = await client.getEntitlement(request);

getProjectId() → {Promise}

Return the project ID used by this class.

Returns:
Type Description
Promise

A promise that resolves to string containing the project ID.

initialize() → {Promise}

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns:
Type Description
Promise

A promise that resolves to an authenticated service stub.

List ChannelPartnerLinks belonging to a distributor. To call this method, you must be a distributor.

Possible Error Codes:

  • PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.

Return Value:
If successful, returns the list of ChannelPartnerLink resources for the distributor account, otherwise returns an error.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the reseller account for listing channel partner links. The parent takes the format: accounts/{account_id}

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, server will pick a default size (25). The maximum value is 200, values above 200 will be coerced to 200.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListChannelPartnerLinksResponse.next_page_token of the previous CloudChannelService.ListChannelPartnerLinks call.

view google.cloud.channel.v1.ChannelPartnerLinkView <optional>

Optional. The level of granularity the ChannelPartnerLink will display.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of ChannelPartnerLink. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listChannelPartnerLinksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listChannelPartnerLinksAsync(request, optionsopt) → {Object}

Equivalent to listChannelPartnerLinks, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the reseller account for listing channel partner links. The parent takes the format: accounts/{account_id}

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, server will pick a default size (25). The maximum value is 200, values above 200 will be coerced to 200.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListChannelPartnerLinksResponse.next_page_token of the previous CloudChannelService.ListChannelPartnerLinks call.

view google.cloud.channel.v1.ChannelPartnerLinkView <optional>

Optional. The level of granularity the ChannelPartnerLink will display.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing ChannelPartnerLink. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listChannelPartnerLinksAsync(request);
for await (const response of iterable) {
  // process response
}

listChannelPartnerLinksStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the reseller account for listing channel partner links. The parent takes the format: accounts/{account_id}

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, server will pick a default size (25). The maximum value is 200, values above 200 will be coerced to 200.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListChannelPartnerLinksResponse.next_page_token of the previous CloudChannelService.ListChannelPartnerLinks call.

view google.cloud.channel.v1.ChannelPartnerLinkView <optional>

Optional. The level of granularity the ChannelPartnerLink will display.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing ChannelPartnerLink on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listChannelPartnerLinksAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCustomers(request, optionsopt) → {Promise}

List downstream Customers.

Possible Error Codes:

  • PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.

Return Value:
List of Customers pertaining to the reseller or empty list if there are none.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the reseller account from which to list customers. The parent takes the format: accounts/{account_id}.

pageSize number <optional>

Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, at most 10 customers will be returned. The maximum value is 50; values about 50 will be coerced to 50.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of Customer. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listCustomersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCustomersAsync(request, optionsopt) → {Object}

Equivalent to listCustomers, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the reseller account from which to list customers. The parent takes the format: accounts/{account_id}.

pageSize number <optional>

Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, at most 10 customers will be returned. The maximum value is 50; values about 50 will be coerced to 50.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Customer. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listCustomersAsync(request);
for await (const response of iterable) {
  // process response
}

listCustomersStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the reseller account from which to list customers. The parent takes the format: accounts/{account_id}.

pageSize number <optional>

Optional. The maximum number of customers to return. The service may return fewer than this value. If unspecified, at most 10 customers will be returned. The maximum value is 50; values about 50 will be coerced to 50.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListCustomersResponse.next_page_token of the previous CloudChannelService.ListCustomers call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Customer on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listCustomersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listEntitlements(request, optionsopt) → {Promise}

List Entitlements belonging to a customer.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.

Return Value:
List of Entitlements belonging to the customer, or empty list if there are none.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the reseller's customer account for which to list entitlements. The parent takes the format: accounts/{account_id}/customers/{customer_id}

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 50 entitlements will be returned. The maximum value is 100; values above 100 will be coerced to 100.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListEntitlementsResponse.next_page_token of the previous CloudChannelService.ListEntitlements call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of Entitlement. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listEntitlementsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listEntitlementsAsync(request, optionsopt) → {Object}

Equivalent to listEntitlements, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the reseller's customer account for which to list entitlements. The parent takes the format: accounts/{account_id}/customers/{customer_id}

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 50 entitlements will be returned. The maximum value is 100; values above 100 will be coerced to 100.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListEntitlementsResponse.next_page_token of the previous CloudChannelService.ListEntitlements call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Entitlement. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listEntitlementsAsync(request);
for await (const response of iterable) {
  // process response
}

listEntitlementsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the reseller's customer account for which to list entitlements. The parent takes the format: accounts/{account_id}/customers/{customer_id}

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 50 entitlements will be returned. The maximum value is 100; values above 100 will be coerced to 100.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one. Typically obtained via ListEntitlementsResponse.next_page_token of the previous CloudChannelService.ListEntitlements call.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Entitlement on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listEntitlementsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listOffers(request, optionsopt) → {Promise}

Lists the Offers the reseller can sell.

Possible Error Codes:

  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the reseller account from which to list Offers. The parent takes the format: accounts/{account_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 500 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one.

filter string <optional>

Optional. The expression to filter results by name (name of the Offer), sku.name (name of the SKU) or sku.product.name (name of the Product). Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 Example 2: name=accounts/a1/offers/o1

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of Offer. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listOffersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listOffersAsync(request, optionsopt) → {Object}

Equivalent to listOffers, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the reseller account from which to list Offers. The parent takes the format: accounts/{account_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 500 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one.

filter string <optional>

Optional. The expression to filter results by name (name of the Offer), sku.name (name of the SKU) or sku.product.name (name of the Product). Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 Example 2: name=accounts/a1/offers/o1

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Offer. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listOffersAsync(request);
for await (const response of iterable) {
  // process response
}

listOffersStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the reseller account from which to list Offers. The parent takes the format: accounts/{account_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 500 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one.

filter string <optional>

Optional. The expression to filter results by name (name of the Offer), sku.name (name of the SKU) or sku.product.name (name of the Product). Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 Example 2: name=accounts/a1/offers/o1

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Offer on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listOffersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listProducts(request, optionsopt) → {Promise}

Lists the Products the reseller is authorized to sell.

Possible Error Codes:

  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
account string

Required. The resource name of the reseller account. Format: accounts/{account_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Products will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one.

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of Product. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listProductsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listProductsAsync(request, optionsopt) → {Object}

Equivalent to listProducts, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
account string

Required. The resource name of the reseller account. Format: accounts/{account_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Products will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one.

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Product. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listProductsAsync(request);
for await (const response of iterable) {
  // process response
}

listProductsStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
account string

Required. The resource name of the reseller account. Format: accounts/{account_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Products will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one.

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Product on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listProductsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPurchasableOffers(request, optionsopt) → {Promise}

Lists the Purchasable Offers for the following cases:

  • Offers that can be newly purchased for a customer
  • Offers that can be changed to, for an entitlement.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
createEntitlementPurchase google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase

List Offers for CreateEntitlement purchase.

changeOfferPurchase google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase

List Offers for ChangeOffer purchase.

customer string

Required. The resource name of the customer for which to list Offers. Format: accounts/{account_id}/customers/{customer_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one.

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of PurchasableOffer. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPurchasableOffersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPurchasableOffersAsync(request, optionsopt) → {Object}

Equivalent to listPurchasableOffers, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
createEntitlementPurchase google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase

List Offers for CreateEntitlement purchase.

changeOfferPurchase google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase

List Offers for ChangeOffer purchase.

customer string

Required. The resource name of the customer for which to list Offers. Format: accounts/{account_id}/customers/{customer_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one.

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing PurchasableOffer. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listPurchasableOffersAsync(request);
for await (const response of iterable) {
  // process response
}

listPurchasableOffersStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
createEntitlementPurchase google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase

List Offers for CreateEntitlement purchase.

changeOfferPurchase google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase

List Offers for ChangeOffer purchase.

customer string

Required. The resource name of the customer for which to list Offers. Format: accounts/{account_id}/customers/{customer_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one.

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing PurchasableOffer on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPurchasableOffersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPurchasableSkus(request, optionsopt) → {Promise}

Lists the Purchasable SKUs for following cases:

  • SKUs that can be newly purchased for a customer
  • SKUs that can be upgraded/downgraded to, for an entitlement.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
createEntitlementPurchase google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase

List SKUs for CreateEntitlement purchase.

changeOfferPurchase google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase

List SKUs for ChangeOffer purchase with a new SKU.

customer string

Required. The resource name of the customer for which to list SKUs. Format: accounts/{account_id}/customers/{customer_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one.

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of PurchasableSku. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPurchasableSkusAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPurchasableSkusAsync(request, optionsopt) → {Object}

Equivalent to listPurchasableSkus, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
createEntitlementPurchase google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase

List SKUs for CreateEntitlement purchase.

changeOfferPurchase google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase

List SKUs for ChangeOffer purchase with a new SKU.

customer string

Required. The resource name of the customer for which to list SKUs. Format: accounts/{account_id}/customers/{customer_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one.

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing PurchasableSku. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listPurchasableSkusAsync(request);
for await (const response of iterable) {
  // process response
}

listPurchasableSkusStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
createEntitlementPurchase google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase

List SKUs for CreateEntitlement purchase.

changeOfferPurchase google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase

List SKUs for ChangeOffer purchase with a new SKU.

customer string

Required. The resource name of the customer for which to list SKUs. Format: accounts/{account_id}/customers/{customer_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one.

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing PurchasableSku on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPurchasableSkusAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSkus(request, optionsopt) → {Promise}

Lists the SKUs for a product the reseller is authorized to sell.

Possible Error Codes:

  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the Product for which to list SKUs. The parent takes the format: products/{product_id}. Supports products/- to retrieve SKUs for all products.

account string

Required. Resource name of the reseller. Format: accounts/{account_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one. Optional.

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of Sku. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listSkusAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSkusAsync(request, optionsopt) → {Object}

Equivalent to listSkus, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the Product for which to list SKUs. The parent takes the format: products/{product_id}. Supports products/- to retrieve SKUs for all products.

account string

Required. Resource name of the reseller. Format: accounts/{account_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one. Optional.

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Sku. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listSkusAsync(request);
for await (const response of iterable) {
  // process response
}

listSkusStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of the Product for which to list SKUs. The parent takes the format: products/{product_id}. Supports products/- to retrieve SKUs for all products.

account string

Required. Resource name of the reseller. Format: accounts/{account_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string <optional>

Optional. A token identifying a page of results, if other than the first one. Optional.

languageCode string <optional>

Optional. The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Sku on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listSkusAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listTransferableOffers(request, optionsopt) → {Promise}

List TransferableOffers of a customer based on Cloud Identity ID or Customer Name in the request.

This method is used when a reseller gets the entitlement information of a customer that is not owned. The reseller should provide the customer's Cloud Identity ID or Customer Name.

Possible Error Codes:

  • PERMISSION_DENIED, due to one of the following reasons: (a) If the customer doesn't belong to the reseller and no auth token or invalid auth token is supplied. (b) If the reseller account making the request and the reseller account being queried for are different.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.

Return Value: List of TransferableOffer for the given customer and SKU.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
cloudIdentityId string

Customer's Cloud Identity ID

customerName string

A reseller should create a customer and use the resource name of the created customer here.

parent string

Required. The resource name of the reseller's account.

pageSize number

Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string

A token identifying a page of results, if other than the first one. Typically obtained via ListTransferableOffersResponse.next_page_token of the previous CloudChannelService.ListTransferableOffers call.

sku string

Required. SKU for which the Offers are being looked up.

languageCode string

The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of TransferableOffer. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listTransferableOffersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listTransferableOffersAsync(request, optionsopt) → {Object}

Equivalent to listTransferableOffers, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
cloudIdentityId string

Customer's Cloud Identity ID

customerName string

A reseller should create a customer and use the resource name of the created customer here.

parent string

Required. The resource name of the reseller's account.

pageSize number

Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string

A token identifying a page of results, if other than the first one. Typically obtained via ListTransferableOffersResponse.next_page_token of the previous CloudChannelService.ListTransferableOffers call.

sku string

Required. SKU for which the Offers are being looked up.

languageCode string

The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing TransferableOffer. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listTransferableOffersAsync(request);
for await (const response of iterable) {
  // process response
}

listTransferableOffersStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
cloudIdentityId string

Customer's Cloud Identity ID

customerName string

A reseller should create a customer and use the resource name of the created customer here.

parent string

Required. The resource name of the reseller's account.

pageSize number

Requested page size. Server might return fewer results than requested. If unspecified, at most 100 Offers will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken string

A token identifying a page of results, if other than the first one. Typically obtained via ListTransferableOffersResponse.next_page_token of the previous CloudChannelService.ListTransferableOffers call.

sku string

Required. SKU for which the Offers are being looked up.

languageCode string

The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US".

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing TransferableOffer on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listTransferableOffersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listTransferableSkus(request, optionsopt) → {Promise}

List TransferableSkus of a customer based on Cloud Identity ID or Customer Name in the request.

This method is used when a reseller lists the entitlements information of a customer that is not owned. The reseller should provide the customer's Cloud Identity ID or Customer Name.

Possible Error Codes:

  • PERMISSION_DENIED, due to one of the following reasons:
    • If the customer doesn't belong to the reseller and no auth token, or an invalid auth token is supplied.
    • If the reseller account making the request and the reseller account being queried for are different.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.

Return Value:
List of TransferableSku for the given customer.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
cloudIdentityId string

Customer's Cloud Identity ID

customerName string

A reseller is required to create a customer and use the resource name of the created customer here. The customer_name takes the format: accounts/{account_id}/customers/{customer_id}

parent string

Required. The resource name of the reseller's account. The parent takes the format: accounts/{account_id}

pageSize number

Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. Optional.

pageToken string

A token identifying a page of results, if other than the first one. Typically obtained via ListTransferableSkusResponse.next_page_token of the previous CloudChannelService.ListTransferableSkus call. Optional.

authToken string

This token is generated by the Super Admin of the resold customer to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. This token can be omitted once the authorization is generated. See https://support.google.com/a/answer/7643790 for more details.

languageCode string

The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". Optional.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is Array of TransferableSku. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listTransferableSkusAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listTransferableSkusAsync(request, optionsopt) → {Object}

Equivalent to listTransferableSkus, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
cloudIdentityId string

Customer's Cloud Identity ID

customerName string

A reseller is required to create a customer and use the resource name of the created customer here. The customer_name takes the format: accounts/{account_id}/customers/{customer_id}

parent string

Required. The resource name of the reseller's account. The parent takes the format: accounts/{account_id}

pageSize number

Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. Optional.

pageToken string

A token identifying a page of results, if other than the first one. Typically obtained via ListTransferableSkusResponse.next_page_token of the previous CloudChannelService.ListTransferableSkus call. Optional.

authToken string

This token is generated by the Super Admin of the resold customer to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. This token can be omitted once the authorization is generated. See https://support.google.com/a/answer/7643790 for more details.

languageCode string

The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". Optional.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing TransferableSku. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example
const iterable = client.listTransferableSkusAsync(request);
for await (const response of iterable) {
  // process response
}

listTransferableSkusStream(request, optionsopt) → {Stream}

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
cloudIdentityId string

Customer's Cloud Identity ID

customerName string

A reseller is required to create a customer and use the resource name of the created customer here. The customer_name takes the format: accounts/{account_id}/customers/{customer_id}

parent string

Required. The resource name of the reseller's account. The parent takes the format: accounts/{account_id}

pageSize number

Requested page size. Server might return fewer results than requested. If unspecified, at most 100 SKUs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. Optional.

pageToken string

A token identifying a page of results, if other than the first one. Typically obtained via ListTransferableSkusResponse.next_page_token of the previous CloudChannelService.ListTransferableSkus call. Optional.

authToken string

This token is generated by the Super Admin of the resold customer to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. This token can be omitted once the authorization is generated. See https://support.google.com/a/answer/7643790 for more details.

languageCode string

The BCP-47 language code, such as "en-US". If specified, the response will be localized to the corresponding language code. Default is "en-US". Optional.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing TransferableSku on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listTransferableSkusAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

matchAccountFromCustomerName(customerName) → {string}

Parse the account from Customer resource.

Parameters:
Name Type Description
customerName string

A fully-qualified path representing Customer resource.

Returns:
Type Description
string

A string representing the account.

matchAccountFromEntitlementName(entitlementName) → {string}

Parse the account from Entitlement resource.

Parameters:
Name Type Description
entitlementName string

A fully-qualified path representing Entitlement resource.

Returns:
Type Description
string

A string representing the account.

matchAccountFromOfferName(offerName) → {string}

Parse the account from Offer resource.

Parameters:
Name Type Description
offerName string

A fully-qualified path representing Offer resource.

Returns:
Type Description
string

A string representing the account.

matchCustomerFromCustomerName(customerName) → {string}

Parse the customer from Customer resource.

Parameters:
Name Type Description
customerName string

A fully-qualified path representing Customer resource.

Returns:
Type Description
string

A string representing the customer.

matchCustomerFromEntitlementName(entitlementName) → {string}

Parse the customer from Entitlement resource.

Parameters:
Name Type Description
entitlementName string

A fully-qualified path representing Entitlement resource.

Returns:
Type Description
string

A string representing the customer.

matchEntitlementFromEntitlementName(entitlementName) → {string}

Parse the entitlement from Entitlement resource.

Parameters:
Name Type Description
entitlementName string

A fully-qualified path representing Entitlement resource.

Returns:
Type Description
string

A string representing the entitlement.

matchOfferFromOfferName(offerName) → {string}

Parse the offer from Offer resource.

Parameters:
Name Type Description
offerName string

A fully-qualified path representing Offer resource.

Returns:
Type Description
string

A string representing the offer.

matchProductFromProductName(productName) → {string}

Parse the product from Product resource.

Parameters:
Name Type Description
productName string

A fully-qualified path representing Product resource.

Returns:
Type Description
string

A string representing the product.

matchProductFromSkuName(skuName) → {string}

Parse the product from Sku resource.

Parameters:
Name Type Description
skuName string

A fully-qualified path representing Sku resource.

Returns:
Type Description
string

A string representing the product.

matchSkuFromSkuName(skuName) → {string}

Parse the sku from Sku resource.

Parameters:
Name Type Description
skuName string

A fully-qualified path representing Sku resource.

Returns:
Type Description
string

A string representing the sku.

offerPath(account, offer) → {string}

Return a fully-qualified offer resource name string.

Parameters:
Name Type Description
account string
offer string
Returns:
Type Description
string

Resource name string.

productPath(product) → {string}

Return a fully-qualified product resource name string.

Parameters:
Name Type Description
product string
Returns:
Type Description
string

Resource name string.

provisionCloudIdentity(request, optionsopt) → {Promise}

Creates a Cloud Identity for the given customer using the customer's information or the information provided here, if present.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • NOT_FOUND: If the customer is not found for the reseller.
  • ALREADY_EXISTS: If the customer's primary email already exists. In this case, retry after changing the customer's primary contact email.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support in this case.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support in this case.

Return Value:
Long Running Operation ID.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
customer string

Required. Resource name of the customer. Format: accounts/{account_id}/customers/{customer_id}

cloudIdentityInfo google.cloud.channel.v1.CloudIdentityInfo

CloudIdentity-specific customer information.

user google.cloud.channel.v1.AdminUser

Admin user information.

validateOnly boolean

If set, validate the request and preview the review, but do not actually post it.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.provisionCloudIdentity(request);
const [response] = await operation.promise();

skuPath(product, sku) → {string}

Return a fully-qualified sku resource name string.

Parameters:
Name Type Description
product string
sku string
Returns:
Type Description
string

Resource name string.

startPaidService(request, optionsopt) → {Promise}

Starts paid service for a trial entitlement.

Starts paid service for a trial entitlement immediately. This method is only applicable if a plan has already been set up for a trial entitlement but has some trial days remaining.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • NOT_FOUND: Entitlement resource not found.
  • FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans.
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.

Return Value:
Long Running Operation ID.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
name string

Required. The name of the entitlement for which paid service is being started. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}

requestId string <optional>

Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where 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 the original operation with the same request ID was received, and if so, 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).

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.startPaidService(request);
const [response] = await operation.promise();

suspendEntitlement(request, optionsopt) → {Promise}

Suspends a previously fulfilled entitlement. An entitlement suspension is a long-running operation.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • NOT_FOUND: Entitlement resource not found.
  • NOT_ACTIVE: Entitlement is not active.
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.

Return Value:
Long Running Operation ID.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
name string

Required. The resource name of the entitlement to suspend. The name takes the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}

requestId string <optional>

Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where 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 the original operation with the same request ID was received, and if so, 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).

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.suspendEntitlement(request);
const [response] = await operation.promise();

transferEntitlements(request, optionsopt) → {Promise}

Transfers customer entitlements to new reseller.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • NOT_FOUND: If the customer or offer resource is not found for the reseller.
  • ALREADY_EXISTS: If the SKU has been already transferred for the customer.
  • CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following cases:
    • Transferring a SKU that requires domain verification and the domain has not been verified.
    • Transferring an Add-On SKU like Vault or Drive without transferring the pre-requisite SKU, such as G Suite Basic
    • Applicable only for developer accounts: reseller and resold domain must follow the domain naming convention as follows:
      • Domain names must start with goog-test.
      • Resold domain names must include the reseller domain.
    • All transferring entitlements must be specified.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case.

Return Value:
Long Running Operation ID.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of OperationMetadata.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of reseller's customer account where the entitlements transfer to. The parent takes the format: accounts/{account_id}/customers/{customer_id}

entitlements Array.<number>

Required. The new entitlements to be created or transferred.

authToken string

This token is generated by the Super Admin of the resold customer to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. This token can be omitted once the authorization is generated. See https://support.google.com/a/answer/7643790 for more details.

requestId string <optional>

Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where 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 the original operation with the same request ID was received, and if so, 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).

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.transferEntitlements(request);
const [response] = await operation.promise();

transferEntitlementsToGoogle(request, optionsopt) → {Promise}

Transfers customer entitlements from current reseller to Google.

Possible Error Codes:

  • PERMISSION_DENIED: If the customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • NOT_FOUND: If the customer or offer resource is not found for the reseller.
  • ALREADY_EXISTS: If the SKU has been already transferred for the customer.
  • CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following cases:
    • Transferring a SKU that requires domain verification and the domain has not been verified.
    • Transferring an Add-On SKU like Vault or Drive without purchasing the pre-requisite SKU, such as G Suite Basic
    • Applicable only for developer accounts: reseller and resold domain must follow the domain naming convention as follows:
      • Domain names must start with goog-test.
      • Resold domain names must include the reseller domain.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Please contact Cloud Channel Support in this case.

Return Value:
Long Running Operation ID.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of OperationMetadata.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
parent string

Required. The resource name of reseller's customer account where the entitlements transfer from. The parent takes the format: accounts/{account_id}/customers/{customer_id}

entitlements Array.<number>

Required. The entitlements to be transferred to Google.

requestId string <optional>

Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.

For example, consider a situation where 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 the original operation with the same request ID was received, and if so, 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).

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.
Example
const [operation] = await client.transferEntitlementsToGoogle(request);
const [response] = await operation.promise();

Updates a channel partner link. A distributor calls this method to change a link's status. For example, suspend a partner link. To call this method, you must be a distributor.

Possible Error Codes:

  • PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
  • INVALID_ARGUMENT:
    • Missing or invalid required parameters in the request.
    • Updating link state from invited to active or suspended.
    • Sending reseller_cloud_identity_id, invite_url or name in update mask.
  • NOT_FOUND: ChannelPartnerLink resource not found.
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.

Return Value:
If successful, the updated ChannelPartnerLink resource, otherwise returns an error.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

Required. The resource name of the channel partner link to cancel. The name takes the format: accounts/{account_id}/channelPartnerLinks/{id} where {id} is the Cloud Identity ID of the partner.

channelPartnerLink google.cloud.channel.v1.ChannelPartnerLink

Required. The channel partner link to update. Only field channel_partner_link.link_state is allowed to be updated.

updateMask google.protobuf.FieldMask

Required. The update mask that applies to the resource. The only allowable value for update mask is channel_partner_link.link_state.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing ChannelPartnerLink. Please see the documentation for more details and examples.
const [response] = await client.updateChannelPartnerLink(request);

updateCustomer(request, optionsopt) → {Promise}

Updates an existing Customer resource belonging to the reseller or distributor.

Possible Error Codes:

  • PERMISSION_DENIED: If the reseller account making the request and the reseller account being queried for are different.
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request.
  • NOT_FOUND: No Customer resource found for the name specified in the request.

Return Value:
If successful, the updated Customer resource, otherwise returns an error.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
customer google.cloud.channel.v1.Customer

Required. New contents of the customer.

updateMask google.protobuf.FieldMask

The update mask that applies to the resource. Optional.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing Customer. Please see the documentation for more details and examples.
Example
const [response] = await client.updateCustomer(request);