CloudChannelReportsService lets Google Cloud resellers and distributors retrieve and combine a variety of data in Cloud Channel for multiple products (Google Cloud Platform (GCP), Google Voice, and Google Workspace.) v1
Package
@google-cloud/channelConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of CloudChannelReportsServiceClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof gax.fallback
: loaded instance of |
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
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 | |
---|---|
Name | Description |
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 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 | |
---|---|
Type | Description |
Promise<protos.google.protobuf.Empty> |
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 | |
---|---|
Name | Description |
account |
string
|
channelPartnerLink |
string
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
account |
string
|
channelPartner |
string
|
channelPartnerRepricingConfig |
string
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name |
string
The operation name that will be passed. |
Returns | |
---|---|
Type | Description |
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](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |
/**
* 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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
account |
string
|
customer |
string
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
account |
string
|
customer |
string
|
customerRepricingConfig |
string
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
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 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 | |
---|---|
Type | Description |
Promise<protos.google.protobuf.Empty> |
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 | |
---|---|
Name | Description |
account |
string
|
customer |
string
|
entitlement |
string
|
Returns | |
---|---|
Type | Description |
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 .
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.channel.v1.IFetchReportResultsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
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 . 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 |
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 | |
---|---|
Name | Description |
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>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
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>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
protos.google.cloud.channel.v1.IFetchReportResultsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.channel.v1.IRow> | {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 . 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. |
/**
* 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'
// 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 | |
---|---|
Name | Description |
request |
protos.google.cloud.channel.v1.IFetchReportResultsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
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 | |
---|---|
Name | Description |
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 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 | |
---|---|
Type | Description |
Promise<[protos.google.longrunning.Operation]> |
const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)
getProjectId()
getProjectId(): Promise<string>;
Returns | |
---|---|
Type | Description |
Promise<string> |
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter | |
---|---|
Name | Description |
callback |
Callback<string, undefined, undefined>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
protos.google.longrunning.ListOperationsRequest
The request object that will be sent. |
options |
gax.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 | |
---|---|
Type | Description |
AsyncIterable<protos.google.longrunning.ListOperationsResponse> | {Object} An iterable Object that conforms to iteration protocols. |
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.
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.channel.v1.IListReportsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
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 . 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 |
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 | |
---|---|
Name | Description |
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>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
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>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request |
protos.google.cloud.channel.v1.IListReportsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.channel.v1.IReport> | {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 . 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. |
/**
* 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 | |
---|---|
Name | Description |
request |
protos.google.cloud.channel.v1.IListReportsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Transform | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
matchAccountFromChannelPartnerLinkName(channelPartnerLinkName)
matchAccountFromChannelPartnerLinkName(channelPartnerLinkName: string): string | number;
Parse the account from ChannelPartnerLink resource.
Parameter | |
---|---|
Name | Description |
channelPartnerLinkName |
string
A fully-qualified path representing ChannelPartnerLink resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the account. |
matchAccountFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName)
matchAccountFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName: string): string | number;
Parse the account from ChannelPartnerRepricingConfig resource.
Parameter | |
---|---|
Name | Description |
channelPartnerRepricingConfigName |
string
A fully-qualified path representing ChannelPartnerRepricingConfig resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the account. |
matchAccountFromCustomerName(customerName)
matchAccountFromCustomerName(customerName: string): string | number;
Parse the account from Customer resource.
Parameter | |
---|---|
Name | Description |
customerName |
string
A fully-qualified path representing Customer resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the account. |
matchAccountFromCustomerRepricingConfigName(customerRepricingConfigName)
matchAccountFromCustomerRepricingConfigName(customerRepricingConfigName: string): string | number;
Parse the account from CustomerRepricingConfig resource.
Parameter | |
---|---|
Name | Description |
customerRepricingConfigName |
string
A fully-qualified path representing CustomerRepricingConfig resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the account. |
matchAccountFromEntitlementName(entitlementName)
matchAccountFromEntitlementName(entitlementName: string): string | number;
Parse the account from Entitlement resource.
Parameter | |
---|---|
Name | Description |
entitlementName |
string
A fully-qualified path representing Entitlement resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the account. |
matchAccountFromOfferName(offerName)
matchAccountFromOfferName(offerName: string): string | number;
Parse the account from Offer resource.
Parameter | |
---|---|
Name | Description |
offerName |
string
A fully-qualified path representing Offer resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the account. |
matchAccountFromReportJobName(reportJobName)
matchAccountFromReportJobName(reportJobName: string): string | number;
Parse the account from ReportJob resource.
Parameter | |
---|---|
Name | Description |
reportJobName |
string
A fully-qualified path representing ReportJob resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the account. |
matchAccountFromReportName(reportName)
matchAccountFromReportName(reportName: string): string | number;
Parse the account from Report resource.
Parameter | |
---|---|
Name | Description |
reportName |
string
A fully-qualified path representing Report resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the account. |
matchChannelPartnerFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName)
matchChannelPartnerFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName: string): string | number;
Parse the channel_partner from ChannelPartnerRepricingConfig resource.
Parameter | |
---|---|
Name | Description |
channelPartnerRepricingConfigName |
string
A fully-qualified path representing ChannelPartnerRepricingConfig resource. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
channelPartnerLinkName |
string
A fully-qualified path representing ChannelPartnerLink resource. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
channelPartnerRepricingConfigName |
string
A fully-qualified path representing ChannelPartnerRepricingConfig resource. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
customerName |
string
A fully-qualified path representing Customer resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the customer. |
matchCustomerFromCustomerRepricingConfigName(customerRepricingConfigName)
matchCustomerFromCustomerRepricingConfigName(customerRepricingConfigName: string): string | number;
Parse the customer from CustomerRepricingConfig resource.
Parameter | |
---|---|
Name | Description |
customerRepricingConfigName |
string
A fully-qualified path representing CustomerRepricingConfig resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the customer. |
matchCustomerFromEntitlementName(entitlementName)
matchCustomerFromEntitlementName(entitlementName: string): string | number;
Parse the customer from Entitlement resource.
Parameter | |
---|---|
Name | Description |
entitlementName |
string
A fully-qualified path representing Entitlement resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the customer. |
matchCustomerRepricingConfigFromCustomerRepricingConfigName(customerRepricingConfigName)
matchCustomerRepricingConfigFromCustomerRepricingConfigName(customerRepricingConfigName: string): string | number;
Parse the customer_repricing_config from CustomerRepricingConfig resource.
Parameter | |
---|---|
Name | Description |
customerRepricingConfigName |
string
A fully-qualified path representing CustomerRepricingConfig resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the customer_repricing_config. |
matchEntitlementFromEntitlementName(entitlementName)
matchEntitlementFromEntitlementName(entitlementName: string): string | number;
Parse the entitlement from Entitlement resource.
Parameter | |
---|---|
Name | Description |
entitlementName |
string
A fully-qualified path representing Entitlement resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the entitlement. |
matchOfferFromOfferName(offerName)
matchOfferFromOfferName(offerName: string): string | number;
Parse the offer from Offer resource.
Parameter | |
---|---|
Name | Description |
offerName |
string
A fully-qualified path representing Offer resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the offer. |
matchProductFromProductName(productName)
matchProductFromProductName(productName: string): string | number;
Parse the product from Product resource.
Parameter | |
---|---|
Name | Description |
productName |
string
A fully-qualified path representing Product resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the product. |
matchProductFromSkuName(skuName)
matchProductFromSkuName(skuName: string): string | number;
Parse the product from Sku resource.
Parameter | |
---|---|
Name | Description |
skuName |
string
A fully-qualified path representing Sku resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the product. |
matchReportFromReportName(reportName)
matchReportFromReportName(reportName: string): string | number;
Parse the report from Report resource.
Parameter | |
---|---|
Name | Description |
reportName |
string
A fully-qualified path representing Report resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the report. |
matchReportJobFromReportJobName(reportJobName)
matchReportJobFromReportJobName(reportJobName: string): string | number;
Parse the report_job from ReportJob resource.
Parameter | |
---|---|
Name | Description |
reportJobName |
string
A fully-qualified path representing ReportJob resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the report_job. |
matchSkuFromSkuName(skuName)
matchSkuFromSkuName(skuName: string): string | number;
Parse the sku from Sku resource.
Parameter | |
---|---|
Name | Description |
skuName |
string
A fully-qualified path representing Sku resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the sku. |
offerPath(account, offer)
offerPath(account: string, offer: string): string;
Return a fully-qualified offer resource name string.
Parameters | |
---|---|
Name | Description |
account |
string
|
offer |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
productPath(product)
productPath(product: string): string;
Return a fully-qualified product resource name string.
Parameter | |
---|---|
Name | Description |
product |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
reportJobPath(account, reportJob)
reportJobPath(account: string, reportJob: string): string;
Return a fully-qualified reportJob resource name string.
Parameters | |
---|---|
Name | Description |
account |
string
|
reportJob |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
reportPath(account, report)
reportPath(account: string, report: string): string;
Return a fully-qualified report resource name string.
Parameters | |
---|---|
Name | Description |
account |
string
|
report |
string
|
Returns | |
---|---|
Type | Description |
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 .
Parameters | |
---|---|
Name | Description |
request |
protos.google.cloud.channel.v1.IRunReportJobRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
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 |
/**
* 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 | |
---|---|
Name | Description |
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>
|
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
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>
|
Returns | |
---|---|
Type | Description |
void |
skuPath(product, sku)
skuPath(product: string, sku: string): string;
Return a fully-qualified sku resource name string.
Parameters | |
---|---|
Name | Description |
product |
string
|
sku |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |