0.16.0 (latest) 0.15.0 0.14.2 0.13.0 0.12.0 0.11.1 0.10.0 0.9.0 0.8.1 0.7.0 0.6.1 0.5.2 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the API Keys V2 API class Google::Cloud::ApiKeys::V2::CreateKeyRequest.

Request message for `CreateKey` method.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #key

    def key() -> ::Google::Cloud::ApiKeys::V2::Key

**Returns**

- ([::Google::Cloud::ApiKeys::V2::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_keys-v2/latest/Google-Cloud-ApiKeys-V2-Key)) --- Required. The API key fields to set at creation time. You can configure only the `display_name`, `restrictions`, and `annotations` fields.

### #key=

    def key=(value) -> ::Google::Cloud::ApiKeys::V2::Key

**Parameter**

- **value** ([::Google::Cloud::ApiKeys::V2::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_keys-v2/latest/Google-Cloud-ApiKeys-V2-Key)) --- Required. The API key fields to set at creation time. You can configure only the `display_name`, `restrictions`, and `annotations` fields.
**Returns**

- ([::Google::Cloud::ApiKeys::V2::Key](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-api_keys-v2/latest/Google-Cloud-ApiKeys-V2-Key)) --- Required. The API key fields to set at creation time. You can configure only the `display_name`, `restrictions`, and `annotations` fields.

### #key_id

    def key_id() -> ::String

**Returns**

- (::String) --- 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.

### #key_id=

    def key_id=(value) -> ::String

**Parameter**

- **value** (::String) --- 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.
**Returns**

- (::String) --- 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.

### #parent

    def parent() -> ::String

**Returns**

- (::String) --- Required. The project in which the API key is created.

### #parent=

    def parent=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The project in which the API key is created.
**Returns**

- (::String) --- Required. The project in which the API key is created.