As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

Types for Google Cloud Secretmanager v1beta1 API

class google.cloud.secretmanager_v1beta1.types.AccessSecretVersionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [SecretManagerService.AccessSecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.AccessSecretVersion].

name

Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] in the format projects/*/secrets/*/versions/*.

Type

str

class google.cloud.secretmanager_v1beta1.types.AccessSecretVersionResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for [SecretManagerService.AccessSecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.AccessSecretVersion].

name

The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] in the format projects/*/secrets/*/versions/*.

Type

str

payload

Secret payload

Type

google.cloud.secretmanager_v1beta1.types.SecretPayload

class google.cloud.secretmanager_v1beta1.types.AddSecretVersionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [SecretManagerService.AddSecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.AddSecretVersion].

parent

Required. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] to associate with the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] in the format projects/*/secrets/*.

Type

str

payload

Required. The secret payload of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].

Type

google.cloud.secretmanager_v1beta1.types.SecretPayload

class google.cloud.secretmanager_v1beta1.types.CreateSecretRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [SecretManagerService.CreateSecret][google.cloud.secrets.v1beta1.SecretManagerService.CreateSecret].

parent

Required. The resource name of the project to associate with the [Secret][google.cloud.secrets.v1beta1.Secret], in the format projects/*.

Type

str

secret_id

Required. This must be unique within the project.

A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore (_) characters.

Type

str

secret

Required. A [Secret][google.cloud.secrets.v1beta1.Secret] with initial field values.

Type

google.cloud.secretmanager_v1beta1.types.Secret

class google.cloud.secretmanager_v1beta1.types.DeleteSecretRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [SecretManagerService.DeleteSecret][google.cloud.secrets.v1beta1.SecretManagerService.DeleteSecret].

name

Required. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] to delete in the format projects/*/secrets/*.

Type

str

class google.cloud.secretmanager_v1beta1.types.DestroySecretVersionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [SecretManagerService.DestroySecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.DestroySecretVersion].

name

Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to destroy in the format projects/*/secrets/*/versions/*.

Type

str

class google.cloud.secretmanager_v1beta1.types.DisableSecretVersionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [SecretManagerService.DisableSecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.DisableSecretVersion].

name

Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to disable in the format projects/*/secrets/*/versions/*.

Type

str

class google.cloud.secretmanager_v1beta1.types.EnableSecretVersionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [SecretManagerService.EnableSecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.EnableSecretVersion].

name

Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] to enable in the format projects/*/secrets/*/versions/*.

Type

str

class google.cloud.secretmanager_v1beta1.types.GetSecretRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [SecretManagerService.GetSecret][google.cloud.secrets.v1beta1.SecretManagerService.GetSecret].

name

Required. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret], in the format projects/*/secrets/*.

Type

str

class google.cloud.secretmanager_v1beta1.types.GetSecretVersionRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [SecretManagerService.GetSecretVersion][google.cloud.secrets.v1beta1.SecretManagerService.GetSecretVersion].

name

Required. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] in the format projects/*/secrets/*/versions/*. projects/*/secrets/*/versions/latest is an alias to the latest [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].

Type

str

class google.cloud.secretmanager_v1beta1.types.ListSecretVersionsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [SecretManagerService.ListSecretVersions][google.cloud.secrets.v1beta1.SecretManagerService.ListSecretVersions].

parent

Required. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] associated with the [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] to list, in the format projects/*/secrets/*.

Type

str

page_size

Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.

Type

int

page_token

Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next_page_token][].

Type

str

class google.cloud.secretmanager_v1beta1.types.ListSecretVersionsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for [SecretManagerService.ListSecretVersions][google.cloud.secrets.v1beta1.SecretManagerService.ListSecretVersions].

versions

The list of [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] sorted in reverse by create_time (newest first).

Type

MutableSequence[google.cloud.secretmanager_v1beta1.types.SecretVersion]

next_page_token

A token to retrieve the next page of results. Pass this value in [ListSecretVersionsRequest.page_token][google.cloud.secrets.v1beta1.ListSecretVersionsRequest.page_token] to retrieve the next page.

Type

str

total_size

The total number of [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion].

Type

int

class google.cloud.secretmanager_v1beta1.types.ListSecretsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [SecretManagerService.ListSecrets][google.cloud.secrets.v1beta1.SecretManagerService.ListSecrets].

parent

Required. The resource name of the project associated with the [Secrets][google.cloud.secrets.v1beta1.Secret], in the format projects/*.

Type

str

page_size

Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.

Type

int

page_token

Optional. Pagination token, returned earlier via [ListSecretsResponse.next_page_token][google.cloud.secrets.v1beta1.ListSecretsResponse.next_page_token].

Type

str

class google.cloud.secretmanager_v1beta1.types.ListSecretsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Response message for [SecretManagerService.ListSecrets][google.cloud.secrets.v1beta1.SecretManagerService.ListSecrets].

secrets

The list of [Secrets][google.cloud.secrets.v1beta1.Secret] sorted in reverse by create_time (newest first).

Type

MutableSequence[google.cloud.secretmanager_v1beta1.types.Secret]

next_page_token

A token to retrieve the next page of results. Pass this value in [ListSecretsRequest.page_token][google.cloud.secrets.v1beta1.ListSecretsRequest.page_token] to retrieve the next page.

Type

str

total_size

The total number of [Secrets][google.cloud.secrets.v1beta1.Secret].

Type

int

class google.cloud.secretmanager_v1beta1.types.Replication(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A policy that defines the replication configuration of data.

This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

automatic

The [Secret][google.cloud.secrets.v1beta1.Secret] will automatically be replicated without any restrictions.

This field is a member of oneof replication.

Type

google.cloud.secretmanager_v1beta1.types.Replication.Automatic

user_managed

The [Secret][google.cloud.secrets.v1beta1.Secret] will only be replicated into the locations specified.

This field is a member of oneof replication.

Type

google.cloud.secretmanager_v1beta1.types.Replication.UserManaged

class Automatic(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A replication policy that replicates the [Secret][google.cloud.secrets.v1beta1.Secret] payload without any restrictions.

class UserManaged(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A replication policy that replicates the [Secret][google.cloud.secrets.v1beta1.Secret] payload into the locations specified in [Secret.replication.user_managed.replicas][]

replicas

Required. The list of Replicas for this [Secret][google.cloud.secrets.v1beta1.Secret].

Cannot be empty.

Type

MutableSequence[google.cloud.secretmanager_v1beta1.types.Replication.UserManaged.Replica]

class Replica(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Represents a Replica for this [Secret][google.cloud.secrets.v1beta1.Secret].

location

The canonical IDs of the location to replicate data. For example: "us-east1".

Type

str

class google.cloud.secretmanager_v1beta1.types.Secret(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A [Secret][google.cloud.secrets.v1beta1.Secret] is a logical secret whose value and versions can be accessed.

A [Secret][google.cloud.secrets.v1beta1.Secret] is made up of zero or more [SecretVersions][google.cloud.secrets.v1beta1.SecretVersion] that represent the secret data.

name

Output only. The resource name of the [Secret][google.cloud.secrets.v1beta1.Secret] in the format projects/*/secrets/*.

Type

str

replication

Required. Immutable. The replication policy of the secret data attached to the [Secret][google.cloud.secrets.v1beta1.Secret].

The replication policy cannot be changed after the Secret has been created.

Type

google.cloud.secretmanager_v1beta1.types.Replication

create_time

Output only. The time at which the [Secret][google.cloud.secrets.v1beta1.Secret] was created.

Type

google.protobuf.timestamp_pb2.Timestamp

labels

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.

Type

MutableMapping[str, str]

class LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Bases: proto.message.Message

class google.cloud.secretmanager_v1beta1.types.SecretPayload(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A secret payload resource in the Secret Manager API. This contains the sensitive secret data that is associated with a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].

data

The secret data. Must be no larger than 64KiB.

Type

bytes

class google.cloud.secretmanager_v1beta1.types.SecretVersion(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

A secret version resource in the Secret Manager API.

name

Output only. The resource name of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] in the format projects/*/secrets/*/versions/*.

[SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] IDs in a [Secret][google.cloud.secrets.v1beta1.Secret] start at 1 and are incremented for each subsequent version of the secret.

Type

str

create_time

Output only. The time at which the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] was created.

Type

google.protobuf.timestamp_pb2.Timestamp

destroy_time

Output only. The time this [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] was destroyed. Only present if [state][google.cloud.secrets.v1beta1.SecretVersion.state] is [DESTROYED][google.cloud.secrets.v1beta1.SecretVersion.State.DESTROYED].

Type

google.protobuf.timestamp_pb2.Timestamp

state

Output only. The current state of the [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion].

Type

google.cloud.secretmanager_v1beta1.types.SecretVersion.State

class State(value)[source]

Bases: proto.enums.Enum

The state of a [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion], indicating if it can be accessed.

Values:
STATE_UNSPECIFIED (0):

Not specified. This value is unused and invalid.

ENABLED (1):

The [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] may be accessed.

DISABLED (2):

The [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] may not be accessed, but the secret data is still available and can be placed back into the [ENABLED][google.cloud.secrets.v1beta1.SecretVersion.State.ENABLED] state.

DESTROYED (3):

The [SecretVersion][google.cloud.secrets.v1beta1.SecretVersion] is destroyed and the secret data is no longer stored. A version may not leave this state once entered.

class google.cloud.secretmanager_v1beta1.types.UpdateSecretRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]

Bases: proto.message.Message

Request message for [SecretManagerService.UpdateSecret][google.cloud.secrets.v1beta1.SecretManagerService.UpdateSecret].

secret

Required. [Secret][google.cloud.secrets.v1beta1.Secret] with updated field values.

Type

google.cloud.secretmanager_v1beta1.types.Secret

update_mask

Required. Specifies the fields to be updated.

Type

google.protobuf.field_mask_pb2.FieldMask