- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Rule
- 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 | |
---|---|
page
|
Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default. |
page
|
A token identifying a page of results the server should return. |
filter
|
Filter based on primaryCategory, secondaryCategory |
custom
|
The Cloud Storage bucket name for custom rules. |
Request body
The request body must be empty.
Response body
Mesesage of response of list rules
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"rules"
:
[
{
object (
|
Fields | |
---|---|
rules[]
|
all rules in response |
next
|
A token identifying a page of results the server should return. |
Authorization scopes
Requires the following OAuth scope:
-
https://www.googleapis.com/auth/cloud-platform
Rule
Message represent a rule
JSON representation |
---|
{ "name" : string , "revisionId" : string , "displayName" : string , "description" : string , "severity" : string , "primaryCategory" : string , "secondaryCategory" : string , "errorMessage" : string , "uri" : string , "remediation" : string , "tags" : [ string ] } |
Fields | |
---|---|
name
|
rule name |
revision
|
Output only. the version of the rule |
display
|
the name display in UI |
description
|
descrite rule in plain language |
severity
|
the severity of the rule |
primary
|
the primary category |
secondary
|
the secondary category |
uri
|
the docuement url for the rule |
remediation
|
the remediation for the rule |
tags[]
|
List of user-defined tags |