Close httplib2 connections.
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists AppliedAutoProtectionPolicies in a given project and location.
list_next(previous_request, previous_response)
Retrieves the next page of results.
close()
Close httplib2 connections.
list(parent, filter=None, orderBy=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists AppliedAutoProtectionPolicies in a given project and location.
Args:
parent: string, Required. The project and location for which to retrieve the list of applied policies. Format: projects/{project}/locations/{location} (required)
filter: string, Optional. A filter expression that filters resources listed in the response.
orderBy: string, Optional. An expression that sorts the results in the response.
pageSize: integer, Optional. The maximum number of applied policies to return in a single page.
pageToken: string, Optional. A page token, received from a previous `ListAppliedAutoProtectionPolicies` call.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response message for ListAppliedAutoProtectionPolicies.
"appliedAutoProtectionPolicies": [ # A list of the AppliedAutoProtectionPolicy resources found.
{ # AppliedAutoProtectionPolicy is a read-only view of AutoProtectionPolicy and AutoProtectionPolicyBinding resources that apply to a given workload project.
"backupPlanDetails": [ # Output only. The set of backup plan configurations, mirroring the backup_plan_details from the source AutoProtectionPolicy. Each element specifies a backup plan for a given resource type.
{ # BackupPlanDetail defines configuration of protection.
"backupPlan": "A String", # Required. The resource name of the BackupPlan to apply to resources that match the policy's criteria. This backup plan must be in the same location as AutoProtectionPolicy. Format: projects/{project}/locations/{location}/backupPlans/{backupPlanId}
"resourceType": "A String", # Required. The type of resource that this policy will automatically protect. For MVP, `compute.googleapis.com/Instance` and `compute.googleapis.com/Disk` are supported.
},
],
"bindingEvaluationSummary": { # BindingEvaluationSummary contains the summary of the last run of job that applies policy to matching resources for a given binding. # Output only. The summary of the last policy application when the job has run.
"failedResourceCount": "A String", # Output only. The number of matching resources whose protection failed during job run.
"matchingResourceCount": "A String", # Output only. The number of resources that currently match the policy's criteria.
"protectedResourceCount": "A String", # Output only. The number of matching resources that are successfully protected.
},
"createTime": "A String", # Output only. Timestamp indicating when the binding was last created.
"criteria": { # Criteria specifies a set of criteria for matching resources. # Output only. The criteria resources must meet for this rule to apply. From AutoProtectionPolicy.criteria.
"matchingConditions": [ # Required. A list of matching conditions that a resource must meet to be protected by the policy.
{ # MatchingCondition specifies a set of conditions for matching resources.
"labelCondition": { # KeyValuePair defines a key-value pair for matching resource labels. # Optional. A condition that matches resources based on their labels. For MVP, this is limited to a single label match.
"key": "A String", # Required. The key of the label to match. This must be in the format `{label_key}`. The key must match the regex Format:`\p{Ll}\p{Lo}{0,62}`.
"values": [ # Required. The values of the label to match. There will be explicit “OR” between values of array. Each value must be in the format `{label_value}`. The value must match the regex Format: `[\\p{Ll}\\p{Lo}\\p{N}_-]{1,63}`.
"A String",
],
},
},
],
},
"name": "A String", # Identifier. Canonical resource name. Format: projects/{workload-project-number}/locations/{location}/appliedAutoProtectionPolicies/{id}.
"sourceBinding": "A String", # Output only. The full resource name of the AutoProtectionPolicyBinding that applies the source policy to a scope including this workload project. e.g., projects/{admin-project}/locations/{location}/autoProtectionPolicies/{policy_id}/autoProtectionPolicyBindings/{binding_id}.
"status": "A String", # Output only. The status of the applied auto protection policy.
"updateTime": "A String", # Output only. Timestamp indicating when the binding was last modified.
},
],
"nextPageToken": "A String", # A token that can be sent as `page_token` to retrieve the next page.
"unreachable": [ # Unordered list. Locations that could not be reached.
"A String",
],
}
list_next(previous_request, previous_response)
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.