Class v1.CloudChannelServiceClient (3.2.1)

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.

  • s: 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. v1

Package

@google-cloud/channel

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of CloudChannelServiceClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new CloudChannelServiceClient({fallback: true}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

cloudChannelServiceStub

cloudChannelServiceStub?: Promise<{
        [name: string]: Function;
    }>;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

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

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

activateEntitlement(request, options)

activateEntitlement(request?: protos.google.cloud.channel.v1.IActivateEntitlementRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

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 .

Parameters
NameDescription
request IActivateEntitlementRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to activate.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callActivateEntitlement() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.activateEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callActivateEntitlement();

activateEntitlement(request, options, callback)

activateEntitlement(request: protos.google.cloud.channel.v1.IActivateEntitlementRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IActivateEntitlementRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

activateEntitlement(request, callback)

activateEntitlement(request: protos.google.cloud.channel.v1.IActivateEntitlementRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IActivateEntitlementRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

billingAccountPath(account, billingAccount)

billingAccountPath(account: string, billingAccount: string): string;

Return a fully-qualified billingAccount resource name string.

Parameters
NameDescription
account string
billingAccount string
Returns
TypeDescription
string

{string} Resource name string.

cancelEntitlement(request, options)

cancelEntitlement(request?: protos.google.cloud.channel.v1.ICancelEntitlementRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

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 .

Parameters
NameDescription
request ICancelEntitlementRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to cancel.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCancelEntitlement() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.cancelEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCancelEntitlement();

cancelEntitlement(request, options, callback)

cancelEntitlement(request: protos.google.cloud.channel.v1.ICancelEntitlementRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICancelEntitlementRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

cancelEntitlement(request, callback)

cancelEntitlement(request: protos.google.cloud.channel.v1.ICancelEntitlementRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICancelEntitlementRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

cancelOperation(request, options, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.

Parameters
NameDescription
request CancelOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});

changeOffer(request, options)

changeOffer(request?: protos.google.cloud.channel.v1.IChangeOfferRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

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 .

Parameters
NameDescription
request IChangeOfferRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to update.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Required. New Offer.
   *  Format: accounts/{account_id}/offers/{offer_id}.
   */
  // const offer = 'abc123'
  /**
   *  Optional. Parameters needed to purchase the Offer. To view the available
   *  Parameters refer to the
   *  Offer.parameter_definitions google.cloud.channel.v1.Offer.parameter_definitions 
   *  from the desired offer.
   */
  // const parameters = [1,2,3,4]
  /**
   *  Optional. Purchase order id provided by the reseller.
   */
  // const purchaseOrderId = 'abc123'
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. The billing account resource name that is used to pay for this
   *  entitlement when setting up billing on a trial subscription.
   *  This field is only relevant for multi-currency accounts. It should be
   *  left empty for single currency accounts.
   */
  // const billingAccount = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callChangeOffer() {
    // Construct request
    const request = {
      name,
      offer,
    };

    // Run request
    const [operation] = await channelClient.changeOffer(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callChangeOffer();

changeOffer(request, options, callback)

changeOffer(request: protos.google.cloud.channel.v1.IChangeOfferRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IChangeOfferRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

changeOffer(request, callback)

changeOffer(request: protos.google.cloud.channel.v1.IChangeOfferRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IChangeOfferRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

changeParameters(request, options)

changeParameters(request?: protos.google.cloud.channel.v1.IChangeParametersRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

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 .

Parameters
NameDescription
request IChangeParametersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the entitlement to update.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Required. Entitlement parameters to update. You can only change editable
   *  parameters.
   *  To view the available Parameters for a request, refer to the
   *  Offer.parameter_definitions google.cloud.channel.v1.Offer.parameter_definitions 
   *  from the desired offer.
   */
  // const parameters = [1,2,3,4]
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. Purchase order ID provided by the reseller.
   */
  // const purchaseOrderId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callChangeParameters() {
    // Construct request
    const request = {
      name,
      parameters,
    };

    // Run request
    const [operation] = await channelClient.changeParameters(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callChangeParameters();

changeParameters(request, options, callback)

changeParameters(request: protos.google.cloud.channel.v1.IChangeParametersRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IChangeParametersRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

changeParameters(request, callback)

changeParameters(request: protos.google.cloud.channel.v1.IChangeParametersRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IChangeParametersRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

changeRenewalSettings(request, options)

changeRenewalSettings(request?: protos.google.cloud.channel.v1.IChangeRenewalSettingsRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

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 .

Parameters
NameDescription
request IChangeRenewalSettingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the entitlement to update.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Required. New renewal settings.
   */
  // const renewalSettings = {}
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callChangeRenewalSettings() {
    // Construct request
    const request = {
      name,
      renewalSettings,
    };

    // Run request
    const [operation] = await channelClient.changeRenewalSettings(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callChangeRenewalSettings();

changeRenewalSettings(request, options, callback)

changeRenewalSettings(request: protos.google.cloud.channel.v1.IChangeRenewalSettingsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IChangeRenewalSettingsRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

changeRenewalSettings(request, callback)

changeRenewalSettings(request: protos.google.cloud.channel.v1.IChangeRenewalSettingsRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IChangeRenewalSettingsRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

channelPartnerLinkPath(account, channelPartnerLink)

channelPartnerLinkPath(account: string, channelPartnerLink: string): string;

Return a fully-qualified channelPartnerLink resource name string.

Parameters
NameDescription
account string
channelPartnerLink string
Returns
TypeDescription
string

{string} Resource name string.

channelPartnerRepricingConfigPath(account, channelPartner, channelPartnerRepricingConfig)

channelPartnerRepricingConfigPath(account: string, channelPartner: string, channelPartnerRepricingConfig: string): string;

Return a fully-qualified channelPartnerRepricingConfig resource name string.

Parameters
NameDescription
account string
channelPartner string
channelPartnerRepricingConfig string
Returns
TypeDescription
string

{string} Resource name string.

checkActivateEntitlementProgress(name)

checkActivateEntitlementProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to activate.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callActivateEntitlement() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.activateEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callActivateEntitlement();

checkCancelEntitlementProgress(name)

checkCancelEntitlementProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.channel.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.channel.v1.OperationMetadata>>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to cancel.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCancelEntitlement() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.cancelEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCancelEntitlement();

checkChangeOfferProgress(name)

checkChangeOfferProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to update.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Required. New Offer.
   *  Format: accounts/{account_id}/offers/{offer_id}.
   */
  // const offer = 'abc123'
  /**
   *  Optional. Parameters needed to purchase the Offer. To view the available
   *  Parameters refer to the
   *  Offer.parameter_definitions google.cloud.channel.v1.Offer.parameter_definitions 
   *  from the desired offer.
   */
  // const parameters = [1,2,3,4]
  /**
   *  Optional. Purchase order id provided by the reseller.
   */
  // const purchaseOrderId = 'abc123'
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. The billing account resource name that is used to pay for this
   *  entitlement when setting up billing on a trial subscription.
   *  This field is only relevant for multi-currency accounts. It should be
   *  left empty for single currency accounts.
   */
  // const billingAccount = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callChangeOffer() {
    // Construct request
    const request = {
      name,
      offer,
    };

    // Run request
    const [operation] = await channelClient.changeOffer(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callChangeOffer();

checkChangeParametersProgress(name)

checkChangeParametersProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the entitlement to update.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Required. Entitlement parameters to update. You can only change editable
   *  parameters.
   *  To view the available Parameters for a request, refer to the
   *  Offer.parameter_definitions google.cloud.channel.v1.Offer.parameter_definitions 
   *  from the desired offer.
   */
  // const parameters = [1,2,3,4]
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. Purchase order ID provided by the reseller.
   */
  // const purchaseOrderId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callChangeParameters() {
    // Construct request
    const request = {
      name,
      parameters,
    };

    // Run request
    const [operation] = await channelClient.changeParameters(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callChangeParameters();

checkChangeRenewalSettingsProgress(name)

checkChangeRenewalSettingsProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the entitlement to update.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Required. New renewal settings.
   */
  // const renewalSettings = {}
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callChangeRenewalSettings() {
    // Construct request
    const request = {
      name,
      renewalSettings,
    };

    // Run request
    const [operation] = await channelClient.changeRenewalSettings(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callChangeRenewalSettings();

checkCloudIdentityAccountsExist(request, options)

checkCloudIdentityAccountsExist(request?: protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistResponse,
        (protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest | undefined),
        {} | undefined
    ]>;

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
NameDescription
request ICheckCloudIdentityAccountsExistRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistResponse, (protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing CheckCloudIdentityAccountsExistResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The reseller account's resource name.
   *  Parent uses the format: accounts/{account_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. Domain to fetch for Cloud Identity account customer.
   */
  // const domain = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCheckCloudIdentityAccountsExist() {
    // Construct request
    const request = {
      parent,
      domain,
    };

    // Run request
    const response = await channelClient.checkCloudIdentityAccountsExist(request);
    console.log(response);
  }

  callCheckCloudIdentityAccountsExist();

checkCloudIdentityAccountsExist(request, options, callback)

checkCloudIdentityAccountsExist(request: protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistResponse, protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICheckCloudIdentityAccountsExistRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistResponse, protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

checkCloudIdentityAccountsExist(request, callback)

checkCloudIdentityAccountsExist(request: protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest, callback: Callback<protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistResponse, protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICheckCloudIdentityAccountsExistRequest
callback Callback<protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistResponse, protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

checkCreateEntitlementProgress(name)

checkCreateEntitlementProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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}
   */
  // const parent = 'abc123'
  /**
   *  Required. The entitlement to create.
   */
  // const entitlement = {}
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCreateEntitlement() {
    // Construct request
    const request = {
      parent,
      entitlement,
    };

    // Run request
    const [operation] = await channelClient.createEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateEntitlement();

checkProvisionCloudIdentityProgress(name)

checkProvisionCloudIdentityProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Customer, protos.google.cloud.channel.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Customer, protos.google.cloud.channel.v1.OperationMetadata>>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the customer.
   *  Format: accounts/{account_id}/customers/{customer_id}
   */
  // const customer = 'abc123'
  /**
   *  CloudIdentity-specific customer information.
   */
  // const cloudIdentityInfo = {}
  /**
   *  Admin user information.
   */
  // const user = {}
  /**
   *  Validate the request and preview the review, but do not post it.
   */
  // const validateOnly = true

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callProvisionCloudIdentity() {
    // Construct request
    const request = {
      customer,
    };

    // Run request
    const [operation] = await channelClient.provisionCloudIdentity(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callProvisionCloudIdentity();

checkStartPaidServiceProgress(name)

checkStartPaidServiceProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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}
   */
  // const name = 'abc123'
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callStartPaidService() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.startPaidService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callStartPaidService();

checkSuspendEntitlementProgress(name)

checkSuspendEntitlementProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to suspend.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callSuspendEntitlement() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.suspendEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callSuspendEntitlement();

checkTransferEntitlementsProgress(name)

checkTransferEntitlementsProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.TransferEntitlementsResponse, protos.google.cloud.channel.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.TransferEntitlementsResponse, protos.google.cloud.channel.v1.OperationMetadata>>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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}
   */
  // const parent = 'abc123'
  /**
   *  Required. The new entitlements to create or transfer.
   */
  // const entitlements = [1,2,3,4]
  /**
   *  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.
   */
  // const authToken = 'abc123'
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callTransferEntitlements() {
    // Construct request
    const request = {
      parent,
      entitlements,
    };

    // Run request
    const [operation] = await channelClient.transferEntitlements(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callTransferEntitlements();

checkTransferEntitlementsToGoogleProgress(name)

checkTransferEntitlementsToGoogleProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.channel.v1.OperationMetadata>>;

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

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.channel.v1.OperationMetadata>>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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}
   */
  // const parent = 'abc123'
  /**
   *  Required. The entitlements to transfer to Google.
   */
  // const entitlements = [1,2,3,4]
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callTransferEntitlementsToGoogle() {
    // Construct request
    const request = {
      parent,
      entitlements,
    };

    // Run request
    const [operation] = await channelClient.transferEntitlementsToGoogle(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callTransferEntitlementsToGoogle();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

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

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createChannelPartnerLink(request?: protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerLink,
        (protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest | undefined),
        {} | undefined
    ]>;

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
NameDescription
request ICreateChannelPartnerLinkRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerLink, (protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest | undefined), {} | undefined ]>

{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.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Create a channel partner link for the provided reseller account's
   *  resource name.
   *  Parent uses the format: accounts/{account_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The channel partner link to create.
   *  Either channel_partner_link.reseller_cloud_identity_id or domain can be
   *  used to create a link.
   */
  // const channelPartnerLink = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCreateChannelPartnerLink() {
    // Construct request
    const request = {
      parent,
      channelPartnerLink,
    };

    // Run request
    const response = await channelClient.createChannelPartnerLink(request);
    console.log(response);
  }

  callCreateChannelPartnerLink();

createChannelPartnerLink(request: protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateChannelPartnerLinkRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void
createChannelPartnerLink(request: protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateChannelPartnerLinkRequest
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createChannelPartnerRepricingConfig(request, options)

createChannelPartnerRepricingConfig(request?: protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig,
        (protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Creates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific ChannelPartner's bill. You can only create configs if the is a future month. If needed, you can create a config for the current month, with some restrictions.

When creating a config for a future month, make sure there are no existing configs for that .

The following restrictions are for creating configs in the current month.

* This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases. * The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours. * There is a limit of ten configs for any ChannelPartner or , for any . * The contained value must be different from the value used in the current config for a ChannelPartner.

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

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

Parameters
NameDescription
request ICreateChannelPartnerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, (protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ChannelPartnerRepricingConfig. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the ChannelPartner that will receive the
   *  repricing config. Parent uses the format:
   *  accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The ChannelPartnerRepricingConfig object to update.
   */
  // const channelPartnerRepricingConfig = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCreateChannelPartnerRepricingConfig() {
    // Construct request
    const request = {
      parent,
      channelPartnerRepricingConfig,
    };

    // Run request
    const response = await channelClient.createChannelPartnerRepricingConfig(request);
    console.log(response);
  }

  callCreateChannelPartnerRepricingConfig();

createChannelPartnerRepricingConfig(request, options, callback)

createChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateChannelPartnerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createChannelPartnerRepricingConfig(request, callback)

createChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateChannelPartnerRepricingConfigRequest
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCustomer(request, options)

createCustomer(request?: protos.google.cloud.channel.v1.ICreateCustomerRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomer,
        protos.google.cloud.channel.v1.ICreateCustomerRequest | undefined,
        {} | undefined
    ]>;

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. * You are not authorized to create a customer. See https://support.google.com/channelservices/answer/9759265 * 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
NameDescription
request ICreateCustomerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.ICreateCustomerRequest | undefined, {} | undefined ]>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of reseller account in which to create the
   *  customer. Parent uses the format: accounts/{account_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The customer to create.
   */
  // const customer = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCreateCustomer() {
    // Construct request
    const request = {
      parent,
      customer,
    };

    // Run request
    const response = await channelClient.createCustomer(request);
    console.log(response);
  }

  callCreateCustomer();

createCustomer(request, options, callback)

createCustomer(request: protos.google.cloud.channel.v1.ICreateCustomerRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.ICreateCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateCustomerRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.ICreateCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCustomer(request, callback)

createCustomer(request: protos.google.cloud.channel.v1.ICreateCustomerRequest, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.ICreateCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateCustomerRequest
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.ICreateCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCustomerRepricingConfig(request, options)

createCustomerRepricingConfig(request?: protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomerRepricingConfig,
        (protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Creates a CustomerRepricingConfig. Call this method to set modifications for a specific customer's bill. You can only create configs if the is a future month. If needed, you can create a config for the current month, with some restrictions.

When creating a config for a future month, make sure there are no existing configs for that .

The following restrictions are for creating configs in the current month.

* This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases. * The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours. * There is a limit of ten configs for any , for any . * The contained value must be different from the value used in the current config for a .

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

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

Parameters
NameDescription
request ICreateCustomerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomerRepricingConfig, (protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing CustomerRepricingConfig. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the customer that will receive this
   *  repricing config. Parent uses the format:
   *  accounts/{account_id}/customers/{customer_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The CustomerRepricingConfig object to update.
   */
  // const customerRepricingConfig = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCreateCustomerRepricingConfig() {
    // Construct request
    const request = {
      parent,
      customerRepricingConfig,
    };

    // Run request
    const response = await channelClient.createCustomerRepricingConfig(request);
    console.log(response);
  }

  callCreateCustomerRepricingConfig();

createCustomerRepricingConfig(request, options, callback)

createCustomerRepricingConfig(request: protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateCustomerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCustomerRepricingConfig(request, callback)

createCustomerRepricingConfig(request: protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest, callback: Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateCustomerRepricingConfigRequest
callback Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createEntitlement(request, options)

createEntitlement(request?: protos.google.cloud.channel.v1.ICreateEntitlementRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates an entitlement for a customer.

Possible error codes:

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

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

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

Parameters
NameDescription
request ICreateEntitlementRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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}
   */
  // const parent = 'abc123'
  /**
   *  Required. The entitlement to create.
   */
  // const entitlement = {}
  /**
   *  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 (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCreateEntitlement() {
    // Construct request
    const request = {
      parent,
      entitlement,
    };

    // Run request
    const [operation] = await channelClient.createEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateEntitlement();

createEntitlement(request, options, callback)

createEntitlement(request: protos.google.cloud.channel.v1.ICreateEntitlementRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateEntitlementRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createEntitlement(request, callback)

createEntitlement(request: protos.google.cloud.channel.v1.ICreateEntitlementRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request ICreateEntitlementRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

customerPath(account, customer)

customerPath(account: string, customer: string): string;

Return a fully-qualified customer resource name string.

Parameters
NameDescription
account string
customer string
Returns
TypeDescription
string

{string} Resource name string.

customerRepricingConfigPath(account, customer, customerRepricingConfig)

customerRepricingConfigPath(account: string, customer: string, customerRepricingConfig: string): string;

Return a fully-qualified customerRepricingConfig resource name string.

Parameters
NameDescription
account string
customer string
customerRepricingConfig string
Returns
TypeDescription
string

{string} Resource name string.

deleteChannelPartnerRepricingConfig(request, options)

deleteChannelPartnerRepricingConfig(request?: protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Deletes the given ChannelPartnerRepricingConfig permanently. You can only delete configs if their is set to a date after the current month.

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 ChannelPartnerRepricingConfig is active or in the past. * NOT_FOUND: No ChannelPartnerRepricingConfig found for the name in the request.

Parameters
NameDescription
request IDeleteChannelPartnerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, (protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest | undefined), {} | undefined ]>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the channel partner repricing config rule to
   *  delete.
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callDeleteChannelPartnerRepricingConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.deleteChannelPartnerRepricingConfig(request);
    console.log(response);
  }

  callDeleteChannelPartnerRepricingConfig();

deleteChannelPartnerRepricingConfig(request, options, callback)

deleteChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteChannelPartnerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteChannelPartnerRepricingConfig(request, callback)

deleteChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteChannelPartnerRepricingConfigRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCustomer(request, options)

deleteCustomer(request?: protos.google.cloud.channel.v1.IDeleteCustomerRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.cloud.channel.v1.IDeleteCustomerRequest | undefined,
        {} | undefined
    ]>;

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
NameDescription
request IDeleteCustomerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRequest | undefined, {} | undefined ]>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the customer to delete.
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callDeleteCustomer() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.deleteCustomer(request);
    console.log(response);
  }

  callDeleteCustomer();

deleteCustomer(request, options, callback)

deleteCustomer(request: protos.google.cloud.channel.v1.IDeleteCustomerRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteCustomerRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCustomer(request, callback)

deleteCustomer(request: protos.google.cloud.channel.v1.IDeleteCustomerRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteCustomerRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCustomerRepricingConfig(request, options)

deleteCustomerRepricingConfig(request?: protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Deletes the given CustomerRepricingConfig permanently. You can only delete configs if their is set to a date after the current month.

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 CustomerRepricingConfig is active or in the past. * NOT_FOUND: No CustomerRepricingConfig found for the name in the request.

Parameters
NameDescription
request IDeleteCustomerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, (protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest | undefined), {} | undefined ]>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the customer repricing config rule to
   *  delete. Format:
   *  accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callDeleteCustomerRepricingConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.deleteCustomerRepricingConfig(request);
    console.log(response);
  }

  callDeleteCustomerRepricingConfig();

deleteCustomerRepricingConfig(request, options, callback)

deleteCustomerRepricingConfig(request: protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteCustomerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCustomerRepricingConfig(request, callback)

deleteCustomerRepricingConfig(request: protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IDeleteCustomerRepricingConfigRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteOperation(request, options, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
NameDescription
request DeleteOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});

entitlementPath(account, customer, entitlement)

entitlementPath(account: string, customer: string, entitlement: string): string;

Return a fully-qualified entitlement resource name string.

Parameters
NameDescription
account string
customer string
entitlement string
Returns
TypeDescription
string

{string} Resource name string.

getChannelPartnerLink(request?: protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerLink,
        protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest | undefined,
        {} | undefined
    ]>;

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
NameDescription
request IGetChannelPartnerLinkRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest | undefined, {} | undefined ]>

{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.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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.
   */
  // const name = 'abc123'
  /**
   *  Optional. The level of granularity the ChannelPartnerLink will display.
   */
  // const view = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callGetChannelPartnerLink() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.getChannelPartnerLink(request);
    console.log(response);
  }

  callGetChannelPartnerLink();

getChannelPartnerLink(request: protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetChannelPartnerLinkRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void
getChannelPartnerLink(request: protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetChannelPartnerLinkRequest
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getChannelPartnerRepricingConfig(request, options)

getChannelPartnerRepricingConfig(request?: protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig,
        (protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Gets information about how a Distributor modifies their bill before sending it to a ChannelPartner.

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The ChannelPartnerRepricingConfig was not found. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

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

Parameters
NameDescription
request IGetChannelPartnerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, (protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing ChannelPartnerRepricingConfig. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the ChannelPartnerRepricingConfig
   *  Format:
   *  accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callGetChannelPartnerRepricingConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.getChannelPartnerRepricingConfig(request);
    console.log(response);
  }

  callGetChannelPartnerRepricingConfig();

getChannelPartnerRepricingConfig(request, options, callback)

getChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetChannelPartnerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getChannelPartnerRepricingConfig(request, callback)

getChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetChannelPartnerRepricingConfigRequest
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCustomer(request, options)

getCustomer(request?: protos.google.cloud.channel.v1.IGetCustomerRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomer,
        protos.google.cloud.channel.v1.IGetCustomerRequest | undefined,
        {} | undefined
    ]>;

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
NameDescription
request IGetCustomerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IGetCustomerRequest | undefined, {} | undefined ]>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the customer to retrieve.
   *  Name uses the format: accounts/{account_id}/customers/{customer_id}
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callGetCustomer() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.getCustomer(request);
    console.log(response);
  }

  callGetCustomer();

getCustomer(request, options, callback)

getCustomer(request: protos.google.cloud.channel.v1.IGetCustomerRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IGetCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCustomerRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IGetCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCustomer(request, callback)

getCustomer(request: protos.google.cloud.channel.v1.IGetCustomerRequest, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IGetCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCustomerRequest
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IGetCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCustomerRepricingConfig(request, options)

getCustomerRepricingConfig(request?: protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomerRepricingConfig,
        (protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Gets information about how a Reseller modifies their bill before sending it to a Customer.

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The CustomerRepricingConfig was not found. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

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

Parameters
NameDescription
request IGetCustomerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomerRepricingConfig, (protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing CustomerRepricingConfig. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the CustomerRepricingConfig.
   *  Format:
   *  accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callGetCustomerRepricingConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.getCustomerRepricingConfig(request);
    console.log(response);
  }

  callGetCustomerRepricingConfig();

getCustomerRepricingConfig(request, options, callback)

getCustomerRepricingConfig(request: protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCustomerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCustomerRepricingConfig(request, callback)

getCustomerRepricingConfig(request: protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest, callback: Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetCustomerRepricingConfigRequest
callback Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getEntitlement(request, options)

getEntitlement(request?: protos.google.cloud.channel.v1.IGetEntitlementRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IEntitlement,
        protos.google.cloud.channel.v1.IGetEntitlementRequest | undefined,
        {} | undefined
    ]>;

Returns the requested 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 resource.

Parameters
NameDescription
request IGetEntitlementRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IGetEntitlementRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to retrieve.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callGetEntitlement() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.getEntitlement(request);
    console.log(response);
  }

  callGetEntitlement();

getEntitlement(request, options, callback)

getEntitlement(request: protos.google.cloud.channel.v1.IGetEntitlementRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IGetEntitlementRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetEntitlementRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IGetEntitlementRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getEntitlement(request, callback)

getEntitlement(request: protos.google.cloud.channel.v1.IGetEntitlementRequest, callback: Callback<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IGetEntitlementRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IGetEntitlementRequest
callback Callback<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IGetEntitlementRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getOperation(request, options, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
NameDescription
request GetOperationRequest

The request object that will be sent.

options CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<[protos.google.longrunning.Operation]>
Example

const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

importCustomer(request, options)

importCustomer(request?: protos.google.cloud.channel.v1.IImportCustomerRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomer,
        protos.google.cloud.channel.v1.IImportCustomerRequest | undefined,
        {} | undefined
    ]>;

Imports a Customer from the Cloud Identity associated with the provided Cloud Identity ID or domain before a TransferEntitlements call. If a linked Customer already exists and overwrite_if_exists is true, it will update that Customer's data.

Possible error codes:

* PERMISSION_DENIED: * The reseller account making the request is different from the reseller account in the API request. * You are not authorized to import the customer. See https://support.google.com/channelservices/answer/9759265 * NOT_FOUND: Cloud Identity doesn't exist or was deleted. * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is expired or invalid. * ALREADY_EXISTS: A customer already exists and has conflicting critical fields. Requires an overwrite.

Return value: The Customer.

Parameters
NameDescription
request IImportCustomerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IImportCustomerRequest | undefined, {} | undefined ]>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Customer domain.
   */
  // const domain = 'abc123'
  /**
   *  Required. Customer's Cloud Identity ID
   */
  // const cloudIdentityId = 'abc123'
  /**
   *  Required. The resource name of the reseller's account.
   *  Parent takes the format: accounts/{account_id} or
   *  accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
   */
  // const parent = 'abc123'
  /**
   *  Optional. 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.
   */
  // const authToken = 'abc123'
  /**
   *  Required. Choose to overwrite an existing customer if found.
   *  This must be set to true if there is an existing customer with a
   *  conflicting region code or domain.
   */
  // const overwriteIfExists = true
  /**
   *  Optional. Cloud Identity ID of a channel partner who will be the direct
   *  reseller for the customer's order. This field is required for 2-tier
   *  transfer scenarios and can be provided via the request Parent binding as
   *  well.
   */
  // const channelPartnerId = 'abc123'
  /**
   *  Optional. Specifies the customer that will receive imported Cloud Identity
   *  information.
   *  Format: accounts/{account_id}/customers/{customer_id}
   */
  // const customer = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callImportCustomer() {
    // Construct request
    const request = {
      domain,
      cloudIdentityId,
      parent,
      overwriteIfExists,
    };

    // Run request
    const response = await channelClient.importCustomer(request);
    console.log(response);
  }

  callImportCustomer();

importCustomer(request, options, callback)

importCustomer(request: protos.google.cloud.channel.v1.IImportCustomerRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IImportCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IImportCustomerRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IImportCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

importCustomer(request, callback)

importCustomer(request: protos.google.cloud.channel.v1.IImportCustomerRequest, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IImportCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request IImportCustomerRequest
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IImportCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

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
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listChannelPartnerLinks(request?: protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerLink[],
        protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest | null,
        protos.google.cloud.channel.v1.IListChannelPartnerLinksResponse
    ]>;

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
NameDescription
request IListChannelPartnerLinksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerLink[], protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest | null, protos.google.cloud.channel.v1.IListChannelPartnerLinksResponse ]>

{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.

listChannelPartnerLinks(request: protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, protos.google.cloud.channel.v1.IListChannelPartnerLinksResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerLink>): void;
Parameters
NameDescription
request IListChannelPartnerLinksRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, protos.google.cloud.channel.v1.IListChannelPartnerLinksResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerLink>
Returns
TypeDescription
void
listChannelPartnerLinks(request: protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, protos.google.cloud.channel.v1.IListChannelPartnerLinksResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerLink>): void;
Parameters
NameDescription
request IListChannelPartnerLinksRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, protos.google.cloud.channel.v1.IListChannelPartnerLinksResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerLink>
Returns
TypeDescription
void

listChannelPartnerLinksAsync(request, options)

listChannelPartnerLinksAsync(request?: protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IChannelPartnerLink>;

Equivalent to listChannelPartnerLinks, but returns an iterable object.

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

Parameters
NameDescription
request IListChannelPartnerLinksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IChannelPartnerLink>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller account for listing channel
   *  partner links. Parent uses the format: accounts/{account_id}
   */
  // const parent = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   *  Obtained using
   *  ListChannelPartnerLinksResponse.next_page_token google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListChannelPartnerLinks google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks 
   *  call.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The level of granularity the ChannelPartnerLink will display.
   */
  // const view = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListChannelPartnerLinks() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listChannelPartnerLinksAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListChannelPartnerLinks();

listChannelPartnerLinksStream(request, options)

listChannelPartnerLinksStream(request?: protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListChannelPartnerLinksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{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.

listChannelPartnerRepricingConfigs(request, options)

listChannelPartnerRepricingConfigs(request?: protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig[],
        protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest | null,
        protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsResponse
    ]>;

Lists information about how a Reseller modifies their bill before sending it to a ChannelPartner.

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The ChannelPartnerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

Return Value: If successful, the ChannelPartnerRepricingConfig resources. The data for each resource is displayed in the ascending order of:

* Channel Partner ID * *

If unsuccessful, returns an error.

Parameters
NameDescription
request IListChannelPartnerRepricingConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig[], protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest | null, protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of ChannelPartnerRepricingConfig. 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 listChannelPartnerRepricingConfigsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listChannelPartnerRepricingConfigs(request, options, callback)

listChannelPartnerRepricingConfigs(request: protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig>): void;
Parameters
NameDescription
request IListChannelPartnerRepricingConfigsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig>
Returns
TypeDescription
void

listChannelPartnerRepricingConfigs(request, callback)

listChannelPartnerRepricingConfigs(request: protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig>): void;
Parameters
NameDescription
request IListChannelPartnerRepricingConfigsRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig>
Returns
TypeDescription
void

listChannelPartnerRepricingConfigsAsync(request, options)

listChannelPartnerRepricingConfigsAsync(request?: protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig>;

Equivalent to listChannelPartnerRepricingConfigs, but returns an iterable object.

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

Parameters
NameDescription
request IListChannelPartnerRepricingConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing ChannelPartnerRepricingConfig. 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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the account's
   *  ChannelPartnerLink google.cloud.channel.v1.ChannelPartnerLink. Parent
   *  uses the format:
   *  accounts/{account_id}/channelPartnerLinks/{channel_partner_id}.
   *  Supports accounts/{account_id}/channelPartnerLinks/- to retrieve configs
   *  for all channel partners.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of repricing configs to return. The service
   *  may return fewer than this value. If unspecified, returns a maximum of 50
   *  rules. The maximum value is 100; values above 100 will be coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results beyond the first page.
   *  Obtained through
   *  ListChannelPartnerRepricingConfigsResponse.next_page_token google.cloud.channel.v1.ListChannelPartnerRepricingConfigsResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListChannelPartnerRepricingConfigs google.cloud.channel.v1.CloudChannelService.ListChannelPartnerRepricingConfigs 
   *  call.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. A filter for
   *  CloudChannelService.ListChannelPartnerRepricingConfigs  results
   *  (channel_partner_link only). You can use this filter when you support a
   *  BatchGet-like query. To use the filter, you must set
   *  `parent=accounts/{account_id}/channelPartnerLinks/-`.
   *  Example: `channel_partner_link =
   *  accounts/account_id/channelPartnerLinks/c1` OR `channel_partner_link =
   *  accounts/account_id/channelPartnerLinks/c2`.
   */
  // const filter = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListChannelPartnerRepricingConfigs() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listChannelPartnerRepricingConfigsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListChannelPartnerRepricingConfigs();

listChannelPartnerRepricingConfigsStream(request, options)

listChannelPartnerRepricingConfigsStream(request?: protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListChannelPartnerRepricingConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing ChannelPartnerRepricingConfig 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 listChannelPartnerRepricingConfigsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCustomerRepricingConfigs(request, options)

listCustomerRepricingConfigs(request?: protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomerRepricingConfig[],
        protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest | null,
        protos.google.cloud.channel.v1.IListCustomerRepricingConfigsResponse
    ]>;

Lists information about how a Reseller modifies their bill before sending it to a Customer.

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The CustomerRepricingConfig specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

Return Value: If successful, the CustomerRepricingConfig resources. The data for each resource is displayed in the ascending order of:

* Customer ID * * *

If unsuccessful, returns an error.

Parameters
NameDescription
request IListCustomerRepricingConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomerRepricingConfig[], protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest | null, protos.google.cloud.channel.v1.IListCustomerRepricingConfigsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of CustomerRepricingConfig. 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 listCustomerRepricingConfigsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCustomerRepricingConfigs(request, options, callback)

listCustomerRepricingConfigs(request: protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListCustomerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.ICustomerRepricingConfig>): void;
Parameters
NameDescription
request IListCustomerRepricingConfigsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListCustomerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.ICustomerRepricingConfig>
Returns
TypeDescription
void

listCustomerRepricingConfigs(request, callback)

listCustomerRepricingConfigs(request: protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListCustomerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.ICustomerRepricingConfig>): void;
Parameters
NameDescription
request IListCustomerRepricingConfigsRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListCustomerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.ICustomerRepricingConfig>
Returns
TypeDescription
void

listCustomerRepricingConfigsAsync(request, options)

listCustomerRepricingConfigsAsync(request?: protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.ICustomerRepricingConfig>;

Equivalent to listCustomerRepricingConfigs, but returns an iterable object.

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

Parameters
NameDescription
request IListCustomerRepricingConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.ICustomerRepricingConfig>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing CustomerRepricingConfig. 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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the customer.
   *  Parent uses the format: accounts/{account_id}/customers/{customer_id}.
   *  Supports accounts/{account_id}/customers/- to retrieve configs for all
   *  customers.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of repricing configs to return. The service
   *  may return fewer than this value. If unspecified, returns a maximum of 50
   *  rules. The maximum value is 100; values above 100 will be coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results beyond the first page.
   *  Obtained through
   *  ListCustomerRepricingConfigsResponse.next_page_token google.cloud.channel.v1.ListCustomerRepricingConfigsResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListCustomerRepricingConfigs google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs 
   *  call.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. A filter for CloudChannelService.ListCustomerRepricingConfigs 
   *  results (customer only). You can use this filter when you support
   *  a BatchGet-like query.
   *  To use the filter, you must set `parent=accounts/{account_id}/customers/-`.
   *  Example: customer = accounts/account_id/customers/c1 OR
   *  customer = accounts/account_id/customers/c2.
   */
  // const filter = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListCustomerRepricingConfigs() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listCustomerRepricingConfigsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListCustomerRepricingConfigs();

listCustomerRepricingConfigsStream(request, options)

listCustomerRepricingConfigsStream(request?: protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListCustomerRepricingConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing CustomerRepricingConfig 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 listCustomerRepricingConfigsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listCustomers(request, options)

listCustomers(request?: protos.google.cloud.channel.v1.IListCustomersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomer[],
        protos.google.cloud.channel.v1.IListCustomersRequest | null,
        protos.google.cloud.channel.v1.IListCustomersResponse
    ]>;

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
NameDescription
request IListCustomersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomer[], protos.google.cloud.channel.v1.IListCustomersRequest | null, protos.google.cloud.channel.v1.IListCustomersResponse ]>

{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.

listCustomers(request, options, callback)

listCustomers(request: protos.google.cloud.channel.v1.IListCustomersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListCustomersRequest, protos.google.cloud.channel.v1.IListCustomersResponse | null | undefined, protos.google.cloud.channel.v1.ICustomer>): void;
Parameters
NameDescription
request IListCustomersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListCustomersRequest, protos.google.cloud.channel.v1.IListCustomersResponse | null | undefined, protos.google.cloud.channel.v1.ICustomer>
Returns
TypeDescription
void

listCustomers(request, callback)

listCustomers(request: protos.google.cloud.channel.v1.IListCustomersRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListCustomersRequest, protos.google.cloud.channel.v1.IListCustomersResponse | null | undefined, protos.google.cloud.channel.v1.ICustomer>): void;
Parameters
NameDescription
request IListCustomersRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListCustomersRequest, protos.google.cloud.channel.v1.IListCustomersResponse | null | undefined, protos.google.cloud.channel.v1.ICustomer>
Returns
TypeDescription
void

listCustomersAsync(request, options)

listCustomersAsync(request?: protos.google.cloud.channel.v1.IListCustomersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.ICustomer>;

Equivalent to listCustomers, but returns an iterable object.

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

Parameters
NameDescription
request IListCustomersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.ICustomer>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller account to list customers from.
   *  Parent uses the format: accounts/{account_id}.
   */
  // const parent = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results other than the first page.
   *  Obtained through
   *  ListCustomersResponse.next_page_token google.cloud.channel.v1.ListCustomersResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListCustomers google.cloud.channel.v1.CloudChannelService.ListCustomers 
   *  call.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Filters applied to the CloudChannelService.ListCustomers 
   *  results. See
   *  https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers
   *  for more information.
   */
  // const filter = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListCustomers() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listCustomersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListCustomers();

listCustomersStream(request, options)

listCustomersStream(request?: protos.google.cloud.channel.v1.IListCustomersRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListCustomersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{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.

listEntitlementChanges(request, options)

listEntitlementChanges(request?: protos.google.cloud.channel.v1.IListEntitlementChangesRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IEntitlementChange[],
        protos.google.cloud.channel.v1.IListEntitlementChangesRequest | null,
        protos.google.cloud.channel.v1.IListEntitlementChangesResponse
    ]>;

List entitlement history.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different. * INVALID_ARGUMENT: Missing or invalid required fields in the request. * NOT_FOUND: The parent resource doesn't exist. Usually the result of an invalid name parameter. * INTERNAL: Any non-user error related to a technical issue in the backend. In this case, contact CloudChannel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, contact Cloud Channel support.

Return value: List of s.

Parameters
NameDescription
request IListEntitlementChangesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IEntitlementChange[], protos.google.cloud.channel.v1.IListEntitlementChangesRequest | null, protos.google.cloud.channel.v1.IListEntitlementChangesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listEntitlementChangesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listEntitlementChanges(request, options, callback)

listEntitlementChanges(request: protos.google.cloud.channel.v1.IListEntitlementChangesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListEntitlementChangesRequest, protos.google.cloud.channel.v1.IListEntitlementChangesResponse | null | undefined, protos.google.cloud.channel.v1.IEntitlementChange>): void;
Parameters
NameDescription
request IListEntitlementChangesRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListEntitlementChangesRequest, protos.google.cloud.channel.v1.IListEntitlementChangesResponse | null | undefined, protos.google.cloud.channel.v1.IEntitlementChange>
Returns
TypeDescription
void

listEntitlementChanges(request, callback)

listEntitlementChanges(request: protos.google.cloud.channel.v1.IListEntitlementChangesRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListEntitlementChangesRequest, protos.google.cloud.channel.v1.IListEntitlementChangesResponse | null | undefined, protos.google.cloud.channel.v1.IEntitlementChange>): void;
Parameters
NameDescription
request IListEntitlementChangesRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListEntitlementChangesRequest, protos.google.cloud.channel.v1.IListEntitlementChangesResponse | null | undefined, protos.google.cloud.channel.v1.IEntitlementChange>
Returns
TypeDescription
void

listEntitlementChangesAsync(request, options)

listEntitlementChangesAsync(request?: protos.google.cloud.channel.v1.IListEntitlementChangesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IEntitlementChange>;

Equivalent to listEntitlementChanges, but returns an iterable object.

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

Parameters
NameDescription
request IListEntitlementChangesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IEntitlementChange>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement for which to list
   *  entitlement changes. The `-` wildcard may be used to match entitlements
   *  across a customer. Formats:
   *    * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   *    * accounts/{account_id}/customers/{customer_id}/entitlements/-
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of entitlement changes to return. The service
   *  may return fewer than this value. If unspecified, returns at most 10
   *  entitlement changes. The maximum value is 50; the server will coerce values
   *  above 50.
   */
  // const pageSize = 1234
  /**
   *  Optional. A page token, received from a previous
   *  CloudChannelService.ListEntitlementChanges google.cloud.channel.v1.CloudChannelService.ListEntitlementChanges 
   *  call. Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to
   *  CloudChannelService.ListEntitlementChanges google.cloud.channel.v1.CloudChannelService.ListEntitlementChanges 
   *  must match the call that provided the page token.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Filters applied to the list results.
   */
  // const filter = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListEntitlementChanges() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listEntitlementChangesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListEntitlementChanges();

listEntitlementChangesStream(request, options)

listEntitlementChangesStream(request?: protos.google.cloud.channel.v1.IListEntitlementChangesRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListEntitlementChangesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listEntitlementChangesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listEntitlements(request, options)

listEntitlements(request?: protos.google.cloud.channel.v1.IListEntitlementsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IEntitlement[],
        protos.google.cloud.channel.v1.IListEntitlementsRequest | null,
        protos.google.cloud.channel.v1.IListEntitlementsResponse
    ]>;

Lists s 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 s.

Parameters
NameDescription
request IListEntitlementsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IEntitlement[], protos.google.cloud.channel.v1.IListEntitlementsRequest | null, protos.google.cloud.channel.v1.IListEntitlementsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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.

listEntitlements(request, options, callback)

listEntitlements(request: protos.google.cloud.channel.v1.IListEntitlementsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListEntitlementsRequest, protos.google.cloud.channel.v1.IListEntitlementsResponse | null | undefined, protos.google.cloud.channel.v1.IEntitlement>): void;
Parameters
NameDescription
request IListEntitlementsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListEntitlementsRequest, protos.google.cloud.channel.v1.IListEntitlementsResponse | null | undefined, protos.google.cloud.channel.v1.IEntitlement>
Returns
TypeDescription
void

listEntitlements(request, callback)

listEntitlements(request: protos.google.cloud.channel.v1.IListEntitlementsRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListEntitlementsRequest, protos.google.cloud.channel.v1.IListEntitlementsResponse | null | undefined, protos.google.cloud.channel.v1.IEntitlement>): void;
Parameters
NameDescription
request IListEntitlementsRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListEntitlementsRequest, protos.google.cloud.channel.v1.IListEntitlementsResponse | null | undefined, protos.google.cloud.channel.v1.IEntitlement>
Returns
TypeDescription
void

listEntitlementsAsync(request, options)

listEntitlementsAsync(request?: protos.google.cloud.channel.v1.IListEntitlementsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IEntitlement>;

Equivalent to listEntitlements, but returns an iterable object.

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

Parameters
NameDescription
request IListEntitlementsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IEntitlement>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . 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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller's customer account to list
   *  entitlements for.
   *  Parent uses the format: accounts/{account_id}/customers/{customer_id}
   */
  // const parent = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   *  Obtained using
   *  ListEntitlementsResponse.next_page_token google.cloud.channel.v1.ListEntitlementsResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListEntitlements google.cloud.channel.v1.CloudChannelService.ListEntitlements 
   *  call.
   */
  // const pageToken = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListEntitlements() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listEntitlementsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListEntitlements();

listEntitlementsStream(request, options)

listEntitlementsStream(request?: protos.google.cloud.channel.v1.IListEntitlementsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListEntitlementsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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, options)

listOffers(request?: protos.google.cloud.channel.v1.IListOffersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IOffer[],
        protos.google.cloud.channel.v1.IListOffersRequest | null,
        protos.google.cloud.channel.v1.IListOffersResponse
    ]>;

Lists the Offers the reseller can sell.

Possible error codes:

* INVALID_ARGUMENT: Required request parameters are missing or invalid.

Parameters
NameDescription
request IListOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IOffer[], protos.google.cloud.channel.v1.IListOffersRequest | null, protos.google.cloud.channel.v1.IListOffersResponse ]>

{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.

listOffers(request, options, callback)

listOffers(request: protos.google.cloud.channel.v1.IListOffersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListOffersRequest, protos.google.cloud.channel.v1.IListOffersResponse | null | undefined, protos.google.cloud.channel.v1.IOffer>): void;
Parameters
NameDescription
request IListOffersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListOffersRequest, protos.google.cloud.channel.v1.IListOffersResponse | null | undefined, protos.google.cloud.channel.v1.IOffer>
Returns
TypeDescription
void

listOffers(request, callback)

listOffers(request: protos.google.cloud.channel.v1.IListOffersRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListOffersRequest, protos.google.cloud.channel.v1.IListOffersResponse | null | undefined, protos.google.cloud.channel.v1.IOffer>): void;
Parameters
NameDescription
request IListOffersRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListOffersRequest, protos.google.cloud.channel.v1.IListOffersResponse | null | undefined, protos.google.cloud.channel.v1.IOffer>
Returns
TypeDescription
void

listOffersAsync(request, options)

listOffersAsync(request?: protos.google.cloud.channel.v1.IListOffersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IOffer>;

Equivalent to listOffers, but returns an iterable object.

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

Parameters
NameDescription
request IListOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IOffer>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller account from which to list
   *  Offers. Parent uses the format: accounts/{account_id}.
   */
  // const parent = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   */
  // const pageToken = 'abc123'
  /**
   *  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
   */
  // const filter = 'abc123'
  /**
   *  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".
   */
  // const languageCode = 'abc123'
  /**
   *  Optional. A boolean flag that determines if a response returns future
   *  offers 30 days from now. If the show_future_offers is true, the response
   *  will only contain offers that are scheduled to be available 30 days from
   *  now.
   */
  // const showFutureOffers = true

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListOffers() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listOffersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListOffers();

listOffersStream(request, options)

listOffersStream(request?: protos.google.cloud.channel.v1.IListOffersRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{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.

listOperationsAsync(request, options)

listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters
NameDescription
request ListOperationsRequest

The request object that will be sent.

options CallOptions

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

Returns
TypeDescription
AsyncIterable<protos.google.longrunning.ListOperationsResponse>

{Object} An iterable Object that conforms to iteration protocols.

Example

const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)

listProducts(request, options)

listProducts(request?: protos.google.cloud.channel.v1.IListProductsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IProduct[],
        protos.google.cloud.channel.v1.IListProductsRequest | null,
        protos.google.cloud.channel.v1.IListProductsResponse
    ]>;

Lists the Products the reseller is authorized to sell.

Possible error codes:

* INVALID_ARGUMENT: Required request parameters are missing or invalid.

Parameters
NameDescription
request IListProductsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IProduct[], protos.google.cloud.channel.v1.IListProductsRequest | null, protos.google.cloud.channel.v1.IListProductsResponse ]>

{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.

listProducts(request, options, callback)

listProducts(request: protos.google.cloud.channel.v1.IListProductsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListProductsRequest, protos.google.cloud.channel.v1.IListProductsResponse | null | undefined, protos.google.cloud.channel.v1.IProduct>): void;
Parameters
NameDescription
request IListProductsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListProductsRequest, protos.google.cloud.channel.v1.IListProductsResponse | null | undefined, protos.google.cloud.channel.v1.IProduct>
Returns
TypeDescription
void

listProducts(request, callback)

listProducts(request: protos.google.cloud.channel.v1.IListProductsRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListProductsRequest, protos.google.cloud.channel.v1.IListProductsResponse | null | undefined, protos.google.cloud.channel.v1.IProduct>): void;
Parameters
NameDescription
request IListProductsRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListProductsRequest, protos.google.cloud.channel.v1.IListProductsResponse | null | undefined, protos.google.cloud.channel.v1.IProduct>
Returns
TypeDescription
void

listProductsAsync(request, options)

listProductsAsync(request?: protos.google.cloud.channel.v1.IListProductsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IProduct>;

Equivalent to listProducts, but returns an iterable object.

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

Parameters
NameDescription
request IListProductsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IProduct>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller account.
   *  Format: accounts/{account_id}.
   */
  // const account = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   */
  // const pageToken = 'abc123'
  /**
   *  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".
   */
  // const languageCode = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListProducts() {
    // Construct request
    const request = {
      account,
    };

    // Run request
    const iterable = await channelClient.listProductsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListProducts();

listProductsStream(request, options)

listProductsStream(request?: protos.google.cloud.channel.v1.IListProductsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListProductsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{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, options)

listPurchasableOffers(request?: protos.google.cloud.channel.v1.IListPurchasableOffersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IPurchasableOffer[],
        protos.google.cloud.channel.v1.IListPurchasableOffersRequest | null,
        protos.google.cloud.channel.v1.IListPurchasableOffersResponse
    ]>;

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 * The reseller is not authorized to transact on this Product. See https://support.google.com/channelservices/answer/9759265 * INVALID_ARGUMENT: Required request parameters are missing or invalid.

Parameters
NameDescription
request IListPurchasableOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IPurchasableOffer[], protos.google.cloud.channel.v1.IListPurchasableOffersRequest | null, protos.google.cloud.channel.v1.IListPurchasableOffersResponse ]>

{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.

listPurchasableOffers(request, options, callback)

listPurchasableOffers(request: protos.google.cloud.channel.v1.IListPurchasableOffersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableOffersRequest, protos.google.cloud.channel.v1.IListPurchasableOffersResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableOffer>): void;
Parameters
NameDescription
request IListPurchasableOffersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableOffersRequest, protos.google.cloud.channel.v1.IListPurchasableOffersResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableOffer>
Returns
TypeDescription
void

listPurchasableOffers(request, callback)

listPurchasableOffers(request: protos.google.cloud.channel.v1.IListPurchasableOffersRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableOffersRequest, protos.google.cloud.channel.v1.IListPurchasableOffersResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableOffer>): void;
Parameters
NameDescription
request IListPurchasableOffersRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableOffersRequest, protos.google.cloud.channel.v1.IListPurchasableOffersResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableOffer>
Returns
TypeDescription
void

listPurchasableOffersAsync(request, options)

listPurchasableOffersAsync(request?: protos.google.cloud.channel.v1.IListPurchasableOffersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IPurchasableOffer>;

Equivalent to listPurchasableOffers, but returns an iterable object.

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

Parameters
NameDescription
request IListPurchasableOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IPurchasableOffer>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  List Offers for CreateEntitlement purchase.
   */
  // const createEntitlementPurchase = {}
  /**
   *  List Offers for ChangeOffer purchase.
   */
  // const changeOfferPurchase = {}
  /**
   *  Required. The resource name of the customer to list Offers for.
   *  Format: accounts/{account_id}/customers/{customer_id}.
   */
  // const customer = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   */
  // const pageToken = 'abc123'
  /**
   *  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".
   */
  // const languageCode = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListPurchasableOffers() {
    // Construct request
    const request = {
      customer,
    };

    // Run request
    const iterable = await channelClient.listPurchasableOffersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPurchasableOffers();

listPurchasableOffersStream(request, options)

listPurchasableOffersStream(request?: protos.google.cloud.channel.v1.IListPurchasableOffersRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListPurchasableOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{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, options)

listPurchasableSkus(request?: protos.google.cloud.channel.v1.IListPurchasableSkusRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IPurchasableSku[],
        protos.google.cloud.channel.v1.IListPurchasableSkusRequest | null,
        protos.google.cloud.channel.v1.IListPurchasableSkusResponse
    ]>;

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
NameDescription
request IListPurchasableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IPurchasableSku[], protos.google.cloud.channel.v1.IListPurchasableSkusRequest | null, protos.google.cloud.channel.v1.IListPurchasableSkusResponse ]>

{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.

listPurchasableSkus(request, options, callback)

listPurchasableSkus(request: protos.google.cloud.channel.v1.IListPurchasableSkusRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableSkusRequest, protos.google.cloud.channel.v1.IListPurchasableSkusResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableSku>): void;
Parameters
NameDescription
request IListPurchasableSkusRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableSkusRequest, protos.google.cloud.channel.v1.IListPurchasableSkusResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableSku>
Returns
TypeDescription
void

listPurchasableSkus(request, callback)

listPurchasableSkus(request: protos.google.cloud.channel.v1.IListPurchasableSkusRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableSkusRequest, protos.google.cloud.channel.v1.IListPurchasableSkusResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableSku>): void;
Parameters
NameDescription
request IListPurchasableSkusRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableSkusRequest, protos.google.cloud.channel.v1.IListPurchasableSkusResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableSku>
Returns
TypeDescription
void

listPurchasableSkusAsync(request, options)

listPurchasableSkusAsync(request?: protos.google.cloud.channel.v1.IListPurchasableSkusRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IPurchasableSku>;

Equivalent to listPurchasableSkus, but returns an iterable object.

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

Parameters
NameDescription
request IListPurchasableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IPurchasableSku>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  List SKUs for CreateEntitlement purchase.
   */
  // const createEntitlementPurchase = {}
  /**
   *  List SKUs for ChangeOffer purchase with a new SKU.
   */
  // const changeOfferPurchase = {}
  /**
   *  Required. The resource name of the customer to list SKUs for.
   *  Format: accounts/{account_id}/customers/{customer_id}.
   */
  // const customer = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   */
  // const pageToken = 'abc123'
  /**
   *  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".
   */
  // const languageCode = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListPurchasableSkus() {
    // Construct request
    const request = {
      customer,
    };

    // Run request
    const iterable = await channelClient.listPurchasableSkusAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPurchasableSkus();

listPurchasableSkusStream(request, options)

listPurchasableSkusStream(request?: protos.google.cloud.channel.v1.IListPurchasableSkusRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListPurchasableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{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.

listSkuGroupBillableSkus(request, options)

listSkuGroupBillableSkus(request?: protos.google.cloud.channel.v1.IListSkuGroupBillableSkusRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IBillableSku[],
        protos.google.cloud.channel.v1.IListSkuGroupBillableSkusRequest | null,
        protos.google.cloud.channel.v1.IListSkuGroupBillableSkusResponse
    ]>;

Lists the Billable SKUs in a given SKU group.

Possible error codes: PERMISSION_DENIED: If the account making the request and the account being queried for are different, or the account doesn't exist. INVALID_ARGUMENT: Missing or invalid required parameters in the request. INTERNAL: Any non-user error related to technical issue in the backend. In this case, contact cloud channel support.

Return Value: If successful, the BillableSku resources. The data for each resource is displayed in the ascending order of:

* *

If unsuccessful, returns an error.

Parameters
NameDescription
request IListSkuGroupBillableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IBillableSku[], protos.google.cloud.channel.v1.IListSkuGroupBillableSkusRequest | null, protos.google.cloud.channel.v1.IListSkuGroupBillableSkusResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of BillableSku. 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 listSkuGroupBillableSkusAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSkuGroupBillableSkus(request, options, callback)

listSkuGroupBillableSkus(request: protos.google.cloud.channel.v1.IListSkuGroupBillableSkusRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListSkuGroupBillableSkusRequest, protos.google.cloud.channel.v1.IListSkuGroupBillableSkusResponse | null | undefined, protos.google.cloud.channel.v1.IBillableSku>): void;
Parameters
NameDescription
request IListSkuGroupBillableSkusRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListSkuGroupBillableSkusRequest, protos.google.cloud.channel.v1.IListSkuGroupBillableSkusResponse | null | undefined, protos.google.cloud.channel.v1.IBillableSku>
Returns
TypeDescription
void

listSkuGroupBillableSkus(request, callback)

listSkuGroupBillableSkus(request: protos.google.cloud.channel.v1.IListSkuGroupBillableSkusRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListSkuGroupBillableSkusRequest, protos.google.cloud.channel.v1.IListSkuGroupBillableSkusResponse | null | undefined, protos.google.cloud.channel.v1.IBillableSku>): void;
Parameters
NameDescription
request IListSkuGroupBillableSkusRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListSkuGroupBillableSkusRequest, protos.google.cloud.channel.v1.IListSkuGroupBillableSkusResponse | null | undefined, protos.google.cloud.channel.v1.IBillableSku>
Returns
TypeDescription
void

listSkuGroupBillableSkusAsync(request, options)

listSkuGroupBillableSkusAsync(request?: protos.google.cloud.channel.v1.IListSkuGroupBillableSkusRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IBillableSku>;

Equivalent to listSkuGroupBillableSkus, but returns an iterable object.

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

Parameters
NameDescription
request IListSkuGroupBillableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IBillableSku>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing BillableSku. 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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the SKU group.
   *  Format: accounts/{account}/skuGroups/{sku_group}.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of SKUs to return. The service may return
   *  fewer than this value. If unspecified, returns a maximum of 100000 SKUs.
   *  The maximum value is 100000; values above 100000 will be coerced to 100000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results beyond the first page.
   *  Obtained through
   *  ListSkuGroupBillableSkus.next_page_token   of the previous
   *  CloudChannelService.ListSkuGroupBillableSkus google.cloud.channel.v1.CloudChannelService.ListSkuGroupBillableSkus 
   *  call.
   */
  // const pageToken = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListSkuGroupBillableSkus() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listSkuGroupBillableSkusAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListSkuGroupBillableSkus();

listSkuGroupBillableSkusStream(request, options)

listSkuGroupBillableSkusStream(request?: protos.google.cloud.channel.v1.IListSkuGroupBillableSkusRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListSkuGroupBillableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing BillableSku 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 listSkuGroupBillableSkusAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSkuGroups(request, options)

listSkuGroups(request?: protos.google.cloud.channel.v1.IListSkuGroupsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ISkuGroup[],
        protos.google.cloud.channel.v1.IListSkuGroupsRequest | null,
        protos.google.cloud.channel.v1.IListSkuGroupsResponse
    ]>;

Lists the Rebilling supported SKU groups the account is authorized to sell. Reference: https://cloud.google.com/skus/sku-groups

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different, or the account doesn't exist. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

Return Value: If successful, the SkuGroup resources. The data for each resource is displayed in the alphabetical order of SKU group display name. The data for each resource is displayed in the ascending order of

If unsuccessful, returns an error.

Parameters
NameDescription
request IListSkuGroupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ISkuGroup[], protos.google.cloud.channel.v1.IListSkuGroupsRequest | null, protos.google.cloud.channel.v1.IListSkuGroupsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of SkuGroup. 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 listSkuGroupsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSkuGroups(request, options, callback)

listSkuGroups(request: protos.google.cloud.channel.v1.IListSkuGroupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListSkuGroupsRequest, protos.google.cloud.channel.v1.IListSkuGroupsResponse | null | undefined, protos.google.cloud.channel.v1.ISkuGroup>): void;
Parameters
NameDescription
request IListSkuGroupsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListSkuGroupsRequest, protos.google.cloud.channel.v1.IListSkuGroupsResponse | null | undefined, protos.google.cloud.channel.v1.ISkuGroup>
Returns
TypeDescription
void

listSkuGroups(request, callback)

listSkuGroups(request: protos.google.cloud.channel.v1.IListSkuGroupsRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListSkuGroupsRequest, protos.google.cloud.channel.v1.IListSkuGroupsResponse | null | undefined, protos.google.cloud.channel.v1.ISkuGroup>): void;
Parameters
NameDescription
request IListSkuGroupsRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListSkuGroupsRequest, protos.google.cloud.channel.v1.IListSkuGroupsResponse | null | undefined, protos.google.cloud.channel.v1.ISkuGroup>
Returns
TypeDescription
void

listSkuGroupsAsync(request, options)

listSkuGroupsAsync(request?: protos.google.cloud.channel.v1.IListSkuGroupsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.ISkuGroup>;

Equivalent to listSkuGroups, but returns an iterable object.

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

Parameters
NameDescription
request IListSkuGroupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.ISkuGroup>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing SkuGroup. 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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the account from which to list SKU groups.
   *  Parent uses the format: accounts/{account}.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of SKU groups to return. The service may
   *  return fewer than this value. If unspecified, returns a maximum of 1000 SKU
   *  groups. The maximum value is 1000; values above 1000 will be coerced to
   *  1000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results beyond the first page.
   *  Obtained through
   *  ListSkuGroups.next_page_token   of the previous
   *  CloudChannelService.ListSkuGroups google.cloud.channel.v1.CloudChannelService.ListSkuGroups 
   *  call.
   */
  // const pageToken = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListSkuGroups() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listSkuGroupsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListSkuGroups();

listSkuGroupsStream(request, options)

listSkuGroupsStream(request?: protos.google.cloud.channel.v1.IListSkuGroupsRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListSkuGroupsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing SkuGroup 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 listSkuGroupsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listSkus(request, options)

listSkus(request?: protos.google.cloud.channel.v1.IListSkusRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ISku[],
        protos.google.cloud.channel.v1.IListSkusRequest | null,
        protos.google.cloud.channel.v1.IListSkusResponse
    ]>;

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
NameDescription
request IListSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ISku[], protos.google.cloud.channel.v1.IListSkusRequest | null, protos.google.cloud.channel.v1.IListSkusResponse ]>

{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.

listSkus(request, options, callback)

listSkus(request: protos.google.cloud.channel.v1.IListSkusRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListSkusRequest, protos.google.cloud.channel.v1.IListSkusResponse | null | undefined, protos.google.cloud.channel.v1.ISku>): void;
Parameters
NameDescription
request IListSkusRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListSkusRequest, protos.google.cloud.channel.v1.IListSkusResponse | null | undefined, protos.google.cloud.channel.v1.ISku>
Returns
TypeDescription
void

listSkus(request, callback)

listSkus(request: protos.google.cloud.channel.v1.IListSkusRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListSkusRequest, protos.google.cloud.channel.v1.IListSkusResponse | null | undefined, protos.google.cloud.channel.v1.ISku>): void;
Parameters
NameDescription
request IListSkusRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListSkusRequest, protos.google.cloud.channel.v1.IListSkusResponse | null | undefined, protos.google.cloud.channel.v1.ISku>
Returns
TypeDescription
void

listSkusAsync(request, options)

listSkusAsync(request?: protos.google.cloud.channel.v1.IListSkusRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.ISku>;

Equivalent to listSkus, but returns an iterable object.

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

Parameters
NameDescription
request IListSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.ISku>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  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.
   */
  // const parent = 'abc123'
  /**
   *  Required. Resource name of the reseller.
   *  Format: accounts/{account_id}.
   */
  // const account = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   *  Optional.
   */
  // const pageToken = 'abc123'
  /**
   *  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".
   */
  // const languageCode = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListSkus() {
    // Construct request
    const request = {
      parent,
      account,
    };

    // Run request
    const iterable = await channelClient.listSkusAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListSkus();

listSkusStream(request, options)

listSkusStream(request?: protos.google.cloud.channel.v1.IListSkusRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{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, options)

listSubscribers(request?: protos.google.cloud.channel.v1.IListSubscribersRequest, options?: CallOptions): Promise<[
        string[],
        protos.google.cloud.channel.v1.IListSubscribersRequest | null,
        protos.google.cloud.channel.v1.IListSubscribersResponse
    ]>;

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
NameDescription
request IListSubscribersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ string[], protos.google.cloud.channel.v1.IListSubscribersRequest | null, protos.google.cloud.channel.v1.IListSubscribersResponse ]>

{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.

listSubscribers(request, options, callback)

listSubscribers(request: protos.google.cloud.channel.v1.IListSubscribersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListSubscribersRequest, protos.google.cloud.channel.v1.IListSubscribersResponse | null | undefined, string>): void;
Parameters
NameDescription
request IListSubscribersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListSubscribersRequest, protos.google.cloud.channel.v1.IListSubscribersResponse | null | undefined, string>
Returns
TypeDescription
void

listSubscribers(request, callback)

listSubscribers(request: protos.google.cloud.channel.v1.IListSubscribersRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListSubscribersRequest, protos.google.cloud.channel.v1.IListSubscribersResponse | null | undefined, string>): void;
Parameters
NameDescription
request IListSubscribersRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListSubscribersRequest, protos.google.cloud.channel.v1.IListSubscribersResponse | null | undefined, string>
Returns
TypeDescription
void

listSubscribersAsync(request, options)

listSubscribersAsync(request?: protos.google.cloud.channel.v1.IListSubscribersRequest, options?: CallOptions): AsyncIterable<string>;

Equivalent to listSubscribers, but returns an iterable object.

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

Parameters
NameDescription
request IListSubscribersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<string>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the account.
   */
  // const account = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  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.
   */
  // const pageToken = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListSubscribers() {
    // Construct request
    const request = {
      account,
    };

    // Run request
    const iterable = await channelClient.listSubscribersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListSubscribers();

listSubscribersStream(request, options)

listSubscribersStream(request?: protos.google.cloud.channel.v1.IListSubscribersRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListSubscribersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{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, options)

listTransferableOffers(request?: protos.google.cloud.channel.v1.IListTransferableOffersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ITransferableOffer[],
        protos.google.cloud.channel.v1.IListTransferableOffersRequest | null,
        protos.google.cloud.channel.v1.IListTransferableOffersResponse
    ]>;

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 customer provided incorrect reseller information when generating auth token. * The reseller account making the request is different from the reseller account in the query. * The reseller is not authorized to transact on this Product. See https://support.google.com/channelservices/answer/9759265 * INVALID_ARGUMENT: Required request parameters are missing or invalid.

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

Parameters
NameDescription
request IListTransferableOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ITransferableOffer[], protos.google.cloud.channel.v1.IListTransferableOffersRequest | null, protos.google.cloud.channel.v1.IListTransferableOffersResponse ]>

{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.

listTransferableOffers(request, options, callback)

listTransferableOffers(request: protos.google.cloud.channel.v1.IListTransferableOffersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListTransferableOffersRequest, protos.google.cloud.channel.v1.IListTransferableOffersResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableOffer>): void;
Parameters
NameDescription
request IListTransferableOffersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListTransferableOffersRequest, protos.google.cloud.channel.v1.IListTransferableOffersResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableOffer>
Returns
TypeDescription
void

listTransferableOffers(request, callback)

listTransferableOffers(request: protos.google.cloud.channel.v1.IListTransferableOffersRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListTransferableOffersRequest, protos.google.cloud.channel.v1.IListTransferableOffersResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableOffer>): void;
Parameters
NameDescription
request IListTransferableOffersRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListTransferableOffersRequest, protos.google.cloud.channel.v1.IListTransferableOffersResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableOffer>
Returns
TypeDescription
void

listTransferableOffersAsync(request, options)

listTransferableOffersAsync(request?: protos.google.cloud.channel.v1.IListTransferableOffersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.ITransferableOffer>;

Equivalent to listTransferableOffers, but returns an iterable object.

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

Parameters
NameDescription
request IListTransferableOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.ITransferableOffer>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Customer's Cloud Identity ID
   */
  // const cloudIdentityId = 'abc123'
  /**
   *  A reseller should create a customer and use the resource name of
   *  that customer here.
   */
  // const customerName = 'abc123'
  /**
   *  Required. The resource name of the reseller's account.
   */
  // const parent = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  A token for a page of results other than the first page.
   *  Obtained using
   *  ListTransferableOffersResponse.next_page_token google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListTransferableOffers google.cloud.channel.v1.CloudChannelService.ListTransferableOffers 
   *  call.
   */
  // const pageToken = 'abc123'
  /**
   *  Required. The SKU to look up Offers for.
   */
  // const sku = 'abc123'
  /**
   *  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".
   */
  // const languageCode = 'abc123'
  /**
   *  Optional. The Billing Account to look up Offers for. Format:
   *  accounts/{account_id}/billingAccounts/{billing_account_id}.
   *  This field is only relevant for multi-currency accounts. It should be left
   *  empty for single currency accounts.
   */
  // const billingAccount = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListTransferableOffers() {
    // Construct request
    const request = {
      parent,
      sku,
    };

    // Run request
    const iterable = await channelClient.listTransferableOffersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListTransferableOffers();

listTransferableOffersStream(request, options)

listTransferableOffersStream(request?: protos.google.cloud.channel.v1.IListTransferableOffersRequest, options?: CallOptions): Transform;

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

Parameters
NameDescription
request IListTransferableOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{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, options)

listTransferableSkus(request?: protos.google.cloud.channel.v1.IListTransferableSkusRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ITransferableSku[],
        protos.google.cloud.channel.v1.IListTransferableSkusRequest | null,
        protos.google.cloud.channel.v1.IListTransferableSkusResponse
    ]>;

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
NameDescription
request IListTransferableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ITransferableSku[], protos.google.cloud.channel.v1.IListTransferableSkusRequest | null, protos.google.cloud.channel.v1.IListTransferableSkusResponse ]>

{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.

listTransferableSkus(request, options, callback)

listTransferableSkus(request: protos.google.cloud.channel.v1.IListTransferableSkusRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListTransferableSkusRequest, protos.google.cloud.channel.v1.IListTransferableSkusResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableSku>): void;
Parameters
NameDescription
request IListTransferableSkusRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListTransferableSkusRequest, protos.google.cloud.channel.v1.IListTransferableSkusResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableSku>
Returns
TypeDescription
void

listTransferableSkus(request, callback)

listTransferableSkus(request: protos.google.cloud.channel.v1.IListTransferableSkusRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListTransferableSkusRequest, protos.google.cloud.channel.v1.IListTransferableSkusResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableSku>): void;
Parameters
NameDescription
request IListTransferableSkusRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListTransferableSkusRequest, protos.google.cloud.channel.v1.IListTransferableSkusResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableSku>
Returns
TypeDescription
void

listTransferableSkusAsync(request, options)

listTransferableSkusAsync(request?: protos.google.cloud.channel.v1.IListTransferableSkusRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.ITransferableSku>;

Equivalent to listTransferableSkus, but returns an iterable object.

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

Parameters
NameDescription
request IListTransferableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.ITransferableSku>

{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

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Customer's Cloud Identity ID
   */
  // const cloudIdentityId = 'abc123'
  /**
   *  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}
   */
  // const customerName = 'abc123'
  /**
   *  Required. The reseller account's resource name.
   *  Parent uses the format: accounts/{account_id}
   */
  // const parent = 'abc123'
  /**
   *  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.
   */
  // const pageSize = 1234
  /**
   *  A token for a page of results other than the first page.
   *  Obtained using
   *  ListTransferableSkusResponse.next_page_token google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListTransferableSkus google.cloud.channel.v1.CloudChannelService.ListTransferableSkus 
   *  call. Optional.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. 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.
   */
  // const authToken = 'abc123'
  /**
   *  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.
   */
  // const languageCode = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListTransferableSkus() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listTransferableSkusAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListTransferableSkus();

listTransferableSkusStream(request, options)

listTransferableSkusStream(request?: protos.google.cloud.channel.v1.IListTransferableSkusRequest, options?: CallOptions): Transform;

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