# Class CreateKeyRequest (0.9.0)

0.9.0 (latest) 0.8.0 0.7.0 0.6.0 0.5.17 0.4.1 0.3.0 0.2.2 0.1.0

    CreateKeyRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Request message for `CreateKey` method.

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `parent` | `str` Required. The project in which the API key is created. |
| `key` | `https://docs.cloud.google.com/python/docs/reference/apikeys/latest/google.cloud.api_keys_v2.types.Key` Required. The API key fields to set at creation time. You can configure only the `display_name`, `restrictions`, and `annotations` fields. |
| `key_id` | `str` User specified key id (optional). If specified, it will become the final component of the key resource name. The id must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. In another word, the id must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. The id must NOT be a UUID-like string. |