# Cloud KMS V1 Client - Class SingleTenantHsmInstance (2.9.0)

2.9.0 (latest) 2.8.0 2.7.0 2.6.0 2.5.2 2.4.0 2.3.1 2.2.0 2.1.6 2.0.0 1.23.0 1.22.1 1.21.4 1.20.3 1.19.0 1.18.1 1.17.0 1.16.4 1.15.3 Reference documentation and code samples for the Cloud KMS V1 Client class SingleTenantHsmInstance.

A [SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance)
represents a single-tenant HSM instance. It can be used for creating
[CryptoKeys](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.CryptoKey) with a
[ProtectionLevel](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.ProtectionLevel) of
HSM_SINGLE_TENANT, as
well as performing cryptographic operations using keys created within the
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance).

Generated from protobuf message `google.cloud.kms.v1.SingleTenantHsmInstance`

## Namespace

Google \\ Cloud \\ Kms \\ V1

## Methods

### __construct

Constructor.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `mixed` |

### getName

Identifier. The resource name for this
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance) in
the format `projects/*/locations/*/singleTenantHsmInstances/*`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

Identifier. The resource name for this
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance) in
the format `projects/*/locations/*/singleTenantHsmInstances/*`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreateTime

Output only. The time at which the
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance) was
created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time at which the
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance) was
created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getState

Output only. The state of the
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance.State). |

### setState

Output only. The state of the
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance.State). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getQuorumAuth

Required. The quorum auth configuration for the
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance.QuorumAuth|null` |   |

### hasQuorumAuth

### clearQuorumAuth

### setQuorumAuth

Required. The quorum auth configuration for the
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance.QuorumAuth` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDeleteTime

Output only. The time at which the
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance) was
deleted.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasDeleteTime

### clearDeleteTime

### setDeleteTime

Output only. The time at which the
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance) was
deleted.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getUnrefreshedDurationUntilDisable

Output only. The system-defined duration that an instance can remain
unrefreshed until it is automatically disabled. This will have a value of
730 days.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasUnrefreshedDurationUntilDisable

### clearUnrefreshedDurationUntilDisable

### setUnrefreshedDurationUntilDisable

Output only. The system-defined duration that an instance can remain
unrefreshed until it is automatically disabled. This will have a value of
730 days.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDisableTime

Output only. The time at which the instance will be automatically disabled
if not refreshed. This field is updated upon creation and after each
successful refresh operation and enable. A
RefreshSingleTenantHsmInstance operation must be made via a
[SingleTenantHsmInstanceProposal](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstanceProposal)
before this time otherwise the
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance) will
become disabled.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasDisableTime

### clearDisableTime

### setDisableTime

Output only. The time at which the instance will be automatically disabled
if not refreshed. This field is updated upon creation and after each
successful refresh operation and enable. A
RefreshSingleTenantHsmInstance operation must be made via a
[SingleTenantHsmInstanceProposal](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstanceProposal)
before this time otherwise the
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance) will
become disabled.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getKeyPortabilityEnabled

Optional. Immutable. Indicates whether key portability is enabled for the
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance).

This can only be set at creation time. Key portability features are
disabled by default and not yet available in GA.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setKeyPortabilityEnabled

Optional. Immutable. Indicates whether key portability is enabled for the
[SingleTenantHsmInstance](https://docs.cloud.google.com/php/docs/reference/cloud-kms/latest/V1.SingleTenantHsmInstance).

This can only be set at creation time. Key portability features are
disabled by default and not yet available in GA.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |