@@ -806,6 +806,107 @@ def update!(**args)
806806 end
807807 end
808808
809+ # Configuration for Managed Connection Pool (MCP).
810+ class ConnectionPoolConfig
811+ include Google ::Apis ::Core ::Hashable
812+
813+ # Optional. Deprecated. Use 'flags' instead. The default pool size. Defaults to
814+ # 20.
815+ # Corresponds to the JSON property `defaultPoolSize`
816+ # @return [String]
817+ attr_accessor :default_pool_size
818+
819+ # Optional. Deprecated; Prefer 'enabled' as this will be removed soon. TODO(b/
820+ # 394996708) move to reserved once the field is removed from the gcloud client.
821+ # Corresponds to the JSON property `enable`
822+ # @return [Boolean]
823+ attr_accessor :enable
824+ alias_method :enable? , :enable
825+
826+ # Optional. Whether to enable Managed Connection Pool (MCP).
827+ # Corresponds to the JSON property `enabled`
828+ # @return [Boolean]
829+ attr_accessor :enabled
830+ alias_method :enabled? , :enabled
831+
832+ # Optional. Connection Pool flags, as a list of "key": "value" pairs.
833+ # Corresponds to the JSON property `flags`
834+ # @return [Hash<String,String>]
835+ attr_accessor :flags
836+
837+ # Optional. Deprecated. Use 'flags' instead. The list of startup parameters to
838+ # ignore. Defaults to ["extra_float_digits"]
839+ # Corresponds to the JSON property `ignoreStartupParameters`
840+ # @return [Array<String>]
841+ attr_accessor :ignore_startup_parameters
842+
843+ # Optional. Deprecated. Use 'flags' instead. The maximum number of client
844+ # connections allowed.
845+ # Corresponds to the JSON property `maxClientConn`
846+ # @return [String]
847+ attr_accessor :max_client_conn
848+
849+ # Optional. Deprecated. Use 'flags' instead. The maximum number of prepared
850+ # statements allowed. MCP makes sure that any statement prepared by a client, up
851+ # to this limit, is available on the backing server connection in transaction
852+ # and statement pooling mode. Even if the statement was originally prepared on
853+ # another server connection. Defaults to 0.
854+ # Corresponds to the JSON property `maxPreparedStatements`
855+ # @return [String]
856+ attr_accessor :max_prepared_statements
857+
858+ # Optional. Deprecated. Use 'flags' instead. The minimum pool size. Defaults to
859+ # 0.
860+ # Corresponds to the JSON property `minPoolSize`
861+ # @return [String]
862+ attr_accessor :min_pool_size
863+
864+ # Optional. Deprecated. Use 'flags' instead. The pool mode. Defaults to `
865+ # POOL_MODE_TRANSACTION`.
866+ # Corresponds to the JSON property `poolMode`
867+ # @return [String]
868+ attr_accessor :pool_mode
869+
870+ # Optional. Deprecated. Use 'flags' instead. The maximum number of seconds
871+ # queries are allowed to spend waiting for execution. If the query is not
872+ # assigned to a server during that time, the client is disconnected. 0 disables.
873+ # Corresponds to the JSON property `queryWaitTimeout`
874+ # @return [String]
875+ attr_accessor :query_wait_timeout
876+
877+ # Optional. Deprecated. Use 'flags' instead. The maximum number of seconds a
878+ # server is allowed to be idle before it is disconnected. 0 disables.
879+ # Corresponds to the JSON property `serverIdleTimeout`
880+ # @return [String]
881+ attr_accessor :server_idle_timeout
882+
883+ # Optional. Deprecated. Use 'flags' instead. The list of users that are allowed
884+ # to connect to the MCP stats console. The users must exist in the database.
885+ # Corresponds to the JSON property `statsUsers`
886+ # @return [Array<String>]
887+ attr_accessor :stats_users
888+
889+ def initialize ( **args )
890+ update! ( **args )
891+ end
892+
893+ # Update properties of this object
894+ def update! ( **args )
895+ @default_pool_size = args [ :default_pool_size ] if args . key? ( :default_pool_size )
896+ @enable = args [ :enable ] if args . key? ( :enable )
897+ @enabled = args [ :enabled ] if args . key? ( :enabled )
898+ @flags = args [ :flags ] if args . key? ( :flags )
899+ @ignore_startup_parameters = args [ :ignore_startup_parameters ] if args . key? ( :ignore_startup_parameters )
900+ @max_client_conn = args [ :max_client_conn ] if args . key? ( :max_client_conn )
901+ @max_prepared_statements = args [ :max_prepared_statements ] if args . key? ( :max_prepared_statements )
902+ @min_pool_size = args [ :min_pool_size ] if args . key? ( :min_pool_size )
903+ @pool_mode = args [ :pool_mode ] if args . key? ( :pool_mode )
904+ @query_wait_timeout = args [ :query_wait_timeout ] if args . key? ( :query_wait_timeout )
905+ @server_idle_timeout = args [ :server_idle_timeout ] if args . key? ( :server_idle_timeout )
906+ @stats_users = args [ :stats_users ] if args . key? ( :stats_users )
907+ end
908+ end
909+
809910 # ContinuousBackupConfig describes the continuous backups recovery
810911 # configurations of a cluster.
811912 class ContinuousBackupConfig
@@ -1554,6 +1655,11 @@ class Instance
15541655 # @return [Google::Apis::AlloydbV1alpha::ClientConnectionConfig]
15551656 attr_accessor :client_connection_config
15561657
1658+ # Configuration for Managed Connection Pool (MCP).
1659+ # Corresponds to the JSON property `connectionPoolConfig`
1660+ # @return [Google::Apis::AlloydbV1alpha::ConnectionPoolConfig]
1661+ attr_accessor :connection_pool_config
1662+
15571663 # Output only. Create time stamp
15581664 # Corresponds to the JSON property `createTime`
15591665 # @return [String]
@@ -1745,6 +1851,7 @@ def update!(**args)
17451851 @annotations = args [ :annotations ] if args . key? ( :annotations )
17461852 @availability_type = args [ :availability_type ] if args . key? ( :availability_type )
17471853 @client_connection_config = args [ :client_connection_config ] if args . key? ( :client_connection_config )
1854+ @connection_pool_config = args [ :connection_pool_config ] if args . key? ( :connection_pool_config )
17481855 @create_time = args [ :create_time ] if args . key? ( :create_time )
17491856 @database_flags = args [ :database_flags ] if args . key? ( :database_flags )
17501857 @delete_time = args [ :delete_time ] if args . key? ( :delete_time )
0 commit comments