A primary instance can provide information about all the secondary
instances replicating from it. However, a secondary instance only knows
about the primary instance from which it is replicating. However, for
scenarios, where the primary instance is unavailable(e.g. regional outage),
a Getinstance request can be sent to any other member instance and this
field will list all the member instances participating in cross instance
replication.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Memorystore V1 API - Class Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig (v1.2.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.2.0 (latest)](/ruby/docs/reference/google-cloud-memorystore-v1/latest/Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig)\n- [1.1.1](/ruby/docs/reference/google-cloud-memorystore-v1/1.1.1/Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig)\n- [1.0.0](/ruby/docs/reference/google-cloud-memorystore-v1/1.0.0/Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig)\n- [0.3.0](/ruby/docs/reference/google-cloud-memorystore-v1/0.3.0/Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig)\n- [0.2.0](/ruby/docs/reference/google-cloud-memorystore-v1/0.2.0/Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig)\n- [0.1.0](/ruby/docs/reference/google-cloud-memorystore-v1/0.1.0/Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig) \nReference documentation and code samples for the Memorystore V1 API class Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig.\n\nCross instance replication config. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #instance_role\n\n def instance_role() -\u003e ::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::InstanceRole\n\n**Returns**\n\n- ([::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::InstanceRole](./Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig-InstanceRole)) --- Required. The role of the instance in cross instance replication.\n\n### #instance_role=\n\n def instance_role=(value) -\u003e ::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::InstanceRole\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::InstanceRole](./Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig-InstanceRole)) --- Required. The role of the instance in cross instance replication. \n**Returns**\n\n- ([::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::InstanceRole](./Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig-InstanceRole)) --- Required. The role of the instance in cross instance replication.\n\n### #membership\n\n def membership() -\u003e ::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::Membership\n\n**Returns**\n\n- ([::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::Membership](./Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig-Membership)) --- Output only. An output only view of all the member instances participating in the cross instance replication. This view will be provided by every member instance irrespective of its instance role(primary or secondary).\n\n\n A primary instance can provide information about all the secondary\n instances replicating from it. However, a secondary instance only knows\n about the primary instance from which it is replicating. However, for\n scenarios, where the primary instance is unavailable(e.g. regional outage),\n a Getinstance request can be sent to any other member instance and this\n field will list all the member instances participating in cross instance\n replication.\n\n### #primary_instance\n\n def primary_instance() -\u003e ::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance\n\n**Returns**\n\n- ([::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance](./Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig-RemoteInstance)) --- Optional. Details of the primary instance that is used as the replication source for this secondary instance.\n\n\n This field is only set for a secondary instance.\n\n### #primary_instance=\n\n def primary_instance=(value) -\u003e ::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance](./Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig-RemoteInstance)) --- Optional. Details of the primary instance that is used as the replication source for this secondary instance.\n\n\nThis field is only set for a secondary instance. \n**Returns**\n\n- ([::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance](./Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig-RemoteInstance)) --- Optional. Details of the primary instance that is used as the replication source for this secondary instance.\n\n\n This field is only set for a secondary instance.\n\n### #secondary_instances\n\n def secondary_instances() -\u003e ::Array\u003c::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance\u003e\n\n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance](./Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig-RemoteInstance)\\\u003e) --- Optional. List of secondary instances that are replicating from this primary instance.\n\n\n This field is only set for a primary instance.\n\n### #secondary_instances=\n\n def secondary_instances=(value) -\u003e ::Array\u003c::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c[::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance](./Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig-RemoteInstance)\\\u003e) --- Optional. List of secondary instances that are replicating from this primary instance.\n\n\nThis field is only set for a primary instance. \n**Returns**\n\n- (::Array\\\u003c[::Google::Cloud::Memorystore::V1::CrossInstanceReplicationConfig::RemoteInstance](./Google-Cloud-Memorystore-V1-CrossInstanceReplicationConfig-RemoteInstance)\\\u003e) --- Optional. List of secondary instances that are replicating from this primary instance.\n\n\n This field is only set for a primary instance.\n\n### #update_time\n\n def update_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Output only. The last time cross instance replication config was updated."]]