- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Rule
- RuleType
- Try it!
Lists rules in a given project.
HTTP request
GET https://workloadmanager.googleapis.com/v1/{parent=projects/*/locations/*}/rules
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
parent |
Required. The [project] on which to execute the request. The format is: projects/{projectId}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions. |
Query parameters
| Parameters | |
|---|---|
pageSize |
Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. |
pageToken |
A token identifying a page of results the server should return. |
filter |
Filter based on primaryCategory, secondaryCategory. |
customRulesBucket |
The Cloud Storage bucket name for custom rules. |
evaluationType |
Optional. The evaluation type of the rules will be applied to. The Cloud Storage bucket name for custom rules. |
Request body
The request body must be empty.
Response body
Response message for the rules.list RPC.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"rules": [
{
object ( |
| Fields | |
|---|---|
rules[] |
All rules in response. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
Rule
A rule to be evaluated.
| JSON representation |
|---|
{
"name": string,
"revisionId": string,
"displayName": string,
"description": string,
"severity": string,
"primaryCategory": string,
"secondaryCategory": string,
"errorMessage": string,
"uri": string,
"remediation": string,
"tags": [
string
],
"ruleType": enum ( |
| Fields | |
|---|---|
name |
Rule name. |
revisionId |
Output only. The version of the rule. |
displayName |
The name display in UI. |
description |
Describe rule in plain language. |
severity |
The severity of the rule. |
primaryCategory |
The primary category. |
secondaryCategory |
The secondary category. |
errorMessage |
The message template for rule. |
uri |
The document url for the rule. |
remediation |
The remediation for the rule. |
tags[] |
List of user-defined tags. |
ruleType |
The type of the rule. |
assetType |
The CAI asset type of the rule is evaluating, for joined asset types, it will be the corresponding primary asset types. |
RuleType
The type of the rule.
| Enums | |
|---|---|
RULE_TYPE_UNSPECIFIED |
Not specified. |
BASELINE |
Baseline rules. |
CUSTOM |
Custom rules. |