Class v1.CloudChannelReportsServiceClient (3.2.1)

CloudChannelReportsService lets Google Cloud resellers and distributors retrieve and combine a variety of data in Cloud Channel for multiple products (Google Cloud, Google Voice, and Google Workspace.)

Deprecated: This service is being deprecated. Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead. v1

Package

@google-cloud/channel

Constructors

(constructor)(opts, gaxInstance)

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

Construct an instance of CloudChannelReportsServiceClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof fallback

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

Properties

apiEndpoint

static get apiEndpoint(): string;

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

auth

auth: gax.GoogleAuth;

cloudChannelReportsServiceStub

cloudChannelReportsServiceStub?: 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

billingAccountPath(account, billingAccount)

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

Return a fully-qualified billingAccount resource name string.

Parameters
NameDescription
account string
billingAccount string
Returns
TypeDescription
string

{string} Resource name string.

cancelOperation(request, options, callback)

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

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

Parameters
NameDescription
request CancelOperationRequest

The request object that will be sent.

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

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

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

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

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

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

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.

checkRunReportJobProgress(name)

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

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

Parameter
NameDescription
name string

The operation name that will be passed.

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

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The report's resource name. Specifies the account and report used
   *  to generate report data. The report_id identifier is a UID (for example,
   *  `613bf59q`).
   *  Name uses the format:
   *  accounts/{account_id}/reports/{report_id}
   */
  // const name = 'abc123'
  /**
   *  Optional. The range of usage or invoice dates to include in the result.
   */
  // const dateRange = {}
  /**
   *  Optional. A structured string that defines conditions on dimension columns
   *  to restrict the report output.
   *  Filters support logical operators (AND, OR, NOT) and conditional operators
   *  (=, !=, <,>, <=, and="">=) using `column_id` as keys.
   *  For example:
   *  `(customer:"accounts/C123abc/customers/S456def" OR
   *  customer:"accounts/C123abc/customers/S789ghi") AND
   *  invoice_start_date.year >= 2022`
   */
  // const filter = 'abc123'
  /**
   *  Optional. The BCP-47 language code, such as "en-US".  If specified, the
   *  response is localized to the corresponding language code if the
   *  original data sources support it.
   *  Default is "en-US".
   */
  // const languageCode = 'abc123'

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

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

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

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

  callRunReportJob();

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.

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.

deleteOperation(request, options, callback)

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

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

Parameters
NameDescription
request DeleteOperationRequest

The request object that will be sent.

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

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

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

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

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

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

entitlementPath(account, customer, entitlement)

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

Return a fully-qualified entitlement resource name string.

Parameters
NameDescription
account string
customer string
entitlement string
Returns
TypeDescription
string

{string} Resource name string.

fetchReportResults(request, options)

fetchReportResults(request?: protos.google.cloud.channel.v1.IFetchReportResultsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IRow[],
        protos.google.cloud.channel.v1.IFetchReportResultsRequest | null,
        protos.google.cloud.channel.v1.IFetchReportResultsResponse
    ]>;

Retrieves data generated by .

Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.

Parameters
NameDescription
request IFetchReportResultsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IRow[], protos.google.cloud.channel.v1.IFetchReportResultsRequest | null, protos.google.cloud.channel.v1.IFetchReportResultsResponse ]>

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

fetchReportResults(request, options, callback)

fetchReportResults(request: protos.google.cloud.channel.v1.IFetchReportResultsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IFetchReportResultsRequest, protos.google.cloud.channel.v1.IFetchReportResultsResponse | null | undefined, protos.google.cloud.channel.v1.IRow>): void;
Parameters
NameDescription
request IFetchReportResultsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IFetchReportResultsRequest, protos.google.cloud.channel.v1.IFetchReportResultsResponse | null | undefined, protos.google.cloud.channel.v1.IRow>
Returns
TypeDescription
void

fetchReportResults(request, callback)

fetchReportResults(request: protos.google.cloud.channel.v1.IFetchReportResultsRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IFetchReportResultsRequest, protos.google.cloud.channel.v1.IFetchReportResultsResponse | null | undefined, protos.google.cloud.channel.v1.IRow>): void;
Parameters
NameDescription
request IFetchReportResultsRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IFetchReportResultsRequest, protos.google.cloud.channel.v1.IFetchReportResultsResponse | null | undefined, protos.google.cloud.channel.v1.IRow>
Returns
TypeDescription
void

fetchReportResultsAsync(request, options)

fetchReportResultsAsync(request?: protos.google.cloud.channel.v1.IFetchReportResultsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IRow>;

Equivalent to fetchReportResults, but returns an iterable object.

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

Parameters
NameDescription
request IFetchReportResultsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The report job created by
   *  CloudChannelReportsService.RunReportJob google.cloud.channel.v1.CloudChannelReportsService.RunReportJob.
   *  Report_job uses the format:
   *  accounts/{account_id}/reportJobs/{report_job_id}
   */
  // const reportJob = 'abc123'
  /**
   *  Optional. Requested page size of the report. The server may return fewer
   *  results than requested. If you don't specify a page size, the server uses a
   *  sensible default (may change over time).
   *  The maximum value is 30,000; the server will change larger values to
   *  30,000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token that specifies a page of results beyond the first page.
   *  Obtained through
   *  FetchReportResultsResponse.next_page_token google.cloud.channel.v1.FetchReportResultsResponse.next_page_token 
   *  of the previous
   *  CloudChannelReportsService.FetchReportResults google.cloud.channel.v1.CloudChannelReportsService.FetchReportResults 
   *  call.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. List of keys specifying which report partitions to return.
   *  If empty, returns all partitions.
   */
  // const partitionKeys = ['abc','def']

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

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

  async function callFetchReportResults() {
    // Construct request
    const request = {
      reportJob,
    };

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

  callFetchReportResults();

fetchReportResultsStream(request, options)

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

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

Parameters
NameDescription
request IFetchReportResultsRequest

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

getOperation(request, options, callback)

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

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

Parameters
NameDescription
request GetOperationRequest

The request object that will be sent.

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

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

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

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

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

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

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

getProjectId()

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

getProjectId(callback)

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

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.

listOperationsAsync(request, options)

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

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

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

Parameters
NameDescription
request ListOperationsRequest

The request object that will be sent.

options CallOptions

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

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

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

Example

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

listReports(request, options)

listReports(request?: protos.google.cloud.channel.v1.IListReportsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IReport[],
        protos.google.cloud.channel.v1.IListReportsRequest | null,
        protos.google.cloud.channel.v1.IListReportsResponse
    ]>;

Lists the reports that RunReportJob can run. These reports include an ID, a description, and the list of columns that will be in the result.

Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.

Parameters
NameDescription
request IListReportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IReport[], protos.google.cloud.channel.v1.IListReportsRequest | null, protos.google.cloud.channel.v1.IListReportsResponse ]>

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

listReports(request, options, callback)

listReports(request: protos.google.cloud.channel.v1.IListReportsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListReportsRequest, protos.google.cloud.channel.v1.IListReportsResponse | null | undefined, protos.google.cloud.channel.v1.IReport>): void;
Parameters
NameDescription
request IListReportsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListReportsRequest, protos.google.cloud.channel.v1.IListReportsResponse | null | undefined, protos.google.cloud.channel.v1.IReport>
Returns
TypeDescription
void

listReports(request, callback)

listReports(request: protos.google.cloud.channel.v1.IListReportsRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListReportsRequest, protos.google.cloud.channel.v1.IListReportsResponse | null | undefined, protos.google.cloud.channel.v1.IReport>): void;
Parameters
NameDescription
request IListReportsRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListReportsRequest, protos.google.cloud.channel.v1.IListReportsResponse | null | undefined, protos.google.cloud.channel.v1.IReport>
Returns
TypeDescription
void

listReportsAsync(request, options)

listReportsAsync(request?: protos.google.cloud.channel.v1.IListReportsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IReport>;

Equivalent to listReports, but returns an iterable object.

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

Parameters
NameDescription
request IListReportsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

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

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

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the partner account to list available
   *  reports for. Parent uses the format: accounts/{account_id}
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size of the report. The server might return fewer
   *  results than requested. If unspecified, returns 20 reports. The maximum
   *  value is 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token that specifies a page of results beyond the first page.
   *  Obtained through
   *  ListReportsResponse.next_page_token google.cloud.channel.v1.ListReportsResponse.next_page_token 
   *  of the previous
   *  CloudChannelReportsService.ListReports google.cloud.channel.v1.CloudChannelReportsService.ListReports 
   *  call.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The BCP-47 language code, such as "en-US".  If specified, the
   *  response is localized to the corresponding language code if the
   *  original data sources support it.
   *  Default is "en-US".
   */
  // const languageCode = 'abc123'

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

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

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

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

  callListReports();

listReportsStream(request, options)

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

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

Parameters
NameDescription
request IListReportsRequest

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

matchAccountFromBillingAccountName(billingAccountName)

matchAccountFromBillingAccountName(billingAccountName: string): string | number;

Parse the account from BillingAccount resource.

Parameter
NameDescription
billingAccountName string

A fully-qualified path representing BillingAccount resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromChannelPartnerLinkName(channelPartnerLinkName)

matchAccountFromChannelPartnerLinkName(channelPartnerLinkName: string): string | number;

Parse the account from ChannelPartnerLink resource.

Parameter
NameDescription
channelPartnerLinkName string

A fully-qualified path representing ChannelPartnerLink resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName)

matchAccountFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName: string): string | number;

Parse the account from ChannelPartnerRepricingConfig resource.

Parameter
NameDescription
channelPartnerRepricingConfigName string

A fully-qualified path representing ChannelPartnerRepricingConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromCustomerName(customerName)

matchAccountFromCustomerName(customerName: string): string | number;

Parse the account from Customer resource.

Parameter
NameDescription
customerName string

A fully-qualified path representing Customer resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromCustomerRepricingConfigName(customerRepricingConfigName)

matchAccountFromCustomerRepricingConfigName(customerRepricingConfigName: string): string | number;

Parse the account from CustomerRepricingConfig resource.

Parameter
NameDescription
customerRepricingConfigName string

A fully-qualified path representing CustomerRepricingConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromEntitlementName(entitlementName)

matchAccountFromEntitlementName(entitlementName: string): string | number;

Parse the account from Entitlement resource.

Parameter
NameDescription
entitlementName string

A fully-qualified path representing Entitlement resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromOfferName(offerName)

matchAccountFromOfferName(offerName: string): string | number;

Parse the account from Offer resource.

Parameter
NameDescription
offerName string

A fully-qualified path representing Offer resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromReportJobName(reportJobName)

matchAccountFromReportJobName(reportJobName: string): string | number;

Parse the account from ReportJob resource.

Parameter
NameDescription
reportJobName string

A fully-qualified path representing ReportJob resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromReportName(reportName)

matchAccountFromReportName(reportName: string): string | number;

Parse the account from Report resource.

Parameter
NameDescription
reportName string

A fully-qualified path representing Report resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromSkuGroupName(skuGroupName)

matchAccountFromSkuGroupName(skuGroupName: string): string | number;

Parse the account from SkuGroup resource.

Parameter
NameDescription
skuGroupName string

A fully-qualified path representing SkuGroup resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchBillingAccountFromBillingAccountName(billingAccountName)

matchBillingAccountFromBillingAccountName(billingAccountName: string): string | number;

Parse the billing_account from BillingAccount resource.

Parameter
NameDescription
billingAccountName string

A fully-qualified path representing BillingAccount resource.

Returns
TypeDescription
string | number

{string} A string representing the billing_account.

matchChannelPartnerFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName)

matchChannelPartnerFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName: string): string | number;

Parse the channel_partner from ChannelPartnerRepricingConfig resource.

Parameter
NameDescription
channelPartnerRepricingConfigName string

A fully-qualified path representing ChannelPartnerRepricingConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the channel_partner.

matchChannelPartnerLinkFromChannelPartnerLinkName(channelPartnerLinkName)

matchChannelPartnerLinkFromChannelPartnerLinkName(channelPartnerLinkName: string): string | number;

Parse the channel_partner_link from ChannelPartnerLink resource.

Parameter
NameDescription
channelPartnerLinkName string

A fully-qualified path representing ChannelPartnerLink resource.

Returns
TypeDescription
string | number

{string} A string representing the channel_partner_link.

matchChannelPartnerRepricingConfigFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName)

matchChannelPartnerRepricingConfigFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName: string): string | number;

Parse the channel_partner_repricing_config from ChannelPartnerRepricingConfig resource.

Parameter
NameDescription
channelPartnerRepricingConfigName string

A fully-qualified path representing ChannelPartnerRepricingConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the channel_partner_repricing_config.

matchCustomerFromCustomerName(customerName)

matchCustomerFromCustomerName(customerName: string): string | number;

Parse the customer from Customer resource.

Parameter
NameDescription
customerName string

A fully-qualified path representing Customer resource.

Returns
TypeDescription
string | number

{string} A string representing the customer.

matchCustomerFromCustomerRepricingConfigName(customerRepricingConfigName)

matchCustomerFromCustomerRepricingConfigName(customerRepricingConfigName: string): string | number;

Parse the customer from CustomerRepricingConfig resource.

Parameter
NameDescription
customerRepricingConfigName string

A fully-qualified path representing CustomerRepricingConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the customer.

matchCustomerFromEntitlementName(entitlementName)

matchCustomerFromEntitlementName(entitlementName: string): string | number;

Parse the customer from Entitlement resource.

Parameter
NameDescription
entitlementName string

A fully-qualified path representing Entitlement resource.

Returns
TypeDescription
string | number

{string} A string representing the customer.

matchCustomerRepricingConfigFromCustomerRepricingConfigName(customerRepricingConfigName)

matchCustomerRepricingConfigFromCustomerRepricingConfigName(customerRepricingConfigName: string): string | number;

Parse the customer_repricing_config from CustomerRepricingConfig resource.

Parameter
NameDescription
customerRepricingConfigName string

A fully-qualified path representing CustomerRepricingConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the customer_repricing_config.

matchEntitlementFromEntitlementName(entitlementName)

matchEntitlementFromEntitlementName(entitlementName: string): string | number;

Parse the entitlement from Entitlement resource.

Parameter
NameDescription
entitlementName string

A fully-qualified path representing Entitlement resource.

Returns
TypeDescription
string | number

{string} A string representing the entitlement.

matchOfferFromOfferName(offerName)

matchOfferFromOfferName(offerName: string): string | number;

Parse the offer from Offer resource.

Parameter
NameDescription
offerName string

A fully-qualified path representing Offer resource.

Returns
TypeDescription
string | number

{string} A string representing the offer.

matchProductFromProductName(productName)

matchProductFromProductName(productName: string): string | number;

Parse the product from Product resource.

Parameter
NameDescription
productName string

A fully-qualified path representing Product resource.

Returns
TypeDescription
string | number

{string} A string representing the product.

matchProductFromSkuName(skuName)

matchProductFromSkuName(skuName: string): string | number;

Parse the product from Sku resource.

Parameter
NameDescription
skuName string

A fully-qualified path representing Sku resource.

Returns
TypeDescription
string | number

{string} A string representing the product.

matchReportFromReportName(reportName)

matchReportFromReportName(reportName: string): string | number;

Parse the report from Report resource.

Parameter
NameDescription
reportName string

A fully-qualified path representing Report resource.

Returns
TypeDescription
string | number

{string} A string representing the report.

matchReportJobFromReportJobName(reportJobName)

matchReportJobFromReportJobName(reportJobName: string): string | number;

Parse the report_job from ReportJob resource.

Parameter
NameDescription
reportJobName string

A fully-qualified path representing ReportJob resource.

Returns
TypeDescription
string | number

{string} A string representing the report_job.

matchSkuFromSkuName(skuName)

matchSkuFromSkuName(skuName: string): string | number;

Parse the sku from Sku resource.

Parameter
NameDescription
skuName string

A fully-qualified path representing Sku resource.

Returns
TypeDescription
string | number

{string} A string representing the sku.

matchSkuGroupFromSkuGroupName(skuGroupName)

matchSkuGroupFromSkuGroupName(skuGroupName: string): string | number;

Parse the sku_group from SkuGroup resource.

Parameter
NameDescription
skuGroupName string

A fully-qualified path representing SkuGroup resource.

Returns
TypeDescription
string | number

{string} A string representing the sku_group.

offerPath(account, offer)

offerPath(account: string, offer: string): string;

Return a fully-qualified offer resource name string.

Parameters
NameDescription
account string
offer string
Returns
TypeDescription
string

{string} Resource name string.

productPath(product)

productPath(product: string): string;

Return a fully-qualified product resource name string.

Parameter
NameDescription
product string
Returns
TypeDescription
string

{string} Resource name string.

reportJobPath(account, reportJob)

reportJobPath(account: string, reportJob: string): string;

Return a fully-qualified reportJob resource name string.

Parameters
NameDescription
account string
reportJob string
Returns
TypeDescription
string

{string} Resource name string.

reportPath(account, report)

reportPath(account: string, report: string): string;

Return a fully-qualified report resource name string.

Parameters
NameDescription
account string
report string
Returns
TypeDescription
string

{string} Resource name string.

runReportJob(request, options)

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

Begins generation of data for a given report. The report identifier is a UID (for example, 613bf59q).

Possible error codes:

* PERMISSION_DENIED: The user doesn't have access to this report. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The report identifier was 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 contains an instance of .

To get the results of report generation, call with the .

Deprecated: Please use [Export Channel Services data to BigQuery](https://cloud.google.com/channel/docs/rebilling/export-data-to-bigquery) instead.

Parameters
NameDescription
request IRunReportJobRequest

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.IRunReportJobResponse, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The report's resource name. Specifies the account and report used
   *  to generate report data. The report_id identifier is a UID (for example,
   *  `613bf59q`).
   *  Name uses the format:
   *  accounts/{account_id}/reports/{report_id}
   */
  // const name = 'abc123'
  /**
   *  Optional. The range of usage or invoice dates to include in the result.
   */
  // const dateRange = {}
  /**
   *  Optional. A structured string that defines conditions on dimension columns
   *  to restrict the report output.
   *  Filters support logical operators (AND, OR, NOT) and conditional operators
   *  (=, !=, <,>, <=, and="">=) using `column_id` as keys.
   *  For example:
   *  `(customer:"accounts/C123abc/customers/S456def" OR
   *  customer:"accounts/C123abc/customers/S789ghi") AND
   *  invoice_start_date.year >= 2022`
   */
  // const filter = 'abc123'
  /**
   *  Optional. The BCP-47 language code, such as "en-US".  If specified, the
   *  response is localized to the corresponding language code if the
   *  original data sources support it.
   *  Default is "en-US".
   */
  // const languageCode = 'abc123'

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

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

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

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

  callRunReportJob();

runReportJob(request, options, callback)

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

runReportJob(request, callback)

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

skuGroupPath(account, skuGroup)

skuGroupPath(account: string, skuGroup: string): string;

Return a fully-qualified skuGroup resource name string.

Parameters
NameDescription
account string
skuGroup string
Returns
TypeDescription
string

{string} Resource name string.

skuPath(product, sku)

skuPath(product: string, sku: string): string;

Return a fully-qualified sku resource name string.

Parameters
NameDescription
product string
sku string
Returns
TypeDescription
string

{string} Resource name string.