Class: Google::Apis::AlloydbV1::Instance

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/alloydb_v1/classes.rb,
lib/google/apis/alloydb_v1/representations.rb,
lib/google/apis/alloydb_v1/representations.rb

Overview

An Instance is a computing unit that an end customer can connect to. It's the main unit of computing resources in AlloyDB.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Instance

Returns a new instance of Instance.



1929
1930
1931
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1929

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#activation_policyString

Optional. Specifies whether an instance needs to spin up. Once the instance is active, the activation policy can be updated to the NEVER to stop the instance. Likewise, the activation policy can be updated to ALWAYS to start the instance. There are restrictions around when an instance can/cannot be activated (for example, a read pool instance should be stopped before stopping primary etc.). Please refer to the API documentation for more details. Corresponds to the JSON property activationPolicy

Returns:

  • (String)


1726
1727
1728
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1726

def activation_policy
  @activation_policy
end

#annotationsHash<String,String>

Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128 Corresponds to the JSON property annotations

Returns:

  • (Hash<String,String>)


1732
1733
1734
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1732

def annotations
  @annotations
end

#availability_typeString

Availability type of an Instance. If empty, defaults to REGIONAL for primary instances. For read pools, availability_type is always UNSPECIFIED. Instances in the read pools are evenly distributed across available zones within the region (i.e. read pools with more than one node will have a node in at least two zones). Corresponds to the JSON property availabilityType

Returns:

  • (String)


1741
1742
1743
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1741

def availability_type
  @availability_type
end

#client_connection_configGoogle::Apis::AlloydbV1::ClientConnectionConfig

Client connection configuration Corresponds to the JSON property clientConnectionConfig



1746
1747
1748
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1746

def client_connection_config
  @client_connection_config
end

#connection_pool_configGoogle::Apis::AlloydbV1::ConnectionPoolConfig

Configuration for Managed Connection Pool (MCP). Corresponds to the JSON property connectionPoolConfig



1751
1752
1753
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1751

def connection_pool_config
  @connection_pool_config
end

#create_timeString

Output only. Create time stamp Corresponds to the JSON property createTime

Returns:

  • (String)


1756
1757
1758
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1756

def create_time
  @create_time
end

#data_api_accessString

Optional. Controls whether the Data API is enabled for this instance. When enabled, this allows authorized users to connect to the instance from the public internet using the executeSql API, even for private IP instances. If this is not specified, the data API is enabled by default for Google internal services like AlloyDB Studio. Disable it explicitly to disallow Google internal services as well. Corresponds to the JSON property dataApiAccess

Returns:

  • (String)


1766
1767
1768
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1766

def data_api_access
  @data_api_access
end

#database_flagsHash<String,String>

Database flags. Set at the instance level. They are copied from the primary instance on secondary instance creation. Flags that have restrictions default to the value at primary instance on read instances during creation. Read instances can set new flags or override existing flags that are relevant for reads, for example, for enabling columnar cache on a read instance. Flags set on read instance might or might not be present on the primary instance. This is a list of "key": "value" pairs. "key": The name of the flag. These flags are passed at instance setup time, so include both server options and system variables for Postgres. Flags are specified with underscores, not hyphens. " value": The value of the flag. Booleans are set to on for true and off for false. This field must be omitted if the flag doesn't take a value. Corresponds to the JSON property databaseFlags

Returns:

  • (Hash<String,String>)


1781
1782
1783
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1781

def database_flags
  @database_flags
end

#delete_timeString

Output only. Delete time stamp Corresponds to the JSON property deleteTime

Returns:

  • (String)


1786
1787
1788
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1786

def delete_time
  @delete_time
end

#display_nameString

User-settable and human-readable display name for the Instance. Corresponds to the JSON property displayName

Returns:

  • (String)


1791
1792
1793
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1791

def display_name
  @display_name
end

#etagString

For Resource freshness validation (https://google.aip.dev/154) Corresponds to the JSON property etag

Returns:

  • (String)


1796
1797
1798
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1796

def etag
  @etag
end

#gce_zoneString

The Compute Engine zone that the instance should serve from, per https://cloud. google.com/compute/docs/regions-zones This can ONLY be specified for ZONAL instances. If present for a REGIONAL instance, an error will be thrown. If this is absent for a ZONAL instance, instance is created in a random zone with available capacity. Corresponds to the JSON property gceZone

Returns:

  • (String)


1805
1806
1807
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1805

def gce_zone
  @gce_zone
end

#instance_typeString

Required. The type of the instance. Specified at creation time. Corresponds to the JSON property instanceType

Returns:

  • (String)


1810
1811
1812
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1810

def instance_type
  @instance_type
end

#ip_addressString

Output only. The IP address for the Instance. This is the connection endpoint for an end-user application. Corresponds to the JSON property ipAddress

Returns:

  • (String)


1816
1817
1818
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1816

def ip_address
  @ip_address
end

#labelsHash<String,String>

Labels as key value pairs Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


1821
1822
1823
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1821

def labels
  @labels
end

#machine_configGoogle::Apis::AlloydbV1::MachineConfig

MachineConfig describes the configuration of a machine. Corresponds to the JSON property machineConfig



1826
1827
1828
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1826

def machine_config
  @machine_config
end

#maintenance_version_nameString

Output only. Maintenance version of the instance, for example: POSTGRES_15. 2025_07_15.04_00. Output only. Update this field via the parent cluster's maintenance_version field(s). Corresponds to the JSON property maintenanceVersionName

Returns:

  • (String)


1833
1834
1835
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1833

def maintenance_version_name
  @maintenance_version_name
end

#nameString

Output only. The name of the instance resource with the format: * projects/ project/locations/region/clusters/cluster_id/instances/instance_id where the cluster and instance ID segments should satisfy the regex expression [a-z]([a-z0-9-]0,61[a-z0-9])?, e.g. 1-63 characters of lowercase letters, numbers, and dashes, starting with a letter, and ending with a letter or number. For more details see https://google.aip.dev/122. The prefix of the instance resource name is the name of the parent resource: * projects/project /locations/region/clusters/cluster_id Corresponds to the JSON property name

Returns:

  • (String)


1845
1846
1847
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1845

def name
  @name
end

#network_configGoogle::Apis::AlloydbV1::InstanceNetworkConfig

Metadata related to instance-level network configuration. Corresponds to the JSON property networkConfig



1850
1851
1852
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1850

def network_config
  @network_config
end

#nodesArray<Google::Apis::AlloydbV1::Node>

Output only. List of available read-only VMs in this instance, including the standby for a PRIMARY instance. Corresponds to the JSON property nodes

Returns:



1856
1857
1858
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1856

def nodes
  @nodes
end

#observability_configGoogle::Apis::AlloydbV1::ObservabilityInstanceConfig

Observability Instance specific configuration. Corresponds to the JSON property observabilityConfig



1861
1862
1863
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1861

def observability_config
  @observability_config
end

#outbound_public_ip_addressesArray<String>

Output only. All outbound public IP addresses configured for the instance. Corresponds to the JSON property outboundPublicIpAddresses

Returns:

  • (Array<String>)


1866
1867
1868
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1866

def outbound_public_ip_addresses
  @outbound_public_ip_addresses
end

#psc_instance_configGoogle::Apis::AlloydbV1::PscInstanceConfig

PscInstanceConfig contains PSC related configuration at an instance level. Corresponds to the JSON property pscInstanceConfig



1871
1872
1873
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1871

def psc_instance_config
  @psc_instance_config
end

#public_ip_addressString

Output only. The public IP addresses for the Instance. This is available ONLY when enable_public_ip is set. This is the connection endpoint for an end-user application. Corresponds to the JSON property publicIpAddress

Returns:

  • (String)


1878
1879
1880
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1878

def public_ip_address
  @public_ip_address
end

#query_insights_configGoogle::Apis::AlloydbV1::QueryInsightsInstanceConfig

QueryInsights Instance specific configuration. Corresponds to the JSON property queryInsightsConfig



1883
1884
1885
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1883

def query_insights_config
  @query_insights_config
end

#read_pool_configGoogle::Apis::AlloydbV1::ReadPoolConfig

Configuration for a read pool instance. Corresponds to the JSON property readPoolConfig



1888
1889
1890
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1888

def read_pool_config
  @read_pool_config
end

#reconcilingBoolean Also known as: reconciling?

Output only. Reconciling (https://google.aip.dev/128#reconciliation). Set to true if the current state of Instance does not match the user's intended state, and the service is actively updating the resource to reconcile them. This can happen due to user-triggered updates or system actions like failover or maintenance. Corresponds to the JSON property reconciling

Returns:

  • (Boolean)


1897
1898
1899
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1897

def reconciling
  @reconciling
end

#satisfies_pzsBoolean Also known as: satisfies_pzs?

Output only. Reserved for future use. Corresponds to the JSON property satisfiesPzs

Returns:

  • (Boolean)


1903
1904
1905
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1903

def satisfies_pzs
  @satisfies_pzs
end

#stateString

Output only. The current serving state of the instance. Corresponds to the JSON property state

Returns:

  • (String)


1909
1910
1911
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1909

def state
  @state
end

#uidString

Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted. Corresponds to the JSON property uid

Returns:

  • (String)


1915
1916
1917
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1915

def uid
  @uid
end

#update_timeString

Output only. Update time stamp Corresponds to the JSON property updateTime

Returns:

  • (String)


1920
1921
1922
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1920

def update_time
  @update_time
end

#writable_nodeGoogle::Apis::AlloydbV1::Node

Details of a single node in the instance. Nodes in an AlloyDB instance are ephemeral, they can change during update, failover, autohealing and resize operations. Corresponds to the JSON property writableNode



1927
1928
1929
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1927

def writable_node
  @writable_node
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
# File 'lib/google/apis/alloydb_v1/classes.rb', line 1934

def update!(**args)
  @activation_policy = args[:activation_policy] if args.key?(:activation_policy)
  @annotations = args[:annotations] if args.key?(:annotations)
  @availability_type = args[:availability_type] if args.key?(:availability_type)
  @client_connection_config = args[:client_connection_config] if args.key?(:client_connection_config)
  @connection_pool_config = args[:connection_pool_config] if args.key?(:connection_pool_config)
  @create_time = args[:create_time] if args.key?(:create_time)
  @data_api_access = args[:data_api_access] if args.key?(:data_api_access)
  @database_flags = args[:database_flags] if args.key?(:database_flags)
  @delete_time = args[:delete_time] if args.key?(:delete_time)
  @display_name = args[:display_name] if args.key?(:display_name)
  @etag = args[:etag] if args.key?(:etag)
  @gce_zone = args[:gce_zone] if args.key?(:gce_zone)
  @instance_type = args[:instance_type] if args.key?(:instance_type)
  @ip_address = args[:ip_address] if args.key?(:ip_address)
  @labels = args[:labels] if args.key?(:labels)
  @machine_config = args[:machine_config] if args.key?(:machine_config)
  @maintenance_version_name = args[:maintenance_version_name] if args.key?(:maintenance_version_name)
  @name = args[:name] if args.key?(:name)
  @network_config = args[:network_config] if args.key?(:network_config)
  @nodes = args[:nodes] if args.key?(:nodes)
  @observability_config = args[:observability_config] if args.key?(:observability_config)
  @outbound_public_ip_addresses = args[:outbound_public_ip_addresses] if args.key?(:outbound_public_ip_addresses)
  @psc_instance_config = args[:psc_instance_config] if args.key?(:psc_instance_config)
  @public_ip_address = args[:public_ip_address] if args.key?(:public_ip_address)
  @query_insights_config = args[:query_insights_config] if args.key?(:query_insights_config)
  @read_pool_config = args[:read_pool_config] if args.key?(:read_pool_config)
  @reconciling = args[:reconciling] if args.key?(:reconciling)
  @satisfies_pzs = args[:satisfies_pzs] if args.key?(:satisfies_pzs)
  @state = args[:state] if args.key?(:state)
  @uid = args[:uid] if args.key?(:uid)
  @update_time = args[:update_time] if args.key?(:update_time)
  @writable_node = args[:writable_node] if args.key?(:writable_node)
end