diff --git a/SecretManager/metadata/V1/Resources.php b/SecretManager/metadata/V1/Resources.php
index 6033f84c64ab..17447424407f 100644
Binary files a/SecretManager/metadata/V1/Resources.php and b/SecretManager/metadata/V1/Resources.php differ
diff --git a/SecretManager/metadata/V1/Service.php b/SecretManager/metadata/V1/Service.php
index 19f886966a4d..720a08a68ac8 100644
--- a/SecretManager/metadata/V1/Service.php
+++ b/SecretManager/metadata/V1/Service.php
@@ -25,11 +25,10 @@ public static function initOnce() {
\GPBMetadata\Google\Protobuf\FieldMask::initOnce();
$pool->internalAddGeneratedFile(
'
-)
-+google/cloud/secretmanager/v1/service.protogoogle.cloud.secretmanager.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto-google/cloud/secretmanager/v1/resources.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"Ÿ
-ListSecretsRequestC
-parent ( B3àAúA-
-+cloudresourcemanager.googleapis.com/Project
+¦0
++google/cloud/secretmanager/v1/service.protogoogle.cloud.secretmanager.v1google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto-google/cloud/secretmanager/v1/resources.protogoogle/iam/v1/iam_policy.protogoogle/iam/v1/policy.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"—
+ListSecretsRequest;
+parent ( B+àAúA%#secretmanager.googleapis.com/Secret
page_size (BàA
page_token ( BàA
@@ -38,10 +37,9 @@ public static function initOnce() {
secrets (2%.google.cloud.secretmanager.v1.Secret
next_page_token (
-total_size ("®
-CreateSecretRequestC
-parent ( B3àAúA-
-+cloudresourcemanager.googleapis.com/Project
+total_size ("¦
+CreateSecretRequest;
+parent ( B+àAúA%#secretmanager.googleapis.com/Secret
secret_id ( BàA:
secret (2%.google.cloud.secretmanager.v1.SecretBàA"š
AddSecretVersionRequest;
@@ -91,23 +89,23 @@ public static function initOnce() {
DestroySecretVersionRequest@
name ( B2àAúA,
*secretmanager.googleapis.com/SecretVersion
-etag ( BàA2Ï
-SecretManagerService¦
-ListSecrets1.google.cloud.secretmanager.v1.ListSecretsRequest2.google.cloud.secretmanager.v1.ListSecretsResponse"0ÚAparent‚Óä“!/v1/{parent=projects/*}/secrets´
-CreateSecret2.google.cloud.secretmanager.v1.CreateSecretRequest%.google.cloud.secretmanager.v1.Secret"IÚAparent,secret_id,secret‚Óä“)"/v1/{parent=projects/*}/secrets:secretÂ
-AddSecretVersion6.google.cloud.secretmanager.v1.AddSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"HÚAparent,payload‚Óä“1",/v1/{parent=projects/*/secrets/*}:addVersion:*“
- GetSecret/.google.cloud.secretmanager.v1.GetSecretRequest%.google.cloud.secretmanager.v1.Secret".ÚAname‚Óä“!/v1/{name=projects/*/secrets/*}¶
-UpdateSecret2.google.cloud.secretmanager.v1.UpdateSecretRequest%.google.cloud.secretmanager.v1.Secret"KÚAsecret,update_mask‚Óä“02&/v1/{secret.name=projects/*/secrets/*}:secretŠ
-DeleteSecret2.google.cloud.secretmanager.v1.DeleteSecretRequest.google.protobuf.Empty".ÚAname‚Óä“!*/v1/{name=projects/*/secrets/*}Æ
-ListSecretVersions8.google.cloud.secretmanager.v1.ListSecretVersionsRequest9.google.cloud.secretmanager.v1.ListSecretVersionsResponse";ÚAparent‚Óä“,*/v1/{parent=projects/*/secrets/*}/versions³
-GetSecretVersion6.google.cloud.secretmanager.v1.GetSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"9ÚAname‚Óä“,*/v1/{name=projects/*/secrets/*/versions/*}Î
-AccessSecretVersion9.google.cloud.secretmanager.v1.AccessSecretVersionRequest:.google.cloud.secretmanager.v1.AccessSecretVersionResponse"@ÚAname‚Óä“31/v1/{name=projects/*/secrets/*/versions/*}:accessÆ
-DisableSecretVersion:.google.cloud.secretmanager.v1.DisableSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"DÚAname‚Óä“7"2/v1/{name=projects/*/secrets/*/versions/*}:disable:*Ã
-EnableSecretVersion9.google.cloud.secretmanager.v1.EnableSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"CÚAname‚Óä“6"1/v1/{name=projects/*/secrets/*/versions/*}:enable:*Æ
-DestroySecretVersion:.google.cloud.secretmanager.v1.DestroySecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"DÚAname‚Óä“7"2/v1/{name=projects/*/secrets/*/versions/*}:destroy:*†
-SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy";‚Óä“5"0/v1/{resource=projects/*/secrets/*}:setIamPolicy:*ƒ
-GetIamPolicy".google.iam.v1.GetIamPolicyRequest.google.iam.v1.Policy"8‚Óä“20/v1/{resource=projects/*/secrets/*}:getIamPolicy¬
-TestIamPermissions(.google.iam.v1.TestIamPermissionsRequest).google.iam.v1.TestIamPermissionsResponse"A‚Óä“;"6/v1/{resource=projects/*/secrets/*}:testIamPermissions:*PÊAsecretmanager.googleapis.comÒA.https://www.googleapis.com/auth/cloud-platformBè
+etag ( BàA2è
+SecretManagerServiceÕ
+ListSecrets1.google.cloud.secretmanager.v1.ListSecretsRequest2.google.cloud.secretmanager.v1.ListSecretsResponse"_ÚAparent‚Óä“P/v1/{parent=projects/*}/secretsZ-+/v1/{parent=projects/*/locations/*}/secretsì
+CreateSecret2.google.cloud.secretmanager.v1.CreateSecretRequest%.google.cloud.secretmanager.v1.Secret"€ÚAparent,secret_id,secret‚Óä“`"/v1/{parent=projects/*}/secrets:secretZ5"+/v1/{parent=projects/*/locations/*}/secrets:secret‚
+AddSecretVersion6.google.cloud.secretmanager.v1.AddSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"‡ÚAparent,payload‚Óä“p",/v1/{parent=projects/*/secrets/*}:addVersion:*Z="8/v1/{parent=projects/*/locations/*/secrets/*}:addVersion:*Â
+ GetSecret/.google.cloud.secretmanager.v1.GetSecretRequest%.google.cloud.secretmanager.v1.Secret"]ÚAname‚Óä“P/v1/{name=projects/*/secrets/*}Z-+/v1/{name=projects/*/locations/*/secrets/*}õ
+UpdateSecret2.google.cloud.secretmanager.v1.UpdateSecretRequest%.google.cloud.secretmanager.v1.Secret"‰ÚAsecret,update_mask‚Óä“n2&/v1/{secret.name=projects/*/secrets/*}:secretZ<22/v1/{secret.name=projects/*/locations/*/secrets/*}:secret¹
+DeleteSecret2.google.cloud.secretmanager.v1.DeleteSecretRequest.google.protobuf.Empty"]ÚAname‚Óä“P*/v1/{name=projects/*/secrets/*}Z-*+/v1/{name=projects/*/locations/*/secrets/*}€
+ListSecretVersions8.google.cloud.secretmanager.v1.ListSecretVersionsRequest9.google.cloud.secretmanager.v1.ListSecretVersionsResponse"uÚAparent‚Óä“f*/v1/{parent=projects/*/secrets/*}/versionsZ86/v1/{parent=projects/*/locations/*/secrets/*}/versionsí
+GetSecretVersion6.google.cloud.secretmanager.v1.GetSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"sÚAname‚Óä“f*/v1/{name=projects/*/secrets/*/versions/*}Z86/v1/{name=projects/*/locations/*/secrets/*/versions/*}
+AccessSecretVersion9.google.cloud.secretmanager.v1.AccessSecretVersionRequest:.google.cloud.secretmanager.v1.AccessSecretVersionResponse"ÚAname‚Óä“t1/v1/{name=projects/*/secrets/*/versions/*}:accessZ?=/v1/{name=projects/*/locations/*/secrets/*/versions/*}:accessŒ
+DisableSecretVersion:.google.cloud.secretmanager.v1.DisableSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"‰ÚAname‚Óä“|"2/v1/{name=projects/*/secrets/*/versions/*}:disable:*ZC">/v1/{name=projects/*/locations/*/secrets/*/versions/*}:disable:*ˆ
+EnableSecretVersion9.google.cloud.secretmanager.v1.EnableSecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"‡ÚAname‚Óä“z"1/v1/{name=projects/*/secrets/*/versions/*}:enable:*ZB"=/v1/{name=projects/*/locations/*/secrets/*/versions/*}:enable:*Œ
+DestroySecretVersion:.google.cloud.secretmanager.v1.DestroySecretVersionRequest,.google.cloud.secretmanager.v1.SecretVersion"‰ÚAname‚Óä“|"2/v1/{name=projects/*/secrets/*/versions/*}:destroy:*ZC">/v1/{name=projects/*/locations/*/secrets/*/versions/*}:destroy:*É
+SetIamPolicy".google.iam.v1.SetIamPolicyRequest.google.iam.v1.Policy"~‚Óä“x"0/v1/{resource=projects/*/secrets/*}:setIamPolicy:*ZA"setReplication($secretReplication);
+ $secret = new Secret();
$request = (new CreateSecretRequest())
->setParent($formattedParent)
->setSecretId($secretId)
diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php
index c341d3064e85..63e0830a6867 100644
--- a/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php
+++ b/SecretManager/samples/V1/SecretManagerServiceClient/destroy_secret_version.php
@@ -38,7 +38,8 @@
*
* @param string $formattedName The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in
- * the format `projects/*/secrets/*/versions/*`. Please see
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`. Please see
* {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field.
*/
function destroy_secret_version_sample(string $formattedName): void
diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php
index 187ea02b7839..e3986eaf84ae 100644
--- a/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php
+++ b/SecretManager/samples/V1/SecretManagerServiceClient/disable_secret_version.php
@@ -37,7 +37,8 @@
*
* @param string $formattedName The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in
- * the format `projects/*/secrets/*/versions/*`. Please see
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`. Please see
* {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field.
*/
function disable_secret_version_sample(string $formattedName): void
diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php
index 0f30e13556da..73e4d6dfce4a 100644
--- a/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php
+++ b/SecretManager/samples/V1/SecretManagerServiceClient/enable_secret_version.php
@@ -37,7 +37,8 @@
*
* @param string $formattedName The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in
- * the format `projects/*/secrets/*/versions/*`. Please see
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`. Please see
* {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field.
*/
function enable_secret_version_sample(string $formattedName): void
diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php
index 14f0523fb22d..abe188f790eb 100644
--- a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php
+++ b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret.php
@@ -33,7 +33,7 @@
*
* @param string $formattedName The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*/secrets/*`. Please see
+ * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see
* {@see SecretManagerServiceClient::secretName()} for help formatting this field.
*/
function get_secret_sample(string $formattedName): void
diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php
index a7baf9974bed..0ac985a33767 100644
--- a/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php
+++ b/SecretManager/samples/V1/SecretManagerServiceClient/get_secret_version.php
@@ -37,10 +37,13 @@
*
* @param string $formattedName The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
+ * `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
- * `projects/*/secrets/*/versions/latest` is an alias to the most recently
- * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see
+ * `projects/*/secrets/*/versions/latest` or
+ * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most
+ * recently created
+ * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see
* {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field.
*/
function get_secret_version_sample(string $formattedName): void
diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php b/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php
index 60a231f14b50..b074fa02d896 100644
--- a/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php
+++ b/SecretManager/samples/V1/SecretManagerServiceClient/list_secret_versions.php
@@ -36,7 +36,7 @@
* @param string $formattedParent The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret] associated with the
* [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in
- * the format `projects/*/secrets/*`. Please see
+ * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see
* {@see SecretManagerServiceClient::secretName()} for help formatting this field.
*/
function list_secret_versions_sample(string $formattedParent): void
diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php b/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php
index dfd1cf50ca86..a4bf43cb2334 100644
--- a/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php
+++ b/SecretManager/samples/V1/SecretManagerServiceClient/list_secrets.php
@@ -33,9 +33,9 @@
* Lists [Secrets][google.cloud.secretmanager.v1.Secret].
*
* @param string $formattedParent The resource name of the project associated with the
- * [Secrets][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*`. Please see
- * {@see SecretManagerServiceClient::projectName()} for help formatting this field.
+ * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`
+ * or `projects/*/locations/*`
+ * Please see {@see SecretManagerServiceClient::projectName()} for help formatting this field.
*/
function list_secrets_sample(string $formattedParent): void
{
diff --git a/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php b/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php
index a38220555f73..84430ff273a5 100644
--- a/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php
+++ b/SecretManager/samples/V1/SecretManagerServiceClient/update_secret.php
@@ -25,7 +25,6 @@
// [START secretmanager_v1_generated_SecretManagerService_UpdateSecret_sync]
use Google\ApiCore\ApiException;
use Google\Cloud\SecretManager\V1\Client\SecretManagerServiceClient;
-use Google\Cloud\SecretManager\V1\Replication;
use Google\Cloud\SecretManager\V1\Secret;
use Google\Cloud\SecretManager\V1\UpdateSecretRequest;
use Google\Protobuf\FieldMask;
@@ -46,9 +45,7 @@ function update_secret_sample(): void
$secretManagerServiceClient = new SecretManagerServiceClient();
// Prepare the request message.
- $secretReplication = new Replication();
- $secret = (new Secret())
- ->setReplication($secretReplication);
+ $secret = new Secret();
$updateMask = new FieldMask();
$request = (new UpdateSecretRequest())
->setSecret($secret)
diff --git a/SecretManager/src/V1/AccessSecretVersionRequest.php b/SecretManager/src/V1/AccessSecretVersionRequest.php
index 022c5103edae..39b085553f0b 100644
--- a/SecretManager/src/V1/AccessSecretVersionRequest.php
+++ b/SecretManager/src/V1/AccessSecretVersionRequest.php
@@ -19,9 +19,12 @@ class AccessSecretVersionRequest extends \Google\Protobuf\Internal\Message
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
- * `projects/*/secrets/*/versions/latest` is an alias to the most recently
- * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+ * `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][google.cloud.secretmanager.v1.SecretVersion].
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -30,10 +33,13 @@ class AccessSecretVersionRequest extends \Google\Protobuf\Internal\Message
/**
* @param string $name Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
+ * `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
- * `projects/*/secrets/*/versions/latest` is an alias to the most recently
- * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see
+ * `projects/*/secrets/*/versions/latest` or
+ * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most
+ * recently created
+ * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see
* {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field.
*
* @return \Google\Cloud\SecretManager\V1\AccessSecretVersionRequest
@@ -55,9 +61,12 @@ public static function build(string $name): self
* @type string $name
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
- * `projects/*/secrets/*/versions/latest` is an alias to the most recently
- * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+ * `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][google.cloud.secretmanager.v1.SecretVersion].
* }
*/
public function __construct($data = NULL) {
@@ -68,9 +77,12 @@ public function __construct($data = NULL) {
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
- * `projects/*/secrets/*/versions/latest` is an alias to the most recently
- * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+ * `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][google.cloud.secretmanager.v1.SecretVersion].
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -83,9 +95,12 @@ public function getName()
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
- * `projects/*/secrets/*/versions/latest` is an alias to the most recently
- * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+ * `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][google.cloud.secretmanager.v1.SecretVersion].
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/SecretManager/src/V1/AccessSecretVersionResponse.php b/SecretManager/src/V1/AccessSecretVersionResponse.php
index e5b0ae63fb21..05ba2a7b5571 100644
--- a/SecretManager/src/V1/AccessSecretVersionResponse.php
+++ b/SecretManager/src/V1/AccessSecretVersionResponse.php
@@ -19,7 +19,8 @@ class AccessSecretVersionResponse extends \Google\Protobuf\Internal\Message
/**
* The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
+ * `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.resource_reference) = {
*/
@@ -40,7 +41,8 @@ class AccessSecretVersionResponse extends \Google\Protobuf\Internal\Message
* @type string $name
* The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
+ * `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
* @type \Google\Cloud\SecretManager\V1\SecretPayload $payload
* Secret payload
* }
@@ -53,7 +55,8 @@ public function __construct($data = NULL) {
/**
* The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
+ * `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.resource_reference) = {
* @return string
@@ -66,7 +69,8 @@ public function getName()
/**
* The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
+ * `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.resource_reference) = {
* @param string $var
diff --git a/SecretManager/src/V1/AddSecretVersionRequest.php b/SecretManager/src/V1/AddSecretVersionRequest.php
index 44da58621e23..4e6fbe5e99ae 100644
--- a/SecretManager/src/V1/AddSecretVersionRequest.php
+++ b/SecretManager/src/V1/AddSecretVersionRequest.php
@@ -20,7 +20,7 @@ class AddSecretVersionRequest extends \Google\Protobuf\Internal\Message
* Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret] to associate with the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*`.
+ * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -37,7 +37,7 @@ class AddSecretVersionRequest extends \Google\Protobuf\Internal\Message
* @param string $parent Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret] to associate with the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*`. Please see
+ * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see
* {@see SecretManagerServiceClient::secretName()} for help formatting this field.
* @param \Google\Cloud\SecretManager\V1\SecretPayload $payload Required. The secret payload of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
@@ -63,7 +63,7 @@ public static function build(string $parent, \Google\Cloud\SecretManager\V1\Secr
* Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret] to associate with the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*`.
+ * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
* @type \Google\Cloud\SecretManager\V1\SecretPayload $payload
* Required. The secret payload of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
@@ -78,7 +78,7 @@ public function __construct($data = NULL) {
* Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret] to associate with the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*`.
+ * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -92,7 +92,7 @@ public function getParent()
* Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret] to associate with the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*`.
+ * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/SecretManager/src/V1/Client/SecretManagerServiceClient.php b/SecretManager/src/V1/Client/SecretManagerServiceClient.php
index 3232855ab61f..d7041c336da1 100644
--- a/SecretManager/src/V1/Client/SecretManagerServiceClient.php
+++ b/SecretManager/src/V1/Client/SecretManagerServiceClient.php
@@ -136,6 +136,23 @@ private static function getClientDefaults()
];
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a location
+ * resource.
+ *
+ * @param string $project
+ * @param string $location
+ *
+ * @return string The formatted location resource.
+ */
+ public static function locationName(string $project, string $location): string
+ {
+ return self::getPathTemplate('location')->render([
+ 'project' => $project,
+ 'location' => $location,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a project
* resource.
@@ -151,6 +168,82 @@ public static function projectName(string $project): string
]);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * project_location_secret resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $secret
+ *
+ * @return string The formatted project_location_secret resource.
+ */
+ public static function projectLocationSecretName(string $project, string $location, string $secret): string
+ {
+ return self::getPathTemplate('projectLocationSecret')->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'secret' => $secret,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * project_location_secret_secret_version resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $secret
+ * @param string $secretVersion
+ *
+ * @return string The formatted project_location_secret_secret_version resource.
+ */
+ public static function projectLocationSecretSecretVersionName(string $project, string $location, string $secret, string $secretVersion): string
+ {
+ return self::getPathTemplate('projectLocationSecretSecretVersion')->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'secret' => $secret,
+ 'secret_version' => $secretVersion,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * project_secret resource.
+ *
+ * @param string $project
+ * @param string $secret
+ *
+ * @return string The formatted project_secret resource.
+ */
+ public static function projectSecretName(string $project, string $secret): string
+ {
+ return self::getPathTemplate('projectSecret')->render([
+ 'project' => $project,
+ 'secret' => $secret,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * project_secret_secret_version resource.
+ *
+ * @param string $project
+ * @param string $secret
+ * @param string $secretVersion
+ *
+ * @return string The formatted project_secret_secret_version resource.
+ */
+ public static function projectSecretSecretVersionName(string $project, string $secret, string $secretVersion): string
+ {
+ return self::getPathTemplate('projectSecretSecretVersion')->render([
+ 'project' => $project,
+ 'secret' => $secret,
+ 'secret_version' => $secretVersion,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a secret
* resource.
@@ -208,7 +301,12 @@ public static function topicName(string $project, string $topic): string
* Parses a formatted name string and returns an associative array of the components in the name.
* The following name formats are supported:
* Template: Pattern
+ * - location: projects/{project}/locations/{location}
* - project: projects/{project}
+ * - projectLocationSecret: projects/{project}/locations/{location}/secrets/{secret}
+ * - projectLocationSecretSecretVersion: projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}
+ * - projectSecret: projects/{project}/secrets/{secret}
+ * - projectSecretSecretVersion: projects/{project}/secrets/{secret}/versions/{secret_version}
* - secret: projects/{project}/secrets/{secret}
* - secretVersion: projects/{project}/secrets/{secret}/versions/{secret_version}
* - topic: projects/{project}/topics/{topic}
diff --git a/SecretManager/src/V1/CreateSecretRequest.php b/SecretManager/src/V1/CreateSecretRequest.php
index df487a7b3aad..2047caaa1cfb 100644
--- a/SecretManager/src/V1/CreateSecretRequest.php
+++ b/SecretManager/src/V1/CreateSecretRequest.php
@@ -18,7 +18,8 @@ class CreateSecretRequest extends \Google\Protobuf\Internal\Message
{
/**
* Required. The resource name of the project to associate with the
- * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`.
+ * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`
+ * or `projects/*/locations/*`.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -42,7 +43,8 @@ class CreateSecretRequest extends \Google\Protobuf\Internal\Message
/**
* @param string $parent Required. The resource name of the project to associate with the
- * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`. Please see
+ * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`
+ * or `projects/*/locations/*`. Please see
* {@see SecretManagerServiceClient::projectName()} for help formatting this field.
* @param string $secretId Required. This must be unique within the project.
*
@@ -72,7 +74,8 @@ public static function build(string $parent, string $secretId, \Google\Cloud\Sec
*
* @type string $parent
* Required. The resource name of the project to associate with the
- * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`.
+ * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`
+ * or `projects/*/locations/*`.
* @type string $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
@@ -90,7 +93,8 @@ public function __construct($data = NULL) {
/**
* Required. The resource name of the project to associate with the
- * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`.
+ * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`
+ * or `projects/*/locations/*`.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -102,7 +106,8 @@ public function getParent()
/**
* Required. The resource name of the project to associate with the
- * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`.
+ * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`
+ * or `projects/*/locations/*`.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/SecretManager/src/V1/DestroySecretVersionRequest.php b/SecretManager/src/V1/DestroySecretVersionRequest.php
index 00eaf0dc2bb0..04d4aec6b7d6 100644
--- a/SecretManager/src/V1/DestroySecretVersionRequest.php
+++ b/SecretManager/src/V1/DestroySecretVersionRequest.php
@@ -19,7 +19,8 @@ class DestroySecretVersionRequest extends \Google\Protobuf\Internal\Message
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -37,7 +38,8 @@ class DestroySecretVersionRequest extends \Google\Protobuf\Internal\Message
/**
* @param string $name Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in
- * the format `projects/*/secrets/*/versions/*`. Please see
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`. Please see
* {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field.
*
* @return \Google\Cloud\SecretManager\V1\DestroySecretVersionRequest
@@ -59,7 +61,8 @@ public static function build(string $name): self
* @type string $name
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
* @type string $etag
* Optional. Etag of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request
@@ -75,7 +78,8 @@ public function __construct($data = NULL) {
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -88,7 +92,8 @@ public function getName()
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/SecretManager/src/V1/DisableSecretVersionRequest.php b/SecretManager/src/V1/DisableSecretVersionRequest.php
index fe7c574a3f2c..5662346c2c04 100644
--- a/SecretManager/src/V1/DisableSecretVersionRequest.php
+++ b/SecretManager/src/V1/DisableSecretVersionRequest.php
@@ -19,7 +19,8 @@ class DisableSecretVersionRequest extends \Google\Protobuf\Internal\Message
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -37,7 +38,8 @@ class DisableSecretVersionRequest extends \Google\Protobuf\Internal\Message
/**
* @param string $name Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in
- * the format `projects/*/secrets/*/versions/*`. Please see
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`. Please see
* {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field.
*
* @return \Google\Cloud\SecretManager\V1\DisableSecretVersionRequest
@@ -59,7 +61,8 @@ public static function build(string $name): self
* @type string $name
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
* @type string $etag
* Optional. Etag of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request
@@ -75,7 +78,8 @@ public function __construct($data = NULL) {
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -88,7 +92,8 @@ public function getName()
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/SecretManager/src/V1/EnableSecretVersionRequest.php b/SecretManager/src/V1/EnableSecretVersionRequest.php
index 79bc681fadc6..306965874f85 100644
--- a/SecretManager/src/V1/EnableSecretVersionRequest.php
+++ b/SecretManager/src/V1/EnableSecretVersionRequest.php
@@ -19,7 +19,8 @@ class EnableSecretVersionRequest extends \Google\Protobuf\Internal\Message
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -37,7 +38,8 @@ class EnableSecretVersionRequest extends \Google\Protobuf\Internal\Message
/**
* @param string $name Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in
- * the format `projects/*/secrets/*/versions/*`. Please see
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`. Please see
* {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field.
*
* @return \Google\Cloud\SecretManager\V1\EnableSecretVersionRequest
@@ -59,7 +61,8 @@ public static function build(string $name): self
* @type string $name
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
* @type string $etag
* Optional. Etag of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. The request
@@ -75,7 +78,8 @@ public function __construct($data = NULL) {
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -88,7 +92,8 @@ public function getName()
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php b/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php
index 72cebb265d8c..36f65f18c86a 100644
--- a/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php
+++ b/SecretManager/src/V1/Gapic/SecretManagerServiceGapicClient.php
@@ -117,8 +117,18 @@ class SecretManagerServiceGapicClient
'https://www.googleapis.com/auth/cloud-platform',
];
+ private static $locationNameTemplate;
+
private static $projectNameTemplate;
+ private static $projectLocationSecretNameTemplate;
+
+ private static $projectLocationSecretSecretVersionNameTemplate;
+
+ private static $projectSecretNameTemplate;
+
+ private static $projectSecretSecretVersionNameTemplate;
+
private static $secretNameTemplate;
private static $secretVersionNameTemplate;
@@ -146,6 +156,15 @@ private static function getClientDefaults()
];
}
+ private static function getLocationNameTemplate()
+ {
+ if (self::$locationNameTemplate == null) {
+ self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}');
+ }
+
+ return self::$locationNameTemplate;
+ }
+
private static function getProjectNameTemplate()
{
if (self::$projectNameTemplate == null) {
@@ -155,6 +174,42 @@ private static function getProjectNameTemplate()
return self::$projectNameTemplate;
}
+ private static function getProjectLocationSecretNameTemplate()
+ {
+ if (self::$projectLocationSecretNameTemplate == null) {
+ self::$projectLocationSecretNameTemplate = new PathTemplate('projects/{project}/locations/{location}/secrets/{secret}');
+ }
+
+ return self::$projectLocationSecretNameTemplate;
+ }
+
+ private static function getProjectLocationSecretSecretVersionNameTemplate()
+ {
+ if (self::$projectLocationSecretSecretVersionNameTemplate == null) {
+ self::$projectLocationSecretSecretVersionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}');
+ }
+
+ return self::$projectLocationSecretSecretVersionNameTemplate;
+ }
+
+ private static function getProjectSecretNameTemplate()
+ {
+ if (self::$projectSecretNameTemplate == null) {
+ self::$projectSecretNameTemplate = new PathTemplate('projects/{project}/secrets/{secret}');
+ }
+
+ return self::$projectSecretNameTemplate;
+ }
+
+ private static function getProjectSecretSecretVersionNameTemplate()
+ {
+ if (self::$projectSecretSecretVersionNameTemplate == null) {
+ self::$projectSecretSecretVersionNameTemplate = new PathTemplate('projects/{project}/secrets/{secret}/versions/{secret_version}');
+ }
+
+ return self::$projectSecretSecretVersionNameTemplate;
+ }
+
private static function getSecretNameTemplate()
{
if (self::$secretNameTemplate == null) {
@@ -186,7 +241,12 @@ private static function getPathTemplateMap()
{
if (self::$pathTemplateMap == null) {
self::$pathTemplateMap = [
+ 'location' => self::getLocationNameTemplate(),
'project' => self::getProjectNameTemplate(),
+ 'projectLocationSecret' => self::getProjectLocationSecretNameTemplate(),
+ 'projectLocationSecretSecretVersion' => self::getProjectLocationSecretSecretVersionNameTemplate(),
+ 'projectSecret' => self::getProjectSecretNameTemplate(),
+ 'projectSecretSecretVersion' => self::getProjectSecretSecretVersionNameTemplate(),
'secret' => self::getSecretNameTemplate(),
'secretVersion' => self::getSecretVersionNameTemplate(),
'topic' => self::getTopicNameTemplate(),
@@ -196,6 +256,23 @@ private static function getPathTemplateMap()
return self::$pathTemplateMap;
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a location
+ * resource.
+ *
+ * @param string $project
+ * @param string $location
+ *
+ * @return string The formatted location resource.
+ */
+ public static function locationName($project, $location)
+ {
+ return self::getLocationNameTemplate()->render([
+ 'project' => $project,
+ 'location' => $location,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a project
* resource.
@@ -211,6 +288,82 @@ public static function projectName($project)
]);
}
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * project_location_secret resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $secret
+ *
+ * @return string The formatted project_location_secret resource.
+ */
+ public static function projectLocationSecretName($project, $location, $secret)
+ {
+ return self::getProjectLocationSecretNameTemplate()->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'secret' => $secret,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * project_location_secret_secret_version resource.
+ *
+ * @param string $project
+ * @param string $location
+ * @param string $secret
+ * @param string $secretVersion
+ *
+ * @return string The formatted project_location_secret_secret_version resource.
+ */
+ public static function projectLocationSecretSecretVersionName($project, $location, $secret, $secretVersion)
+ {
+ return self::getProjectLocationSecretSecretVersionNameTemplate()->render([
+ 'project' => $project,
+ 'location' => $location,
+ 'secret' => $secret,
+ 'secret_version' => $secretVersion,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * project_secret resource.
+ *
+ * @param string $project
+ * @param string $secret
+ *
+ * @return string The formatted project_secret resource.
+ */
+ public static function projectSecretName($project, $secret)
+ {
+ return self::getProjectSecretNameTemplate()->render([
+ 'project' => $project,
+ 'secret' => $secret,
+ ]);
+ }
+
+ /**
+ * Formats a string containing the fully-qualified path to represent a
+ * project_secret_secret_version resource.
+ *
+ * @param string $project
+ * @param string $secret
+ * @param string $secretVersion
+ *
+ * @return string The formatted project_secret_secret_version resource.
+ */
+ public static function projectSecretSecretVersionName($project, $secret, $secretVersion)
+ {
+ return self::getProjectSecretSecretVersionNameTemplate()->render([
+ 'project' => $project,
+ 'secret' => $secret,
+ 'secret_version' => $secretVersion,
+ ]);
+ }
+
/**
* Formats a string containing the fully-qualified path to represent a secret
* resource.
@@ -268,7 +421,12 @@ public static function topicName($project, $topic)
* Parses a formatted name string and returns an associative array of the components in the name.
* The following name formats are supported:
* Template: Pattern
+ * - location: projects/{project}/locations/{location}
* - project: projects/{project}
+ * - projectLocationSecret: projects/{project}/locations/{location}/secrets/{secret}
+ * - projectLocationSecretSecretVersion: projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}
+ * - projectSecret: projects/{project}/secrets/{secret}
+ * - projectSecretSecretVersion: projects/{project}/secrets/{secret}/versions/{secret_version}
* - secret: projects/{project}/secrets/{secret}
* - secretVersion: projects/{project}/secrets/{secret}/versions/{secret_version}
* - topic: projects/{project}/topics/{topic}
@@ -388,10 +546,13 @@ public function __construct(array $options = [])
*
* @param string $name Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
+ * `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
- * `projects/*/secrets/*/versions/latest` is an alias to the most recently
- * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+ * `projects/*/secrets/*/versions/latest` or
+ * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most
+ * recently created
+ * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
* @param array $optionalArgs {
* Optional.
*
@@ -436,7 +597,7 @@ public function accessSecretVersion($name, array $optionalArgs = [])
* @param string $parent Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret] to associate with the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*`.
+ * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
* @param SecretPayload $payload Required. The secret payload of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
* @param array $optionalArgs {
@@ -482,7 +643,8 @@ public function addSecretVersion($parent, $payload, array $optionalArgs = [])
* ```
*
* @param string $parent Required. The resource name of the project to associate with the
- * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`.
+ * [Secret][google.cloud.secretmanager.v1.Secret], in the format `projects/*`
+ * or `projects/*/locations/*`.
* @param string $secretId Required. This must be unique within the project.
*
* A secret ID is a string with a maximum length of 255 characters and can
@@ -584,7 +746,8 @@ public function deleteSecret($name, array $optionalArgs = [])
*
* @param string $name Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to destroy in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
* @param array $optionalArgs {
* Optional.
*
@@ -638,7 +801,8 @@ public function destroySecretVersion($name, array $optionalArgs = [])
*
* @param string $name Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to disable in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
* @param array $optionalArgs {
* Optional.
*
@@ -692,7 +856,8 @@ public function disableSecretVersion($name, array $optionalArgs = [])
*
* @param string $name Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] to enable in
- * the format `projects/*/secrets/*/versions/*`.
+ * the format `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
* @param array $optionalArgs {
* Optional.
*
@@ -790,7 +955,7 @@ public function getIamPolicy($resource, array $optionalArgs = [])
*
* @param string $name Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*/secrets/*`.
+ * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
* @param array $optionalArgs {
* Optional.
*
@@ -835,10 +1000,13 @@ public function getSecret($name, array $optionalArgs = [])
*
* @param string $name Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
+ * `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
- * `projects/*/secrets/*/versions/latest` is an alias to the most recently
- * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+ * `projects/*/secrets/*/versions/latest` or
+ * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most
+ * recently created
+ * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
* @param array $optionalArgs {
* Optional.
*
@@ -893,7 +1061,7 @@ public function getSecretVersion($name, array $optionalArgs = [])
* @param string $parent Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret] associated with the
* [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in
- * the format `projects/*/secrets/*`.
+ * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
* @param array $optionalArgs {
* Optional.
*
@@ -972,8 +1140,8 @@ public function listSecretVersions($parent, array $optionalArgs = [])
* ```
*
* @param string $parent Required. The resource name of the project associated with the
- * [Secrets][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*`.
+ * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`
+ * or `projects/*/locations/*`
* @param array $optionalArgs {
* Optional.
*
diff --git a/SecretManager/src/V1/GetSecretRequest.php b/SecretManager/src/V1/GetSecretRequest.php
index 90f8705c6adb..ef2cd694b906 100644
--- a/SecretManager/src/V1/GetSecretRequest.php
+++ b/SecretManager/src/V1/GetSecretRequest.php
@@ -19,7 +19,7 @@ class GetSecretRequest extends \Google\Protobuf\Internal\Message
/**
* Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*/secrets/*`.
+ * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -28,7 +28,7 @@ class GetSecretRequest extends \Google\Protobuf\Internal\Message
/**
* @param string $name Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*/secrets/*`. Please see
+ * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see
* {@see SecretManagerServiceClient::secretName()} for help formatting this field.
*
* @return \Google\Cloud\SecretManager\V1\GetSecretRequest
@@ -50,7 +50,7 @@ public static function build(string $name): self
* @type string $name
* Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*/secrets/*`.
+ * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
* }
*/
public function __construct($data = NULL) {
@@ -61,7 +61,7 @@ public function __construct($data = NULL) {
/**
* Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*/secrets/*`.
+ * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -74,7 +74,7 @@ public function getName()
/**
* Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*/secrets/*`.
+ * `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/SecretManager/src/V1/GetSecretVersionRequest.php b/SecretManager/src/V1/GetSecretVersionRequest.php
index 6ac5e42e7fd2..d0788e670269 100644
--- a/SecretManager/src/V1/GetSecretVersionRequest.php
+++ b/SecretManager/src/V1/GetSecretVersionRequest.php
@@ -19,9 +19,12 @@ class GetSecretVersionRequest extends \Google\Protobuf\Internal\Message
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
- * `projects/*/secrets/*/versions/latest` is an alias to the most recently
- * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+ * `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][google.cloud.secretmanager.v1.SecretVersion].
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -30,10 +33,13 @@ class GetSecretVersionRequest extends \Google\Protobuf\Internal\Message
/**
* @param string $name Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
+ * `projects/*/secrets/*/versions/*` or
+ * `projects/*/locations/*/secrets/*/versions/*`.
*
- * `projects/*/secrets/*/versions/latest` is an alias to the most recently
- * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see
+ * `projects/*/secrets/*/versions/latest` or
+ * `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most
+ * recently created
+ * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Please see
* {@see SecretManagerServiceClient::secretVersionName()} for help formatting this field.
*
* @return \Google\Cloud\SecretManager\V1\GetSecretVersionRequest
@@ -55,9 +61,12 @@ public static function build(string $name): self
* @type string $name
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
- * `projects/*/secrets/*/versions/latest` is an alias to the most recently
- * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+ * `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][google.cloud.secretmanager.v1.SecretVersion].
* }
*/
public function __construct($data = NULL) {
@@ -68,9 +77,12 @@ public function __construct($data = NULL) {
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
- * `projects/*/secrets/*/versions/latest` is an alias to the most recently
- * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+ * `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][google.cloud.secretmanager.v1.SecretVersion].
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -83,9 +95,12 @@ public function getName()
/**
* Required. The resource name of the
* [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
- * `projects/*/secrets/*/versions/*`.
- * `projects/*/secrets/*/versions/latest` is an alias to the most recently
- * created [SecretVersion][google.cloud.secretmanager.v1.SecretVersion].
+ * `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][google.cloud.secretmanager.v1.SecretVersion].
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/SecretManager/src/V1/ListSecretVersionsRequest.php b/SecretManager/src/V1/ListSecretVersionsRequest.php
index 4053e960474e..13cee276dd74 100644
--- a/SecretManager/src/V1/ListSecretVersionsRequest.php
+++ b/SecretManager/src/V1/ListSecretVersionsRequest.php
@@ -20,7 +20,7 @@ class ListSecretVersionsRequest extends \Google\Protobuf\Internal\Message
* Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret] associated with the
* [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in
- * the format `projects/*/secrets/*`.
+ * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -55,7 +55,7 @@ class ListSecretVersionsRequest extends \Google\Protobuf\Internal\Message
* @param string $parent Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret] associated with the
* [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in
- * the format `projects/*/secrets/*`. Please see
+ * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`. Please see
* {@see SecretManagerServiceClient::secretName()} for help formatting this field.
*
* @return \Google\Cloud\SecretManager\V1\ListSecretVersionsRequest
@@ -78,7 +78,7 @@ public static function build(string $parent): self
* Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret] associated with the
* [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in
- * the format `projects/*/secrets/*`.
+ * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
* @type int $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
@@ -103,7 +103,7 @@ public function __construct($data = NULL) {
* Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret] associated with the
* [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in
- * the format `projects/*/secrets/*`.
+ * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -117,7 +117,7 @@ public function getParent()
* Required. The resource name of the
* [Secret][google.cloud.secretmanager.v1.Secret] associated with the
* [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] to list, in
- * the format `projects/*/secrets/*`.
+ * the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/SecretManager/src/V1/ListSecretVersionsResponse.php b/SecretManager/src/V1/ListSecretVersionsResponse.php
index 22df5857848e..ed985751b8eb 100644
--- a/SecretManager/src/V1/ListSecretVersionsResponse.php
+++ b/SecretManager/src/V1/ListSecretVersionsResponse.php
@@ -33,7 +33,10 @@ class ListSecretVersionsResponse extends \Google\Protobuf\Internal\Message
private $next_page_token = '';
/**
* The total number of
- * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].
+ * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] but 0 when
+ * the
+ * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter]
+ * field is set.
*
* Generated from protobuf field int32 total_size = 3;
*/
@@ -54,7 +57,10 @@ class ListSecretVersionsResponse extends \Google\Protobuf\Internal\Message
* to retrieve the next page.
* @type int $total_size
* The total number of
- * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].
+ * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] but 0 when
+ * the
+ * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter]
+ * field is set.
* }
*/
public function __construct($data = NULL) {
@@ -122,7 +128,10 @@ public function setNextPageToken($var)
/**
* The total number of
- * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].
+ * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] but 0 when
+ * the
+ * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter]
+ * field is set.
*
* Generated from protobuf field int32 total_size = 3;
* @return int
@@ -134,7 +143,10 @@ public function getTotalSize()
/**
* The total number of
- * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].
+ * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] but 0 when
+ * the
+ * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter]
+ * field is set.
*
* Generated from protobuf field int32 total_size = 3;
* @param int $var
diff --git a/SecretManager/src/V1/ListSecretsRequest.php b/SecretManager/src/V1/ListSecretsRequest.php
index b86481071939..0745e9613c9d 100644
--- a/SecretManager/src/V1/ListSecretsRequest.php
+++ b/SecretManager/src/V1/ListSecretsRequest.php
@@ -18,8 +18,8 @@ class ListSecretsRequest extends \Google\Protobuf\Internal\Message
{
/**
* Required. The resource name of the project associated with the
- * [Secrets][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*`.
+ * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`
+ * or `projects/*/locations/*`
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
*/
@@ -52,9 +52,9 @@ class ListSecretsRequest extends \Google\Protobuf\Internal\Message
/**
* @param string $parent Required. The resource name of the project associated with the
- * [Secrets][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*`. Please see
- * {@see SecretManagerServiceClient::projectName()} for help formatting this field.
+ * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`
+ * or `projects/*/locations/*`
+ * Please see {@see SecretManagerServiceClient::projectName()} for help formatting this field.
*
* @return \Google\Cloud\SecretManager\V1\ListSecretsRequest
*
@@ -74,8 +74,8 @@ public static function build(string $parent): self
*
* @type string $parent
* Required. The resource name of the project associated with the
- * [Secrets][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*`.
+ * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`
+ * or `projects/*/locations/*`
* @type int $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
@@ -98,8 +98,8 @@ public function __construct($data = NULL) {
/**
* Required. The resource name of the project associated with the
- * [Secrets][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*`.
+ * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`
+ * or `projects/*/locations/*`
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @return string
@@ -111,8 +111,8 @@ public function getParent()
/**
* Required. The resource name of the project associated with the
- * [Secrets][google.cloud.secretmanager.v1.Secret], in the format
- * `projects/*`.
+ * [Secrets][google.cloud.secretmanager.v1.Secret], in the format `projects/*`
+ * or `projects/*/locations/*`
*
* Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
* @param string $var
diff --git a/SecretManager/src/V1/ListSecretsResponse.php b/SecretManager/src/V1/ListSecretsResponse.php
index 0dfe831310d1..a147839fd2ef 100644
--- a/SecretManager/src/V1/ListSecretsResponse.php
+++ b/SecretManager/src/V1/ListSecretsResponse.php
@@ -32,7 +32,10 @@ class ListSecretsResponse extends \Google\Protobuf\Internal\Message
*/
private $next_page_token = '';
/**
- * The total number of [Secrets][google.cloud.secretmanager.v1.Secret].
+ * The total number of [Secrets][google.cloud.secretmanager.v1.Secret] but 0
+ * when the
+ * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter]
+ * field is set.
*
* Generated from protobuf field int32 total_size = 3;
*/
@@ -52,7 +55,10 @@ class ListSecretsResponse extends \Google\Protobuf\Internal\Message
* [ListSecretsRequest.page_token][google.cloud.secretmanager.v1.ListSecretsRequest.page_token]
* to retrieve the next page.
* @type int $total_size
- * The total number of [Secrets][google.cloud.secretmanager.v1.Secret].
+ * The total number of [Secrets][google.cloud.secretmanager.v1.Secret] but 0
+ * when the
+ * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter]
+ * field is set.
* }
*/
public function __construct($data = NULL) {
@@ -119,7 +125,10 @@ public function setNextPageToken($var)
}
/**
- * The total number of [Secrets][google.cloud.secretmanager.v1.Secret].
+ * The total number of [Secrets][google.cloud.secretmanager.v1.Secret] but 0
+ * when the
+ * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter]
+ * field is set.
*
* Generated from protobuf field int32 total_size = 3;
* @return int
@@ -130,7 +139,10 @@ public function getTotalSize()
}
/**
- * The total number of [Secrets][google.cloud.secretmanager.v1.Secret].
+ * The total number of [Secrets][google.cloud.secretmanager.v1.Secret] but 0
+ * when the
+ * [ListSecretsRequest.filter][google.cloud.secretmanager.v1.ListSecretsRequest.filter]
+ * field is set.
*
* Generated from protobuf field int32 total_size = 3;
* @param int $var
diff --git a/SecretManager/src/V1/Secret.php b/SecretManager/src/V1/Secret.php
index b8c8dd8514cf..ea3c57532afa 100644
--- a/SecretManager/src/V1/Secret.php
+++ b/SecretManager/src/V1/Secret.php
@@ -28,11 +28,11 @@ class Secret extends \Google\Protobuf\Internal\Message
*/
private $name = '';
/**
- * Required. Immutable. The replication policy of the secret data attached to
+ * Optional. Immutable. The replication policy of the secret data attached to
* the [Secret][google.cloud.secretmanager.v1.Secret].
* The replication policy cannot be changed after the Secret has been created.
*
- * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
*/
private $replication = null;
/**
@@ -85,7 +85,7 @@ class Secret extends \Google\Protobuf\Internal\Message
* letter and cannot be the string 'latest' or 'NEW'.
* No more than 50 aliases can be assigned to a given secret.
* Version-Alias pairs will be viewable via GetSecret and modifiable via
- * UpdateSecret. At launch access by alias will only be supported on
+ * UpdateSecret. Access by alias is only be supported on
* GetSecretVersion and AccessSecretVersion.
*
* Generated from protobuf field map version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL];
@@ -105,6 +105,29 @@ class Secret extends \Google\Protobuf\Internal\Message
* Generated from protobuf field map annotations = 13 [(.google.api.field_behavior) = OPTIONAL];
*/
private $annotations;
+ /**
+ * Optional. Secret Version TTL after destruction request
+ * This is a part of the Delayed secret version destroy feature.
+ * For secret with TTL>0, version destruction doesn't happen immediately
+ * on calling destroy instead the version goes to a disabled state and
+ * destruction happens after the TTL expires.
+ *
+ * Generated from protobuf field .google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $version_destroy_ttl = null;
+ /**
+ * Optional. The customer-managed encryption configuration of the Regionalised
+ * Secrets. If no configuration is provided, Google-managed default encryption
+ * is used.
+ * Updates to the [Secret][google.cloud.secretmanager.v1.Secret] encryption
+ * configuration only apply to
+ * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] added
+ * afterwards. They do not apply retroactively to existing
+ * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].
+ *
+ * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL];
+ */
+ private $customer_managed_encryption = null;
protected $expiration;
/**
@@ -118,7 +141,7 @@ class Secret extends \Google\Protobuf\Internal\Message
* [Secret][google.cloud.secretmanager.v1.Secret] in the format
* `projects/*/secrets/*`.
* @type \Google\Cloud\SecretManager\V1\Replication $replication
- * Required. Immutable. The replication policy of the secret data attached to
+ * Optional. Immutable. The replication policy of the secret data attached to
* the [Secret][google.cloud.secretmanager.v1.Secret].
* The replication policy cannot be changed after the Secret has been created.
* @type \Google\Protobuf\Timestamp $create_time
@@ -158,7 +181,7 @@ class Secret extends \Google\Protobuf\Internal\Message
* letter and cannot be the string 'latest' or 'NEW'.
* No more than 50 aliases can be assigned to a given secret.
* Version-Alias pairs will be viewable via GetSecret and modifiable via
- * UpdateSecret. At launch access by alias will only be supported on
+ * UpdateSecret. Access by alias is only be supported on
* GetSecretVersion and AccessSecretVersion.
* @type array|\Google\Protobuf\Internal\MapField $annotations
* Optional. Custom metadata about the secret.
@@ -170,6 +193,21 @@ class Secret extends \Google\Protobuf\Internal\Message
* ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and
* alphanumerics in between these symbols.
* The total size of annotation keys and values must be less than 16KiB.
+ * @type \Google\Protobuf\Duration $version_destroy_ttl
+ * Optional. Secret Version TTL after destruction request
+ * This is a part of the Delayed secret version destroy feature.
+ * For secret with TTL>0, version destruction doesn't happen immediately
+ * on calling destroy instead the version goes to a disabled state and
+ * destruction happens after the TTL expires.
+ * @type \Google\Cloud\SecretManager\V1\CustomerManagedEncryption $customer_managed_encryption
+ * Optional. The customer-managed encryption configuration of the Regionalised
+ * Secrets. If no configuration is provided, Google-managed default encryption
+ * is used.
+ * Updates to the [Secret][google.cloud.secretmanager.v1.Secret] encryption
+ * configuration only apply to
+ * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] added
+ * afterwards. They do not apply retroactively to existing
+ * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].
* }
*/
public function __construct($data = NULL) {
@@ -208,11 +246,11 @@ public function setName($var)
}
/**
- * Required. Immutable. The replication policy of the secret data attached to
+ * Optional. Immutable. The replication policy of the secret data attached to
* the [Secret][google.cloud.secretmanager.v1.Secret].
* The replication policy cannot be changed after the Secret has been created.
*
- * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
* @return \Google\Cloud\SecretManager\V1\Replication|null
*/
public function getReplication()
@@ -231,11 +269,11 @@ public function clearReplication()
}
/**
- * Required. Immutable. The replication policy of the secret data attached to
+ * Optional. Immutable. The replication policy of the secret data attached to
* the [Secret][google.cloud.secretmanager.v1.Secret].
* The replication policy cannot be changed after the Secret has been created.
*
- * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED];
+ * Generated from protobuf field .google.cloud.secretmanager.v1.Replication replication = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL];
* @param \Google\Cloud\SecretManager\V1\Replication $var
* @return $this
*/
@@ -497,7 +535,7 @@ public function setRotation($var)
* letter and cannot be the string 'latest' or 'NEW'.
* No more than 50 aliases can be assigned to a given secret.
* Version-Alias pairs will be viewable via GetSecret and modifiable via
- * UpdateSecret. At launch access by alias will only be supported on
+ * UpdateSecret. Access by alias is only be supported on
* GetSecretVersion and AccessSecretVersion.
*
* Generated from protobuf field map version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL];
@@ -516,7 +554,7 @@ public function getVersionAliases()
* letter and cannot be the string 'latest' or 'NEW'.
* No more than 50 aliases can be assigned to a given secret.
* Version-Alias pairs will be viewable via GetSecret and modifiable via
- * UpdateSecret. At launch access by alias will only be supported on
+ * UpdateSecret. Access by alias is only be supported on
* GetSecretVersion and AccessSecretVersion.
*
* Generated from protobuf field map version_aliases = 11 [(.google.api.field_behavior) = OPTIONAL];
@@ -573,6 +611,100 @@ public function setAnnotations($var)
return $this;
}
+ /**
+ * Optional. Secret Version TTL after destruction request
+ * This is a part of the Delayed secret version destroy feature.
+ * For secret with TTL>0, version destruction doesn't happen immediately
+ * on calling destroy instead the version goes to a disabled state and
+ * destruction happens after the TTL expires.
+ *
+ * Generated from protobuf field .google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Protobuf\Duration|null
+ */
+ public function getVersionDestroyTtl()
+ {
+ return $this->version_destroy_ttl;
+ }
+
+ public function hasVersionDestroyTtl()
+ {
+ return isset($this->version_destroy_ttl);
+ }
+
+ public function clearVersionDestroyTtl()
+ {
+ unset($this->version_destroy_ttl);
+ }
+
+ /**
+ * Optional. Secret Version TTL after destruction request
+ * This is a part of the Delayed secret version destroy feature.
+ * For secret with TTL>0, version destruction doesn't happen immediately
+ * on calling destroy instead the version goes to a disabled state and
+ * destruction happens after the TTL expires.
+ *
+ * Generated from protobuf field .google.protobuf.Duration version_destroy_ttl = 14 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Protobuf\Duration $var
+ * @return $this
+ */
+ public function setVersionDestroyTtl($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
+ $this->version_destroy_ttl = $var;
+
+ return $this;
+ }
+
+ /**
+ * Optional. The customer-managed encryption configuration of the Regionalised
+ * Secrets. If no configuration is provided, Google-managed default encryption
+ * is used.
+ * Updates to the [Secret][google.cloud.secretmanager.v1.Secret] encryption
+ * configuration only apply to
+ * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] added
+ * afterwards. They do not apply retroactively to existing
+ * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].
+ *
+ * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL];
+ * @return \Google\Cloud\SecretManager\V1\CustomerManagedEncryption|null
+ */
+ public function getCustomerManagedEncryption()
+ {
+ return $this->customer_managed_encryption;
+ }
+
+ public function hasCustomerManagedEncryption()
+ {
+ return isset($this->customer_managed_encryption);
+ }
+
+ public function clearCustomerManagedEncryption()
+ {
+ unset($this->customer_managed_encryption);
+ }
+
+ /**
+ * Optional. The customer-managed encryption configuration of the Regionalised
+ * Secrets. If no configuration is provided, Google-managed default encryption
+ * is used.
+ * Updates to the [Secret][google.cloud.secretmanager.v1.Secret] encryption
+ * configuration only apply to
+ * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion] added
+ * afterwards. They do not apply retroactively to existing
+ * [SecretVersions][google.cloud.secretmanager.v1.SecretVersion].
+ *
+ * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryption customer_managed_encryption = 15 [(.google.api.field_behavior) = OPTIONAL];
+ * @param \Google\Cloud\SecretManager\V1\CustomerManagedEncryption $var
+ * @return $this
+ */
+ public function setCustomerManagedEncryption($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\SecretManager\V1\CustomerManagedEncryption::class);
+ $this->customer_managed_encryption = $var;
+
+ return $this;
+ }
+
/**
* @return string
*/
diff --git a/SecretManager/src/V1/SecretVersion.php b/SecretManager/src/V1/SecretVersion.php
index 2782b22c7e39..778619b5cb07 100644
--- a/SecretManager/src/V1/SecretVersion.php
+++ b/SecretManager/src/V1/SecretVersion.php
@@ -75,6 +75,26 @@ class SecretVersion extends \Google\Protobuf\Internal\Message
* Generated from protobuf field bool client_specified_payload_checksum = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
private $client_specified_payload_checksum = false;
+ /**
+ * Optional. Output only. Scheduled destroy time for secret version.
+ * This is a part of the Delayed secret version destroy feature. For a
+ * Secret with a valid version destroy TTL, when a secert version is
+ * destroyed, the version is moved to disabled state and it is scheduled for
+ * destruction. The version is destroyed only after the
+ * `scheduled_destroy_time`.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp scheduled_destroy_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $scheduled_destroy_time = null;
+ /**
+ * Output only. The customer-managed encryption status of the
+ * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Only
+ * populated if customer-managed encryption is used and
+ * [Secret][google.cloud.secretmanager.v1.Secret] is a Regionalised Secret.
+ *
+ * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryptionStatus customer_managed_encryption = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ */
+ private $customer_managed_encryption = null;
/**
* Constructor.
@@ -114,6 +134,18 @@ class SecretVersion extends \Google\Protobuf\Internal\Message
* [SecretManagerService][google.cloud.secretmanager.v1.SecretManagerService]
* on
* [SecretManagerService.AddSecretVersion][google.cloud.secretmanager.v1.SecretManagerService.AddSecretVersion].
+ * @type \Google\Protobuf\Timestamp $scheduled_destroy_time
+ * Optional. Output only. Scheduled destroy time for secret version.
+ * This is a part of the Delayed secret version destroy feature. For a
+ * Secret with a valid version destroy TTL, when a secert version is
+ * destroyed, the version is moved to disabled state and it is scheduled for
+ * destruction. The version is destroyed only after the
+ * `scheduled_destroy_time`.
+ * @type \Google\Cloud\SecretManager\V1\CustomerManagedEncryptionStatus $customer_managed_encryption
+ * Output only. The customer-managed encryption status of the
+ * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Only
+ * populated if customer-managed encryption is used and
+ * [Secret][google.cloud.secretmanager.v1.Secret] is a Regionalised Secret.
* }
*/
public function __construct($data = NULL) {
@@ -369,5 +401,93 @@ public function setClientSpecifiedPayloadChecksum($var)
return $this;
}
+ /**
+ * Optional. Output only. Scheduled destroy time for secret version.
+ * This is a part of the Delayed secret version destroy feature. For a
+ * Secret with a valid version destroy TTL, when a secert version is
+ * destroyed, the version is moved to disabled state and it is scheduled for
+ * destruction. The version is destroyed only after the
+ * `scheduled_destroy_time`.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp scheduled_destroy_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Protobuf\Timestamp|null
+ */
+ public function getScheduledDestroyTime()
+ {
+ return $this->scheduled_destroy_time;
+ }
+
+ public function hasScheduledDestroyTime()
+ {
+ return isset($this->scheduled_destroy_time);
+ }
+
+ public function clearScheduledDestroyTime()
+ {
+ unset($this->scheduled_destroy_time);
+ }
+
+ /**
+ * Optional. Output only. Scheduled destroy time for secret version.
+ * This is a part of the Delayed secret version destroy feature. For a
+ * Secret with a valid version destroy TTL, when a secert version is
+ * destroyed, the version is moved to disabled state and it is scheduled for
+ * destruction. The version is destroyed only after the
+ * `scheduled_destroy_time`.
+ *
+ * Generated from protobuf field .google.protobuf.Timestamp scheduled_destroy_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Protobuf\Timestamp $var
+ * @return $this
+ */
+ public function setScheduledDestroyTime($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
+ $this->scheduled_destroy_time = $var;
+
+ return $this;
+ }
+
+ /**
+ * Output only. The customer-managed encryption status of the
+ * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Only
+ * populated if customer-managed encryption is used and
+ * [Secret][google.cloud.secretmanager.v1.Secret] is a Regionalised Secret.
+ *
+ * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryptionStatus customer_managed_encryption = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @return \Google\Cloud\SecretManager\V1\CustomerManagedEncryptionStatus|null
+ */
+ public function getCustomerManagedEncryption()
+ {
+ return $this->customer_managed_encryption;
+ }
+
+ public function hasCustomerManagedEncryption()
+ {
+ return isset($this->customer_managed_encryption);
+ }
+
+ public function clearCustomerManagedEncryption()
+ {
+ unset($this->customer_managed_encryption);
+ }
+
+ /**
+ * Output only. The customer-managed encryption status of the
+ * [SecretVersion][google.cloud.secretmanager.v1.SecretVersion]. Only
+ * populated if customer-managed encryption is used and
+ * [Secret][google.cloud.secretmanager.v1.Secret] is a Regionalised Secret.
+ *
+ * Generated from protobuf field .google.cloud.secretmanager.v1.CustomerManagedEncryptionStatus customer_managed_encryption = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
+ * @param \Google\Cloud\SecretManager\V1\CustomerManagedEncryptionStatus $var
+ * @return $this
+ */
+ public function setCustomerManagedEncryption($var)
+ {
+ GPBUtil::checkMessage($var, \Google\Cloud\SecretManager\V1\CustomerManagedEncryptionStatus::class);
+ $this->customer_managed_encryption = $var;
+
+ return $this;
+ }
+
}
diff --git a/SecretManager/src/V1/Topic.php b/SecretManager/src/V1/Topic.php
index 7c8138533aed..37c0b0adb94f 100644
--- a/SecretManager/src/V1/Topic.php
+++ b/SecretManager/src/V1/Topic.php
@@ -19,8 +19,9 @@ class Topic extends \Google\Protobuf\Internal\Message
/**
* Required. The resource name of the Pub/Sub topic that will be published to,
* in the following format: `projects/*/topics/*`. For publication to succeed,
- * the Secret Manager P4SA must have `pubsub.publisher` permissions on the
- * topic.
+ * the Secret Manager service agent must have the `pubsub.topic.publish`
+ * permission on the topic. The Pub/Sub Publisher role
+ * (`roles/pubsub.publisher`) includes this permission.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
*/
@@ -35,8 +36,9 @@ class Topic extends \Google\Protobuf\Internal\Message
* @type string $name
* Required. The resource name of the Pub/Sub topic that will be published to,
* in the following format: `projects/*/topics/*`. For publication to succeed,
- * the Secret Manager P4SA must have `pubsub.publisher` permissions on the
- * topic.
+ * the Secret Manager service agent must have the `pubsub.topic.publish`
+ * permission on the topic. The Pub/Sub Publisher role
+ * (`roles/pubsub.publisher`) includes this permission.
* }
*/
public function __construct($data = NULL) {
@@ -47,8 +49,9 @@ public function __construct($data = NULL) {
/**
* Required. The resource name of the Pub/Sub topic that will be published to,
* in the following format: `projects/*/topics/*`. For publication to succeed,
- * the Secret Manager P4SA must have `pubsub.publisher` permissions on the
- * topic.
+ * the Secret Manager service agent must have the `pubsub.topic.publish`
+ * permission on the topic. The Pub/Sub Publisher role
+ * (`roles/pubsub.publisher`) includes this permission.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @return string
@@ -61,8 +64,9 @@ public function getName()
/**
* Required. The resource name of the Pub/Sub topic that will be published to,
* in the following format: `projects/*/topics/*`. For publication to succeed,
- * the Secret Manager P4SA must have `pubsub.publisher` permissions on the
- * topic.
+ * the Secret Manager service agent must have the `pubsub.topic.publish`
+ * permission on the topic. The Pub/Sub Publisher role
+ * (`roles/pubsub.publisher`) includes this permission.
*
* Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED];
* @param string $var
diff --git a/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php b/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php
index fc12f035380c..17c40a342374 100644
--- a/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php
+++ b/SecretManager/src/V1/resources/secret_manager_service_descriptor_config.php
@@ -221,7 +221,12 @@
],
],
'templateMap' => [
+ 'location' => 'projects/{project}/locations/{location}',
'project' => 'projects/{project}',
+ 'projectLocationSecret' => 'projects/{project}/locations/{location}/secrets/{secret}',
+ 'projectLocationSecretSecretVersion' => 'projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}',
+ 'projectSecret' => 'projects/{project}/secrets/{secret}',
+ 'projectSecretSecretVersion' => 'projects/{project}/secrets/{secret}/versions/{secret_version}',
'secret' => 'projects/{project}/secrets/{secret}',
'secretVersion' => 'projects/{project}/secrets/{secret}/versions/{secret_version}',
'topic' => 'projects/{project}/topics/{topic}',
diff --git a/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php b/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php
index 02f86aaecf44..6dc68c1b4731 100644
--- a/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php
+++ b/SecretManager/src/V1/resources/secret_manager_service_rest_client_config.php
@@ -50,6 +50,12 @@
'AccessSecretVersion' => [
'method' => 'get',
'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}:access',
+ 'additionalBindings' => [
+ [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}:access',
+ ],
+ ],
'placeholders' => [
'name' => [
'getters' => [
@@ -62,6 +68,13 @@
'method' => 'post',
'uriTemplate' => '/v1/{parent=projects/*/secrets/*}:addVersion',
'body' => '*',
+ 'additionalBindings' => [
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*/secrets/*}:addVersion',
+ 'body' => '*',
+ ],
+ ],
'placeholders' => [
'parent' => [
'getters' => [
@@ -74,6 +87,16 @@
'method' => 'post',
'uriTemplate' => '/v1/{parent=projects/*}/secrets',
'body' => 'secret',
+ 'additionalBindings' => [
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/secrets',
+ 'body' => 'secret',
+ 'queryParams' => [
+ 'secret_id',
+ ],
+ ],
+ ],
'placeholders' => [
'parent' => [
'getters' => [
@@ -88,6 +111,12 @@
'DeleteSecret' => [
'method' => 'delete',
'uriTemplate' => '/v1/{name=projects/*/secrets/*}',
+ 'additionalBindings' => [
+ [
+ 'method' => 'delete',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*}',
+ ],
+ ],
'placeholders' => [
'name' => [
'getters' => [
@@ -100,6 +129,13 @@
'method' => 'post',
'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}:destroy',
'body' => '*',
+ 'additionalBindings' => [
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}:destroy',
+ 'body' => '*',
+ ],
+ ],
'placeholders' => [
'name' => [
'getters' => [
@@ -112,6 +148,13 @@
'method' => 'post',
'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}:disable',
'body' => '*',
+ 'additionalBindings' => [
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}:disable',
+ 'body' => '*',
+ ],
+ ],
'placeholders' => [
'name' => [
'getters' => [
@@ -124,6 +167,13 @@
'method' => 'post',
'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}:enable',
'body' => '*',
+ 'additionalBindings' => [
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}:enable',
+ 'body' => '*',
+ ],
+ ],
'placeholders' => [
'name' => [
'getters' => [
@@ -135,6 +185,12 @@
'GetIamPolicy' => [
'method' => 'get',
'uriTemplate' => '/v1/{resource=projects/*/secrets/*}:getIamPolicy',
+ 'additionalBindings' => [
+ [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/secrets/*}:getIamPolicy',
+ ],
+ ],
'placeholders' => [
'resource' => [
'getters' => [
@@ -146,6 +202,12 @@
'GetSecret' => [
'method' => 'get',
'uriTemplate' => '/v1/{name=projects/*/secrets/*}',
+ 'additionalBindings' => [
+ [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*}',
+ ],
+ ],
'placeholders' => [
'name' => [
'getters' => [
@@ -157,6 +219,12 @@
'GetSecretVersion' => [
'method' => 'get',
'uriTemplate' => '/v1/{name=projects/*/secrets/*/versions/*}',
+ 'additionalBindings' => [
+ [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{name=projects/*/locations/*/secrets/*/versions/*}',
+ ],
+ ],
'placeholders' => [
'name' => [
'getters' => [
@@ -168,6 +236,12 @@
'ListSecretVersions' => [
'method' => 'get',
'uriTemplate' => '/v1/{parent=projects/*/secrets/*}/versions',
+ 'additionalBindings' => [
+ [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*/secrets/*}/versions',
+ ],
+ ],
'placeholders' => [
'parent' => [
'getters' => [
@@ -179,6 +253,12 @@
'ListSecrets' => [
'method' => 'get',
'uriTemplate' => '/v1/{parent=projects/*}/secrets',
+ 'additionalBindings' => [
+ [
+ 'method' => 'get',
+ 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/secrets',
+ ],
+ ],
'placeholders' => [
'parent' => [
'getters' => [
@@ -191,6 +271,13 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/secrets/*}:setIamPolicy',
'body' => '*',
+ 'additionalBindings' => [
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/secrets/*}:setIamPolicy',
+ 'body' => '*',
+ ],
+ ],
'placeholders' => [
'resource' => [
'getters' => [
@@ -203,6 +290,13 @@
'method' => 'post',
'uriTemplate' => '/v1/{resource=projects/*/secrets/*}:testIamPermissions',
'body' => '*',
+ 'additionalBindings' => [
+ [
+ 'method' => 'post',
+ 'uriTemplate' => '/v1/{resource=projects/*/locations/*/secrets/*}:testIamPermissions',
+ 'body' => '*',
+ ],
+ ],
'placeholders' => [
'resource' => [
'getters' => [
@@ -215,6 +309,16 @@
'method' => 'patch',
'uriTemplate' => '/v1/{secret.name=projects/*/secrets/*}',
'body' => 'secret',
+ 'additionalBindings' => [
+ [
+ 'method' => 'patch',
+ 'uriTemplate' => '/v1/{secret.name=projects/*/locations/*/secrets/*}',
+ 'body' => 'secret',
+ 'queryParams' => [
+ 'update_mask',
+ ],
+ ],
+ ],
'placeholders' => [
'secret.name' => [
'getters' => [
diff --git a/SecretManager/tests/Unit/V1/Client/SecretManagerServiceClientTest.php b/SecretManager/tests/Unit/V1/Client/SecretManagerServiceClientTest.php
index bbbb3fa93d16..7f5b590fa420 100644
--- a/SecretManager/tests/Unit/V1/Client/SecretManagerServiceClientTest.php
+++ b/SecretManager/tests/Unit/V1/Client/SecretManagerServiceClientTest.php
@@ -46,7 +46,6 @@
use Google\Cloud\SecretManager\V1\ListSecretVersionsResponse;
use Google\Cloud\SecretManager\V1\ListSecretsRequest;
use Google\Cloud\SecretManager\V1\ListSecretsResponse;
-use Google\Cloud\SecretManager\V1\Replication;
use Google\Cloud\SecretManager\V1\Secret;
use Google\Cloud\SecretManager\V1\SecretPayload;
use Google\Cloud\SecretManager\V1\SecretVersion;
@@ -241,8 +240,6 @@ public function createSecretTest()
$formattedParent = $gapicClient->projectName('[PROJECT]');
$secretId = 'secretId-739547894';
$secret = new Secret();
- $secretReplication = new Replication();
- $secret->setReplication($secretReplication);
$request = (new CreateSecretRequest())
->setParent($formattedParent)
->setSecretId($secretId)
@@ -285,8 +282,6 @@ public function createSecretExceptionTest()
$formattedParent = $gapicClient->projectName('[PROJECT]');
$secretId = 'secretId-739547894';
$secret = new Secret();
- $secretReplication = new Replication();
- $secret->setReplication($secretReplication);
$request = (new CreateSecretRequest())
->setParent($formattedParent)
->setSecretId($secretId)
@@ -1074,8 +1069,6 @@ public function updateSecretTest()
$transport->addResponse($expectedResponse);
// Mock request
$secret = new Secret();
- $secretReplication = new Replication();
- $secret->setReplication($secretReplication);
$updateMask = new FieldMask();
$request = (new UpdateSecretRequest())
->setSecret($secret)
@@ -1114,8 +1107,6 @@ public function updateSecretExceptionTest()
$transport->addResponse(null, $status);
// Mock request
$secret = new Secret();
- $secretReplication = new Replication();
- $secret->setReplication($secretReplication);
$updateMask = new FieldMask();
$request = (new UpdateSecretRequest())
->setSecret($secret)
diff --git a/SecretManager/tests/Unit/V1/SecretManagerServiceClientTest.php b/SecretManager/tests/Unit/V1/SecretManagerServiceClientTest.php
index c18a8df8f800..7155d85fd35d 100644
--- a/SecretManager/tests/Unit/V1/SecretManagerServiceClientTest.php
+++ b/SecretManager/tests/Unit/V1/SecretManagerServiceClientTest.php
@@ -31,7 +31,6 @@
use Google\Cloud\SecretManager\V1\AccessSecretVersionResponse;
use Google\Cloud\SecretManager\V1\ListSecretVersionsResponse;
use Google\Cloud\SecretManager\V1\ListSecretsResponse;
-use Google\Cloud\SecretManager\V1\Replication;
use Google\Cloud\SecretManager\V1\Secret;
use Google\Cloud\SecretManager\V1\SecretManagerServiceClient;
use Google\Cloud\SecretManager\V1\SecretPayload;
@@ -216,8 +215,6 @@ public function createSecretTest()
$formattedParent = $gapicClient->projectName('[PROJECT]');
$secretId = 'secretId-739547894';
$secret = new Secret();
- $secretReplication = new Replication();
- $secret->setReplication($secretReplication);
$response = $gapicClient->createSecret($formattedParent, $secretId, $secret);
$this->assertEquals($expectedResponse, $response);
$actualRequests = $transport->popReceivedCalls();
@@ -256,8 +253,6 @@ public function createSecretExceptionTest()
$formattedParent = $gapicClient->projectName('[PROJECT]');
$secretId = 'secretId-739547894';
$secret = new Secret();
- $secretReplication = new Replication();
- $secret->setReplication($secretReplication);
try {
$gapicClient->createSecret($formattedParent, $secretId, $secret);
// If the $gapicClient method call did not throw, fail the test
@@ -993,8 +988,6 @@ public function updateSecretTest()
$transport->addResponse($expectedResponse);
// Mock request
$secret = new Secret();
- $secretReplication = new Replication();
- $secret->setReplication($secretReplication);
$updateMask = new FieldMask();
$response = $gapicClient->updateSecret($secret, $updateMask);
$this->assertEquals($expectedResponse, $response);
@@ -1030,8 +1023,6 @@ public function updateSecretExceptionTest()
$transport->addResponse(null, $status);
// Mock request
$secret = new Secret();
- $secretReplication = new Replication();
- $secret->setReplication($secretReplication);
$updateMask = new FieldMask();
try {
$gapicClient->updateSecret($secret, $updateMask);