approve(name, body=None, x__xgafv=None)
Approves a request and returns the updated ApprovalRequest. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
Close httplib2 connections.
dismiss(name, body=None, x__xgafv=None)
Dismisses a request. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state.
Gets an approval request. Returns NOT_FOUND if the request does not exist.
invalidate(name, body=None, x__xgafv=None)
Invalidates an existing ApprovalRequest. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It only invalidates a single approval. Returns FAILED_PRECONDITION if the request exists but is not in an approved state.
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological.
Retrieves the next page of results.
approve(name, body=None, x__xgafv=None)
Approves a request and returns the updated ApprovalRequest. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state. Args: name: string, Name of the approval request to approve. (required) body: object, The request body. The object takes the form of: { # Request to approve an ApprovalRequest. "expireTime": "A String", # The expiration time of this approval. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A request for the customer to approve access to a resource. "approve": { # A decision that has been made to approve access to a resource. # Access was approved. "approveTime": "A String", # The time at which approval was granted. "autoApproved": True or False, # True when the request has been auto-approved. "expireTime": "A String", # The time at which the approval expires. "invalidateTime": "A String", # If set, denotes the timestamp at which the approval is invalidated. "signatureInfo": { # Information about the digital signature of the resource. # The signature for the ApprovalRequest and details on how it was signed. "customerKmsKeyVersion": "A String", # The resource name of the customer CryptoKeyVersion used for signing. "googleKeyAlgorithm": "A String", # The hashing algorithm used for signature verification. It will only be present in the case of Google managed keys. "googlePublicKeyPem": "A String", # The public key for the Google default signing, encoded in PEM format. The signature was created using a private key which may be verified using this public key. "serializedApprovalRequest": "A String", # The ApprovalRequest that is serialized without the SignatureInfo message field. This data is used with the hashing algorithm to generate the digital signature, and it can be used for signature verification. "signature": "A String", # The digital signature. }, }, "dismiss": { # A decision that has been made to dismiss an approval request. # The request was dismissed. "dismissTime": "A String", # The time at which the approval request was dismissed. "implicit": True or False, # This field will be true if the ApprovalRequest was implicitly dismissed due to inaction by the access approval approvers (the request is not acted on by the approvers before the exiration time). }, "name": "A String", # The resource name of the request. Format is "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}". "requestTime": "A String", # The time at which approval was requested. "requestedAugmentedInfo": { # This field contains the augmented information of the request. # This field contains the augmented information of the request. "command": "A String", # For command-line tools, the full command-line exactly as entered by the actor without adding any additional characters (such as quotation marks). }, "requestedDuration": "A String", # The requested access duration. "requestedExpiration": "A String", # The original requested expiration for the approval. Calculated by adding the requested_duration to the request_time. "requestedLocations": { # Home office and physical location of the principal. # The locations for which approval is being requested. "principalOfficeCountry": "A String", # The "home office" location of the principal. A two-letter country code (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In some limited situations Google systems may refer refer to a region code instead of a country code. Possible Region Codes: * ASI: Asia * EUR: Europe * OCE: Oceania * AFR: Africa * NAM: North America * SAM: South America * ANT: Antarctica * ANY: Any location "principalPhysicalLocationCountry": "A String", # Physical location of the principal at the time of the access. A two-letter country code (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In some limited situations Google systems may refer refer to a region code instead of a country code. Possible Region Codes: * ASI: Asia * EUR: Europe * OCE: Oceania * AFR: Africa * NAM: North America * SAM: South America * ANT: Antarctica * ANY: Any location }, "requestedReason": { # The justification for which approval is being requested. "detail": "A String", # More detail about certain reason types. See comments for each type above. "type": "A String", # Type of access justification. }, "requestedResourceName": "A String", # The resource for which approval is being requested. The format of the resource name is defined at https://cloud.google.com/apis/design/resource_names. The resource name here may either be a "full" resource name (e.g. "//library.googleapis.com/shelves/shelf1/books/book2") or a "relative" resource name (e.g. "shelves/shelf1/books/book2") as described in the resource name specification. "requestedResourceProperties": { # The properties associated with the resource of the request. # Properties related to the resource represented by requested_resource_name. "excludesDescendants": True or False, # Whether an approval will exclude the descendants of the resource being requested. }, }
close()
Close httplib2 connections.
dismiss(name, body=None, x__xgafv=None)
Dismisses a request. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It is equivalent in effect to ignoring the request altogether. Returns NOT_FOUND if the request does not exist. Returns FAILED_PRECONDITION if the request exists but is not in a pending state. Args: name: string, Name of the ApprovalRequest to dismiss. (required) body: object, The request body. The object takes the form of: { # Request to dismiss an approval request. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A request for the customer to approve access to a resource. "approve": { # A decision that has been made to approve access to a resource. # Access was approved. "approveTime": "A String", # The time at which approval was granted. "autoApproved": True or False, # True when the request has been auto-approved. "expireTime": "A String", # The time at which the approval expires. "invalidateTime": "A String", # If set, denotes the timestamp at which the approval is invalidated. "signatureInfo": { # Information about the digital signature of the resource. # The signature for the ApprovalRequest and details on how it was signed. "customerKmsKeyVersion": "A String", # The resource name of the customer CryptoKeyVersion used for signing. "googleKeyAlgorithm": "A String", # The hashing algorithm used for signature verification. It will only be present in the case of Google managed keys. "googlePublicKeyPem": "A String", # The public key for the Google default signing, encoded in PEM format. The signature was created using a private key which may be verified using this public key. "serializedApprovalRequest": "A String", # The ApprovalRequest that is serialized without the SignatureInfo message field. This data is used with the hashing algorithm to generate the digital signature, and it can be used for signature verification. "signature": "A String", # The digital signature. }, }, "dismiss": { # A decision that has been made to dismiss an approval request. # The request was dismissed. "dismissTime": "A String", # The time at which the approval request was dismissed. "implicit": True or False, # This field will be true if the ApprovalRequest was implicitly dismissed due to inaction by the access approval approvers (the request is not acted on by the approvers before the exiration time). }, "name": "A String", # The resource name of the request. Format is "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}". "requestTime": "A String", # The time at which approval was requested. "requestedAugmentedInfo": { # This field contains the augmented information of the request. # This field contains the augmented information of the request. "command": "A String", # For command-line tools, the full command-line exactly as entered by the actor without adding any additional characters (such as quotation marks). }, "requestedDuration": "A String", # The requested access duration. "requestedExpiration": "A String", # The original requested expiration for the approval. Calculated by adding the requested_duration to the request_time. "requestedLocations": { # Home office and physical location of the principal. # The locations for which approval is being requested. "principalOfficeCountry": "A String", # The "home office" location of the principal. A two-letter country code (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In some limited situations Google systems may refer refer to a region code instead of a country code. Possible Region Codes: * ASI: Asia * EUR: Europe * OCE: Oceania * AFR: Africa * NAM: North America * SAM: South America * ANT: Antarctica * ANY: Any location "principalPhysicalLocationCountry": "A String", # Physical location of the principal at the time of the access. A two-letter country code (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In some limited situations Google systems may refer refer to a region code instead of a country code. Possible Region Codes: * ASI: Asia * EUR: Europe * OCE: Oceania * AFR: Africa * NAM: North America * SAM: South America * ANT: Antarctica * ANY: Any location }, "requestedReason": { # The justification for which approval is being requested. "detail": "A String", # More detail about certain reason types. See comments for each type above. "type": "A String", # Type of access justification. }, "requestedResourceName": "A String", # The resource for which approval is being requested. The format of the resource name is defined at https://cloud.google.com/apis/design/resource_names. The resource name here may either be a "full" resource name (e.g. "//library.googleapis.com/shelves/shelf1/books/book2") or a "relative" resource name (e.g. "shelves/shelf1/books/book2") as described in the resource name specification. "requestedResourceProperties": { # The properties associated with the resource of the request. # Properties related to the resource represented by requested_resource_name. "excludesDescendants": True or False, # Whether an approval will exclude the descendants of the resource being requested. }, }
get(name, x__xgafv=None)
Gets an approval request. Returns NOT_FOUND if the request does not exist. Args: name: string, The name of the approval request to retrieve. Format: "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}" (required) x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A request for the customer to approve access to a resource. "approve": { # A decision that has been made to approve access to a resource. # Access was approved. "approveTime": "A String", # The time at which approval was granted. "autoApproved": True or False, # True when the request has been auto-approved. "expireTime": "A String", # The time at which the approval expires. "invalidateTime": "A String", # If set, denotes the timestamp at which the approval is invalidated. "signatureInfo": { # Information about the digital signature of the resource. # The signature for the ApprovalRequest and details on how it was signed. "customerKmsKeyVersion": "A String", # The resource name of the customer CryptoKeyVersion used for signing. "googleKeyAlgorithm": "A String", # The hashing algorithm used for signature verification. It will only be present in the case of Google managed keys. "googlePublicKeyPem": "A String", # The public key for the Google default signing, encoded in PEM format. The signature was created using a private key which may be verified using this public key. "serializedApprovalRequest": "A String", # The ApprovalRequest that is serialized without the SignatureInfo message field. This data is used with the hashing algorithm to generate the digital signature, and it can be used for signature verification. "signature": "A String", # The digital signature. }, }, "dismiss": { # A decision that has been made to dismiss an approval request. # The request was dismissed. "dismissTime": "A String", # The time at which the approval request was dismissed. "implicit": True or False, # This field will be true if the ApprovalRequest was implicitly dismissed due to inaction by the access approval approvers (the request is not acted on by the approvers before the exiration time). }, "name": "A String", # The resource name of the request. Format is "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}". "requestTime": "A String", # The time at which approval was requested. "requestedAugmentedInfo": { # This field contains the augmented information of the request. # This field contains the augmented information of the request. "command": "A String", # For command-line tools, the full command-line exactly as entered by the actor without adding any additional characters (such as quotation marks). }, "requestedDuration": "A String", # The requested access duration. "requestedExpiration": "A String", # The original requested expiration for the approval. Calculated by adding the requested_duration to the request_time. "requestedLocations": { # Home office and physical location of the principal. # The locations for which approval is being requested. "principalOfficeCountry": "A String", # The "home office" location of the principal. A two-letter country code (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In some limited situations Google systems may refer refer to a region code instead of a country code. Possible Region Codes: * ASI: Asia * EUR: Europe * OCE: Oceania * AFR: Africa * NAM: North America * SAM: South America * ANT: Antarctica * ANY: Any location "principalPhysicalLocationCountry": "A String", # Physical location of the principal at the time of the access. A two-letter country code (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In some limited situations Google systems may refer refer to a region code instead of a country code. Possible Region Codes: * ASI: Asia * EUR: Europe * OCE: Oceania * AFR: Africa * NAM: North America * SAM: South America * ANT: Antarctica * ANY: Any location }, "requestedReason": { # The justification for which approval is being requested. "detail": "A String", # More detail about certain reason types. See comments for each type above. "type": "A String", # Type of access justification. }, "requestedResourceName": "A String", # The resource for which approval is being requested. The format of the resource name is defined at https://cloud.google.com/apis/design/resource_names. The resource name here may either be a "full" resource name (e.g. "//library.googleapis.com/shelves/shelf1/books/book2") or a "relative" resource name (e.g. "shelves/shelf1/books/book2") as described in the resource name specification. "requestedResourceProperties": { # The properties associated with the resource of the request. # Properties related to the resource represented by requested_resource_name. "excludesDescendants": True or False, # Whether an approval will exclude the descendants of the resource being requested. }, }
invalidate(name, body=None, x__xgafv=None)
Invalidates an existing ApprovalRequest. Returns the updated ApprovalRequest. NOTE: This does not deny access to the resource if another request has been made and approved. It only invalidates a single approval. Returns FAILED_PRECONDITION if the request exists but is not in an approved state. Args: name: string, Name of the ApprovalRequest to invalidate. (required) body: object, The request body. The object takes the form of: { # Request to invalidate an existing approval. } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # A request for the customer to approve access to a resource. "approve": { # A decision that has been made to approve access to a resource. # Access was approved. "approveTime": "A String", # The time at which approval was granted. "autoApproved": True or False, # True when the request has been auto-approved. "expireTime": "A String", # The time at which the approval expires. "invalidateTime": "A String", # If set, denotes the timestamp at which the approval is invalidated. "signatureInfo": { # Information about the digital signature of the resource. # The signature for the ApprovalRequest and details on how it was signed. "customerKmsKeyVersion": "A String", # The resource name of the customer CryptoKeyVersion used for signing. "googleKeyAlgorithm": "A String", # The hashing algorithm used for signature verification. It will only be present in the case of Google managed keys. "googlePublicKeyPem": "A String", # The public key for the Google default signing, encoded in PEM format. The signature was created using a private key which may be verified using this public key. "serializedApprovalRequest": "A String", # The ApprovalRequest that is serialized without the SignatureInfo message field. This data is used with the hashing algorithm to generate the digital signature, and it can be used for signature verification. "signature": "A String", # The digital signature. }, }, "dismiss": { # A decision that has been made to dismiss an approval request. # The request was dismissed. "dismissTime": "A String", # The time at which the approval request was dismissed. "implicit": True or False, # This field will be true if the ApprovalRequest was implicitly dismissed due to inaction by the access approval approvers (the request is not acted on by the approvers before the exiration time). }, "name": "A String", # The resource name of the request. Format is "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}". "requestTime": "A String", # The time at which approval was requested. "requestedAugmentedInfo": { # This field contains the augmented information of the request. # This field contains the augmented information of the request. "command": "A String", # For command-line tools, the full command-line exactly as entered by the actor without adding any additional characters (such as quotation marks). }, "requestedDuration": "A String", # The requested access duration. "requestedExpiration": "A String", # The original requested expiration for the approval. Calculated by adding the requested_duration to the request_time. "requestedLocations": { # Home office and physical location of the principal. # The locations for which approval is being requested. "principalOfficeCountry": "A String", # The "home office" location of the principal. A two-letter country code (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In some limited situations Google systems may refer refer to a region code instead of a country code. Possible Region Codes: * ASI: Asia * EUR: Europe * OCE: Oceania * AFR: Africa * NAM: North America * SAM: South America * ANT: Antarctica * ANY: Any location "principalPhysicalLocationCountry": "A String", # Physical location of the principal at the time of the access. A two-letter country code (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In some limited situations Google systems may refer refer to a region code instead of a country code. Possible Region Codes: * ASI: Asia * EUR: Europe * OCE: Oceania * AFR: Africa * NAM: North America * SAM: South America * ANT: Antarctica * ANY: Any location }, "requestedReason": { # The justification for which approval is being requested. "detail": "A String", # More detail about certain reason types. See comments for each type above. "type": "A String", # Type of access justification. }, "requestedResourceName": "A String", # The resource for which approval is being requested. The format of the resource name is defined at https://cloud.google.com/apis/design/resource_names. The resource name here may either be a "full" resource name (e.g. "//library.googleapis.com/shelves/shelf1/books/book2") or a "relative" resource name (e.g. "shelves/shelf1/books/book2") as described in the resource name specification. "requestedResourceProperties": { # The properties associated with the resource of the request. # Properties related to the resource represented by requested_resource_name. "excludesDescendants": True or False, # Whether an approval will exclude the descendants of the resource being requested. }, }
list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists approval requests associated with a project, folder, or organization. Approval requests can be filtered by state (pending, active, dismissed). The order is reverse chronological. Args: parent: string, The parent resource. This may be "projects/{project}", "folders/{folder}", or "organizations/{organization}". (required) filter: string, A filter on the type of approval requests to retrieve. Must be one of the following values: * [not set]: Requests that are pending or have active approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE: Only active (i.e. currently approved) requests. * DISMISSED: Only requests that have been dismissed, or requests that are not approved and past expiration. * EXPIRED: Only requests that have been approved, and the approval has expired. * HISTORY: Active, dismissed and expired requests. pageSize: integer, Requested page size. pageToken: string, A token identifying the page of results to return. x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Response to listing of ApprovalRequest objects. "approvalRequests": [ # Approval request details. { # A request for the customer to approve access to a resource. "approve": { # A decision that has been made to approve access to a resource. # Access was approved. "approveTime": "A String", # The time at which approval was granted. "autoApproved": True or False, # True when the request has been auto-approved. "expireTime": "A String", # The time at which the approval expires. "invalidateTime": "A String", # If set, denotes the timestamp at which the approval is invalidated. "signatureInfo": { # Information about the digital signature of the resource. # The signature for the ApprovalRequest and details on how it was signed. "customerKmsKeyVersion": "A String", # The resource name of the customer CryptoKeyVersion used for signing. "googleKeyAlgorithm": "A String", # The hashing algorithm used for signature verification. It will only be present in the case of Google managed keys. "googlePublicKeyPem": "A String", # The public key for the Google default signing, encoded in PEM format. The signature was created using a private key which may be verified using this public key. "serializedApprovalRequest": "A String", # The ApprovalRequest that is serialized without the SignatureInfo message field. This data is used with the hashing algorithm to generate the digital signature, and it can be used for signature verification. "signature": "A String", # The digital signature. }, }, "dismiss": { # A decision that has been made to dismiss an approval request. # The request was dismissed. "dismissTime": "A String", # The time at which the approval request was dismissed. "implicit": True or False, # This field will be true if the ApprovalRequest was implicitly dismissed due to inaction by the access approval approvers (the request is not acted on by the approvers before the exiration time). }, "name": "A String", # The resource name of the request. Format is "{projects|folders|organizations}/{id}/approvalRequests/{approval_request}". "requestTime": "A String", # The time at which approval was requested. "requestedAugmentedInfo": { # This field contains the augmented information of the request. # This field contains the augmented information of the request. "command": "A String", # For command-line tools, the full command-line exactly as entered by the actor without adding any additional characters (such as quotation marks). }, "requestedDuration": "A String", # The requested access duration. "requestedExpiration": "A String", # The original requested expiration for the approval. Calculated by adding the requested_duration to the request_time. "requestedLocations": { # Home office and physical location of the principal. # The locations for which approval is being requested. "principalOfficeCountry": "A String", # The "home office" location of the principal. A two-letter country code (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In some limited situations Google systems may refer refer to a region code instead of a country code. Possible Region Codes: * ASI: Asia * EUR: Europe * OCE: Oceania * AFR: Africa * NAM: North America * SAM: South America * ANT: Antarctica * ANY: Any location "principalPhysicalLocationCountry": "A String", # Physical location of the principal at the time of the access. A two-letter country code (ISO 3166-1 alpha-2), such as "US", "DE" or "GB" or a region code. In some limited situations Google systems may refer refer to a region code instead of a country code. Possible Region Codes: * ASI: Asia * EUR: Europe * OCE: Oceania * AFR: Africa * NAM: North America * SAM: South America * ANT: Antarctica * ANY: Any location }, "requestedReason": { # The justification for which approval is being requested. "detail": "A String", # More detail about certain reason types. See comments for each type above. "type": "A String", # Type of access justification. }, "requestedResourceName": "A String", # The resource for which approval is being requested. The format of the resource name is defined at https://cloud.google.com/apis/design/resource_names. The resource name here may either be a "full" resource name (e.g. "//library.googleapis.com/shelves/shelf1/books/book2") or a "relative" resource name (e.g. "shelves/shelf1/books/book2") as described in the resource name specification. "requestedResourceProperties": { # The properties associated with the resource of the request. # Properties related to the resource represented by requested_resource_name. "excludesDescendants": True or False, # Whether an approval will exclude the descendants of the resource being requested. }, }, ], "nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more. }
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.