Skip to content

Commit

Permalink
chore: remove unused proto imports (#643)
Browse files Browse the repository at this point in the history
- [ ] 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
gcf-owl-bot[bot] authored Aug 19, 2022
1 parent fc5132b commit 2f87ab6
Show file tree
Hide file tree
Showing 4 changed files with 203 additions and 3 deletions.
120 changes: 120 additions & 0 deletions asset/snippets/generated/v1/asset_service.query_assets.js
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));
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ function main(scope) {
* compared against each Cloud IAM policy binding, including its principals,
* roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
* contain the bindings that match your query. To learn more about the IAM
* policy structure, see IAM policy
* doc (https://cloud.google.com/iam/docs/policies#structure).
* policy structure, see the IAM policy
* documentation (https://cloud.google.com/iam/help/allow-policies/structure).
* Examples:
* * `policy:[email protected]` to find IAM policy bindings that specify user
* "[email protected]".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ function main(scope) {
* * `labels.env:*` to find Cloud resources that have a label "env".
* * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
* encryption key whose name contains the word "key".
* * `relationships:instance-group-1` to find Cloud resources that have
* relationships with "instance-group-1" in the related resource name.
* * `relationships:INSTANCE_TO_INSTANCEGROUP` to find compute instances that
* have relationships of type "INSTANCE_TO_INSTANCEGROUP".
* * `relationships.INSTANCE_TO_INSTANCEGROUP:instance-group-1` to find
* compute instances that have relationships with "instance-group-1" in the
* compute instance group resource name, for relationship type
* "INSTANCE_TO_INSTANCEGROUP".
* * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
* word.
* * `NOT state:ACTIVE` to find Cloud resources whose state doesn't contain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
"segments": [
{
"start": 25,
"end": 185,
"end": 193,
"type": "FULL"
}
],
Expand Down Expand Up @@ -671,6 +671,78 @@
}
}
},
{
"regionTag": "cloudasset_v1_generated_AssetService_QueryAssets_async",
"title": "AssetService queryAssets Sample",
"origin": "API_DEFINITION",
"description": " Issue a job that queries assets using a SQL statement compatible with [BigQuery Standard SQL](http://cloud/bigquery/docs/reference/standard-sql/enabling-standard-sql). If the query execution finishes within timeout and there's no pagination, the full query results will be returned in the `QueryAssetsResponse`. Otherwise, full query results can be obtained by issuing extra requests with the `job_reference` from the a previous `QueryAssets` call. Note, the query result has approximately 10 GB limitation enforced by BigQuery https://cloud.google.com/bigquery/docs/best-practices-performance-output, queries return larger results will result in errors.",
"canonical": true,
"file": "asset_service.query_assets.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 25,
"end": 112,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "QueryAssets",
"fullName": "google.cloud.asset.v1.AssetService.QueryAssets",
"async": true,
"parameters": [
{
"name": "parent",
"type": "TYPE_STRING"
},
{
"name": "statement",
"type": "TYPE_STRING"
},
{
"name": "job_reference",
"type": "TYPE_STRING"
},
{
"name": "page_size",
"type": "TYPE_INT32"
},
{
"name": "page_token",
"type": "TYPE_STRING"
},
{
"name": "timeout",
"type": ".google.protobuf.Duration"
},
{
"name": "read_time_window",
"type": ".google.cloud.asset.v1.TimeWindow"
},
{
"name": "read_time",
"type": ".google.protobuf.Timestamp"
},
{
"name": "output_config",
"type": ".google.cloud.asset.v1.QueryAssetsOutputConfig"
}
],
"resultType": ".google.cloud.asset.v1.QueryAssetsResponse",
"client": {
"shortName": "AssetServiceClient",
"fullName": "google.cloud.asset.v1.AssetServiceClient"
},
"method": {
"shortName": "QueryAssets",
"fullName": "google.cloud.asset.v1.AssetService.QueryAssets",
"service": {
"shortName": "AssetService",
"fullName": "google.cloud.asset.v1.AssetService"
}
}
}
},
{
"regionTag": "cloudasset_v1_generated_AssetService_CreateSavedQuery_async",
"title": "AssetService createSavedQuery Sample",
Expand Down

0 comments on commit 2f87ab6

Please sign in to comment.