# Secret Manager V1 API - Class Google::Cloud::SecretManager::V1::SecretVersion (v1.8.0)

1.8.0 (latest) 1.7.0 1.6.0 1.5.1 1.4.0 1.3.0 1.2.1 1.1.0 1.0.1 0.21.0 0.20.0 0.19.2 0.18.0 0.17.2 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.3 Reference documentation and code samples for the Secret Manager V1 API class Google::Cloud::SecretManager::V1::SecretVersion.

A secret version resource in the Secret Manager API.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #client_specified_payload_checksum

    def client_specified_payload_checksum() -> ::Boolean

**Returns**

- (::Boolean) --- Output only. True if payload checksum specified in [SecretPayload](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretPayload "Google::Cloud::SecretManager::V1::SecretPayload (class)") object has been received by [SecretManagerService](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretManagerService-Client "Google::Cloud::SecretManager::V1::SecretManagerService::Client (class)") on [SecretManagerService.AddSecretVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretManagerService-Client#Google__Cloud__SecretManager__V1__SecretManagerService__Client_add_secret_version_instance_ "Google::Cloud::SecretManager::V1::SecretManagerService::Client#add_secret_version (method)").

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time at which the [SecretVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretVersion "Google::Cloud::SecretManager::V1::SecretVersion (class)") was created.

### #customer_managed_encryption

    def customer_managed_encryption() -> ::Google::Cloud::SecretManager::V1::CustomerManagedEncryptionStatus

**Returns**

- ([::Google::Cloud::SecretManager::V1::CustomerManagedEncryptionStatus](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-CustomerManagedEncryptionStatus)) --- Output only. The customer-managed encryption status of the [SecretVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretVersion "Google::Cloud::SecretManager::V1::SecretVersion (class)"). Only populated if customer-managed encryption is used and [Secret](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Secret "Google::Cloud::SecretManager::V1::Secret (class)") is a regionalized secret.

### #destroy_time

    def destroy_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The time this [SecretVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretVersion "Google::Cloud::SecretManager::V1::SecretVersion (class)") was destroyed. Only present if [state](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretVersion#Google__Cloud__SecretManager__V1__SecretVersion_state_instance_ "Google::Cloud::SecretManager::V1::SecretVersion#state (method)") is [DESTROYED](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretVersion-State#Google__Cloud__SecretManager__V1__SecretVersion__State__DESTROYED "Google::Cloud::SecretManager::V1::SecretVersion::State::DESTROYED (constant)").

### #etag

    def etag() -> ::String

**Returns**

- (::String) --- Output only. Etag of the currently stored [SecretVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretVersion "Google::Cloud::SecretManager::V1::SecretVersion (class)").

### #name

    def name() -> ::String

**Returns**

- (::String) --- Output only. The resource name of the [SecretVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretVersion "Google::Cloud::SecretManager::V1::SecretVersion (class)") in the format `projects/*/secrets/*/versions/*`.


  [SecretVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretVersion "Google::Cloud::SecretManager::V1::SecretVersion (class)") IDs in a
  [Secret](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Secret "Google::Cloud::SecretManager::V1::Secret (class)") start at 1 and are
  incremented for each subsequent version of the secret.

### #replication_status

    def replication_status() -> ::Google::Cloud::SecretManager::V1::ReplicationStatus

**Returns**

- ([::Google::Cloud::SecretManager::V1::ReplicationStatus](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-ReplicationStatus)) --- The replication status of the [SecretVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretVersion "Google::Cloud::SecretManager::V1::SecretVersion (class)").

### #replication_status=

    def replication_status=(value) -> ::Google::Cloud::SecretManager::V1::ReplicationStatus

**Parameter**

- **value** ([::Google::Cloud::SecretManager::V1::ReplicationStatus](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-ReplicationStatus)) --- The replication status of the [SecretVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretVersion "Google::Cloud::SecretManager::V1::SecretVersion (class)").
**Returns**

- ([::Google::Cloud::SecretManager::V1::ReplicationStatus](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-ReplicationStatus)) --- The replication status of the [SecretVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretVersion "Google::Cloud::SecretManager::V1::SecretVersion (class)").

### #scheduled_destroy_time

    def scheduled_destroy_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Protobuf-Timestamp)) --- Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled_destroy_time.

### #state

    def state() -> ::Google::Cloud::SecretManager::V1::SecretVersion::State

**Returns**

- ([::Google::Cloud::SecretManager::V1::SecretVersion::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretVersion-State)) --- Output only. The current state of the [SecretVersion](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-SecretVersion "Google::Cloud::SecretManager::V1::SecretVersion (class)").