Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Mysql.getReplica
Explore with Pulumi AI
This data source provides details about a specific Replica resource in Oracle Cloud Infrastructure MySQL Database service.
Gets the full details of the specified read replica.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testReplica = oci.Mysql.getReplica({
    replicaId: testReplicaOciMysqlReplica.id,
});
import pulumi
import pulumi_oci as oci
test_replica = oci.Mysql.get_replica(replica_id=test_replica_oci_mysql_replica["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/mysql"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := mysql.GetReplica(ctx, &mysql.GetReplicaArgs{
			ReplicaId: testReplicaOciMysqlReplica.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testReplica = Oci.Mysql.GetReplica.Invoke(new()
    {
        ReplicaId = testReplicaOciMysqlReplica.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Mysql.MysqlFunctions;
import com.pulumi.oci.Mysql.inputs.GetReplicaArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var testReplica = MysqlFunctions.getReplica(GetReplicaArgs.builder()
            .replicaId(testReplicaOciMysqlReplica.id())
            .build());
    }
}
variables:
  testReplica:
    fn::invoke:
      function: oci:Mysql:getReplica
      arguments:
        replicaId: ${testReplicaOciMysqlReplica.id}
Using getReplica
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getReplica(args: GetReplicaArgs, opts?: InvokeOptions): Promise<GetReplicaResult>
function getReplicaOutput(args: GetReplicaOutputArgs, opts?: InvokeOptions): Output<GetReplicaResult>def get_replica(replica_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetReplicaResult
def get_replica_output(replica_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetReplicaResult]func LookupReplica(ctx *Context, args *LookupReplicaArgs, opts ...InvokeOption) (*LookupReplicaResult, error)
func LookupReplicaOutput(ctx *Context, args *LookupReplicaOutputArgs, opts ...InvokeOption) LookupReplicaResultOutput> Note: This function is named LookupReplica in the Go SDK.
public static class GetReplica 
{
    public static Task<GetReplicaResult> InvokeAsync(GetReplicaArgs args, InvokeOptions? opts = null)
    public static Output<GetReplicaResult> Invoke(GetReplicaInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetReplicaResult> getReplica(GetReplicaArgs args, InvokeOptions options)
public static Output<GetReplicaResult> getReplica(GetReplicaArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Mysql/getReplica:getReplica
  arguments:
    # arguments dictionaryThe following arguments are supported:
- replica_id str
- The Replica OCID.
getReplica Result
The following output properties are available:
- AvailabilityDomain string
- The name of the Availability Domain the read replica is located in.
- CompartmentId string
- The OCID of the compartment that contains the read replica.
- ConfigurationId string
- The OCID of the Configuration to be used by the read replica.
- DbSystem stringId 
- The OCID of the DB System the read replica is associated with.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- Description string
- User provided description of the read replica.
- DisplayName string
- The user-friendly name for the read replica. It does not have to be unique.
- FaultDomain string
- The name of the Fault Domain the read replica is located in.
- Dictionary<string, string>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- Id string
- The OCID of the read replica.
- IpAddress string
- The IP address the read replica is configured to listen on.
- IsDelete boolProtected 
- Specifies whether the read replica can be deleted. Set to true to prevent deletion, false (default) to allow. Note that if a read replica is delete protected it also prevents the entire DB System from being deleted. If the DB System is delete protected, read replicas can still be deleted individually if they are not delete protected themselves.
- LifecycleDetails string
- A message describing the state of the read replica.
- MysqlVersion string
- The MySQL version to be used by the read replica.
- Port int
- The port the read replica is configured to listen on.
- PortX int
- The TCP network port on which X Plugin listens for connections. This is the X Plugin equivalent of port.
- ReplicaId string
- ReplicaOverrides List<GetReplica Replica Override> 
- By default a read replica inherits the MySQL version, shape, and configuration of the source DB system. If you want to override any of these, provide values in the properties, mysqlVersion, shapeName, and configurationId. If you set a property value to "", then the value is inherited from its source DB system.
- SecureConnections List<GetReplica Secure Connection> 
- Secure connection configuration details.
- ShapeName string
- The shape currently in use by the read replica. The shape determines the resources allocated: CPU cores and memory for VM shapes, CPU cores, memory and storage for non-VM (bare metal) shapes. To get a list of shapes, use the ListShapes operation.
- State string
- The state of the read replica.
- TimeCreated string
- The date and time the read replica was created, as described by RFC 3339.
- TimeUpdated string
- The time the read replica was last updated, as described by RFC 3339.
- AvailabilityDomain string
- The name of the Availability Domain the read replica is located in.
- CompartmentId string
- The OCID of the compartment that contains the read replica.
- ConfigurationId string
- The OCID of the Configuration to be used by the read replica.
- DbSystem stringId 
- The OCID of the DB System the read replica is associated with.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- Description string
- User provided description of the read replica.
- DisplayName string
- The user-friendly name for the read replica. It does not have to be unique.
- FaultDomain string
- The name of the Fault Domain the read replica is located in.
- map[string]string
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- Id string
- The OCID of the read replica.
- IpAddress string
- The IP address the read replica is configured to listen on.
- IsDelete boolProtected 
- Specifies whether the read replica can be deleted. Set to true to prevent deletion, false (default) to allow. Note that if a read replica is delete protected it also prevents the entire DB System from being deleted. If the DB System is delete protected, read replicas can still be deleted individually if they are not delete protected themselves.
- LifecycleDetails string
- A message describing the state of the read replica.
- MysqlVersion string
- The MySQL version to be used by the read replica.
- Port int
- The port the read replica is configured to listen on.
- PortX int
- The TCP network port on which X Plugin listens for connections. This is the X Plugin equivalent of port.
- ReplicaId string
- ReplicaOverrides []GetReplica Replica Override 
- By default a read replica inherits the MySQL version, shape, and configuration of the source DB system. If you want to override any of these, provide values in the properties, mysqlVersion, shapeName, and configurationId. If you set a property value to "", then the value is inherited from its source DB system.
- SecureConnections []GetReplica Secure Connection 
- Secure connection configuration details.
- ShapeName string
- The shape currently in use by the read replica. The shape determines the resources allocated: CPU cores and memory for VM shapes, CPU cores, memory and storage for non-VM (bare metal) shapes. To get a list of shapes, use the ListShapes operation.
- State string
- The state of the read replica.
- TimeCreated string
- The date and time the read replica was created, as described by RFC 3339.
- TimeUpdated string
- The time the read replica was last updated, as described by RFC 3339.
- availabilityDomain String
- The name of the Availability Domain the read replica is located in.
- compartmentId String
- The OCID of the compartment that contains the read replica.
- configurationId String
- The OCID of the Configuration to be used by the read replica.
- dbSystem StringId 
- The OCID of the DB System the read replica is associated with.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- description String
- User provided description of the read replica.
- displayName String
- The user-friendly name for the read replica. It does not have to be unique.
- faultDomain String
- The name of the Fault Domain the read replica is located in.
- Map<String,String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id String
- The OCID of the read replica.
- ipAddress String
- The IP address the read replica is configured to listen on.
- isDelete BooleanProtected 
- Specifies whether the read replica can be deleted. Set to true to prevent deletion, false (default) to allow. Note that if a read replica is delete protected it also prevents the entire DB System from being deleted. If the DB System is delete protected, read replicas can still be deleted individually if they are not delete protected themselves.
- lifecycleDetails String
- A message describing the state of the read replica.
- mysqlVersion String
- The MySQL version to be used by the read replica.
- port Integer
- The port the read replica is configured to listen on.
- portX Integer
- The TCP network port on which X Plugin listens for connections. This is the X Plugin equivalent of port.
- replicaId String
- replicaOverrides List<GetReplica Replica Override> 
- By default a read replica inherits the MySQL version, shape, and configuration of the source DB system. If you want to override any of these, provide values in the properties, mysqlVersion, shapeName, and configurationId. If you set a property value to "", then the value is inherited from its source DB system.
- secureConnections List<GetReplica Secure Connection> 
- Secure connection configuration details.
- shapeName String
- The shape currently in use by the read replica. The shape determines the resources allocated: CPU cores and memory for VM shapes, CPU cores, memory and storage for non-VM (bare metal) shapes. To get a list of shapes, use the ListShapes operation.
- state String
- The state of the read replica.
- timeCreated String
- The date and time the read replica was created, as described by RFC 3339.
- timeUpdated String
- The time the read replica was last updated, as described by RFC 3339.
- availabilityDomain string
- The name of the Availability Domain the read replica is located in.
- compartmentId string
- The OCID of the compartment that contains the read replica.
- configurationId string
- The OCID of the Configuration to be used by the read replica.
- dbSystem stringId 
- The OCID of the DB System the read replica is associated with.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- description string
- User provided description of the read replica.
- displayName string
- The user-friendly name for the read replica. It does not have to be unique.
- faultDomain string
- The name of the Fault Domain the read replica is located in.
- {[key: string]: string}
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id string
- The OCID of the read replica.
- ipAddress string
- The IP address the read replica is configured to listen on.
- isDelete booleanProtected 
- Specifies whether the read replica can be deleted. Set to true to prevent deletion, false (default) to allow. Note that if a read replica is delete protected it also prevents the entire DB System from being deleted. If the DB System is delete protected, read replicas can still be deleted individually if they are not delete protected themselves.
- lifecycleDetails string
- A message describing the state of the read replica.
- mysqlVersion string
- The MySQL version to be used by the read replica.
- port number
- The port the read replica is configured to listen on.
- portX number
- The TCP network port on which X Plugin listens for connections. This is the X Plugin equivalent of port.
- replicaId string
- replicaOverrides GetReplica Replica Override[] 
- By default a read replica inherits the MySQL version, shape, and configuration of the source DB system. If you want to override any of these, provide values in the properties, mysqlVersion, shapeName, and configurationId. If you set a property value to "", then the value is inherited from its source DB system.
- secureConnections GetReplica Secure Connection[] 
- Secure connection configuration details.
- shapeName string
- The shape currently in use by the read replica. The shape determines the resources allocated: CPU cores and memory for VM shapes, CPU cores, memory and storage for non-VM (bare metal) shapes. To get a list of shapes, use the ListShapes operation.
- state string
- The state of the read replica.
- timeCreated string
- The date and time the read replica was created, as described by RFC 3339.
- timeUpdated string
- The time the read replica was last updated, as described by RFC 3339.
- availability_domain str
- The name of the Availability Domain the read replica is located in.
- compartment_id str
- The OCID of the compartment that contains the read replica.
- configuration_id str
- The OCID of the Configuration to be used by the read replica.
- db_system_ strid 
- The OCID of the DB System the read replica is associated with.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- description str
- User provided description of the read replica.
- display_name str
- The user-friendly name for the read replica. It does not have to be unique.
- fault_domain str
- The name of the Fault Domain the read replica is located in.
- Mapping[str, str]
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id str
- The OCID of the read replica.
- ip_address str
- The IP address the read replica is configured to listen on.
- is_delete_ boolprotected 
- Specifies whether the read replica can be deleted. Set to true to prevent deletion, false (default) to allow. Note that if a read replica is delete protected it also prevents the entire DB System from being deleted. If the DB System is delete protected, read replicas can still be deleted individually if they are not delete protected themselves.
- lifecycle_details str
- A message describing the state of the read replica.
- mysql_version str
- The MySQL version to be used by the read replica.
- port int
- The port the read replica is configured to listen on.
- port_x int
- The TCP network port on which X Plugin listens for connections. This is the X Plugin equivalent of port.
- replica_id str
- replica_overrides Sequence[GetReplica Replica Override] 
- By default a read replica inherits the MySQL version, shape, and configuration of the source DB system. If you want to override any of these, provide values in the properties, mysqlVersion, shapeName, and configurationId. If you set a property value to "", then the value is inherited from its source DB system.
- secure_connections Sequence[GetReplica Secure Connection] 
- Secure connection configuration details.
- shape_name str
- The shape currently in use by the read replica. The shape determines the resources allocated: CPU cores and memory for VM shapes, CPU cores, memory and storage for non-VM (bare metal) shapes. To get a list of shapes, use the ListShapes operation.
- state str
- The state of the read replica.
- time_created str
- The date and time the read replica was created, as described by RFC 3339.
- time_updated str
- The time the read replica was last updated, as described by RFC 3339.
- availabilityDomain String
- The name of the Availability Domain the read replica is located in.
- compartmentId String
- The OCID of the compartment that contains the read replica.
- configurationId String
- The OCID of the Configuration to be used by the read replica.
- dbSystem StringId 
- The OCID of the DB System the read replica is associated with.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- description String
- User provided description of the read replica.
- displayName String
- The user-friendly name for the read replica. It does not have to be unique.
- faultDomain String
- The name of the Fault Domain the read replica is located in.
- Map<String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id String
- The OCID of the read replica.
- ipAddress String
- The IP address the read replica is configured to listen on.
- isDelete BooleanProtected 
- Specifies whether the read replica can be deleted. Set to true to prevent deletion, false (default) to allow. Note that if a read replica is delete protected it also prevents the entire DB System from being deleted. If the DB System is delete protected, read replicas can still be deleted individually if they are not delete protected themselves.
- lifecycleDetails String
- A message describing the state of the read replica.
- mysqlVersion String
- The MySQL version to be used by the read replica.
- port Number
- The port the read replica is configured to listen on.
- portX Number
- The TCP network port on which X Plugin listens for connections. This is the X Plugin equivalent of port.
- replicaId String
- replicaOverrides List<Property Map>
- By default a read replica inherits the MySQL version, shape, and configuration of the source DB system. If you want to override any of these, provide values in the properties, mysqlVersion, shapeName, and configurationId. If you set a property value to "", then the value is inherited from its source DB system.
- secureConnections List<Property Map>
- Secure connection configuration details.
- shapeName String
- The shape currently in use by the read replica. The shape determines the resources allocated: CPU cores and memory for VM shapes, CPU cores, memory and storage for non-VM (bare metal) shapes. To get a list of shapes, use the ListShapes operation.
- state String
- The state of the read replica.
- timeCreated String
- The date and time the read replica was created, as described by RFC 3339.
- timeUpdated String
- The time the read replica was last updated, as described by RFC 3339.
Supporting Types
GetReplicaReplicaOverride   
- ConfigurationId string
- The OCID of the Configuration to be used by the read replica.
- MysqlVersion string
- The MySQL version to be used by the read replica.
- ShapeName string
- The shape currently in use by the read replica. The shape determines the resources allocated: CPU cores and memory for VM shapes, CPU cores, memory and storage for non-VM (bare metal) shapes. To get a list of shapes, use the ListShapes operation.
- ConfigurationId string
- The OCID of the Configuration to be used by the read replica.
- MysqlVersion string
- The MySQL version to be used by the read replica.
- ShapeName string
- The shape currently in use by the read replica. The shape determines the resources allocated: CPU cores and memory for VM shapes, CPU cores, memory and storage for non-VM (bare metal) shapes. To get a list of shapes, use the ListShapes operation.
- configurationId String
- The OCID of the Configuration to be used by the read replica.
- mysqlVersion String
- The MySQL version to be used by the read replica.
- shapeName String
- The shape currently in use by the read replica. The shape determines the resources allocated: CPU cores and memory for VM shapes, CPU cores, memory and storage for non-VM (bare metal) shapes. To get a list of shapes, use the ListShapes operation.
- configurationId string
- The OCID of the Configuration to be used by the read replica.
- mysqlVersion string
- The MySQL version to be used by the read replica.
- shapeName string
- The shape currently in use by the read replica. The shape determines the resources allocated: CPU cores and memory for VM shapes, CPU cores, memory and storage for non-VM (bare metal) shapes. To get a list of shapes, use the ListShapes operation.
- configuration_id str
- The OCID of the Configuration to be used by the read replica.
- mysql_version str
- The MySQL version to be used by the read replica.
- shape_name str
- The shape currently in use by the read replica. The shape determines the resources allocated: CPU cores and memory for VM shapes, CPU cores, memory and storage for non-VM (bare metal) shapes. To get a list of shapes, use the ListShapes operation.
- configurationId String
- The OCID of the Configuration to be used by the read replica.
- mysqlVersion String
- The MySQL version to be used by the read replica.
- shapeName String
- The shape currently in use by the read replica. The shape determines the resources allocated: CPU cores and memory for VM shapes, CPU cores, memory and storage for non-VM (bare metal) shapes. To get a list of shapes, use the ListShapes operation.
GetReplicaSecureConnection   
- CertificateGeneration stringType 
- Select whether to use MySQL Database Service-managed certificate (SYSTEM) or your own certificate (BYOC).
- CertificateId string
- The OCID of the certificate to use.
- CertificateGeneration stringType 
- Select whether to use MySQL Database Service-managed certificate (SYSTEM) or your own certificate (BYOC).
- CertificateId string
- The OCID of the certificate to use.
- certificateGeneration StringType 
- Select whether to use MySQL Database Service-managed certificate (SYSTEM) or your own certificate (BYOC).
- certificateId String
- The OCID of the certificate to use.
- certificateGeneration stringType 
- Select whether to use MySQL Database Service-managed certificate (SYSTEM) or your own certificate (BYOC).
- certificateId string
- The OCID of the certificate to use.
- certificate_generation_ strtype 
- Select whether to use MySQL Database Service-managed certificate (SYSTEM) or your own certificate (BYOC).
- certificate_id str
- The OCID of the certificate to use.
- certificateGeneration StringType 
- Select whether to use MySQL Database Service-managed certificate (SYSTEM) or your own certificate (BYOC).
- certificateId String
- The OCID of the certificate to use.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.