Skip to content

Commit e99a085

Browse files
Google APIscopybara-github
authored andcommitted
feat: add top-level CloudSqlSingleUserCredentials message in resources.proto for Cloud SQL single-user managed rotation
fix!: update `EnableManagedRotationRequest` in `service.proto` to reference top-level `CloudSqlSingleUserCredentials` and rename `oneof credentials` to `oneof credential` PiperOrigin-RevId: 1009494249
1 parent 3d42ca0 commit e99a085

3 files changed

Lines changed: 25 additions & 17 deletions

File tree

‎google/cloud/secretmanager/v1/resources.proto‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,3 +575,17 @@ message SecretPayload {
575575
// https://cloud.google.com/apis/design/design_patterns#integer_types
576576
optional int64 data_crc32c = 2 [(google.api.field_behavior) = OPTIONAL];
577577
}
578+
579+
// These are the credentials required for Cloud SQL DB for Single user
580+
// Managed Rotation.
581+
message CloudSqlSingleUserCredentials {
582+
// Required. Instance ID of the Cloud SQL instance.
583+
string instance_id = 1 [(google.api.field_behavior) = REQUIRED];
584+
585+
// Required. Username of the Cloud SQL instance.
586+
string username = 2 [(google.api.field_behavior) = REQUIRED];
587+
588+
// Optional. Password of the Cloud SQL instance. If this is not provided,
589+
// a random password will be generated.
590+
string password = 3 [(google.api.field_behavior) = OPTIONAL];
591+
}

‎google/cloud/secretmanager/v1/secretmanager_grpc_service_config.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@
5757
{
5858
"service": "google.cloud.secretmanager.v1.SecretManagerService",
5959
"method": "TestIamPermissions"
60+
},
61+
{
62+
"service": "google.cloud.secretmanager.v1.SecretManagerService",
63+
"method": "EnableManagedRotation"
64+
},
65+
{
66+
"service": "google.cloud.secretmanager.v1.SecretManagerService",
67+
"method": "RotateSecret"
6068
}
6169
],
6270
"timeout": "60s"

‎google/cloud/secretmanager/v1/service.proto‎

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -398,20 +398,6 @@ message AddSecretVersionRequest {
398398
// Request message for
399399
// [SecretManagerService.EnableManagedRotation][google.cloud.secretmanager.v1.SecretManagerService.EnableManagedRotation].
400400
message EnableManagedRotationRequest {
401-
// These are the credentials required for Cloud SQL DB for Single user
402-
// Managed Rotation.
403-
message CloudSQLSingleUserCredentials {
404-
// Required. Instance ID of the Cloud SQL instance.
405-
string instance_id = 1 [(google.api.field_behavior) = REQUIRED];
406-
407-
// Required. Username of the Cloud SQL instance.
408-
string username = 2 [(google.api.field_behavior) = REQUIRED];
409-
410-
// Optional. Password of the Cloud SQL instance. If this is not provided,
411-
// a random password will be generated.
412-
string password = 3 [(google.api.field_behavior) = OPTIONAL];
413-
}
414-
415401
// Required. The resource name of the
416402
// [Secret][google.cloud.secretmanager.v1.Secret] to associate with the
417403
// [SecretVersion][google.cloud.secretmanager.v1.SecretVersion] in the format
@@ -423,11 +409,11 @@ message EnableManagedRotationRequest {
423409
}
424410
];
425411

426-
// The credentials required for Managed Rotation.
412+
// The credential required for Managed Rotation.
427413
// Right now, only Cloud SQL Single User credentials are supported.
428-
oneof credentials {
414+
oneof credential {
429415
// Credentials required for Cloud SQL DB for Single user Managed Rotation.
430-
CloudSQLSingleUserCredentials cloud_sql_single_user_credentials = 2;
416+
CloudSqlSingleUserCredentials cloud_sql_single_user_credentials = 2;
431417
}
432418
}
433419

0 commit comments

Comments
 (0)