-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove unused proto imports (#643)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 468735472 Source-Link: googleapis/googleapis@cfa1b37 Source-Link: https://github.com/googleapis/googleapis-gen/commit/09b7666656510f5b00b893f003a0ba5766f9e250 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDliNzY2NjY1NjUxMGY1YjAwYjg5M2YwMDNhMGJhNTc2NmY5ZTI1MCJ9 feat: Add client library support for AssetService v1 BatchGetEffectiveIamPolicies API Committer: haochunzhang@ PiperOrigin-RevId: 468010360 Source-Link: googleapis/googleapis@4bda299 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8ed040614d04743f16cf4e4844b716fed998f94c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGVkMDQwNjE0ZDA0NzQzZjE2Y2Y0ZTQ4NDRiNzE2ZmVkOTk4Zjk0YyJ9 feat: Release of query system Committer: lvv@ PiperOrigin-RevId: 466748663 Source-Link: googleapis/googleapis@80d630f Source-Link: https://github.com/googleapis/googleapis-gen/commit/252f5ade18a31a72f12810bbfd1d83d56a8e72e1 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjUyZjVhZGUxOGEzMWE3MmYxMjgxMGJiZmQxZDgzZDU2YThlNzJlMSJ9 feat: Add client library support for AssetService v1 BatchGetEffectiveIamPolicies API Committer: haochunzhang@ PiperOrigin-RevId: 466134014 Source-Link: googleapis/googleapis@63c73fb Source-Link: https://github.com/googleapis/googleapis-gen/commit/2350945f7a70ecaaecf9a1fdd7d6e70ac50e862d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjM1MDk0NWY3YTcwZWNhYWVjZjlhMWZkZDdkNmU3MGFjNTBlODYyZCJ9
- Loading branch information
1 parent
fc5132b
commit 2f87ab6
Showing
4 changed files
with
203 additions
and
3 deletions.
There are no files selected for viewing
120 changes: 120 additions & 0 deletions
120
asset/snippets/generated/v1/asset_service.query_assets.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
// Copyright 2022 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// ** This file is automatically generated by gapic-generator-typescript. ** | ||
// ** https://github.com/googleapis/gapic-generator-typescript ** | ||
// ** All changes to this file may be overwritten. ** | ||
|
||
|
||
|
||
'use strict'; | ||
|
||
function main(parent) { | ||
// [START cloudasset_v1_generated_AssetService_QueryAssets_async] | ||
/** | ||
* TODO(developer): Uncomment these variables before running the sample. | ||
*/ | ||
/** | ||
* Required. The relative name of the root asset. This can only be an | ||
* organization number (such as "organizations/123"), a project ID (such as | ||
* "projects/my-project-id"), or a project number (such as "projects/12345"), | ||
* or a folder number (such as "folders/123"). | ||
* Only assets belonging to the `parent` will be returned. | ||
*/ | ||
// const parent = 'abc123' | ||
/** | ||
* Optional. A SQL statement that's compatible with BigQuery Standard | ||
* SQL (http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql). | ||
*/ | ||
// const statement = 'abc123' | ||
/** | ||
* Optional. Reference to the query job, which is from the | ||
* `QueryAssetsResponse` of previous `QueryAssets` call. | ||
*/ | ||
// const jobReference = 'abc123' | ||
/** | ||
* Optional. The maximum number of rows to return in the results. Responses | ||
* are limited to 10 MB and 1000 rows. | ||
* By default, the maximum row count is 1000. When the byte or row count limit | ||
* is reached, the rest of the query results will be paginated. | ||
* The field will be ignored when output_config is specified. | ||
*/ | ||
// const pageSize = 1234 | ||
/** | ||
* Optional. A page token received from previous `QueryAssets`. | ||
* The field will be ignored when output_config is specified. | ||
*/ | ||
// const pageToken = 'abc123' | ||
/** | ||
* Optional. Specifies the maximum amount of time that the client is willing | ||
* to wait for the query to complete. By default, this limit is 5 min for the | ||
* first query, and 1 minute for the following queries. If the query is | ||
* complete, the `done` field in the `QueryAssetsResponse` is true, otherwise | ||
* false. | ||
* Like BigQuery jobs.query | ||
* API (https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest) | ||
* The call is not guaranteed to wait for the specified timeout; it typically | ||
* returns after around 200 seconds (200,000 milliseconds), even if the query | ||
* is not complete. | ||
* The field will be ignored when output_config is specified. | ||
*/ | ||
// const timeout = {} | ||
/** | ||
* Optional. start_time is required. start_time must be less than | ||
* end_time Defaults end_time to now if start_time is set and | ||
* end_time isn't. Maximum permitted time range is 7 days. | ||
*/ | ||
// const readTimeWindow = {} | ||
/** | ||
* Optional. Queries cloud assets as they appeared at the specified point in | ||
* time. | ||
*/ | ||
// const readTime = {} | ||
/** | ||
* Optional. Destination where the query results will be saved. | ||
* When this field is specified, the query results won't be saved in the | ||
* QueryAssetsResponse.query_result. Instead | ||
* QueryAssetsResponse.output_config will be set. | ||
* Meanwhile, QueryAssetsResponse.job_reference will be set and can be used | ||
* to check the status of the query job when passed to a following | ||
* QueryAssets API call. | ||
*/ | ||
// const outputConfig = {} | ||
|
||
// Imports the Asset library | ||
const {AssetServiceClient} = require('@google-cloud/asset').v1; | ||
|
||
// Instantiates a client | ||
const assetClient = new AssetServiceClient(); | ||
|
||
async function callQueryAssets() { | ||
// Construct request | ||
const request = { | ||
parent, | ||
}; | ||
|
||
// Run request | ||
const response = await assetClient.queryAssets(request); | ||
console.log(response); | ||
} | ||
|
||
callQueryAssets(); | ||
// [END cloudasset_v1_generated_AssetService_QueryAssets_async] | ||
} | ||
|
||
process.on('unhandledRejection', err => { | ||
console.error(err.message); | ||
process.exitCode = 1; | ||
}); | ||
main(...process.argv.slice(2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters