Skip to content

Commit

Permalink
feat(cloudasset): update the api
Browse files Browse the repository at this point in the history
#### cloudasset:v1

The following keys were added:
- resources.v1.methods.searchAllResources.parameters.readMask (Total Keys: 3)
- schemas.ResourceSearchResult.properties.versionedResources (Total Keys: 2)
- schemas.VersionedResource (Total Keys: 5)
  • Loading branch information
yoshi-automation committed Jul 6, 2021
1 parent 7581a42 commit 2e31dd0
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 8 deletions.
13 changes: 11 additions & 2 deletions docs/dyn/cloudasset_v1.v1.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ <h2>Instance Methods</h2>
<code><a href="#searchAllIamPolicies_next">searchAllIamPolicies_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<p class="toc_element">
<code><a href="#searchAllResources">searchAllResources(scope, assetTypes=None, orderBy=None, pageSize=None, pageToken=None, query=None, x__xgafv=None)</a></code></p>
<code><a href="#searchAllResources">searchAllResources(scope, assetTypes=None, orderBy=None, pageSize=None, pageToken=None, query=None, readMask=None, x__xgafv=None)</a></code></p>
<p class="firstline">Searches all Cloud resources within the specified scope, such as a project, folder, or organization. The caller must be granted the `cloudasset.assets.searchAllResources` permission on the desired scope, otherwise the request will be rejected.</p>
<p class="toc_element">
<code><a href="#searchAllResources_next">searchAllResources_next(previous_request, previous_response)</a></code></p>
Expand Down Expand Up @@ -1525,7 +1525,7 @@ <h3>Method Details</h3>
</div>

<div class="method">
<code class="details" id="searchAllResources">searchAllResources(scope, assetTypes=None, orderBy=None, pageSize=None, pageToken=None, query=None, x__xgafv=None)</code>
<code class="details" id="searchAllResources">searchAllResources(scope, assetTypes=None, orderBy=None, pageSize=None, pageToken=None, query=None, readMask=None, x__xgafv=None)</code>
<pre>Searches all Cloud resources within the specified scope, such as a project, folder, or organization. The caller must be granted the `cloudasset.assets.searchAllResources` permission on the desired scope, otherwise the request will be rejected.

Args:
Expand All @@ -1535,6 +1535,7 @@ <h3>Method Details</h3>
pageSize: integer, Optional. The page size for search result pagination. Page size is capped at 500 even if a larger value is given. If set to zero, server will pick an appropriate default. Returned results may be fewer than requested. When this happens, there could be more results as long as `next_page_token` is returned.
pageToken: string, Optional. If present, then retrieve the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of all other method parameters, must be identical to those in the previous call.
query: string, Optional. The query statement. See [how to construct a query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) for more information. If not specified or empty, it will search all the resources within the specified `scope`. Examples: * `name:Important` to find Cloud resources whose name contains &quot;Important&quot; as a word. * `name=Important` to find the Cloud resource whose name is exactly &quot;Important&quot;. * `displayName:Impor*` to find Cloud resources whose display name contains &quot;Impor&quot; as a prefix of any word in the field. * `location:us-west*` to find Cloud resources whose location contains both &quot;us&quot; and &quot;west&quot; as prefixes. * `labels:prod` to find Cloud resources whose labels contain &quot;prod&quot; as a key or value. * `labels.env:prod` to find Cloud resources that have a label &quot;env&quot; and its value is &quot;prod&quot;. * `labels.env:*` to find Cloud resources that have a label &quot;env&quot;. * `kmsKey:key` to find Cloud resources encrypted with a customer-managed encryption key whose name contains the word &quot;key&quot;. * `state:ACTIVE` to find Cloud resources whose state contains &quot;ACTIVE&quot; as a word. * `NOT state:ACTIVE` to find {{gcp_name}} resources whose state doesn&#x27;t contain &quot;ACTIVE&quot; as a word. * `createTime&lt;1609459200` to find Cloud resources that were created before &quot;2021-01-01 00:00:00 UTC&quot;. 1609459200 is the epoch timestamp of &quot;2021-01-01 00:00:00 UTC&quot; in seconds. * `updateTime&gt;1609459200` to find Cloud resources that were updated after &quot;2021-01-01 00:00:00 UTC&quot;. 1609459200 is the epoch timestamp of &quot;2021-01-01 00:00:00 UTC&quot; in seconds. * `Important` to find Cloud resources that contain &quot;Important&quot; as a word in any of the searchable fields. * `Impor*` to find Cloud resources that contain &quot;Impor&quot; as a prefix of any word in any of the searchable fields. * `Important location:(us-west1 OR global)` to find Cloud resources that contain &quot;Important&quot; as a word in any of the searchable fields and are also located in the &quot;us-west1&quot; region or the &quot;global&quot; location.
readMask: string, Optional. A comma-separated list of fields specifying which fields to be returned in ResourceSearchResult. Only &#x27;*&#x27; or combination of top level fields can be specified. Field names of both snake_case and camelCase are supported. Examples: `&quot;*&quot;`, `&quot;name,location&quot;`, `&quot;name,versionedResources&quot;`. The read_mask paths must be valid field paths listed but not limited to (both snake_case and camelCase are supported): * name * asset_type or assetType * project * display_name or displayName * description * location * labels * network_tags or networkTags * kms_key or kmsKey * create_time or createTime * update_time or updateTime * state * additional_attributes or additionalAttributes * versioned_resources or versionedResources If read_mask is not specified, all fields except versionedResources will be returned. If only &#x27;*&#x27; is specified, all fields including versionedResources will be returned. Any invalid field path will trigger INVALID_ARGUMENT error.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
Expand Down Expand Up @@ -1572,6 +1573,14 @@ <h3>Method Details</h3>
&quot;project&quot;: &quot;A String&quot;, # The project that this resource belongs to, in the form of projects/{PROJECT_NUMBER}. This field is available when the resource belongs to a project. To search against `project`: * use a field query. Example: `project:12345` * use a free text query. Example: `12345` * specify the `scope` field as this project in your search request.
&quot;state&quot;: &quot;A String&quot;, # The state of this resource. Different resources types have different state definitions that are mapped from various fields of different resource types. This field is available only when the resource&#x27;s proto contains it. Example: If the resource is an instance provided by Compute Engine, its state will include PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition in [API Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances). If the resource is a project provided by Cloud Resource Manager, its state will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and DELETE_IN_PROGRESS. See `lifecycleState` definition in [API Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects). To search against the `state`: * use a field query. Example: `state:RUNNING` * use a free text query. Example: `RUNNING`
&quot;updateTime&quot;: &quot;A String&quot;, # The last update timestamp of this resource, at which the resource was last modified or deleted. The granularity is in seconds. Timestamp.nanos will always be 0. This field is available only when the resource&#x27;s proto contains it. To search against `update_time`: * use a field query. - value in seconds since unix epoch. Example: `updateTime &lt; 1609459200` - value in date string. Example: `updateTime &lt; 2021-01-01` - value in date-time string (must be quoted). Example: `updateTime &lt; &quot;2021-01-01T00:00:00&quot;`
&quot;versionedResources&quot;: [ # Versioned resource representations of this resource. This is repeated because there could be multiple versions of resource representations during version migration. This `versioned_resources` field is not searchable. Some attributes of the resource representations are exposed in `additional_attributes` field, so as to allow users to search on them.
{ # Resource representation as defined by the corresponding service providing the resource for a given API version.
&quot;resource&quot;: { # JSON representation of the resource as defined by the corresponding service providing this resource. Example: If the resource is an instance provided by Compute Engine, this field will contain the JSON representation of the instance as defined by Compute Engine: `https://cloud.google.com/compute/docs/reference/rest/v1/instances`. You can find the resource definition for each supported resource type in this table: `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
&quot;a_key&quot;: &quot;&quot;, # Properties of the object.
},
&quot;version&quot;: &quot;A String&quot;, # API version of the resource. Example: If the resource is an instance provided by Compute Engine v1 API as defined in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`, version will be &quot;v1&quot;.
},
],
},
],
}</pre>
Expand Down
34 changes: 33 additions & 1 deletion googleapiclient/discovery_cache/documents/cloudasset.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,12 @@
"location": "query",
"type": "string"
},
"readMask": {
"description": "Optional. A comma-separated list of fields specifying which fields to be returned in ResourceSearchResult. Only '*' or combination of top level fields can be specified. Field names of both snake_case and camelCase are supported. Examples: `\"*\"`, `\"name,location\"`, `\"name,versionedResources\"`. The read_mask paths must be valid field paths listed but not limited to (both snake_case and camelCase are supported): * name * asset_type or assetType * project * display_name or displayName * description * location * labels * network_tags or networkTags * kms_key or kmsKey * create_time or createTime * update_time or updateTime * state * additional_attributes or additionalAttributes * versioned_resources or versionedResources If read_mask is not specified, all fields except versionedResources will be returned. If only '*' is specified, all fields including versionedResources will be returned. Any invalid field path will trigger INVALID_ARGUMENT error.",
"format": "google-fieldmask",
"location": "query",
"type": "string"
},
"scope": {
"description": "Required. A scope can be a project, a folder, or an organization. The search is limited to the resources within the `scope`. The caller must be granted the [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) permission on the desired scope. The allowed values are: * projects/{PROJECT_ID} (e.g., \"projects/foo-bar\") * projects/{PROJECT_NUMBER} (e.g., \"projects/12345678\") * folders/{FOLDER_NUMBER} (e.g., \"folders/1234567\") * organizations/{ORGANIZATION_NUMBER} (e.g., \"organizations/123456\")",
"location": "path",
Expand All @@ -705,7 +711,7 @@
}
}
},
"revision": "20210618",
"revision": "20210625",
"rootUrl": "https://cloudasset.googleapis.com/",
"schemas": {
"AccessSelector": {
Expand Down Expand Up @@ -2801,6 +2807,13 @@
"description": "The last update timestamp of this resource, at which the resource was last modified or deleted. The granularity is in seconds. Timestamp.nanos will always be 0. This field is available only when the resource's proto contains it. To search against `update_time`: * use a field query. - value in seconds since unix epoch. Example: `updateTime < 1609459200` - value in date string. Example: `updateTime < 2021-01-01` - value in date-time string (must be quoted). Example: `updateTime < \"2021-01-01T00:00:00\"`",
"format": "google-datetime",
"type": "string"
},
"versionedResources": {
"description": "Versioned resource representations of this resource. This is repeated because there could be multiple versions of resource representations during version migration. This `versioned_resources` field is not searchable. Some attributes of the resource representations are exposed in `additional_attributes` field, so as to allow users to search on them.",
"items": {
"$ref": "VersionedResource"
},
"type": "array"
}
},
"type": "object"
Expand Down Expand Up @@ -3011,6 +3024,25 @@
},
"type": "object"
},
"VersionedResource": {
"description": "Resource representation as defined by the corresponding service providing the resource for a given API version.",
"id": "VersionedResource",
"properties": {
"resource": {
"additionalProperties": {
"description": "Properties of the object.",
"type": "any"
},
"description": "JSON representation of the resource as defined by the corresponding service providing this resource. Example: If the resource is an instance provided by Compute Engine, this field will contain the JSON representation of the instance as defined by Compute Engine: `https://cloud.google.com/compute/docs/reference/rest/v1/instances`. You can find the resource definition for each supported resource type in this table: `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`",
"type": "object"
},
"version": {
"description": "API version of the resource. Example: If the resource is an instance provided by Compute Engine v1 API as defined in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`, version will be \"v1\".",
"type": "string"
}
},
"type": "object"
},
"WindowsQuickFixEngineeringPackage": {
"description": "Information related to a Quick Fix Engineering package. Fields are taken from Windows QuickFixEngineering Interface and match the source names: https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering",
"id": "WindowsQuickFixEngineeringPackage",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@
}
}
},
"revision": "20210618",
"revision": "20210625",
"rootUrl": "https://cloudasset.googleapis.com/",
"schemas": {
"AnalyzeIamPolicyLongrunningResponse": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
}
}
},
"revision": "20210618",
"revision": "20210625",
"rootUrl": "https://cloudasset.googleapis.com/",
"schemas": {
"AnalyzeIamPolicyLongrunningResponse": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
}
}
},
"revision": "20210618",
"revision": "20210625",
"rootUrl": "https://cloudasset.googleapis.com/",
"schemas": {
"AccessSelector": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
}
}
},
"revision": "20210618",
"revision": "20210625",
"rootUrl": "https://cloudasset.googleapis.com/",
"schemas": {
"AnalyzeIamPolicyLongrunningResponse": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
}
}
},
"revision": "20210618",
"revision": "20210625",
"rootUrl": "https://cloudasset.googleapis.com/",
"schemas": {
"AnalyzeIamPolicyLongrunningResponse": {
Expand Down

0 comments on commit 2e31dd0

Please sign in to comment.