Secret Manager V1 Client - Class CreateSecretRequest (1.11.0)

Reference documentation and code samples for the Secret Manager V1 Client class CreateSecretRequest.

Request message for SecretManagerService.CreateSecret.

Generated from protobuf message google.cloud.secretmanager.v1.CreateSecretRequest

Methods

build

Parameters
NameDescription
parent string

Required. The resource name of the project to associate with the Secret, in the format projects/*. Please see {@see \Google\Cloud\SecretManager\V1\SecretManagerServiceClient::projectName()} for help formatting this field.

secretId string

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.

secret Google\Cloud\SecretManager\V1\Secret

Required. A Secret with initial field values.

Returns
TypeDescription
Google\Cloud\SecretManager\V1\CreateSecretRequest

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ parent string

Required. The resource name of the project to associate with the Secret, in the format projects/*.

↳ secret_id string

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.

↳ secret Google\Cloud\SecretManager\V1\Secret

Required. A Secret with initial field values.

getParent

Required. The resource name of the project to associate with the Secret, in the format projects/*.

Returns
TypeDescription
string

setParent

Required. The resource name of the project to associate with the Secret, in the format projects/*.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSecretId

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.

Returns
TypeDescription
string

setSecretId

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSecret

Required. A Secret with initial field values.

Returns
TypeDescription
Google\Cloud\SecretManager\V1\Secret|null

hasSecret

clearSecret

setSecret

Required. A Secret with initial field values.

Parameter
NameDescription
var Google\Cloud\SecretManager\V1\Secret
Returns
TypeDescription
$this