# Certificate Authority Service V1beta1 API - Class Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage (v0.18.0)

0.18.0 (latest) 0.17.1 0.16.0 0.15.1 0.14.0 0.13.0 0.12.1 0.11.0 0.10.0 0.9.1 0.8.2 0.7.0 0.6.1 0.5.0 0.4.0 0.3.6 Reference documentation and code samples for the Certificate Authority Service V1beta1 API class Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage.

A [KeyUsage](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-KeyUsage "Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage (class)") describes key usage values that may appear in an X.509
certificate.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #base_key_usage

    def base_key_usage() -> ::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::KeyUsageOptions

**Returns**

- ([::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::KeyUsageOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-KeyUsage-KeyUsageOptions)) --- Describes high-level ways in which a key may be used.

### #base_key_usage=

    def base_key_usage=(value) -> ::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::KeyUsageOptions

**Parameter**

- **value** ([::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::KeyUsageOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-KeyUsage-KeyUsageOptions)) --- Describes high-level ways in which a key may be used.
**Returns**

- ([::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::KeyUsageOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-KeyUsage-KeyUsageOptions)) --- Describes high-level ways in which a key may be used.

### #extended_key_usage

    def extended_key_usage() -> ::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions

**Returns**

- ([::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-KeyUsage-ExtendedKeyUsageOptions)) --- Detailed scenarios in which a key may be used.

### #extended_key_usage=

    def extended_key_usage=(value) -> ::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions

**Parameter**

- **value** ([::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-KeyUsage-ExtendedKeyUsageOptions)) --- Detailed scenarios in which a key may be used.
**Returns**

- ([::Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-KeyUsage-ExtendedKeyUsageOptions)) --- Detailed scenarios in which a key may be used.

### #unknown_extended_key_usages

    def unknown_extended_key_usages() -> ::Array<::Google::Cloud::Security::PrivateCA::V1beta1::ObjectId>

**Returns**

- (::Array\<[::Google::Cloud::Security::PrivateCA::V1beta1::ObjectId](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-ObjectId)\>) --- Used to describe extended key usages that are not listed in the [KeyUsage.ExtendedKeyUsageOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-KeyUsage-ExtendedKeyUsageOptions "Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions (class)") message.

### #unknown_extended_key_usages=

    def unknown_extended_key_usages=(value) -> ::Array<::Google::Cloud::Security::PrivateCA::V1beta1::ObjectId>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Security::PrivateCA::V1beta1::ObjectId](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-ObjectId)\>) --- Used to describe extended key usages that are not listed in the [KeyUsage.ExtendedKeyUsageOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-KeyUsage-ExtendedKeyUsageOptions "Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions (class)") message.
**Returns**

- (::Array\<[::Google::Cloud::Security::PrivateCA::V1beta1::ObjectId](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-ObjectId)\>) --- Used to describe extended key usages that are not listed in the [KeyUsage.ExtendedKeyUsageOptions](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-security-private_ca-v1beta1/latest/Google-Cloud-Security-PrivateCA-V1beta1-KeyUsage-ExtendedKeyUsageOptions "Google::Cloud::Security::PrivateCA::V1beta1::KeyUsage::ExtendedKeyUsageOptions (class)") message.