google-cloud-sql-v1 0.1.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +4 -4
  3. data/README.md +9 -2
  4. data/lib/google/cloud/sql/v1/cloud_sql_connect_pb.rb +2 -1
  5. data/lib/google/cloud/sql/v1/cloud_sql_connect_services_pb.rb +3 -0
  6. data/lib/google/cloud/sql/v1/cloud_sql_databases_pb.rb +2 -1
  7. data/lib/google/cloud/sql/v1/cloud_sql_instances_pb.rb +3 -1
  8. data/lib/google/cloud/sql/v1/cloud_sql_operations_pb.rb +1 -1
  9. data/lib/google/cloud/sql/v1/cloud_sql_resources_pb.rb +3 -1
  10. data/lib/google/cloud/sql/v1/cloud_sql_ssl_certs_pb.rb +2 -1
  11. data/lib/google/cloud/sql/v1/cloud_sql_users_pb.rb +1 -1
  12. data/lib/google/cloud/sql/v1/sql_backups_service/paths.rb +19 -0
  13. data/lib/google/cloud/sql/v1/sql_connect_service/client.rb +98 -0
  14. data/lib/google/cloud/sql/v1/sql_connect_service/rest/client.rb +88 -0
  15. data/lib/google/cloud/sql/v1/sql_connect_service/rest/service_stub.rb +62 -0
  16. data/lib/google/cloud/sql/v1/sql_databases_service/client.rb +18 -6
  17. data/lib/google/cloud/sql/v1/sql_databases_service/rest/client.rb +18 -6
  18. data/lib/google/cloud/sql/v1/sql_instances_service/client.rb +137 -44
  19. data/lib/google/cloud/sql/v1/sql_instances_service/paths.rb +64 -0
  20. data/lib/google/cloud/sql/v1/sql_instances_service/rest/client.rb +132 -42
  21. data/lib/google/cloud/sql/v1/sql_operations_service/client.rb +9 -3
  22. data/lib/google/cloud/sql/v1/sql_operations_service/rest/client.rb +9 -3
  23. data/lib/google/cloud/sql/v1/sql_users_service/client.rb +23 -5
  24. data/lib/google/cloud/sql/v1/sql_users_service/rest/client.rb +23 -5
  25. data/lib/google/cloud/sql/v1/version.rb +1 -1
  26. data/lib/google/cloud/sql/v1.rb +0 -6
  27. data/proto_docs/google/api/routing.rb +463 -0
  28. data/proto_docs/google/cloud/sql/v1/cloud_sql_connect.rb +16 -0
  29. data/proto_docs/google/cloud/sql/v1/cloud_sql_databases.rb +15 -0
  30. data/proto_docs/google/cloud/sql/v1/cloud_sql_instances.rb +174 -1
  31. data/proto_docs/google/cloud/sql/v1/cloud_sql_operations.rb +9 -0
  32. data/proto_docs/google/cloud/sql/v1/cloud_sql_resources.rb +126 -14
  33. data/proto_docs/google/cloud/sql/v1/cloud_sql_users.rb +32 -0
  34. data/proto_docs/google/protobuf/timestamp.rb +7 -6
  35. metadata +6 -5
@@ -117,8 +117,12 @@ module Google
117
117
  # (MySQL only) Whether binary log is enabled. If backup configuration is
118
118
  # disabled, binarylog must be disabled as well.
119
119
  # @!attribute [rw] replication_log_archiving_enabled
120
+ # @deprecated This field is deprecated and may be removed in the next major version update.
120
121
  # @return [::Google::Protobuf::BoolValue]
121
- # Reserved for future use.
122
+ # Optional. Deprecated: replication_log_archiving_enabled is deprecated and
123
+ # will be removed from a future version of the API. Use
124
+ # {::Google::Cloud::Sql::V1::BackupConfiguration#point_in_time_recovery_enabled point_in_time_recovery_enabled}
125
+ # instead.
122
126
  # @!attribute [rw] location
123
127
  # @return [::String]
124
128
  # Location of the backup
@@ -961,20 +965,24 @@ module Google
961
965
  # format: projects/PROJECT/regions/REGION/networkAttachments/ID
962
966
  # @!attribute [rw] psc_auto_dns_enabled
963
967
  # @return [::Boolean]
964
- # Optional. Indicates whether PSC DNS automation is enabled for this
965
- # instance. When enabled, Cloud SQL provisions a universal DNS record across
966
- # all networks configured with Private Service Connect (PSC)
967
- # auto-connections. This will default to true for new instances when Private
968
- # Service Connect is enabled.
968
+ # Optional. Indicates whether Private Service Connect DNS automation is
969
+ # enabled for this instance. When enabled, Cloud SQL provisions a universal
970
+ # DNS record across all networks configured with Private Service Connect
971
+ # auto-connections. This will default to true for new instances when
972
+ # Private Service Connect is enabled.
969
973
  # @!attribute [rw] psc_write_endpoint_dns_enabled
970
974
  # @return [::Boolean]
971
- # Optional. Indicates whether PSC write endpoint DNS automation is enabled
972
- # for this instance. When enabled, Cloud SQL provisions a universal global
973
- # DNS record across all networks configured with Private Service Connect
974
- # (PSC) auto-connections that always points to the cluster primary instance.
975
- # This feature is only supported for Enterprise Plus edition.
976
- # This will default to true for new Enterprise Plus instances when
975
+ # Optional. Indicates whether Private Service Connect write endpoint DNS
976
+ # automation is enabled for this instance. When enabled, Cloud SQL provisions
977
+ # a universal global DNS record across all networks configured with Private
978
+ # Service Connect auto-connections that points to the cluster primary
979
+ # instance. This feature is only supported for Enterprise Plus edition. This
980
+ # will default to true for new Enterprise Plus instances when
977
981
  # `psc_auto_dns_enabled` is enabled.
982
+ # @!attribute [rw] psc_auto_connection_policy_enabled
983
+ # @return [::Boolean]
984
+ # Optional. Whether to set up the PSC service connection policy
985
+ # automatically.
978
986
  class PscConfig
979
987
  include ::Google::Protobuf::MessageExts
980
988
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -1007,6 +1015,23 @@ module Google
1007
1015
  # @!attribute [rw] consumer_network_status
1008
1016
  # @return [::String]
1009
1017
  # The connection policy status of the consumer network.
1018
+ # @!attribute [r] service_connection_policy
1019
+ # @return [::String]
1020
+ # Output only. The service connection policy created automatically for the
1021
+ # consumer network when `psc_auto_connection_policy_enabled` is true. It is
1022
+ # in the format of:
1023
+ # `projects/{project}/regions/{region}/serviceConnectionPolicies/{policy_id}`
1024
+ # The `policy_id` is in format of `$NETWORK-$RANDOM`.
1025
+ # @!attribute [r] service_connection_policy_creation_result
1026
+ # @return [::String]
1027
+ # Output only. The status of service connection policy creation.
1028
+ # @!attribute [r] instance_auto_dns_status
1029
+ # @return [::Google::Cloud::Sql::V1::AutoDnsStatus]
1030
+ # Output only. The status of automated DNS provisioning.
1031
+ # @!attribute [r] write_endpoint_auto_dns_status
1032
+ # @return [::Google::Cloud::Sql::V1::AutoDnsStatus]
1033
+ # Output only. The status of automated DNS provisioning for the write
1034
+ # endpoint.
1010
1035
  class PscAutoConnectionConfig
1011
1036
  include ::Google::Protobuf::MessageExts
1012
1037
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -1480,6 +1505,11 @@ module Google
1480
1505
 
1481
1506
  # Pre-checks the major version upgrade operation.
1482
1507
  PRE_CHECK_MAJOR_VERSION_UPGRADE = 54
1508
+
1509
+ # This operation type represents individual steps in a multi-step setup
1510
+ # migration workflow: including configuration, replication,
1511
+ # switchover/back, and data reseeding, as defined by operation's intent.
1512
+ SETUP_MIGRATION = 55
1483
1513
  end
1484
1514
 
1485
1515
  # The status of an operation.
@@ -1711,7 +1741,7 @@ module Google
1711
1741
  # SQL Server specific audit configuration.
1712
1742
  # @!attribute [rw] edition
1713
1743
  # @return [::Google::Cloud::Sql::V1::Settings::Edition]
1714
- # Optional. The edition of the instance.
1744
+ # Optional. The edition type of the Cloud SQL instance.
1715
1745
  # @!attribute [rw] connector_enforcement
1716
1746
  # @return [::Google::Cloud::Sql::V1::Settings::ConnectorEnforcement]
1717
1747
  # Specifies if connections must use Cloud SQL connectors.
@@ -1823,7 +1853,7 @@ module Google
1823
1853
  ON_DEMAND = 3
1824
1854
  end
1825
1855
 
1826
- # The edition of the instance.
1856
+ # The list of Cloud SQL editions available to users.
1827
1857
  module Edition
1828
1858
  # The instance did not specify the edition.
1829
1859
  EDITION_UNSPECIFIED = 0
@@ -1833,6 +1863,9 @@ module Google
1833
1863
 
1834
1864
  # The instance is an Enterprise Plus edition.
1835
1865
  ENTERPRISE_PLUS = 3
1866
+
1867
+ # This instance is a Cloud SQL developer edition instance.
1868
+ DEVELOPER = 5
1836
1869
  end
1837
1870
 
1838
1871
  # The options for enforcing Cloud SQL connectors in the instance.
@@ -1888,9 +1921,70 @@ module Google
1888
1921
  # @return [::Integer]
1889
1922
  # Optional. Specifies the amount of time in seconds that a transaction needs
1890
1923
  # to have been open before the watcher starts recording it.
1924
+ # @!attribute [rw] cpu_utilization_threshold_percent
1925
+ # @return [::Integer]
1926
+ # Optional. Specifies the minimum percentage of CPU utilization to trigger
1927
+ # the performance capture. Valid integers range from `10` to `99`. Enter `0`
1928
+ # to disable the check.
1929
+ # @!attribute [rw] memory_usage_threshold_percent
1930
+ # @return [::Integer]
1931
+ # Optional. Specifies the minimum percentage of memory usage to trigger the
1932
+ # performance capture.
1933
+ # Valid integers range from `10` to `99`. Enter `0` to disable the check.
1934
+ # @!attribute [rw] transaction_lock_wait_threshold_count
1935
+ # @return [::Integer]
1936
+ # Optional. Specifies the minimum allowed number of transactions in lock wait
1937
+ # state to trigger the performance capture. Valid integers range from `10` to
1938
+ # `10000`. Enter `0` to disable the check.
1939
+ # @!attribute [rw] semaphore_wait_threshold_count
1940
+ # @return [::Integer]
1941
+ # Optional. Specifies the minimum allowed number of semaphore waits to
1942
+ # trigger the performance capture. Valid integers range from `10` to `10000`.
1943
+ # Enter `0` to disable the check.
1944
+ # @!attribute [rw] history_list_length_threshold_count
1945
+ # @return [::Integer]
1946
+ # Optional. Specifies the minimum number of undo log entries in the history
1947
+ # list length to trigger the performance capture. Valid integers range from
1948
+ # `10000` to `10000000`. Enter `0` to disable the check.
1949
+ # @!attribute [rw] transaction_kill_threshold_seconds
1950
+ # @return [::Integer]
1951
+ # Optional. Specifies the amount of time in seconds that a transaction needs
1952
+ # to have been open before the watcher starts terminating it. Valid integers
1953
+ # range from `60` to `604800` (7 days). Enter `0` to disable. If enabled
1954
+ # (i.e., > 0), this value must be greater than or equal to
1955
+ # `transaction_duration_threshold`. Configurations where
1956
+ # `0 < transaction_kill_threshold_seconds < transaction_duration_threshold`
1957
+ # will be rejected.
1958
+ # @!attribute [rw] transaction_kill_excluded_user_hosts
1959
+ # @return [::Array<::String>]
1960
+ # Optional. Specifies a customer-defined list of users to exclude from
1961
+ # transaction termination. Entries can be in the format 'user@host' or just
1962
+ # 'user'. A standalone 'user' implies 'user@%', excluding the user from any
1963
+ # host. Wildcard '%' is allowed in the host part of the 'user@host' format.
1964
+ # Example: `["app_user", "db_admin@10.1.2.3", "report_user@%"]`
1965
+ # @!attribute [rw] transaction_kill_type
1966
+ # @return [::Google::Cloud::Sql::V1::PerformanceCaptureConfig::TransactionKillType]
1967
+ # Optional. Determines which transactions are allowed to be terminated when
1968
+ # they exceed `transaction_kill_threshold_seconds`. This allows protecting
1969
+ # write-heavy transactions from auto-termination if desired. Defaults to
1970
+ # `READ_ONLY_TRANSACTIONS` if unspecified.
1891
1971
  class PerformanceCaptureConfig
1892
1972
  include ::Google::Protobuf::MessageExts
1893
1973
  extend ::Google::Protobuf::MessageExts::ClassMethods
1974
+
1975
+ # Defines the categories of long-running transactions eligible for automatic
1976
+ # termination by the Performance Capture.
1977
+ module TransactionKillType
1978
+ # Unspecified.
1979
+ TRANSACTION_KILL_TYPE_UNSPECIFIED = 0
1980
+
1981
+ # Only read-only transactions are eligible for termination.
1982
+ READ_ONLY_TRANSACTIONS = 1
1983
+
1984
+ # All transactions are eligible for termination, including those with write
1985
+ # operations (such as INSERT, UPDATE, DELETE, or DDL).
1986
+ ALL_TRANSACTIONS = 2
1987
+ end
1894
1988
  end
1895
1989
 
1896
1990
  # Connection pool flags for Cloud SQL instances managed connection pool
@@ -2405,6 +2499,9 @@ module Google
2405
2499
  # The database version is PostgreSQL 19.
2406
2500
  POSTGRES_19 = 684
2407
2501
 
2502
+ # The database version is PostgreSQL 20.
2503
+ POSTGRES_20 = 781
2504
+
2408
2505
  # The database version is SQL Server 2019 Standard.
2409
2506
  SQLSERVER_2019_STANDARD = 26
2410
2507
 
@@ -2516,6 +2613,21 @@ module Google
2516
2613
  # after the notification is sent out.
2517
2614
  3
2518
2615
  end
2616
+
2617
+ # The status of automated DNS provisioning.
2618
+ module AutoDnsStatus
2619
+ # Unspecified status. This means status is missing from dependency service.
2620
+ AUTO_DNS_STATUS_UNSPECIFIED = 0
2621
+
2622
+ # DNS provisioning is OK.
2623
+ AUTO_DNS_OK = 1
2624
+
2625
+ # DNS provisioning failed.
2626
+ AUTO_DNS_FAILED = 2
2627
+
2628
+ # DNS provisioning status is not recognized by Cloud SQL.
2629
+ AUTO_DNS_UNKNOWN = 3
2630
+ end
2519
2631
  end
2520
2632
  end
2521
2633
  end
@@ -33,6 +33,9 @@ module Google
33
33
  # @!attribute [rw] project
34
34
  # @return [::String]
35
35
  # Project ID of the project that contains the instance.
36
+ # @!attribute [rw] location
37
+ # @return [::String]
38
+ # Optional. Region of the Cloud SQL instance.
36
39
  class SqlUsersDeleteRequest
37
40
  include ::Google::Protobuf::MessageExts
38
41
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -51,6 +54,9 @@ module Google
51
54
  # @!attribute [rw] host
52
55
  # @return [::String]
53
56
  # Host of a user of the instance.
57
+ # @!attribute [rw] location
58
+ # @return [::String]
59
+ # Optional. Region of the Cloud SQL instance.
54
60
  class SqlUsersGetRequest
55
61
  include ::Google::Protobuf::MessageExts
56
62
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -64,6 +70,9 @@ module Google
64
70
  # Project ID of the project that contains the instance.
65
71
  # @!attribute [rw] body
66
72
  # @return [::Google::Cloud::Sql::V1::User]
73
+ # @!attribute [rw] location
74
+ # @return [::String]
75
+ # Optional. Region of the Cloud SQL instance.
67
76
  class SqlUsersInsertRequest
68
77
  include ::Google::Protobuf::MessageExts
69
78
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -75,6 +84,9 @@ module Google
75
84
  # @!attribute [rw] project
76
85
  # @return [::String]
77
86
  # Project ID of the project that contains the instance.
87
+ # @!attribute [rw] location
88
+ # @return [::String]
89
+ # Optional. Region of the Cloud SQL instance.
78
90
  class SqlUsersListRequest
79
91
  include ::Google::Protobuf::MessageExts
80
92
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -101,8 +113,21 @@ module Google
101
113
  # Optional. Specifies whether to revoke existing roles that are not present
102
114
  # in the `database_roles` field. If `false` or unset, the database roles
103
115
  # specified in `database_roles` are added to the user's existing roles.
116
+ # @!attribute [rw] server_roles
117
+ # @return [::Array<::String>]
118
+ # Optional. The server roles to grant to the SQL Server login. Existing
119
+ # server roles will not be revoked if revoke_existing_roles is false.
120
+ # body.server_roles will be ignored for update request.
121
+ # @!attribute [rw] revoke_existing_server_roles
122
+ # @return [::Boolean]
123
+ # Optional. Specifies whether to revoke existing roles that are not present
124
+ # in the `server_roles` field. If `false` or unset, the server roles
125
+ # specified in `server_roles` are added to the user's existing server roles.
104
126
  # @!attribute [rw] body
105
127
  # @return [::Google::Cloud::Sql::V1::User]
128
+ # @!attribute [rw] location
129
+ # @return [::String]
130
+ # Optional. Region of the Cloud SQL instance.
106
131
  class SqlUsersUpdateRequest
107
132
  include ::Google::Protobuf::MessageExts
108
133
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -196,6 +221,9 @@ module Google
196
221
  # @!attribute [rw] database_roles
197
222
  # @return [::Array<::String>]
198
223
  # Optional. Role memberships of the user
224
+ # @!attribute [rw] server_roles
225
+ # @return [::Array<::String>]
226
+ # Optional. The server roles for the SQL Server login.
199
227
  class User
200
228
  include ::Google::Protobuf::MessageExts
201
229
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -221,6 +249,10 @@ module Google
221
249
  # Cloud IAM group.
222
250
  CLOUD_IAM_GROUP_SERVICE_ACCOUNT = 5
223
251
 
252
+ # Cloud IAM workforce identity user managed via workforce identity
253
+ # federation.
254
+ CLOUD_IAM_WORKFORCE_IDENTITY = 6
255
+
224
256
  # Microsoft Entra ID user.
225
257
  ENTRAID_USER = 7
226
258
  end
@@ -110,14 +110,15 @@ module Google
110
110
  # ) to obtain a formatter capable of generating timestamps in this format.
111
111
  # @!attribute [rw] seconds
112
112
  # @return [::Integer]
113
- # Represents seconds of UTC time since Unix epoch
114
- # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
115
- # 9999-12-31T23:59:59Z inclusive.
113
+ # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
114
+ # be between -315576000000 and 315576000000 inclusive (which corresponds to
115
+ # 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
116
116
  # @!attribute [rw] nanos
117
117
  # @return [::Integer]
118
- # Non-negative fractions of a second at nanosecond resolution. Negative
119
- # second values with fractions must still have non-negative nanos values
120
- # that count forward in time. Must be from 0 to 999,999,999
118
+ # Non-negative fractions of a second at nanosecond resolution. This field is
119
+ # the nanosecond portion of the duration, not an alternative to seconds.
120
+ # Negative second values with fractions must still have non-negative nanos
121
+ # values that count forward in time. Must be between 0 and 999,999,999
121
122
  # inclusive.
122
123
  class Timestamp
123
124
  include ::Google::Protobuf::MessageExts
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-sql-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -51,9 +51,9 @@ dependencies:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '1.0'
54
- description: API for Cloud SQL database instance management. Note that google-cloud-sql-v1
55
- is a version-specific client library. For most uses, we recommend installing the
56
- main client library google-cloud-sql instead. See the readme for more details.
54
+ description: Cloud SQL Admin API Note that google-cloud-sql-v1 is a version-specific
55
+ client library. For most uses, we recommend installing the main client library google-cloud-sql
56
+ instead. See the readme for more details.
57
57
  email: googleapis-packages@google.com
58
58
  executables: []
59
59
  extensions: []
@@ -168,6 +168,7 @@ files:
168
168
  - proto_docs/google/api/field_info.rb
169
169
  - proto_docs/google/api/launch_stage.rb
170
170
  - proto_docs/google/api/resource.rb
171
+ - proto_docs/google/api/routing.rb
171
172
  - proto_docs/google/cloud/sql/v1/cloud_sql_backup_runs.rb
172
173
  - proto_docs/google/cloud/sql/v1/cloud_sql_backups.rb
173
174
  - proto_docs/google/cloud/sql/v1/cloud_sql_connect.rb
@@ -207,5 +208,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
208
  requirements: []
208
209
  rubygems_version: 3.6.9
209
210
  specification_version: 4
210
- summary: API for Cloud SQL database instance management.
211
+ summary: Cloud SQL Admin API
211
212
  test_files: []