CloudChannelServiceClient

CloudChannelServiceClient

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

Using this service:

  1. Resellers and distributors can manage a customer entity.
  2. Distributors can register an authorized reseller in their channel and provide them with delegated admin access.
  3. Resellers and distributors can manage customer entitlements.

CloudChannelService exposes the following resources:

  • Customers: An entity—usually an enterprise—managed by a reseller or distributor.

  • Entitlements: An entity that provides a customer with the means to use a service. Entitlements are created or updated as a result of a successful fulfillment.

  • ChannelPartnerLinks: 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. Entitlements suspended for pending ToS acceptance can't be activated using this method.

An entitlement activation is a long-running operation and it updates the state of the customer entitlement.

Possible error codes:

  • PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • NOT_FOUND: Entitlement resource not found.
  • SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated suspensions and entitlements that have accepted the TOS.
  • NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE state.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

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

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. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}

requestId string <optional>

Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete.

For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

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: The reseller account making the request is different from the reseller account in the API request.
  • FAILED_PRECONDITION: There are Google Cloud projects linked to the Google Cloud entitlement's Cloud Billing subaccount.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • 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. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The 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. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}

requestId string <optional>

Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete.

For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

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 it updates the entitlement as a result of fulfillment.

Possible error codes:

  • PERMISSION_DENIED: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • NOT_FOUND: Offer or Entitlement resource not found.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

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

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 update. Name uses the 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. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete.

For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

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 update is a long-running operation and it updates the entitlement as a result of fulfillment.

Possible error codes:

  • PERMISSION_DENIED: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid. For example, the number of seats being changed is greater than the allowed number of max seats, 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. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

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

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. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}

parameters Array.<number>

Required. Entitlement parameters to update. You can only change editable parameters.

requestId string <optional>

Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete.

For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

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 it updates the entitlement as a result of fulfillment.

Possible error codes:

  • PERMISSION_DENIED: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • NOT_FOUND: Entitlement resource not found.
  • NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't enable or disable renewals for non-commitment plans.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

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

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. Name uses 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. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete.

For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

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 if the Cloud Identity accounts are owned by the reseller.

Possible error codes:

  • PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • INVALID_VALUE: Invalid domain value in the request.

Return value: A list of CloudIdentityCustomerAccount resources for the domain (may be empty)

Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if no CloudIdentityCustomerAccount resources match the domain.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The reseller account's resource name. Parent uses the format: accounts/{account_id}

domain string

Required. Domain to fetch for Cloud Identity account customer.

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. Invited partners need to follow the invite_link_uri provided in the response to accept. After accepting the invitation, a link is set up between the two parties. You must be a distributor to call this method.

Possible error codes:

  • PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • ALREADY_EXISTS: The ChannelPartnerLink sent in the request already exists.
  • NOT_FOUND: No Cloud Identity customer exists for provided domain.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The new ChannelPartnerLink resource.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. Create a channel partner link for the provided reseller account's resource name. Parent uses 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.

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: The reseller account making the request is different from the reseller account in the API request.
  • INVALID_ARGUMENT:
    • Required request parameters are missing or invalid.
    • Domain field value doesn't match the primary email domain.

Return value: The newly created Customer resource.

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. Parent uses 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: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT:
    • Required request parameters are missing or invalid.
    • There is already a customer entitlement for a SKU from the same product family.
  • INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support for further troubleshooting.
  • NOT_FOUND: The customer or offer resource was not found.
  • ALREADY_EXISTS:
    • The SKU was already purchased for the customer.
    • The customer's primary email already exists. Retry after changing the customer's primary contact email.
  • CONDITION_NOT_MET or FAILED_PRECONDITION:
    • The domain required for purchasing a SKU has not been verified.
    • A pre-requisite SKU required to purchase an Add-On SKU is missing. For example, Google Workspace Business Starter is required to purchase Vault or Drive.
    • (Developer accounts only) Reseller and resold domain must meet the following naming requirements:
      • Domain names must start with goog-test.
      • Domain names must include the reseller domain.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

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

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 in which to create the entitlement. Parent uses the format: accounts/{account_id}/customers/{customer_id}

entitlement google.cloud.channel.v1.Entitlement

Required. The entitlement to create.

requestId string <optional>

Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete.

For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

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.

Possible error codes:

  • PERMISSION_DENIED: The account making the request does not own this customer.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • FAILED_PRECONDITION: The customer has existing entitlements.
  • NOT_FOUND: No Customer resource found for the name 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 the requested ChannelPartnerLink resource. You must be a distributor to call this method.

Possible error codes:

  • PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • NOT_FOUND: ChannelPartnerLink resource not found because of an invalid channel partner link name.

Return value: The ChannelPartnerLink resource.

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. Name uses 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 the requested Customer resource.

Possible error codes:

  • PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name parameter.

Return value: The Customer resource.

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. Name uses 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 the requested Entitlement resource.

Possible error codes:

  • PERMISSION_DENIED: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • NOT_FOUND: The customer entitlement was not found.

Return value: The requested Entitlement resource.

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. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_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. You must be a distributor to call this method.

Possible error codes:

  • PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: The list of the distributor account's ChannelPartnerLink resources.

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. Parent uses 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; the server will coerce values above 200.

pageToken string <optional>

Optional. A token for a page of results other than the first page. Obtained using 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. Parent uses 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; the server will coerce values above 200.

pageToken string <optional>

Optional. A token for a page of results other than the first page. Obtained using 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. Parent uses 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; the server will coerce values above 200.

pageToken string <optional>

Optional. A token for a page of results other than the first page. Obtained using 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 Customers.

Possible error codes:

  • PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: List of Customers, or an empty list if there are no customers.

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 to list customers from. Parent uses 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, returns at most 10 customers. The maximum value is 50.

pageToken string <optional>

Optional. A token identifying a page of results other than the first page. Obtained through 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 to list customers from. Parent uses 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, returns at most 10 customers. The maximum value is 50.

pageToken string <optional>

Optional. A token identifying a page of results other than the first page. Obtained through 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 to list customers from. Parent uses 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, returns at most 10 customers. The maximum value is 50.

pageToken string <optional>

Optional. A token identifying a page of results other than the first page. Obtained through 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}

Lists Entitlements belonging to a customer.

Possible error codes:

  • PERMISSION_DENIED: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: A list of the customer's Entitlements.

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 to list entitlements for. Parent uses the format: accounts/{account_id}/customers/{customer_id}

pageSize number <optional>

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

pageToken string <optional>

Optional. A token for a page of results other than the first page. Obtained using 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 to list entitlements for. Parent uses the format: accounts/{account_id}/customers/{customer_id}

pageSize number <optional>

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

pageToken string <optional>

Optional. A token for a page of results other than the first page. Obtained using 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 to list entitlements for. Parent uses the format: accounts/{account_id}/customers/{customer_id}

pageSize number <optional>

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

pageToken string <optional>

Optional. A token for a page of results other than the first page. Obtained using 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: Required request parameters are missing or invalid.
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. Parent uses the format: accounts/{account_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 500 Offers. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page.

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. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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. Parent uses the format: accounts/{account_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 500 Offers. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page.

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. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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. Parent uses the format: accounts/{account_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 500 Offers. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page.

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. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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: Required request parameters are missing or invalid.
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, returns at most 100 Products. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page.

languageCode string <optional>

Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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, returns at most 100 Products. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page.

languageCode string <optional>

Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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, returns at most 100 Products. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page.

languageCode string <optional>

Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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 following:

  • Offers that you can purchase for a customer.
  • Offers that you can change for an entitlement.

Possible error codes:

  • PERMISSION_DENIED: The customer doesn't belong to the reseller
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
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 to list Offers for. Format: accounts/{account_id}/customers/{customer_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 Offers. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page.

languageCode string <optional>

Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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 to list Offers for. Format: accounts/{account_id}/customers/{customer_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 Offers. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page.

languageCode string <optional>

Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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 to list Offers for. Format: accounts/{account_id}/customers/{customer_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 Offers. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page.

languageCode string <optional>

Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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 following:

  • SKUs that you can purchase for a customer
  • SKUs that you can upgrade or downgrade for an entitlement.

Possible error codes:

  • PERMISSION_DENIED: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
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 to list SKUs for. Format: accounts/{account_id}/customers/{customer_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page.

languageCode string <optional>

Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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 to list SKUs for. Format: accounts/{account_id}/customers/{customer_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page.

languageCode string <optional>

Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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 to list SKUs for. Format: accounts/{account_id}/customers/{customer_id}.

pageSize number <optional>

Optional. Requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page.

languageCode string <optional>

Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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: Required request parameters are missing or invalid.
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 to list SKUs for. Parent uses 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, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page. Optional.

languageCode string <optional>

Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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 to list SKUs for. Parent uses 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, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page. Optional.

languageCode string <optional>

Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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 to list SKUs for. Parent uses 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, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A token for a page of results other than the first page. Optional.

languageCode string <optional>

Optional. The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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.

listSubscribers(request, optionsopt) → {Promise}

Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account.

Possible error codes:

  • PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • NOT_FOUND: The topic resource doesn't exist.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: A list of service email addresses.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
account string

Required. Resource name of the account.

pageSize number <optional>

Optional. The maximum number of service accounts to return. The service may return fewer than this value. If unspecified, returns at most 100 service accounts. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A page token, received from a previous ListSubscribers call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListSubscribers must match the call that provided the page token.

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 string. 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 listSubscribersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSubscribersAsync(request, optionsopt) → {Object}

Equivalent to listSubscribers, 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. Resource name of the account.

pageSize number <optional>

Optional. The maximum number of service accounts to return. The service may return fewer than this value. If unspecified, returns at most 100 service accounts. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A page token, received from a previous ListSubscribers call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListSubscribers must match the call that provided the page token.

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 string. 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.listSubscribersAsync(request);
for await (const response of iterable) {
  // process response
}

listSubscribersStream(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. Resource name of the account.

pageSize number <optional>

Optional. The maximum number of service accounts to return. The service may return fewer than this value. If unspecified, returns at most 100 service accounts. The maximum value is 1000; the server will coerce values above 1000.

pageToken string <optional>

Optional. A page token, received from a previous ListSubscribers call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListSubscribers must match the call that provided the page token.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing string 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 listSubscribersAsync() 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.

Use this method when a reseller gets the entitlement information of an unowned customer. The reseller should provide the customer's Cloud Identity ID or Customer Name.

Possible error codes:

  • PERMISSION_DENIED:
    • The customer doesn't belong to the reseller and has no auth token.
    • The supplied auth token is invalid.
    • The reseller account making the request is different from the reseller account in the query.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.

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 that 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, returns at most 100 offers. The maximum value is 1000; the server will coerce values above 1000.

pageToken string

A token for a page of results other than the first page. Obtained using ListTransferableOffersResponse.next_page_token of the previous CloudChannelService.ListTransferableOffers call.

sku string

Required. The SKU to look up Offers for.

languageCode string

The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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 that 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, returns at most 100 offers. The maximum value is 1000; the server will coerce values above 1000.

pageToken string

A token for a page of results other than the first page. Obtained using ListTransferableOffersResponse.next_page_token of the previous CloudChannelService.ListTransferableOffers call.

sku string

Required. The SKU to look up Offers for.

languageCode string

The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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 that 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, returns at most 100 offers. The maximum value is 1000; the server will coerce values above 1000.

pageToken string

A token for a page of results other than the first page. Obtained using ListTransferableOffersResponse.next_page_token of the previous CloudChannelService.ListTransferableOffers call.

sku string

Required. The SKU to look up Offers for.

languageCode string

The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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 the Cloud Identity ID or Customer Name in the request.

Use this method to list the entitlements information of an unowned customer. You should provide the customer's Cloud Identity ID or Customer Name.

Possible error codes:

  • PERMISSION_DENIED:
    • The customer doesn't belong to the reseller and has no auth token.
    • The supplied auth token is invalid.
    • The reseller account making the request is different from the reseller account in the query.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: A list of the customer's TransferableSku.

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. Customer_name uses the format: accounts/{account_id}/customers/{customer_id}

parent string

Required. The reseller account's resource name. Parent uses the format: accounts/{account_id}

pageSize number

The requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000. Optional.

pageToken string

A token for a page of results other than the first page. Obtained using ListTransferableSkusResponse.next_page_token of the previous CloudChannelService.ListTransferableSkus call. Optional.

authToken string

The super admin of the resold customer generates this token to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. You can omit this token after authorization. See https://support.google.com/a/answer/7643790 for more details.

languageCode string

The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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. Customer_name uses the format: accounts/{account_id}/customers/{customer_id}

parent string

Required. The reseller account's resource name. Parent uses the format: accounts/{account_id}

pageSize number

The requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000. Optional.

pageToken string

A token for a page of results other than the first page. Obtained using ListTransferableSkusResponse.next_page_token of the previous CloudChannelService.ListTransferableSkus call. Optional.

authToken string

The super admin of the resold customer generates this token to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. You can omit this token after authorization. See https://support.google.com/a/answer/7643790 for more details.

languageCode string

The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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. Customer_name uses the format: accounts/{account_id}/customers/{customer_id}

parent string

Required. The reseller account's resource name. Parent uses the format: accounts/{account_id}

pageSize number

The requested page size. Server might return fewer results than requested. If unspecified, returns at most 100 SKUs. The maximum value is 1000; the server will coerce values above 1000. Optional.

pageToken string

A token for a page of results other than the first page. Obtained using ListTransferableSkusResponse.next_page_token of the previous CloudChannelService.ListTransferableSkus call. Optional.

authToken string

The super admin of the resold customer generates this token to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. You can omit this token after authorization. See https://support.google.com/a/answer/7643790 for more details.

languageCode string

The BCP-47 language code. For example, "en-US". The response will localize in the corresponding language code, if specified. The default value 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.

lookupOffer(request, optionsopt) → {Promise}

Returns the requested Offer resource.

Possible error codes:

  • PERMISSION_DENIED: The entitlement doesn't belong to the reseller.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • NOT_FOUND: Entitlement or offer was not found.

Return value: The Offer resource.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
entitlement string

Required. The resource name of the entitlement to retrieve the Offer. Entitlement uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_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 Offer. Please see the documentation for more details and examples.
Example
const [response] = await client.lookupOffer(request);

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.

Possible error codes:

  • PERMISSION_DENIED: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • NOT_FOUND: The customer was not found.
  • ALREADY_EXISTS: The customer's primary email already exists. 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.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains 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

Validate the request and preview the review, but do not 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();

registerSubscriber(request, optionsopt) → {Promise}

Registers a service account with subscriber privileges on the Cloud Pub/Sub topic for this Channel Services account. After you create a subscriber, you get the events through SubscriberEvent

Possible error codes:

  • PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The topic name with the registered service email address.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
account string

Required. Resource name of the account.

serviceAccount string

Required. Service account that provides subscriber access to the registered topic.

options object <optional>

Call options. See CallOptions for more details.

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

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 is set up for a trial entitlement but has some trial days remaining.

Possible error codes:

  • PERMISSION_DENIED: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • 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. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

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

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 start a paid service for. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}

requestId string <optional>

Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete.

For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

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: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • 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. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

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

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. Name uses the format: accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}

requestId string <optional>

Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete.

For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

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: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • NOT_FOUND: The customer or offer resource was not found.
  • ALREADY_EXISTS: The SKU was already transferred for the customer.
  • CONDITION_NOT_MET or FAILED_PRECONDITION:
    • The SKU requires domain verification to transfer, but the domain is not verified.
    • An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic).
    • (Developer accounts only) Reseller and resold domain must meet the following naming requirements:
      • Domain names must start with goog-test.
      • Domain names must include the reseller domain.
    • Specify all transferring entitlements.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

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

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 that will receive transferred entitlements. Parent uses the format: accounts/{account_id}/customers/{customer_id}

entitlements Array.<number>

Required. The new entitlements to create or transfer.

authToken string

The super admin of the resold customer generates this token to authorize a reseller to access their Cloud Identity and purchase entitlements on their behalf. You can omit this token after authorization. See https://support.google.com/a/answer/7643790 for more details.

requestId string <optional>

Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete.

For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

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 their current reseller to Google.

Possible error codes:

  • PERMISSION_DENIED: The customer doesn't belong to the reseller.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • NOT_FOUND: The customer or offer resource was not found.
  • ALREADY_EXISTS: The SKU was already transferred for the customer.
  • CONDITION_NOT_MET or FAILED_PRECONDITION:
    • The SKU requires domain verification to transfer, but the domain is not verified.
    • An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic).
    • (Developer accounts only) Reseller and resold domain must meet the following naming requirements:
      • Domain names must start with goog-test.
      • Domain names must include the reseller domain.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The 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 the reseller's customer account where the entitlements transfer from. Parent uses the format: accounts/{account_id}/customers/{customer_id}

entitlements Array.<number>

Required. The entitlements to transfer to Google.

requestId string <optional>

Optional. You can specify an optional unique request ID, and if you need to retry your request, the server will know to ignore the request if it's complete.

For example, you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if it received the original operation with the same request ID. If it did, it will ignore the second request.

The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

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();

unregisterSubscriber(request, optionsopt) → {Promise}

Unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. If there are no service accounts left with subscriber privileges, this deletes the topic. You can call ListSubscribers to check for these accounts.

Possible error codes:

  • PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • NOT_FOUND: The topic resource doesn't exist.
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The topic name that unregistered the service email address. Returns a success response if the service email address wasn't registered with the topic.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
account string

Required. Resource name of the account.

serviceAccount string

Required. Service account to unregister from subscriber access to the topic.

options object <optional>

Call options. See CallOptions for more details.

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

Updates a channel partner link. Distributors call this method to change a link's status. For example, to suspend a partner link. You must be a distributor to call this method.

Possible error codes:

  • PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
  • INVALID_ARGUMENT:
    • Required request parameters are missing or invalid.
    • Link state cannot change from invited to active or suspended.
    • Cannot send 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. Contact Cloud Channel support.
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The updated ChannelPartnerLink resource.

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. Name uses 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 channel_partner_link.link_state is allowed for updates.

updateMask google.protobuf.FieldMask

Required. The update mask that applies to the resource. The only allowable value for an 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 for the reseller or distributor.

Possible error codes:

  • PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request.
  • INVALID_ARGUMENT: Required request parameters are missing or invalid.
  • NOT_FOUND: No Customer resource found for the name in the request.

Return value: The updated Customer resource.

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);