Skip to content

Commit

Permalink
feat: Support for the AcquireSsrsLease and ReleaseSsrsLease RPCs
Browse files Browse the repository at this point in the history
feat: Support for migration type and PostgreSQL parallel level in the VerifyExternalSyncSettings call
feat: Support for setting the migration type when starting an external sync
feat: Support for additional error types in external sync settings
feat: DatabaseInstance resource now includes disaster recovery replica information and Gemini configuration
feat: BackupConfiguration resource now includes transactional log storage location
feat: ImportContext now includes options for importing data from SQL statements
feat: Operation resource now includes context for acquire SSRS lease operations
feat: Support for additional SQL operations related to SSRS leases and old primary reconfiguration
feat: Databsae instance settings now includes a flag to enable Vertex AI integration
feat: Support for several newer releases of MySQL 8.0
docs: Note that `ssl_mode` is now used by all databases including SQL Server

PiperOrigin-RevId: 629471589
  • Loading branch information
Google APIs authored and Copybara-Service committed Apr 30, 2024
1 parent e3388e1 commit b63fdfa
Show file tree
Hide file tree
Showing 2 changed files with 257 additions and 7 deletions.
157 changes: 157 additions & 0 deletions google/cloud/sql/v1/cloud_sql_instances.proto
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,23 @@ service SqlInstancesService {
get: "/v1/projects/{project}/instances/{instance}/getLatestRecoveryTime"
};
}

// Acquire a lease for the setup of SQL Server Reporting Services (SSRS).
rpc AcquireSsrsLease(SqlInstancesAcquireSsrsLeaseRequest)
returns (SqlInstancesAcquireSsrsLeaseResponse) {
option (google.api.http) = {
post: "/v1/projects/{project}/instances/{instance}/acquireSsrsLease"
body: "body"
};
}

// Release a lease for the setup of SQL Server Reporting Services (SSRS).
rpc ReleaseSsrsLease(SqlInstancesReleaseSsrsLeaseRequest)
returns (SqlInstancesReleaseSsrsLeaseResponse) {
option (google.api.http) = {
post: "/v1/projects/{project}/instances/{instance}/releaseSsrsLease"
};
}
}

// Instance add server CA request.
Expand Down Expand Up @@ -680,6 +697,19 @@ message SqlInstancesVerifyExternalSyncSettingsRequest {
OFFLINE = 2;
}

// MigrationType decides if the migration is a physical file based migration
// or logical migration
enum MigrationType {
// Default value is logical migration
MIGRATION_TYPE_UNSPECIFIED = 0;

// Logical Migrations
LOGICAL = 1;

// Physical file based Migrations
PHYSICAL = 2;
}

// Cloud SQL instance ID. This does not include the project ID.
string instance = 1;

Expand All @@ -700,6 +730,15 @@ message SqlInstancesVerifyExternalSyncSettingsRequest {
MySqlSyncConfig mysql_sync_config = 6
[(google.api.field_behavior) = OPTIONAL];
}

// Optional. MigrationType decides if the migration is a physical file based
// migration or logical migration
MigrationType migration_type = 7 [(google.api.field_behavior) = OPTIONAL];

// Optional. Parallel level for initial data sync. Currently only applicable
// for PostgreSQL.
ExternalSyncParallelLevel sync_parallel_level = 8
[(google.api.field_behavior) = OPTIONAL];
}

// Instance start external sync request.
Expand All @@ -725,6 +764,11 @@ message SqlInstancesStartExternalSyncRequest {
// for MySQL.
ExternalSyncParallelLevel sync_parallel_level = 7
[(google.api.field_behavior) = OPTIONAL];

// Optional. MigrationType decides if the migration is a physical file based
// migration or logical migration.
SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8
[(google.api.field_behavior) = OPTIONAL];
}

// Instance reset replica size request.
Expand Down Expand Up @@ -838,6 +882,12 @@ message InstancesTruncateLogRequest {
TruncateLogContext truncate_log_context = 1;
}

// Request to acquire a lease for SSRS.
message InstancesAcquireSsrsLeaseRequest {
// Contains details about the acquire SSRS lease operation.
AcquireSsrsLeaseContext acquire_ssrs_lease_context = 1;
}

// Instance verify external sync settings response.
message SqlInstancesVerifyExternalSyncSettingsResponse {
// This is always `sql#migrationSettingErrorList`.
Expand Down Expand Up @@ -1196,6 +1246,56 @@ message DatabaseInstance {
// Output only. The dns name of the primary instance in a replication group.
optional string write_endpoint = 52
[(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. The pair of a primary instance and disaster recovery (DR)
// replica. A DR replica is a cross-region replica that you designate for
// failover in the event that the primary instance has regional failure.
ReplicationCluster replication_cluster = 54
[(google.api.field_behavior) = OPTIONAL];

// Gemini configuration.
optional GeminiInstanceConfig gemini_config = 55;
}

// Gemini configuration.
message GeminiInstanceConfig {
// Output only. Whether gemini is enabled.
optional bool entitled = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Whether vacuum management is enabled.
optional bool google_vacuum_mgmt_enabled = 2
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Whether oom session cancel is enabled.
optional bool oom_session_cancel_enabled = 3
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Whether active query is enabled.
optional bool active_query_enabled = 4
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Whether index advisor is enabled.
optional bool index_advisor_enabled = 5
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Whether flag recommender is enabled.
optional bool flag_recommender_enabled = 6
[(google.api.field_behavior) = OUTPUT_ONLY];
}

// Primary-DR replica pair
message ReplicationCluster {
// Optional. If the instance is a primary instance, then this field identifies
// the disaster recovery (DR) replica. A DR replica is an optional
// configuration for Enterprise Plus edition instances. If the instance is a
// read replica, then the field is not set. Users can set this field to set a
// designated DR replica for a primary. Removing this field removes the DR
// replica.
string failover_dr_replica_name = 2 [(google.api.field_behavior) = OPTIONAL];

// Output only. read-only field that indicates if the replica is a dr_replica;
// not set for a primary.
bool dr_replica = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Reschedule options for maintenance windows.
Expand Down Expand Up @@ -1444,6 +1544,22 @@ message SqlExternalSyncSettingError {
// If a time out occurs while the subscription counts are calculated, then
// this value is set to 1. Otherwise, this value is set to 2.
SUBSCRIPTION_CALCULATION_STATUS = 40;

// Count of subscriptions needed to sync source data for PostgreSQL
// database.
PG_SUBSCRIPTION_COUNT = 41;

// Final parallel level that is used to do migration.
PG_SYNC_PARALLEL_LEVEL = 42;

// The disk size of the replica instance is smaller than the data size of
// the source instance.
INSUFFICIENT_DISK_SIZE = 43;

// The data size of the source instance is greater than 1 TB, the number of
// cores of the replica instance is less than 8, and the memory of the
// replica is less than 32 GB.
INSUFFICIENT_MACHINE_TIER = 44;
}

// Can be `sql#externalSyncSettingError` or
Expand Down Expand Up @@ -1515,6 +1631,47 @@ message ReplicaConfiguration {
[(google.api.field_behavior) = OPTIONAL];
}

// Request to acquire a lease for SSRS.
message SqlInstancesAcquireSsrsLeaseRequest {
// Required. Cloud SQL instance ID. This doesn't include the project ID. It's
// composed of lowercase letters, numbers, and hyphens, and it must start with
// a letter. The total length must be 98 characters or less (Example:
// instance-id).
string instance = 1 [(google.api.field_behavior) = REQUIRED];

// Required. Project ID of the project that contains the instance (Example:
// project-id).
string project = 2 [(google.api.field_behavior) = REQUIRED];

// Required. The request body.
InstancesAcquireSsrsLeaseRequest body = 100
[(google.api.field_behavior) = REQUIRED];
}

// Response for the acquire SSRS lease request.
message SqlInstancesAcquireSsrsLeaseResponse {
// The unique identifier for this operation.
string operation_id = 1;
}

// Request to release a lease for SSRS.
message SqlInstancesReleaseSsrsLeaseRequest {
// Required. The Cloud SQL instance ID. This doesn't include the project ID.
// The instance ID contains lowercase letters, numbers, and hyphens, and it
// must start with a letter. This ID can have a maximum length of 98
// characters.
string instance = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The project ID that contains the instance.
string project = 2 [(google.api.field_behavior) = REQUIRED];
}

// Response for the release SSRS lease request.
message SqlInstancesReleaseSsrsLeaseResponse {
// The unique identifier for this operation.
string operation_id = 1;
}

enum SqlInstanceType {
// This is an unknown Cloud SQL instance type.
SQL_INSTANCE_TYPE_UNSPECIFIED = 0;
Expand Down
Loading

0 comments on commit b63fdfa

Please sign in to comment.