本页面上的部分或全部信息可能不适用于 Trusted Cloud by S3NS。
Method: organizations.protectedResources.search
返回指定 Cloud 组织中受指定 Cloud KMS CryptoKey
保护的资源的相关元数据。
HTTP 请求
GET https://kmsinventory.googleapis.com/v1/{scope=organizations/*}/protectedResources:search
网址采用 gRPC 转码语法。
路径参数
参数 |
scope |
string
必需。组织的资源名称。示例:organizations/123
必须对指定的资源 scope 具有以下 IAM 权限才能进行授权:
cloudkms.protectedResources.search
|
查询参数
参数 |
cryptoKey |
string
必需。CryptoKey 的资源名称。
必须对指定的资源 cryptoKey 具有以下 IAM 权限才能进行授权:
|
pageSize |
integer
要返回的资源数量上限。服务返回的值可能小于此值。如果未指定,则最多返回 500 项资源。最大值为 500;大于 500 的值将被强制转换为 500。
|
pageToken |
string
从之前的 KeyTrackingService.SearchProtectedResources 调用接收的页面令牌。利用其进行后续页面检索。 进行分页时,提供给 KeyTrackingService.SearchProtectedResources 的所有其他参数必须与提供页面令牌的调用匹配。
|
resourceTypes[] |
string
可选。此请求会搜索的资源类型列表。如果为空,它将搜索所有可跟踪的资源类型。 此外,还支持正则表达式。例如:
- 对类型以
compute.googleapis.com 开头的 compute.googleapis.com.* 资源拍摄快照。
.*Image 对类型以 Image 结尾的资源创建了快照。
- 对类型包含
Image 的 .*Image.* 资源拍摄快照。
如需了解所有受支持的正则表达式语法,请参阅 RE2。如果正则表达式与任何受支持的资源类型都不匹配,将返回 INVALID_ARGUMENT 错误。
|
响应正文
如果成功,响应正文将包含结构如下的数据:
JSON 表示法 |
{
"protectedResources": [
{
object (ProtectedResource )
}
],
"nextPageToken": string
} |
字段 |
protectedResources[] |
object (ProtectedResource )
此网页的受保护资源。
|
nextPageToken |
string
可作为 pageToken 发送以检索下一页的令牌。如果省略此字段,则不存在后续页面。
|
授权范围
需要以下 OAuth 范围:
https://www.googleapis.com/auth/cloud-platform
如需了解详情,请参阅身份验证概览。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-06-01。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-06-01。"],[],[],null,["# Method: organizations.protectedResources.search\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.SearchProtectedResourcesResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReturns metadata about the resources protected by the given Cloud KMS [CryptoKey](/kms/docs/reference/inventory/rest/v1/projects.cryptoKeys#CryptoKey) in the given Cloud organization.\n\n### HTTP request\n\n`GET https://kmsinventory.googleapis.com/v1/{scope=organizations/*}/protectedResources:search`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nResponse message for [KeyTrackingService.SearchProtectedResources](/kms/docs/reference/inventory/rest/v1/organizations.protectedResources/search#google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/)."]]