Google Cloud PHP shared dependency, providing functionality useful to all components. Client - Class KeyManager (1.50.0)

Reference documentation and code samples for the Google Cloud PHP shared dependency, providing functionality useful to all components. Client class KeyManager.

Manage KMS keys used for system tests.

Methods

__construct

Parameters
NameDescription
keyFile array
serviceAccountEmail mixed
projectId mixed
location mixed

setServiceAccountEmail

Set the service account email used for IAM management.

Parameter
NameDescription
serviceAccountEmail string

setLocation

Set keyring location.

Location name may be in upper or lower case.

Parameter
NameDescription
location string

getProject

Get the project data.

Parameter
NameDescription
projectId string

[optional] If not provided, uses ID given in constructor or keyfile.

Returns
TypeDescription
array

getKeyNames

A helper to get KMS keys and set correct permissions.

Parameters
NameDescription
keyRingId string
keyIds string[]
Returns
TypeDescription
array

Constants

DEFAULT_LOCATION

Value: 'us-west1'