Close httplib2 connections.
Get OS policies compliance data for the specified Compute Engine VM instance.
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
List OS policies compliance data for all Compute Engine VM instances in the specified zone.
Retrieves the next page of results.
close()
Close httplib2 connections.
get(name, x__xgafv=None)
Get OS policies compliance data for the specified Compute Engine VM instance. Args: name: string, Required. API resource name for instance OS policies compliance resource. Format: `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}` For `{project}`, either Compute Engine project-number or project-id can be provided. For `{instance}`, either Compute Engine VM instance-id or instance-name can be provided. (required) x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # This API resource represents the OS policies compliance data for a Compute Engine virtual machine (VM) instance at a given point in time. A Compute Engine VM can have multiple OS policy assignments, and each assignment can have multiple OS policies. As a result, multiple OS policies could be applied to a single VM. You can use this API resource to determine both the compliance state of your VM as well as the compliance state of an individual OS policy. For more information, see [View compliance](https://cloud.google.com/compute/docs/os-configuration-management/view-compliance). "detailedState": "A String", # Output only. Detailed compliance state of the VM. This field is populated only when compliance state is `UNKNOWN`. It may contain one of the following values: * `no-compliance-data`: Compliance data is not available for this VM. * `no-agent-detected`: OS Config agent is not detected for this VM. * `config-not-supported-by-agent`: The version of the OS Config agent running on this VM does not support configuration management. * `inactive`: VM is not running. * `internal-service-errors`: There were internal service errors encountered while enforcing compliance. * `agent-errors`: OS config agent encountered errors while enforcing compliance. "detailedStateReason": "A String", # Output only. The reason for the `detailed_state` of the VM (if any). "instance": "A String", # Output only. The Compute Engine VM instance name. "lastComplianceCheckTime": "A String", # Output only. Timestamp of the last compliance check for the VM. "lastComplianceRunId": "A String", # Output only. Unique identifier for the last compliance run. This id will be logged by the OS config agent during a compliance run and can be used for debugging and tracing purpose. "name": "A String", # Output only. The `InstanceOSPoliciesCompliance` API resource name. Format: `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}` "osPolicyCompliances": [ # Output only. Compliance data for each `OSPolicy` that is applied to the VM. { # Compliance data for an OS policy "osPolicyAssignment": "A String", # Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` belongs to. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` "osPolicyId": "A String", # The OS policy id "osPolicyResourceCompliances": [ # Compliance data for each `OSPolicyResource` that is applied to the VM. { # Compliance data for an OS policy resource. "configSteps": [ # Ordered list of configuration steps taken by the agent for the OS policy resource. { # Step performed by the OS Config agent for configuring an `OSPolicyResource` to its desired state. "errorMessage": "A String", # An error message recorded during the execution of this step. Only populated when outcome is FAILED. "outcome": "A String", # Outcome of the configuration step. "type": "A String", # Configuration step type. }, ], "execResourceOutput": { # ExecResource specific output. # ExecResource specific output. "enforcementOutput": "A String", # Output from Enforcement phase output file (if run). Output size is limited to 100K bytes. }, "osPolicyResourceId": "A String", # The id of the OS policy resource. "state": "A String", # Compliance state of the OS policy resource. }, ], "state": "A String", # Compliance state of the OS policy. }, ], "state": "A String", # Output only. Compliance state of the VM. }
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
List OS policies compliance data for all Compute Engine VM instances in the specified zone. Args: parent: string, Required. The parent resource name. Format: `projects/{project}/locations/{location}` For `{project}`, either Compute Engine project-number or project-id can be provided. (required) filter: string, If provided, this field specifies the criteria that must be met by a `InstanceOSPoliciesCompliance` API resource to be included in the response. pageSize: integer, The maximum number of results to return. pageToken: string, A pagination token returned from a previous call to `ListInstanceOSPoliciesCompliances` that indicates where this listing should continue from. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A response message for listing OS policies compliance data for all Compute Engine VMs in the given location. "instanceOsPoliciesCompliances": [ # List of instance OS policies compliance objects. { # This API resource represents the OS policies compliance data for a Compute Engine virtual machine (VM) instance at a given point in time. A Compute Engine VM can have multiple OS policy assignments, and each assignment can have multiple OS policies. As a result, multiple OS policies could be applied to a single VM. You can use this API resource to determine both the compliance state of your VM as well as the compliance state of an individual OS policy. For more information, see [View compliance](https://cloud.google.com/compute/docs/os-configuration-management/view-compliance). "detailedState": "A String", # Output only. Detailed compliance state of the VM. This field is populated only when compliance state is `UNKNOWN`. It may contain one of the following values: * `no-compliance-data`: Compliance data is not available for this VM. * `no-agent-detected`: OS Config agent is not detected for this VM. * `config-not-supported-by-agent`: The version of the OS Config agent running on this VM does not support configuration management. * `inactive`: VM is not running. * `internal-service-errors`: There were internal service errors encountered while enforcing compliance. * `agent-errors`: OS config agent encountered errors while enforcing compliance. "detailedStateReason": "A String", # Output only. The reason for the `detailed_state` of the VM (if any). "instance": "A String", # Output only. The Compute Engine VM instance name. "lastComplianceCheckTime": "A String", # Output only. Timestamp of the last compliance check for the VM. "lastComplianceRunId": "A String", # Output only. Unique identifier for the last compliance run. This id will be logged by the OS config agent during a compliance run and can be used for debugging and tracing purpose. "name": "A String", # Output only. The `InstanceOSPoliciesCompliance` API resource name. Format: `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}` "osPolicyCompliances": [ # Output only. Compliance data for each `OSPolicy` that is applied to the VM. { # Compliance data for an OS policy "osPolicyAssignment": "A String", # Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` belongs to. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}` "osPolicyId": "A String", # The OS policy id "osPolicyResourceCompliances": [ # Compliance data for each `OSPolicyResource` that is applied to the VM. { # Compliance data for an OS policy resource. "configSteps": [ # Ordered list of configuration steps taken by the agent for the OS policy resource. { # Step performed by the OS Config agent for configuring an `OSPolicyResource` to its desired state. "errorMessage": "A String", # An error message recorded during the execution of this step. Only populated when outcome is FAILED. "outcome": "A String", # Outcome of the configuration step. "type": "A String", # Configuration step type. }, ], "execResourceOutput": { # ExecResource specific output. # ExecResource specific output. "enforcementOutput": "A String", # Output from Enforcement phase output file (if run). Output size is limited to 100K bytes. }, "osPolicyResourceId": "A String", # The id of the OS policy resource. "state": "A String", # Compliance state of the OS policy resource. }, ], "state": "A String", # Compliance state of the OS policy. }, ], "state": "A String", # Output only. Compliance state of the VM. }, ], "nextPageToken": "A String", # The pagination token to retrieve the next page of instance OS policies compliance objects. }
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.