Service describing handlers for resources v1
Package
@google-cloud/storageinsightsConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
Construct an instance of StorageInsightsClient.
Parameters | |
---|---|
Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof 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;
descriptors
descriptors: Descriptors;
innerApiCalls
innerApiCalls: {
[name: string]: Function;
};
locationsClient
locationsClient: LocationsClient;
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.
storageInsightsStub
storageInsightsStub?: Promise<{
[name: string]: Function;
}>;
warn
warn: (code: string, message: string, warnType?: string) => void;
Methods
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. |
createReportConfig(request, options)
createReportConfig(request?: protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest, options?: CallOptions): Promise<[
protos.google.cloud.storageinsights.v1.IReportConfig,
(protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest | undefined),
{} | undefined
]>;
Creates a new ReportConfig in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
ICreateReportConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.storageinsights.v1.IReportConfig,
(protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Value for parent.
*/
// const parent = 'abc123'
/**
* Required. The resource being created
*/
// const reportConfig = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where 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 original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Storageinsights library
const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;
// Instantiates a client
const storageinsightsClient = new StorageInsightsClient();
async function callCreateReportConfig() {
// Construct request
const request = {
parent,
reportConfig,
};
// Run request
const response = await storageinsightsClient.createReportConfig(request);
console.log(response);
}
callCreateReportConfig();
createReportConfig(request, options, callback)
createReportConfig(request: protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateReportConfigRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
createReportConfig(request, callback)
createReportConfig(request: protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest, callback: Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
ICreateReportConfigRequest
|
callback |
Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.ICreateReportConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteReportConfig(request, options)
deleteReportConfig(request?: protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest | undefined),
{} | undefined
]>;
Deletes a single ReportConfig.
Parameters | |
---|---|
Name | Description |
request |
IDeleteReportConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.protobuf.IEmpty,
(protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Name of the resource
*/
// const name = 'abc123'
/**
* Optional. If set, all ReportDetails for this ReportConfig will be deleted.
*/
// const force = true
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where 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 original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Storageinsights library
const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;
// Instantiates a client
const storageinsightsClient = new StorageInsightsClient();
async function callDeleteReportConfig() {
// Construct request
const request = {
name,
};
// Run request
const response = await storageinsightsClient.deleteReportConfig(request);
console.log(response);
}
callDeleteReportConfig();
deleteReportConfig(request, options, callback)
deleteReportConfig(request: protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteReportConfigRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
deleteReportConfig(request, callback)
deleteReportConfig(request: protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IDeleteReportConfigRequest
|
callback |
Callback<protos.google.protobuf.IEmpty, protos.google.cloud.storageinsights.v1.IDeleteReportConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getLocation(request, options, callback)
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
Gets information about a location.
Parameters | |
---|---|
Name | Description |
request |
LocationProtos.google.cloud.location.IGetLocationRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Call options. See CallOptions for more details. |
callback |
Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
Promise<google.cloud.location.ILocation> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |
const [response] = await client.getLocation(request);
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 |
getReportConfig(request, options)
getReportConfig(request?: protos.google.cloud.storageinsights.v1.IGetReportConfigRequest, options?: CallOptions): Promise<[
protos.google.cloud.storageinsights.v1.IReportConfig,
(protos.google.cloud.storageinsights.v1.IGetReportConfigRequest | undefined),
{} | undefined
]>;
Gets details of a single ReportConfig.
Parameters | |
---|---|
Name | Description |
request |
IGetReportConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.storageinsights.v1.IReportConfig,
(protos.google.cloud.storageinsights.v1.IGetReportConfigRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Name of the resource
*/
// const name = 'abc123'
// Imports the Storageinsights library
const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;
// Instantiates a client
const storageinsightsClient = new StorageInsightsClient();
async function callGetReportConfig() {
// Construct request
const request = {
name,
};
// Run request
const response = await storageinsightsClient.getReportConfig(request);
console.log(response);
}
callGetReportConfig();
getReportConfig(request, options, callback)
getReportConfig(request: protos.google.cloud.storageinsights.v1.IGetReportConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IGetReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetReportConfigRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IGetReportConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getReportConfig(request, callback)
getReportConfig(request: protos.google.cloud.storageinsights.v1.IGetReportConfigRequest, callback: Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IGetReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetReportConfigRequest
|
callback |
Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IGetReportConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getReportDetail(request, options)
getReportDetail(request?: protos.google.cloud.storageinsights.v1.IGetReportDetailRequest, options?: CallOptions): Promise<[
protos.google.cloud.storageinsights.v1.IReportDetail,
(protos.google.cloud.storageinsights.v1.IGetReportDetailRequest | undefined),
{} | undefined
]>;
Gets details of a single ReportDetail.
Parameters | |
---|---|
Name | Description |
request |
IGetReportDetailRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.storageinsights.v1.IReportDetail,
(protos.google.cloud.storageinsights.v1.IGetReportDetailRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Name of the resource
*/
// const name = 'abc123'
// Imports the Storageinsights library
const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;
// Instantiates a client
const storageinsightsClient = new StorageInsightsClient();
async function callGetReportDetail() {
// Construct request
const request = {
name,
};
// Run request
const response = await storageinsightsClient.getReportDetail(request);
console.log(response);
}
callGetReportDetail();
getReportDetail(request, options, callback)
getReportDetail(request: protos.google.cloud.storageinsights.v1.IGetReportDetailRequest, options: CallOptions, callback: Callback<protos.google.cloud.storageinsights.v1.IReportDetail, protos.google.cloud.storageinsights.v1.IGetReportDetailRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetReportDetailRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.storageinsights.v1.IReportDetail, protos.google.cloud.storageinsights.v1.IGetReportDetailRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
getReportDetail(request, callback)
getReportDetail(request: protos.google.cloud.storageinsights.v1.IGetReportDetailRequest, callback: Callback<protos.google.cloud.storageinsights.v1.IReportDetail, protos.google.cloud.storageinsights.v1.IGetReportDetailRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IGetReportDetailRequest
|
callback |
Callback<protos.google.cloud.storageinsights.v1.IReportDetail, protos.google.cloud.storageinsights.v1.IGetReportDetailRequest | null | undefined, {} | null | 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. |
listLocationsAsync(request, options)
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
Lists information about the supported locations for this service. Returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
LocationProtos.google.cloud.location.IListLocationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<google.cloud.location.ILocation> | {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. |
const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
// process response
}
listReportConfigs(request, options)
listReportConfigs(request?: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, options?: CallOptions): Promise<[
protos.google.cloud.storageinsights.v1.IReportConfig[],
protos.google.cloud.storageinsights.v1.IListReportConfigsRequest | null,
protos.google.cloud.storageinsights.v1.IListReportConfigsResponse
]>;
Lists ReportConfigs in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
IListReportConfigsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.storageinsights.v1.IReportConfig[],
protos.google.cloud.storageinsights.v1.IListReportConfigsRequest | null,
protos.google.cloud.storageinsights.v1.IListReportConfigsResponse
]> | {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 |
listReportConfigs(request, options, callback)
listReportConfigs(request: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, protos.google.cloud.storageinsights.v1.IListReportConfigsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportConfig>): void;
Parameters | |
---|---|
Name | Description |
request |
IListReportConfigsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, protos.google.cloud.storageinsights.v1.IListReportConfigsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportConfig>
|
Returns | |
---|---|
Type | Description |
void |
listReportConfigs(request, callback)
listReportConfigs(request: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, callback: PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, protos.google.cloud.storageinsights.v1.IListReportConfigsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportConfig>): void;
Parameters | |
---|---|
Name | Description |
request |
IListReportConfigsRequest
|
callback |
PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, protos.google.cloud.storageinsights.v1.IListReportConfigsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportConfig>
|
Returns | |
---|---|
Type | Description |
void |
listReportConfigsAsync(request, options)
listReportConfigsAsync(request?: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.storageinsights.v1.IReportConfig>;
Equivalent to listReportConfigs
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListReportConfigsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.storageinsights.v1.IReportConfig> | {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. Parent value for ListReportConfigsRequest
*/
// const parent = 'abc123'
/**
* Requested page size. Server may return fewer items than requested.
* If unspecified, server will pick an appropriate default.
*/
// const pageSize = 1234
/**
* A token identifying a page of results the server should return.
*/
// const pageToken = 'abc123'
/**
* Filtering results
*/
// const filter = 'abc123'
/**
* Hint for how to order the results
*/
// const orderBy = 'abc123'
// Imports the Storageinsights library
const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;
// Instantiates a client
const storageinsightsClient = new StorageInsightsClient();
async function callListReportConfigs() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await storageinsightsClient.listReportConfigsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListReportConfigs();
listReportConfigsStream(request, options)
listReportConfigsStream(request?: protos.google.cloud.storageinsights.v1.IListReportConfigsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListReportConfigsRequest
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 |
listReportDetails(request, options)
listReportDetails(request?: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, options?: CallOptions): Promise<[
protos.google.cloud.storageinsights.v1.IReportDetail[],
protos.google.cloud.storageinsights.v1.IListReportDetailsRequest | null,
protos.google.cloud.storageinsights.v1.IListReportDetailsResponse
]>;
Lists ReportDetails in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
IListReportDetailsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.storageinsights.v1.IReportDetail[],
protos.google.cloud.storageinsights.v1.IListReportDetailsRequest | null,
protos.google.cloud.storageinsights.v1.IListReportDetailsResponse
]> | {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 |
listReportDetails(request, options, callback)
listReportDetails(request: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, protos.google.cloud.storageinsights.v1.IListReportDetailsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportDetail>): void;
Parameters | |
---|---|
Name | Description |
request |
IListReportDetailsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, protos.google.cloud.storageinsights.v1.IListReportDetailsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportDetail>
|
Returns | |
---|---|
Type | Description |
void |
listReportDetails(request, callback)
listReportDetails(request: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, callback: PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, protos.google.cloud.storageinsights.v1.IListReportDetailsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportDetail>): void;
Parameters | |
---|---|
Name | Description |
request |
IListReportDetailsRequest
|
callback |
PaginationCallback<protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, protos.google.cloud.storageinsights.v1.IListReportDetailsResponse | null | undefined, protos.google.cloud.storageinsights.v1.IReportDetail>
|
Returns | |
---|---|
Type | Description |
void |
listReportDetailsAsync(request, options)
listReportDetailsAsync(request?: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.storageinsights.v1.IReportDetail>;
Equivalent to listReportDetails
, but returns an iterable object.
for
-await
-of
syntax is used with the iterable to get response elements on-demand.
Parameters | |
---|---|
Name | Description |
request |
IListReportDetailsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
AsyncIterable<protos.google.cloud.storageinsights.v1.IReportDetail> | {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. Parent value for ListReportDetailsRequest
*/
// const parent = 'abc123'
/**
* Requested page size. Server may return fewer items than requested.
* If unspecified, server will pick an appropriate default.
*/
// const pageSize = 1234
/**
* A token identifying a page of results the server should return.
*/
// const pageToken = 'abc123'
/**
* Filtering results
*/
// const filter = 'abc123'
/**
* Hint for how to order the results
*/
// const orderBy = 'abc123'
// Imports the Storageinsights library
const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;
// Instantiates a client
const storageinsightsClient = new StorageInsightsClient();
async function callListReportDetails() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = await storageinsightsClient.listReportDetailsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListReportDetails();
listReportDetailsStream(request, options)
listReportDetailsStream(request?: protos.google.cloud.storageinsights.v1.IListReportDetailsRequest, options?: CallOptions): Transform;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
Parameters | |
---|---|
Name | Description |
request |
IListReportDetailsRequest
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 |
locationPath(project, location)
locationPath(project: string, location: string): string;
Return a fully-qualified location resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName: string): string | number;
Parse the location from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromReportConfigName(reportConfigName)
matchLocationFromReportConfigName(reportConfigName: string): string | number;
Parse the location from ReportConfig resource.
Parameter | |
---|---|
Name | Description |
reportConfigName |
string
A fully-qualified path representing ReportConfig resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchLocationFromReportDetailName(reportDetailName)
matchLocationFromReportDetailName(reportDetailName: string): string | number;
Parse the location from ReportDetail resource.
Parameter | |
---|---|
Name | Description |
reportDetailName |
string
A fully-qualified path representing ReportDetail resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the location. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName: string): string | number;
Parse the project from Location resource.
Parameter | |
---|---|
Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName: string): string | number;
Parse the project from Project resource.
Parameter | |
---|---|
Name | Description |
projectName |
string
A fully-qualified path representing Project resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromReportConfigName(reportConfigName)
matchProjectFromReportConfigName(reportConfigName: string): string | number;
Parse the project from ReportConfig resource.
Parameter | |
---|---|
Name | Description |
reportConfigName |
string
A fully-qualified path representing ReportConfig resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchProjectFromReportDetailName(reportDetailName)
matchProjectFromReportDetailName(reportDetailName: string): string | number;
Parse the project from ReportDetail resource.
Parameter | |
---|---|
Name | Description |
reportDetailName |
string
A fully-qualified path representing ReportDetail resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the project. |
matchReportConfigFromReportConfigName(reportConfigName)
matchReportConfigFromReportConfigName(reportConfigName: string): string | number;
Parse the report_config from ReportConfig resource.
Parameter | |
---|---|
Name | Description |
reportConfigName |
string
A fully-qualified path representing ReportConfig resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the report_config. |
matchReportConfigFromReportDetailName(reportDetailName)
matchReportConfigFromReportDetailName(reportDetailName: string): string | number;
Parse the report_config from ReportDetail resource.
Parameter | |
---|---|
Name | Description |
reportDetailName |
string
A fully-qualified path representing ReportDetail resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the report_config. |
matchReportDetailFromReportDetailName(reportDetailName)
matchReportDetailFromReportDetailName(reportDetailName: string): string | number;
Parse the report_detail from ReportDetail resource.
Parameter | |
---|---|
Name | Description |
reportDetailName |
string
A fully-qualified path representing ReportDetail resource. |
Returns | |
---|---|
Type | Description |
string | number | {string} A string representing the report_detail. |
projectPath(project)
projectPath(project: string): string;
Return a fully-qualified project resource name string.
Parameter | |
---|---|
Name | Description |
project |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
reportConfigPath(project, location, reportConfig)
reportConfigPath(project: string, location: string, reportConfig: string): string;
Return a fully-qualified reportConfig resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
reportConfig |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
reportDetailPath(project, location, reportConfig, reportDetail)
reportDetailPath(project: string, location: string, reportConfig: string, reportDetail: string): string;
Return a fully-qualified reportDetail resource name string.
Parameters | |
---|---|
Name | Description |
project |
string
|
location |
string
|
reportConfig |
string
|
reportDetail |
string
|
Returns | |
---|---|
Type | Description |
string | {string} Resource name string. |
updateReportConfig(request, options)
updateReportConfig(request?: protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest, options?: CallOptions): Promise<[
protos.google.cloud.storageinsights.v1.IReportConfig,
(protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest | undefined),
{} | undefined
]>;
Updates the parameters of a single ReportConfig.
Parameters | |
---|---|
Name | Description |
request |
IUpdateReportConfigRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
Returns | |
---|---|
Type | Description |
Promise<[
protos.google.cloud.storageinsights.v1.IReportConfig,
(protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest | undefined),
{} | undefined
]> | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) 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. Field mask is used to specify the fields to be overwritten in the
* ReportConfig resource by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then all fields will be overwritten.
*/
// const updateMask = {}
/**
* Required. The resource being updated
*/
// const reportConfig = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where 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 original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Storageinsights library
const {StorageInsightsClient} = require('@google-cloud/storageinsights').v1;
// Instantiates a client
const storageinsightsClient = new StorageInsightsClient();
async function callUpdateReportConfig() {
// Construct request
const request = {
updateMask,
reportConfig,
};
// Run request
const response = await storageinsightsClient.updateReportConfig(request);
console.log(response);
}
callUpdateReportConfig();
updateReportConfig(request, options, callback)
updateReportConfig(request: protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUpdateReportConfigRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |
updateReportConfig(request, callback)
updateReportConfig(request: protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest, callback: Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters | |
---|---|
Name | Description |
request |
IUpdateReportConfigRequest
|
callback |
Callback<protos.google.cloud.storageinsights.v1.IReportConfig, protos.google.cloud.storageinsights.v1.IUpdateReportConfigRequest | null | undefined, {} | null | undefined>
|
Returns | |
---|---|
Type | Description |
void |