Method: projects.locations.instances.keyRings.keys.transactions.create

Creates a Transaction for a Key. The server assigns the Transaction ID.

The request carries the authorization of the initiator, which counts as the AUTHORIZE decision of the initiator. The initiator is the User whose principal matches the authenticated identity of the caller. That User must have the SIGNER role, have an authorizationKey, and hold a key share of the Key.

The server evaluates the Transaction against the enforced transaction policies, which are the policies in state ACTIVE or PENDING_DISABLED. If policy evaluation denies the Transaction, the server returns it in state REJECTED. Otherwise, the server returns it in state PENDING_AUTHORIZATION, and other signers authorize or deny it with transactions.recordSignerDecision.

If the server can decode transaction.payload and transaction.signing_message does not match its digest, the request fails with INVALID_ARGUMENT. If policy evaluation is unavailable, the request fails with UNAVAILABLE, and signers cannot record decisions on the Transaction until the evaluation finishes. To finish the evaluation, retry the request with the same requestId.

The request fails with PERMISSION_DENIED if the caller holds no key share of the Key, and with FAILED_PRECONDITION if the Key is not ACTIVE.

HTTP request

POST https://mpc.googleapis.com/v1beta/{parent=projects/*/locations/*/instances/*/keyRings/*/keys/*}/transactions

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The Key that signs the Transaction. Format: projects/{project}/locations/{location}/instances/{instance}/keyRings/{keyRing}/keys/{key} It takes the form projects/{project}/locations/{location}/instances/{instance}/keyRings/{keyring}/keys/{key}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "transaction": {
    object (Transaction)
  },
  "authorizationInfo": {
    object (AuthorizationInfo)
  },
  "requestId": string
}
Fields
transaction

object (Transaction)

Required. The Transaction to create. The server reads only signingMessage, action, schema, payload, and metadata. It ignores output-only fields.

authorizationInfo

object (AuthorizationInfo)

Required. The initiator's authorization over a TransactionSigningPayload, signed with the authorization key of the User whose principal matches the caller, with:

  • key: set to parent
  • decision: AUTHORIZE
  • signingMessage: set to transaction.signing_message

Recorded as the first entry in signerDecisions.

requestId

string

Optional. An idempotency key. The server generates Transaction IDs, so a client must set this field to retry a transactions.create request safely. If an earlier request with the same requestId completed, the server returns the Transaction that it created and does not create another one. If the earlier request failed with UNAVAILABLE during policy evaluation, the server finishes the evaluation of that Transaction. If the retry specifies a different caller, Key, signingMessage, action, schema, payload, or metadata, it fails with ALREADY_EXISTS (REQUEST_ID_ALREADY_USED).

Must be a UUID4 and not the zero UUID.

Response body

If successful, the response body contains a newly created instance of Transaction.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.