Workload Manager API . projects . locations . rules

Instance Methods

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.

Method Details

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
  "invalidRulesWrapper": { # Message wrappes a list of invalid rules. # A wrapper of the invalid rules that failed to be validated.
    "invalidRules": [ # The invalid rules that failed to be validated.
      { # Message represent an rule that failed to be validated.
        "displayName": "A String", # display name of the invalid rule
        "gcsUri": "A String", # cloud storage destination of the invalid rule
        "name": "A String", # name of the invalid rule
        "valiadtionError": "A String", # The error message of valdating rule formats.
      },
    ],
  },
  "rules": [ # all rules in response
    { # Message represent a rule
      "assetType": "A String", # The CAI asset type of the rule is evaluating, for joined asset types, it will be the corresponding primary asset types.
      "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
      "ruleType": "A String", # The type 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
    },
  ],
}