ProjectsSecrets
class ProjectsSecrets extends Resource (View source)
The "secrets" collection of methods.
Typical usage is:
$secretmanagerService = new Google\Service\SecretManager(...);
$secrets = $secretmanagerService->projects_secrets;
Methods
Creates a new SecretVersion containing secret data and attaches it to an existing Secret. (secrets.addVersion)
Deletes a Secret. (secrets.delete)
Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set. (secrets.getIamPolicy)
Lists Secrets. (secrets.listProjectsSecrets)
Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret. (secrets.setIamPolicy)
Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.
Details
SecretVersion
addVersion(string $parent, AddSecretVersionRequest $postBody, array $optParams = [])
Creates a new SecretVersion containing secret data and attaches it to an existing Secret. (secrets.addVersion)
Secret
create(string $parent, Secret $postBody, array $optParams = [])
Creates a new Secret containing no SecretVersions. (secrets.create)
SecretmanagerEmpty
delete(string $name, array $optParams = [])
Deletes a Secret. (secrets.delete)
Secret
get(string $name, array $optParams = [])
Gets metadata for a given Secret. (secrets.get)
Policy
getIamPolicy(string $resource, array $optParams = [])
Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set. (secrets.getIamPolicy)
ListSecretsResponse
listProjectsSecrets(string $parent, array $optParams = [])
Lists Secrets. (secrets.listProjectsSecrets)
Secret
patch(string $name, Secret $postBody, array $optParams = [])
Updates metadata of an existing Secret. (secrets.patch)
Policy
setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])
Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret. (secrets.setIamPolicy)
TestIamPermissionsResponse
testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])
Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.
This operation may "fail open" without warning. (secrets.testIamPermissions)