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

Creates a new Key in a KeyRing by running distributed key generation (DKG). The server assigns the Key ID.

The call is synchronous: it returns the ACTIVE Key with its public key, or an error. The server picks the key-share holders from the KeyRing's KeyPolicy and returns them in keyShares.

HTTP request

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

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent KeyRing where the Key will be created. Format: projects/{project}/locations/{location}/instances/{instance}/keyRings/{keyRing} It takes the form projects/{project}/locations/{location}/instances/{instance}/keyRings/{keyring}.

Query parameters

Parameters
requestId

string

Optional. An idempotency key. Because Key IDs are server-generated, a client must set this to retry a create safely. If a request with the same requestId was already completed, the server returns the Key it created instead of running DKG again.

Must be a UUID4 and not the zero UUID.

Request body

The request body contains an instance of Key.

Response body

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

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.