blob: e6ea8cd9f0176eec41fee507722a6b630a170658 [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="osconfig_v1alpha.html">OS Config API</a> . <a href="osconfig_v1alpha.projects.html">projects</a> . <a href="osconfig_v1alpha.projects.locations.html">locations</a> . <a href="osconfig_v1alpha.projects.locations.instances.html">instances</a> . <a href="osconfig_v1alpha.projects.locations.instances.osPolicyAssignments.html">osPolicyAssignments</a> . <a href="osconfig_v1alpha.projects.locations.instances.osPolicyAssignments.reports.html">reports</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#get">get(name, x__xgafv=None)</a></code></p>
<p class="firstline">Get the OS policy asssignment report for the specified Compute Engine VM instance.</p>
<p class="toc_element">
<code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">List OS policy asssignment reports for all Compute Engine VM instances in the specified zone.</p>
<p class="toc_element">
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="get">get(name, x__xgafv=None)</code>
<pre>Get the OS policy asssignment report for the specified Compute Engine VM instance.
Args:
name: string, Required. API resource name for OS policy assignment report. Format: `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` For `{project}`, either `project-number` or `project-id` can be provided. For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` can be provided. For `{assignment_id}`, the OSPolicyAssignment id must 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:
{ # A report of the OS policy assignment status for a given instance.
&quot;instance&quot;: &quot;A String&quot;, # The Compute Engine VM instance name.
&quot;lastRunId&quot;: &quot;A String&quot;, # Unique identifier of the last attempted run to apply the OS policies associated with this assignment on the VM. This ID is logged by the OS Config agent while applying the OS policies associated with this assignment on the VM. NOTE: If the service is unable to successfully connect to the agent for this run, then this id will not be available in the agent logs.
&quot;name&quot;: &quot;A String&quot;, # The `OSPolicyAssignmentReport` API resource name. Format: `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`
&quot;osPolicyAssignment&quot;: &quot;A String&quot;, # Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` belongs to. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
&quot;osPolicyCompliances&quot;: [ # Compliance data for each `OSPolicy` that is applied to the VM.
{ # Compliance data for an OS policy
&quot;complianceState&quot;: &quot;A String&quot;, # The compliance state of the OS policy.
&quot;complianceStateReason&quot;: &quot;A String&quot;, # The reason for the OS policy to be in an unknown compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. If populated, the field can contain one of the following values: * `vm-not-running`: The VM was not running. * `os-policies-not-supported-by-agent`: The version of the OS Config agent running on the VM does not support running OS policies. * `no-agent-detected`: The OS Config agent is not detected for the VM. * `resource-execution-errors`: The OS Config agent encountered errors while executing one or more resources in the policy. See `os_policy_resource_compliances` for details. * `task-timeout`: The task sent to the agent to apply the policy timed out. * `unexpected-agent-state`: The OS Config agent did not report the final status of the task that attempted to apply the policy. Instead, the agent unexpectedly started working on a different task. This mostly happens when the agent or VM unexpectedly restarts while applying OS policies. * `internal-service-errors`: Internal service errors were encountered while attempting to apply the policy.
&quot;osPolicyId&quot;: &quot;A String&quot;, # The OS policy id
&quot;osPolicyResourceCompliances&quot;: [ # Compliance data for each resource within the policy that is applied to the VM.
{ # Compliance data for an OS policy resource.
&quot;complianceState&quot;: &quot;A String&quot;, # The compliance state of the resource.
&quot;complianceStateReason&quot;: &quot;A String&quot;, # A reason for the resource to be in the given compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. The following values are supported when `compliance_state == UNKNOWN` * `execution-errors`: Errors were encountered by the agent while executing the resource and the compliance state couldn&#x27;t be determined. * `execution-skipped-by-agent`: Resource execution was skipped by the agent because errors were encountered while executing prior resources in the OS policy. * `os-policy-execution-attempt-failed`: The execution of the OS policy containing this resource failed and the compliance state couldn&#x27;t be determined.
&quot;configSteps&quot;: [ # Ordered list of configuration completed by the agent for the OS policy resource.
{ # Step performed by the OS Config agent for configuring an `OSPolicy` resource to its desired state.
&quot;errorMessage&quot;: &quot;A String&quot;, # An error message recorded during the execution of this step. Only populated if errors were encountered during this step execution.
&quot;type&quot;: &quot;A String&quot;, # Configuration step type.
},
],
&quot;execResourceOutput&quot;: { # ExecResource specific output. # ExecResource specific output.
&quot;enforcementOutput&quot;: &quot;A String&quot;, # Output from enforcement phase output file (if run). Output size is limited to 100K bytes.
},
&quot;osPolicyResourceId&quot;: &quot;A String&quot;, # The ID of the OS policy resource.
},
],
},
],
&quot;updateTime&quot;: &quot;A String&quot;, # Timestamp for when the report was last generated.
}</pre>
</div>
<div class="method">
<code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
<pre>List OS policy asssignment reports for all Compute Engine VM instances in the specified zone.
Args:
parent: string, Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` For `{project}`, either `project-number` or `project-id` can be provided. For `{instance}`, either `instance-name`, `instance-id`, or `-` can be provided. If &#x27;-&#x27; is provided, the response will include OSPolicyAssignmentReports for all instances in the project/location. For `{assignment}`, either `assignment-id` or `-` can be provided. If &#x27;-&#x27; is provided, the response will include OSPolicyAssignmentReports for all OSPolicyAssignments in the project/location. Either {instance} or {assignment} must be `-`. For example: `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` returns all reports for the instance `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` returns all the reports for the given assignment across all instances. `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` returns all the reports for all assignments across all instances. (required)
filter: string, If provided, this field specifies the criteria that must be met by the `OSPolicyAssignmentReport` API resource that is included in the response.
pageSize: integer, The maximum number of results to return.
pageToken: string, A pagination token returned from a previous call to the `ListOSPolicyAssignmentReports` method 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 Policy assignment reports including the page of results and page token.
&quot;nextPageToken&quot;: &quot;A String&quot;, # The pagination token to retrieve the next page of OS policy assignment report objects.
&quot;osPolicyAssignmentReports&quot;: [ # List of OS policy assignment reports.
{ # A report of the OS policy assignment status for a given instance.
&quot;instance&quot;: &quot;A String&quot;, # The Compute Engine VM instance name.
&quot;lastRunId&quot;: &quot;A String&quot;, # Unique identifier of the last attempted run to apply the OS policies associated with this assignment on the VM. This ID is logged by the OS Config agent while applying the OS policies associated with this assignment on the VM. NOTE: If the service is unable to successfully connect to the agent for this run, then this id will not be available in the agent logs.
&quot;name&quot;: &quot;A String&quot;, # The `OSPolicyAssignmentReport` API resource name. Format: `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`
&quot;osPolicyAssignment&quot;: &quot;A String&quot;, # Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` belongs to. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`
&quot;osPolicyCompliances&quot;: [ # Compliance data for each `OSPolicy` that is applied to the VM.
{ # Compliance data for an OS policy
&quot;complianceState&quot;: &quot;A String&quot;, # The compliance state of the OS policy.
&quot;complianceStateReason&quot;: &quot;A String&quot;, # The reason for the OS policy to be in an unknown compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. If populated, the field can contain one of the following values: * `vm-not-running`: The VM was not running. * `os-policies-not-supported-by-agent`: The version of the OS Config agent running on the VM does not support running OS policies. * `no-agent-detected`: The OS Config agent is not detected for the VM. * `resource-execution-errors`: The OS Config agent encountered errors while executing one or more resources in the policy. See `os_policy_resource_compliances` for details. * `task-timeout`: The task sent to the agent to apply the policy timed out. * `unexpected-agent-state`: The OS Config agent did not report the final status of the task that attempted to apply the policy. Instead, the agent unexpectedly started working on a different task. This mostly happens when the agent or VM unexpectedly restarts while applying OS policies. * `internal-service-errors`: Internal service errors were encountered while attempting to apply the policy.
&quot;osPolicyId&quot;: &quot;A String&quot;, # The OS policy id
&quot;osPolicyResourceCompliances&quot;: [ # Compliance data for each resource within the policy that is applied to the VM.
{ # Compliance data for an OS policy resource.
&quot;complianceState&quot;: &quot;A String&quot;, # The compliance state of the resource.
&quot;complianceStateReason&quot;: &quot;A String&quot;, # A reason for the resource to be in the given compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. The following values are supported when `compliance_state == UNKNOWN` * `execution-errors`: Errors were encountered by the agent while executing the resource and the compliance state couldn&#x27;t be determined. * `execution-skipped-by-agent`: Resource execution was skipped by the agent because errors were encountered while executing prior resources in the OS policy. * `os-policy-execution-attempt-failed`: The execution of the OS policy containing this resource failed and the compliance state couldn&#x27;t be determined.
&quot;configSteps&quot;: [ # Ordered list of configuration completed by the agent for the OS policy resource.
{ # Step performed by the OS Config agent for configuring an `OSPolicy` resource to its desired state.
&quot;errorMessage&quot;: &quot;A String&quot;, # An error message recorded during the execution of this step. Only populated if errors were encountered during this step execution.
&quot;type&quot;: &quot;A String&quot;, # Configuration step type.
},
],
&quot;execResourceOutput&quot;: { # ExecResource specific output. # ExecResource specific output.
&quot;enforcementOutput&quot;: &quot;A String&quot;, # Output from enforcement phase output file (if run). Output size is limited to 100K bytes.
},
&quot;osPolicyResourceId&quot;: &quot;A String&quot;, # The ID of the OS policy resource.
},
],
},
],
&quot;updateTime&quot;: &quot;A String&quot;, # Timestamp for when the report was last generated.
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next(previous_request, previous_response)</code>
<pre>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 &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
</body></html>