Close httplib2 connections.
Lists rules in a given project.
Retrieves the next page of results.
close()
Close httplib2 connections.
list(parent, customRulesBucket=None, evaluationType=None, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists rules in a given project.
Args:
parent: string, Required. The [project] on which to execute the request. The format is: projects/{project_id}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions (required)
customRulesBucket: string, The Cloud Storage bucket name for custom rules.
evaluationType: string, Optional. The evaluation type of the rules will be applied to. The Cloud Storage bucket name for custom rules.
Allowed values
EVALUATION_TYPE_UNSPECIFIED - Not specified
SAP - SAP best practices
SQL_SERVER - SQL best practices
OTHER - Customized best practices
SCC_IAC - SCC IaC (Infra as Code) best practices
filter: string, Filter based on primary_category, secondary_category
pageSize: integer, Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
pageToken: string, A token identifying a page of results the server should return.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Mesesage of response of list rules
"nextPageToken": "A String", # A token identifying a page of results the server should return.
"rules": [ # all rules in response
{ # Message represent a rule
"description": "A String", # descrite rule in plain language
"displayName": "A String", # the name display in UI
"errorMessage": "A String", # the message template for rule
"name": "A String", # rule name
"primaryCategory": "A String", # the primary category
"remediation": "A String", # the remediation for the rule
"revisionId": "A String", # Output only. the version of the rule
"secondaryCategory": "A String", # the secondary category
"severity": "A String", # the severity of the rule
"tags": [ # List of user-defined tags
"A String",
],
"uri": "A String", # the docuement url for the rule
},
],
}
list_next()
Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.