Assured Workloads API . organizations . locations . workloads . violations

Instance Methods

close()

Close httplib2 connections.

get(name, x__xgafv=None)

Retrieves Assured Workload Violation based on ID.

list(parent, filter=None, interval_endTime=None, interval_startTime=None, pageSize=None, pageToken=None, x__xgafv=None)

Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across multiple Workloads as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash character) as a wildcard character instead of workload-id in the parent. Format `organizations/{org_id}/locations/{location}/workloads/-`

list_next()

Retrieves the next page of results.

Method Details

close()
Close httplib2 connections.
get(name, x__xgafv=None)
Retrieves Assured Workload Violation based on ID.

Args:
  name: string, Required. The resource name of the Violation to fetch (ie. Violation.name). Format: organizations/{organization}/locations/{location}/workloads/{workload}/violations/{violation} (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Workload monitoring Violation.
  "auditLogLink": "A String", # Output only. Immutable. Audit Log Link for violated resource Format: https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder}
  "beginTime": "A String", # Output only. Time of the event which triggered the Violation.
  "category": "A String", # Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc.
  "description": "A String", # Output only. Description for the Violation. e.g. OrgPolicy gcp.resourceLocations has non compliant value.
  "name": "A String", # Output only. Immutable. Name of the Violation. Format: organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}
  "nonCompliantOrgPolicy": "A String", # Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name}
  "orgPolicyConstraint": "A String", # Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in this violation.
  "resolveTime": "A String", # Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty.
  "state": "A String", # Output only. State of the violation
  "updateTime": "A String", # Output only. The last time when the Violation record was updated.
}
list(parent, filter=None, interval_endTime=None, interval_startTime=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists the Violations in the AssuredWorkload Environment. Callers may also choose to read across multiple Workloads as per [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash character) as a wildcard character instead of workload-id in the parent. Format `organizations/{org_id}/locations/{location}/workloads/-`

Args:
  parent: string, Required. The Workload name. Format `organizations/{org_id}/locations/{location}/workloads/{workload}`. (required)
  filter: string, Optional. A custom filter for filtering by the Violations properties.
  interval_endTime: string, The end of the time window.
  interval_startTime: string, The start of the time window.
  pageSize: integer, Optional. Page size.
  pageToken: string, Optional. Page token returned from previous request.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response of ListViolations endpoint.
  "nextPageToken": "A String", # The next page token. Returns empty if reached the last page.
  "violations": [ # List of Violations under a Workload.
    { # Workload monitoring Violation.
      "auditLogLink": "A String", # Output only. Immutable. Audit Log Link for violated resource Format: https://console.cloud.google.com/logs/query;query={logName}{protoPayload.resourceName}{timeRange}{folder}
      "beginTime": "A String", # Output only. Time of the event which triggered the Violation.
      "category": "A String", # Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc.
      "description": "A String", # Output only. Description for the Violation. e.g. OrgPolicy gcp.resourceLocations has non compliant value.
      "name": "A String", # Output only. Immutable. Name of the Violation. Format: organizations/{organization}/locations/{location}/workloads/{workload_id}/violations/{violations_id}
      "nonCompliantOrgPolicy": "A String", # Output only. Immutable. Name of the OrgPolicy which was modified with non-compliant change and resulted this violation. Format: projects/{project_number}/policies/{constraint_name} folders/{folder_id}/policies/{constraint_name} organizations/{organization_id}/policies/{constraint_name}
      "orgPolicyConstraint": "A String", # Output only. Immutable. The org-policy-constraint that was incorrectly changed, which resulted in this violation.
      "resolveTime": "A String", # Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty.
      "state": "A String", # Output only. State of the violation
      "updateTime": "A String", # Output only. The last time when the Violation record was updated.
    },
  ],
}
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.