Method: projects.locations.instances.transactionPolicies.approve

Records a Policy Author's approval for a policy that is waiting to be activated or disabled.

Before counting approvals, the server discards any earlier approval whose User is no longer an active Policy Author or whose signature no longer verifies against that User's current User.authorization_key. It then records the caller's approval. When the remaining approvals reach the required number of Policy Author approvals, the transition completes: a policy waiting for activation becomes active, and a policy waiting to be disabled becomes disabled. Otherwise the policy stays pending with the remaining approvals.

Returns the following error codes:

  • NOT_FOUND: The TransactionPolicy does not exist.
  • FAILED_PRECONDITION: The policy is not waiting for approval.
  • ALREADY_EXISTS: The Policy Author has already approved this transition.
  • INVALID_ARGUMENT: The authorization in authorizationInfo cannot be verified.
  • PERMISSION_DENIED: The caller is not an authorized Policy Author.

HTTP request

POST https://mpc.googleapis.com/v1beta/{name=projects/*/locations/*/instances/*/transactionPolicies/*}:approve

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The name of the TransactionPolicy to approve. Format: projects/{project}/locations/{location}/instances/{instance}/transactionPolicies/{transactionPolicy} It takes the form projects/{project}/locations/{location}/instances/{instance}/transactionPolicies/{transactionpolicies}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "authorizationInfo": {
    object (AuthorizationInfo)
  }
}
Fields
authorizationInfo

object (AuthorizationInfo)

Required. The Policy Author's authorization over a TransactionPolicySigningPayload with:

  • transactionPolicy: set to name
  • action: ACTIVATE when the policy is waiting for activation, or DISABLE when the policy is waiting to be disabled
  • rule: set to the policy's rule

Response body

If successful, the response body contains an instance of TransactionPolicy.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.