Class v1.CloudChannelServiceClient (2.4.0)

Stay organized with collections Save and categorize content based on your preferences.

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

  • s: 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 gax.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: 'rest'}, 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 protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 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>
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 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>
Returns
TypeDescription
void

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 protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 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>
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 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>
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 protos.google.longrunning.CancelOperationRequest

The request object that will be sent.

options gax.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]https://googleapis.github.io/gax-nodejs/global.html#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 protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 = 1234
  /**
   *  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'

  // 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 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>
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 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>
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 protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 = 1234
  /**
   *  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 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>
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 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>
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 protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 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>
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 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>
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 = 1234
  /**
   *  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'

  // 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 = 1234
  /**
   *  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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 resources for the domain (may be empty)

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

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 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>
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 protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 = 1234
  /**
   *  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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 = 1234
  /**
   *  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 resource.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 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>
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 protos.google.cloud.channel.v1.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 . * The contained vaule 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 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 resource, otherwise returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 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>
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 protos.google.cloud.channel.v1.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 resource under the reseller or distributor account.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * Domain field value doesn't match the primary email domain.

Return value: The newly created resource.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 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>
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 protos.google.cloud.channel.v1.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 or . * The contained vaule 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 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 resource, otherwise returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 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>
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 protos.google.cloud.channel.v1.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. * 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 protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) 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 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>
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 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>
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 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 is active or in the past. * NOT_FOUND: No found for the name in the request.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 protos.google.cloud.channel.v1.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 protos.google.cloud.channel.v1.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 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 resource found for the name in the request.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 protos.google.cloud.channel.v1.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 protos.google.cloud.channel.v1.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 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 is active or in the past. * NOT_FOUND: No found for the name in the request.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 protos.google.cloud.channel.v1.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 protos.google.cloud.channel.v1.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 protos.google.longrunning.DeleteOperationRequest

The request object that will be sent.

options gax.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]https://googleapis.github.io/gax-nodejs/global.html#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 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 resource.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 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>
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 protos.google.cloud.channel.v1.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 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 resource, otherwise returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 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>
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 protos.google.cloud.channel.v1.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 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 resource.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 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>
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 protos.google.cloud.channel.v1.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 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 resource, otherwise returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 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>
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 protos.google.cloud.channel.v1.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 protos.google.cloud.channel.v1.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 [Entitlement]. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 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>
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 protos.google.cloud.channel.v1.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 protos.google.longrunning.GetOperationRequest

The request object that will be sent.

options gax.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]https://googleapis.github.io/gax-nodejs/global.html#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 [google.longrunning.Operation]. {Promise} - The promise which resolves to an array. The first element of the array is an object representing [google.longrunning.Operation]. 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 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. * 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 .

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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 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>
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 protos.google.cloud.channel.v1.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 s 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 resources.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 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>
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 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>
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 protos.google.cloud.channel.v1.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](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 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 resources. The data for each resource is displayed in the ascending order of: * channel partner ID * *

If unsuccessful, returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 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>
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 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>
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 protos.google.cloud.channel.v1.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](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 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 resources. The data for each resource is displayed in the ascending order of: * customer ID * * *

If unsuccessful, returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 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>
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 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>
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 protos.google.cloud.channel.v1.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](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 s.

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 s, or an empty list if there are no customers.

Parameters
NameDescription
request protos.google.cloud.channel.v1.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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 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>
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 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>
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 protos.google.cloud.channel.v1.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](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). 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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) 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 protos.google.cloud.channel.v1.IListCustomersRequest

The request object that will be sent.

options