NAME
Google::Cloud::Secretmanager::V1beta2::Resources - Compiled Protocol Buffers messages for google/cloud/secretmanager/v1beta2/resources.proto
SYNOPSIS
use Google::Cloud::Secretmanager::V1beta2::Resources;
my $msg = Google::Cloud::Secretmanager::V1beta2::Resources::Secret->new({
name => $name,
replication => $replication,
create_time => $create_time,
labels => $labels,
});
# Read or update a field
my $val = $msg->name();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Secretmanager::V1beta2::Resources::Secret->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/secretmanager/v1beta2/resources.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Secretmanager::V1beta2::Resources::Secret
A [Secret][google.cloud.secretmanager.v1beta2.Secret] is a logical secret whose value and versions can be accessed.
A [Secret][google.cloud.secretmanager.v1beta2.Secret] is made up of zero or more [SecretVersions][google.cloud.secretmanager.v1beta2.SecretVersion] that represent the secret data.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringOutput only. The resource name of the [Secret][google.cloud.secretmanager.v1beta2.Secret] in the format `projects/*/secrets/*`.
$msg->replication()/$msg->replication($value)Type:
Message(Google::Cloud::Secretmanager::V1beta2::Resources::Replication)Optional. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secretmanager.v1beta2.Secret].
The replication policy cannot be changed after the Secret has been created.
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The time at which the [Secret][google.cloud.secretmanager.v1beta2.Secret] was created.
$msg->labels()/$msg->labels($value)Type:
Message(Google::Cloud::Secretmanager::V1beta2::Resources::Secret::LabelsEntry)The labels assigned to this Secret.
Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`
Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`
No more than 64 labels can be assigned to a given resource.
$msg->topics()/$msg->topics($value)Type:
Message(Google::Cloud::Secretmanager::V1beta2::Resources::Topic)Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.
$msg->expire_time()/$msg->expire_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Optional. Timestamp in UTC when the [Secret][google.cloud.secretmanager.v1beta2.Secret] is scheduled to expire. This is always provided on output, regardless of what was sent on input.
$msg->ttl()/$msg->ttl($value)Type:
Message(Google::Protobuf::Duration::Duration)Input only. The TTL for the [Secret][google.cloud.secretmanager.v1beta2.Secret].
$msg->etag()/$msg->etag($value)Type:
StringOptional. Etag of the currently stored [Secret][google.cloud.secretmanager.v1beta2.Secret].
$msg->rotation()/$msg->rotation($value)Type:
Message(Google::Cloud::Secretmanager::V1beta2::Resources::Rotation)Optional. Rotation policy attached to the [Secret][google.cloud.secretmanager.v1beta2.Secret]. May be excluded if there is no rotation policy.
$msg->version_aliases()/$msg->version_aliases($value)Type:
Message(Google::Cloud::Secretmanager::V1beta2::Resources::Secret::VersionAliasesEntry)Optional. Mapping from version alias to version name.
A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret.
Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only supported for GetSecretVersion and AccessSecretVersion.
$msg->annotations()/$msg->annotations($value)Type:
Message(Google::Cloud::Secretmanager::V1beta2::Resources::Secret::AnnotationsEntry)Optional. Custom metadata about the secret.
Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database.
Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols.
The total size of annotation keys and values must be less than 16KiB.
$msg->version_destroy_ttl()/$msg->version_destroy_ttl($value)Type:
Message(Google::Protobuf::Duration::Duration)Optional. Secret Version TTL after destruction request
This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires.
$msg->customer_managed_encryption()/$msg->customer_managed_encryption($value)Type:
Message(Google::Cloud::Secretmanager::V1beta2::Resources::CustomerManagedEncryption)Optional. The customer-managed encryption configuration of the Regionalised Secrets. If no configuration is provided, Google-managed default encryption is used.
Updates to the [Secret][google.cloud.secretmanager.v1beta2.Secret] encryption configuration only apply to [SecretVersions][google.cloud.secretmanager.v1beta2.SecretVersion] added afterwards. They do not apply retroactively to existing [SecretVersions][google.cloud.secretmanager.v1beta2.SecretVersion].
Google::Cloud::Secretmanager::V1beta2::Resources::SecretVersion
A secret version resource in the Secret Manager API.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringOutput only. The resource name of the [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] in the format `projects/*/secrets/*/versions/*`.
[SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] IDs in a [Secret][google.cloud.secretmanager.v1beta2.Secret] start at 1 and are incremented for each subsequent version of the secret.
$msg->create_time()/$msg->create_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The time at which the [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] was created.
$msg->destroy_time()/$msg->destroy_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Output only. The time this [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] was destroyed. Only present if [state][google.cloud.secretmanager.v1beta2.SecretVersion.state] is [DESTROYED][google.cloud.secretmanager.v1beta2.SecretVersion.State.DESTROYED].
$msg->state()/$msg->state($value)Type:
Enum(Google::Cloud::Secretmanager::V1beta2::SecretVersion::State)Output only. The current state of the [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion].
$msg->replication_status()/$msg->replication_status($value)Type:
Message(Google::Cloud::Secretmanager::V1beta2::Resources::ReplicationStatus)The replication status of the [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion].
$msg->etag()/$msg->etag($value)Type:
StringOutput only. Etag of the currently stored [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion].
$msg->client_specified_payload_checksum()/$msg->client_specified_payload_checksum($value)Type:
BoolOutput only. True if payload checksum specified in [SecretPayload][google.cloud.secretmanager.v1beta2.SecretPayload] object has been received by [SecretManagerService][google.cloud.secretmanager.v1beta2.SecretManagerService] on [SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1beta2.SecretManagerService.AddSecretVersion].
$msg->scheduled_destroy_time()/$msg->scheduled_destroy_time($value)Type:
Message(Google::Protobuf::Timestamp::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.
$msg->customer_managed_encryption()/$msg->customer_managed_encryption($value)Type:
Message(Google::Cloud::Secretmanager::V1beta2::Resources::CustomerManagedEncryptionStatus)Output only. The customer-managed encryption status of the [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion]. Only populated if customer-managed encryption is used and [Secret][google.cloud.secretmanager.v1beta2.Secret] is a Regionalised Secret.
Enum: SecretVersion::State
STATE_UNSPECIFIED=>0ENABLED=>1DISABLED=>2DESTROYED=>3
Google::Cloud::Secretmanager::V1beta2::Resources::Replication
A policy that defines the replication and encryption configuration of data.
Inherits from Protobuf::Message.
Accessors
$msg->automatic()/$msg->automatic($value)Type:
Message(Google::Cloud::Secretmanager::V1beta2::Resources::Replication::Automatic)The [Secret][google.cloud.secretmanager.v1beta2.Secret] will automatically be replicated without any restrictions.
$msg->user_managed()/$msg->user_managed($value)Type:
Message(Google::Cloud::Secretmanager::V1beta2::Resources::Replication::UserManaged)The [Secret][google.cloud.secretmanager.v1beta2.Secret] will only be replicated into the locations specified.
Google::Cloud::Secretmanager::V1beta2::Resources::CustomerManagedEncryption
Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK).
Inherits from Protobuf::Message.
Accessors
$msg->kms_key_name()/$msg->kms_key_name($value)Type:
StringRequired. The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads.
For secrets using the [UserManaged][google.cloud.secretmanager.v1beta2.Replication.UserManaged] replication policy type, Cloud KMS CryptoKeys must reside in the same location as the [replica location][Secret.UserManaged.Replica.location].
For secrets using the [Automatic][google.cloud.secretmanager.v1beta2.Replication.Automatic] replication policy type, Cloud KMS CryptoKeys must reside in `global`.
The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
Google::Cloud::Secretmanager::V1beta2::Resources::ReplicationStatus
The replication status of a [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion].
Inherits from Protobuf::Message.
Accessors
$msg->automatic()/$msg->automatic($value)Type:
Message(Google::Cloud::Secretmanager::V1beta2::Resources::ReplicationStatus::AutomaticStatus)Describes the replication status of a [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] with automatic replication.
Only populated if the parent [Secret][google.cloud.secretmanager.v1beta2.Secret] has an automatic replication policy.
$msg->user_managed()/$msg->user_managed($value)Type:
Message(Google::Cloud::Secretmanager::V1beta2::Resources::ReplicationStatus::UserManagedStatus)Describes the replication status of a [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion] with user-managed replication.
Only populated if the parent [Secret][google.cloud.secretmanager.v1beta2.Secret] has a user-managed replication policy.
Google::Cloud::Secretmanager::V1beta2::Resources::CustomerManagedEncryptionStatus
Describes the status of customer-managed encryption.
Inherits from Protobuf::Message.
Accessors
$msg->kms_key_version_name()/$msg->kms_key_version_name($value)Type:
StringRequired. The resource name of the Cloud KMS CryptoKeyVersion used to encrypt the secret payload, in the following format: `projects/*/locations/*/keyRings/*/cryptoKeys/*/versions/*`.
Google::Cloud::Secretmanager::V1beta2::Resources::Topic
A Pub/Sub topic which Secret Manager will publish to when control plane events occur on this secret.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The resource name of the Pub/Sub topic that will be published to, in the following format: `projects/*/topics/*`. For publication to succeed, the Secret Manager service agent must have the `pubsub.topic.publish` permission on the topic. The Pub/Sub Publisher role (`roles/pubsub.publisher`) includes this permission.
Google::Cloud::Secretmanager::V1beta2::Resources::Rotation
The rotation time and period for a [Secret][google.cloud.secretmanager.v1beta2.Secret]. At next_rotation_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. [Secret.topics][google.cloud.secretmanager.v1beta2.Secret.topics] must be set to configure rotation.
Inherits from Protobuf::Message.
Accessors
$msg->next_rotation_time()/$msg->next_rotation_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Optional. Timestamp in UTC at which the [Secret][google.cloud.secretmanager.v1beta2.Secret] is scheduled to rotate. Cannot be set to less than 300s (5 min) in the future and at most 3153600000s (100 years).
[next_rotation_time][google.cloud.secretmanager.v1beta2.Rotation.next_rotation_time] MUST be set if [rotation_period][google.cloud.secretmanager.v1beta2.Rotation.rotation_period] is set.
$msg->rotation_period()/$msg->rotation_period($value)Type:
Message(Google::Protobuf::Duration::Duration)Input only. The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years).
If [rotation_period][google.cloud.secretmanager.v1beta2.Rotation.rotation_period] is set, [next_rotation_time][google.cloud.secretmanager.v1beta2.Rotation.next_rotation_time] must be set. [next_rotation_time][google.cloud.secretmanager.v1beta2.Rotation.next_rotation_time] will be advanced by this period when the service automatically sends rotation notifications.
Google::Cloud::Secretmanager::V1beta2::Resources::SecretPayload
A secret payload resource in the Secret Manager API. This contains the sensitive secret payload that is associated with a [SecretVersion][google.cloud.secretmanager.v1beta2.SecretVersion].
Inherits from Protobuf::Message.
Accessors
$msg->data()/$msg->data($value)Type:
BytesThe secret data. Must be no larger than 64KiB.
$msg->data_crc32c()/$msg->data_crc32c($value)Type:
Int64Optional. If specified, [SecretManagerService][google.cloud.secretmanager.v1beta2.SecretManagerService] will verify the integrity of the received [data][google.cloud.secretmanager.v1beta2.SecretPayload.data] on [SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1beta2.SecretManagerService.AddSecretVersion] calls using the crc32c checksum and store it to include in future [SecretManagerService.AccessSecretVersion][google.cloud.secretmanager.v1beta2.SecretManagerService.AccessSecretVersion] responses. If a checksum is not provided in the [SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1beta2.SecretManagerService.AddSecretVersion] request, the [SecretManagerService][google.cloud.secretmanager.v1beta2.SecretManagerService] will generate and store one for you.
The CRC32C value is encoded as a Int64 for compatibility, and can be safely downconverted to uint32 in languages that support this type. https://cloud.google.com/apis/design/design_patterns#integer_types
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Secretmanager::V1beta2::Resources::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.