class ProjectsLocationsSecretsVersions extends Resource (View source)

The "versions" collection of methods.

Typical usage is:

 $secretmanagerService = new Google\Service\SecretManager(...);
 $versions = $secretmanagerService->projects_locations_secrets_versions;

Methods

access(string $name, array $optParams = [])

Accesses a SecretVersion. This call returns the secret data.

destroy(string $name, DestroySecretVersionRequest $postBody, array $optParams = [])

Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data. (versions.destroy)

disable(string $name, DisableSecretVersionRequest $postBody, array $optParams = [])

Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.

enable(string $name, EnableSecretVersionRequest $postBody, array $optParams = [])

Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.

get(string $name, array $optParams = [])

Gets metadata for a SecretVersion. projects/secrets/versions/latest is an alias to the most recently created SecretVersion. (versions.get)

listProjectsLocationsSecretsVersions(string $parent, array $optParams = [])

Lists SecretVersions. This call does not return secret data.

Details

AccessSecretVersionResponse access(string $name, array $optParams = [])

Accesses a SecretVersion. This call returns the secret data.

projects/secrets/versions/latest is an alias to the most recently created SecretVersion. (versions.access)

Parameters

string $name

Required. The resource name of the SecretVersion in the format projects/secrets/versions or projects/locations/secrets/versions. projects/secrets/versions/latest or projects/locations/secrets/versions/latest is an alias to the most recently created SecretVersion.

array $optParams

Optional parameters.

Return Value

AccessSecretVersionResponse

Exceptions

Exception

SecretVersion destroy(string $name, DestroySecretVersionRequest $postBody, array $optParams = [])

Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data. (versions.destroy)

Parameters

string $name

Required. The resource name of the SecretVersion to destroy in the format projects/secrets/versions or projects/locations/secrets/versions.

DestroySecretVersionRequest $postBody
array $optParams

Optional parameters.

Return Value

SecretVersion

Exceptions

Exception

SecretVersion disable(string $name, DisableSecretVersionRequest $postBody, array $optParams = [])

Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.

(versions.disable)

Parameters

string $name

Required. The resource name of the SecretVersion to disable in the format projects/secrets/versions or projects/locations/secrets/versions.

DisableSecretVersionRequest $postBody
array $optParams

Optional parameters.

Return Value

SecretVersion

Exceptions

Exception

SecretVersion enable(string $name, EnableSecretVersionRequest $postBody, array $optParams = [])

Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.

(versions.enable)

Parameters

string $name

Required. The resource name of the SecretVersion to enable in the format projects/secrets/versions or projects/locations/secrets/versions.

EnableSecretVersionRequest $postBody
array $optParams

Optional parameters.

Return Value

SecretVersion

Exceptions

Exception

SecretVersion get(string $name, array $optParams = [])

Gets metadata for a SecretVersion. projects/secrets/versions/latest is an alias to the most recently created SecretVersion. (versions.get)

Parameters

string $name

Required. The resource name of the SecretVersion in the format projects/secrets/versions or projects/locations/secrets/versions. projects/secrets/versions/latest or projects/locations/secrets/versions/latest is an alias to the most recently created SecretVersion.

array $optParams

Optional parameters.

Return Value

SecretVersion

Exceptions

Exception

ListSecretVersionsResponse listProjectsLocationsSecretsVersions(string $parent, array $optParams = [])

Lists SecretVersions. This call does not return secret data.

(versions.listProjectsLocationsSecretsVersions)

Parameters

string $parent

Required. The resource name of the Secret associated with the SecretVersions to list, in the format projects/secrets or projects/locations/secrets.

array $optParams

Optional parameters.

Return Value

ListSecretVersionsResponse

Exceptions

Exception