public sealed class QueryAssetsRequest : IMessage<QueryAssetsRequest>, IEquatable<QueryAssetsRequest>, IDeepCloneable<QueryAssetsRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Asset Inventory v1 API class QueryAssetsRequest.
public QueryAssetsOutputConfig OutputConfig { get; set; }
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.
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.
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.
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
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version available for \u003ccode\u003eQueryAssetsRequest\u003c/code\u003e in the Google Cloud Asset Inventory v1 API is 3.12.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eQueryAssetsRequest\u003c/code\u003e is a class used to request asset queries within the Google Cloud Asset Inventory, inheriting from \u003ccode\u003eobject\u003c/code\u003e and implementing several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, and \u003ccode\u003eIDeepCloneable\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides properties like \u003ccode\u003eJobReference\u003c/code\u003e, \u003ccode\u003eOutputConfig\u003c/code\u003e, \u003ccode\u003ePageSize\u003c/code\u003e, \u003ccode\u003ePageToken\u003c/code\u003e, and \u003ccode\u003eParent\u003c/code\u003e to configure the query and manage its output.\u003c/p\u003e\n"],["\u003cp\u003eUsers can specify a \u003ccode\u003eStatement\u003c/code\u003e property to query with a SQL statement, and they can also use \u003ccode\u003eReadTime\u003c/code\u003e or \u003ccode\u003eReadTimeWindow\u003c/code\u003e to query based on a specific time range.\u003c/p\u003e\n"],["\u003cp\u003eIt is possible to filter the results by setting the \u003ccode\u003eparent\u003c/code\u003e property which can be an organization number, project ID, project number or a folder number.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Asset Inventory v1 API - Class QueryAssetsRequest (3.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.13.0 (latest)](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.12.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.11.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.10.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.9.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.8.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.7.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.6.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.5.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.4.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.3.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.2.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.1.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/3.0.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.11.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.10.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.9.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.8.0/Google.Cloud.Asset.V1.QueryAssetsRequest)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.Asset.V1/2.7.0/Google.Cloud.Asset.V1.QueryAssetsRequest) \n\n public sealed class QueryAssetsRequest : IMessage\u003cQueryAssetsRequest\u003e, IEquatable\u003cQueryAssetsRequest\u003e, IDeepCloneable\u003cQueryAssetsRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Asset Inventory v1 API class QueryAssetsRequest.\n\nQueryAssets request. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e QueryAssetsRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[QueryAssetsRequest](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.QueryAssetsRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[QueryAssetsRequest](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.QueryAssetsRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[QueryAssetsRequest](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.QueryAssetsRequest), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Asset.V1](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Asset.V1.dll\n\nConstructors\n------------\n\n### QueryAssetsRequest()\n\n public QueryAssetsRequest()\n\n### QueryAssetsRequest(QueryAssetsRequest)\n\n public QueryAssetsRequest(QueryAssetsRequest other)\n\nProperties\n----------\n\n### HasJobReference\n\n public bool HasJobReference { get; }\n\nGets whether the \"job_reference\" field is set\n\n### HasStatement\n\n public bool HasStatement { get; }\n\nGets whether the \"statement\" field is set\n\n### JobReference\n\n public string JobReference { get; set; }\n\nOptional. Reference to the query job, which is from the\n`QueryAssetsResponse` of previous `QueryAssets` call.\n\n### OutputConfig\n\n public QueryAssetsOutputConfig OutputConfig { get; set; }\n\nOptional. Destination where the query results will be saved.\n\nWhen this field is specified, the query results won't be saved in the\n\\[QueryAssetsResponse.query_result\\]. Instead\n\\[QueryAssetsResponse.output_config\\] will be set.\n\nMeanwhile, \\[QueryAssetsResponse.job_reference\\] will be set and can be used\nto check the status of the query job when passed to a following\n\\[QueryAssets\\] API call.\n\n### PageSize\n\n public int PageSize { get; set; }\n\nOptional. The maximum number of rows to return in the results. Responses\nare limited to 10 MB and 1000 rows.\n\nBy default, the maximum row count is 1000. When the byte or row count limit\nis reached, the rest of the query results will be paginated.\n\nThe field will be ignored when \\[output_config\\] is specified.\n\n### PageToken\n\n public string PageToken { get; set; }\n\nOptional. A page token received from previous `QueryAssets`.\n\nThe field will be ignored when \\[output_config\\] is specified.\n\n### Parent\n\n public string Parent { get; set; }\n\nRequired. The relative name of the root asset. This can only be an\norganization number (such as \"organizations/123\"), a project ID (such as\n\"projects/my-project-id\"), or a project number (such as \"projects/12345\"),\nor a folder number (such as \"folders/123\").\n\nOnly assets belonging to the `parent` will be returned.\n\n### ParentAsResourceName\n\n public IResourceName ParentAsResourceName { get; set; }\n\n[IResourceName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IResourceName.html)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.Asset.V1/latest/Google.Cloud.Asset.V1.QueryAssetsRequest#Google_Cloud_Asset_V1_QueryAssetsRequest_Parent) resource name property.\n\n### QueryCase\n\n public QueryAssetsRequest.QueryOneofCase QueryCase { get; }\n\n### ReadTime\n\n public Timestamp ReadTime { get; set; }\n\nOptional. Queries cloud assets as they appeared at the specified point in\ntime.\n\n### ReadTimeWindow\n\n public TimeWindow ReadTimeWindow { get; set; }\n\nOptional. \\[start_time\\] is required. \\[start_time\\] must be less than\n\\[end_time\\] Defaults \\[end_time\\] to now if \\[start_time\\] is set and\n\\[end_time\\] isn't. Maximum permitted time range is 7 days.\n\n### Statement\n\n public string Statement { get; set; }\n\nOptional. A SQL statement that's compatible with [BigQuery\nSQL](https://cloud.google.com/bigquery/docs/introduction-sql).\n\n### TimeCase\n\n public QueryAssetsRequest.TimeOneofCase TimeCase { get; }\n\n### Timeout\n\n public Duration Timeout { get; set; }\n\nOptional. Specifies the maximum amount of time that the client is willing\nto wait for the query to complete. By default, this limit is 5 min for the\nfirst query, and 1 minute for the following queries. If the query is\ncomplete, the `done` field in the `QueryAssetsResponse` is true, otherwise\nfalse.\n\nLike BigQuery [jobs.query\nAPI](https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs/query#queryrequest)\nThe call is not guaranteed to wait for the specified timeout; it typically\nreturns after around 200 seconds (200,000 milliseconds), even if the query\nis not complete.\n\nThe field will be ignored when \\[output_config\\] is specified."]]