oci.Mysql.Replica
Explore with Pulumi AI
This resource provides the Replica resource in Oracle Cloud Infrastructure MySQL Database service.
Creates a DB System read replica.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testReplica = new oci.mysql.Replica("test_replica", {
dbSystemId: testMysqlDbSystem.id,
definedTags: {
"foo-namespace.bar-key": "value",
},
description: replicaDescription,
displayName: replicaDisplayName,
freeformTags: {
"bar-key": "value",
},
isDeleteProtected: replicaIsDeleteProtected,
replicaOverrides: {
configurationId: testMysqlConfiguration.id,
mysqlVersion: replicaReplicaOverridesMysqlVersion,
shapeName: testShape.name,
},
});
import pulumi
import pulumi_oci as oci
test_replica = oci.mysql.Replica("test_replica",
db_system_id=test_mysql_db_system["id"],
defined_tags={
"foo-namespace.bar-key": "value",
},
description=replica_description,
display_name=replica_display_name,
freeform_tags={
"bar-key": "value",
},
is_delete_protected=replica_is_delete_protected,
replica_overrides={
"configuration_id": test_mysql_configuration["id"],
"mysql_version": replica_replica_overrides_mysql_version,
"shape_name": test_shape["name"],
})
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.NewReplica(ctx, "test_replica", &Mysql.ReplicaArgs{
DbSystemId: pulumi.Any(testMysqlDbSystem.Id),
DefinedTags: pulumi.StringMap{
"foo-namespace.bar-key": pulumi.String("value"),
},
Description: pulumi.Any(replicaDescription),
DisplayName: pulumi.Any(replicaDisplayName),
FreeformTags: pulumi.StringMap{
"bar-key": pulumi.String("value"),
},
IsDeleteProtected: pulumi.Any(replicaIsDeleteProtected),
ReplicaOverrides: &mysql.ReplicaReplicaOverridesArgs{
ConfigurationId: pulumi.Any(testMysqlConfiguration.Id),
MysqlVersion: pulumi.Any(replicaReplicaOverridesMysqlVersion),
ShapeName: pulumi.Any(testShape.Name),
},
})
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 = new Oci.Mysql.Replica("test_replica", new()
{
DbSystemId = testMysqlDbSystem.Id,
DefinedTags =
{
{ "foo-namespace.bar-key", "value" },
},
Description = replicaDescription,
DisplayName = replicaDisplayName,
FreeformTags =
{
{ "bar-key", "value" },
},
IsDeleteProtected = replicaIsDeleteProtected,
ReplicaOverrides = new Oci.Mysql.Inputs.ReplicaReplicaOverridesArgs
{
ConfigurationId = testMysqlConfiguration.Id,
MysqlVersion = replicaReplicaOverridesMysqlVersion,
ShapeName = testShape.Name,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Mysql.Replica;
import com.pulumi.oci.Mysql.ReplicaArgs;
import com.pulumi.oci.Mysql.inputs.ReplicaReplicaOverridesArgs;
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) {
var testReplica = new Replica("testReplica", ReplicaArgs.builder()
.dbSystemId(testMysqlDbSystem.id())
.definedTags(Map.of("foo-namespace.bar-key", "value"))
.description(replicaDescription)
.displayName(replicaDisplayName)
.freeformTags(Map.of("bar-key", "value"))
.isDeleteProtected(replicaIsDeleteProtected)
.replicaOverrides(ReplicaReplicaOverridesArgs.builder()
.configurationId(testMysqlConfiguration.id())
.mysqlVersion(replicaReplicaOverridesMysqlVersion)
.shapeName(testShape.name())
.build())
.build());
}
}
resources:
testReplica:
type: oci:Mysql:Replica
name: test_replica
properties:
dbSystemId: ${testMysqlDbSystem.id}
definedTags:
foo-namespace.bar-key: value
description: ${replicaDescription}
displayName: ${replicaDisplayName}
freeformTags:
bar-key: value
isDeleteProtected: ${replicaIsDeleteProtected}
replicaOverrides:
configurationId: ${testMysqlConfiguration.id}
mysqlVersion: ${replicaReplicaOverridesMysqlVersion}
shapeName: ${testShape.name}
Create Replica Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Replica(name: string, args: ReplicaArgs, opts?: CustomResourceOptions);
@overload
def Replica(resource_name: str,
args: ReplicaArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Replica(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_system_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
is_delete_protected: Optional[bool] = None,
replica_overrides: Optional[_mysql.ReplicaReplicaOverridesArgs] = None)
func NewReplica(ctx *Context, name string, args ReplicaArgs, opts ...ResourceOption) (*Replica, error)
public Replica(string name, ReplicaArgs args, CustomResourceOptions? opts = null)
public Replica(String name, ReplicaArgs args)
public Replica(String name, ReplicaArgs args, CustomResourceOptions options)
type: oci:Mysql:Replica
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ReplicaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ReplicaArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ReplicaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ReplicaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ReplicaArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var replicaResource = new Oci.Mysql.Replica("replicaResource", new()
{
DbSystemId = "string",
DefinedTags =
{
{ "string", "string" },
},
Description = "string",
DisplayName = "string",
FreeformTags =
{
{ "string", "string" },
},
IsDeleteProtected = false,
ReplicaOverrides = new Oci.Mysql.Inputs.ReplicaReplicaOverridesArgs
{
ConfigurationId = "string",
MysqlVersion = "string",
ShapeName = "string",
},
});
example, err := Mysql.NewReplica(ctx, "replicaResource", &Mysql.ReplicaArgs{
DbSystemId: pulumi.String("string"),
DefinedTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
FreeformTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
IsDeleteProtected: pulumi.Bool(false),
ReplicaOverrides: &mysql.ReplicaReplicaOverridesArgs{
ConfigurationId: pulumi.String("string"),
MysqlVersion: pulumi.String("string"),
ShapeName: pulumi.String("string"),
},
})
var replicaResource = new Replica("replicaResource", ReplicaArgs.builder()
.dbSystemId("string")
.definedTags(Map.of("string", "string"))
.description("string")
.displayName("string")
.freeformTags(Map.of("string", "string"))
.isDeleteProtected(false)
.replicaOverrides(ReplicaReplicaOverridesArgs.builder()
.configurationId("string")
.mysqlVersion("string")
.shapeName("string")
.build())
.build());
replica_resource = oci.mysql.Replica("replicaResource",
db_system_id="string",
defined_tags={
"string": "string",
},
description="string",
display_name="string",
freeform_tags={
"string": "string",
},
is_delete_protected=False,
replica_overrides={
"configuration_id": "string",
"mysql_version": "string",
"shape_name": "string",
})
const replicaResource = new oci.mysql.Replica("replicaResource", {
dbSystemId: "string",
definedTags: {
string: "string",
},
description: "string",
displayName: "string",
freeformTags: {
string: "string",
},
isDeleteProtected: false,
replicaOverrides: {
configurationId: "string",
mysqlVersion: "string",
shapeName: "string",
},
});
type: oci:Mysql:Replica
properties:
dbSystemId: string
definedTags:
string: string
description: string
displayName: string
freeformTags:
string: string
isDeleteProtected: false
replicaOverrides:
configurationId: string
mysqlVersion: string
shapeName: string
Replica Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Replica resource accepts the following input properties:
- Db
System stringId - The OCID of the DB System the read replica is associated with.
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- (Updatable) User provided description of the read replica.
- Display
Name string - (Updatable) The user-friendly name for the read replica. It does not have to be unique.
- Dictionary<string, string>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Is
Delete boolProtected - (Updatable) 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.
- Replica
Overrides ReplicaReplica Overrides - (Updatable) 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.
- Db
System stringId - The OCID of the DB System the read replica is associated with.
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- (Updatable) User provided description of the read replica.
- Display
Name string - (Updatable) The user-friendly name for the read replica. It does not have to be unique.
- map[string]string
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Is
Delete boolProtected - (Updatable) 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.
- Replica
Overrides ReplicaReplica Overrides Args - (Updatable) 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.
- db
System StringId - The OCID of the DB System the read replica is associated with.
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- (Updatable) User provided description of the read replica.
- display
Name String - (Updatable) The user-friendly name for the read replica. It does not have to be unique.
- Map<String,String>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- is
Delete BooleanProtected - (Updatable) 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.
- replica
Overrides ReplicaReplica Overrides - (Updatable) 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.
- db
System stringId - The OCID of the DB System the read replica is associated with.
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description string
- (Updatable) User provided description of the read replica.
- display
Name string - (Updatable) The user-friendly name for the read replica. It does not have to be unique.
- {[key: string]: string}
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- is
Delete booleanProtected - (Updatable) 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.
- replica
Overrides ReplicaReplica Overrides - (Updatable) 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.
- db_
system_ strid - The OCID of the DB System the read replica is associated with.
- Mapping[str, str]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description str
- (Updatable) User provided description of the read replica.
- display_
name str - (Updatable) The user-friendly name for the read replica. It does not have to be unique.
- Mapping[str, str]
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- is_
delete_ boolprotected - (Updatable) 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.
- replica_
overrides mysql.Replica Replica Overrides Args - (Updatable) 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.
- db
System StringId - The OCID of the DB System the read replica is associated with.
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- (Updatable) User provided description of the read replica.
- display
Name String - (Updatable) The user-friendly name for the read replica. It does not have to be unique.
- Map<String>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- is
Delete BooleanProtected - (Updatable) 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.
- replica
Overrides Property Map - (Updatable) 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the Replica resource produces the following output properties:
- Availability
Domain string - The name of the Availability Domain the read replica is located in.
- Compartment
Id string - The OCID of the compartment that contains the read replica.
- Configuration
Id string - The OCID of the Configuration to be used by the read replica.
- Fault
Domain string - The name of the Fault Domain the read replica is located in.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Address string - The IP address the read replica is configured to listen on.
- Lifecycle
Details string - A message describing the state of the read replica.
- Mysql
Version string - 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.
- Secure
Connections List<ReplicaSecure Connection> - Secure connection configuration details.
- Shape
Name 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.
- Time
Created string - The date and time the read replica was created, as described by RFC 3339.
- Time
Updated string - The time the read replica was last updated, as described by RFC 3339.
- Availability
Domain string - The name of the Availability Domain the read replica is located in.
- Compartment
Id string - The OCID of the compartment that contains the read replica.
- Configuration
Id string - The OCID of the Configuration to be used by the read replica.
- Fault
Domain string - The name of the Fault Domain the read replica is located in.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Address string - The IP address the read replica is configured to listen on.
- Lifecycle
Details string - A message describing the state of the read replica.
- Mysql
Version string - 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.
- Secure
Connections []ReplicaSecure Connection - Secure connection configuration details.
- Shape
Name 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.
- Time
Created string - The date and time the read replica was created, as described by RFC 3339.
- Time
Updated string - The time the read replica was last updated, as described by RFC 3339.
- availability
Domain String - The name of the Availability Domain the read replica is located in.
- compartment
Id String - The OCID of the compartment that contains the read replica.
- configuration
Id String - The OCID of the Configuration to be used by the read replica.
- fault
Domain String - The name of the Fault Domain the read replica is located in.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Address String - The IP address the read replica is configured to listen on.
- lifecycle
Details String - A message describing the state of the read replica.
- mysql
Version String - The MySQL version to be used by the read replica.
- port Integer
- The port the read replica is configured to listen on.
- port
X Integer - The TCP network port on which X Plugin listens for connections. This is the X Plugin equivalent of port.
- secure
Connections List<ReplicaSecure Connection> - Secure connection configuration details.
- shape
Name 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.
- time
Created String - The date and time the read replica was created, as described by RFC 3339.
- time
Updated String - The time the read replica was last updated, as described by RFC 3339.
- availability
Domain string - The name of the Availability Domain the read replica is located in.
- compartment
Id string - The OCID of the compartment that contains the read replica.
- configuration
Id string - The OCID of the Configuration to be used by the read replica.
- fault
Domain string - The name of the Fault Domain the read replica is located in.
- id string
- The provider-assigned unique ID for this managed resource.
- ip
Address string - The IP address the read replica is configured to listen on.
- lifecycle
Details string - A message describing the state of the read replica.
- mysql
Version string - The MySQL version to be used by the read replica.
- port number
- The port the read replica is configured to listen on.
- port
X number - The TCP network port on which X Plugin listens for connections. This is the X Plugin equivalent of port.
- secure
Connections ReplicaSecure Connection[] - Secure connection configuration details.
- shape
Name 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.
- time
Created string - The date and time the read replica was created, as described by RFC 3339.
- time
Updated 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.
- fault_
domain str - The name of the Fault Domain the read replica is located in.
- id str
- The provider-assigned unique ID for this managed resource.
- ip_
address str - The IP address the read replica is configured to listen on.
- 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.
- secure_
connections Sequence[mysql.Replica 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.
- availability
Domain String - The name of the Availability Domain the read replica is located in.
- compartment
Id String - The OCID of the compartment that contains the read replica.
- configuration
Id String - The OCID of the Configuration to be used by the read replica.
- fault
Domain String - The name of the Fault Domain the read replica is located in.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Address String - The IP address the read replica is configured to listen on.
- lifecycle
Details String - A message describing the state of the read replica.
- mysql
Version String - The MySQL version to be used by the read replica.
- port Number
- The port the read replica is configured to listen on.
- port
X Number - The TCP network port on which X Plugin listens for connections. This is the X Plugin equivalent of port.
- secure
Connections List<Property Map> - Secure connection configuration details.
- shape
Name 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.
- time
Created String - The date and time the read replica was created, as described by RFC 3339.
- time
Updated String - The time the read replica was last updated, as described by RFC 3339.
Look up Existing Replica Resource
Get an existing Replica resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ReplicaState, opts?: CustomResourceOptions): Replica
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
availability_domain: Optional[str] = None,
compartment_id: Optional[str] = None,
configuration_id: Optional[str] = None,
db_system_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
fault_domain: Optional[str] = None,
freeform_tags: Optional[Mapping[str, str]] = None,
ip_address: Optional[str] = None,
is_delete_protected: Optional[bool] = None,
lifecycle_details: Optional[str] = None,
mysql_version: Optional[str] = None,
port: Optional[int] = None,
port_x: Optional[int] = None,
replica_overrides: Optional[_mysql.ReplicaReplicaOverridesArgs] = None,
secure_connections: Optional[Sequence[_mysql.ReplicaSecureConnectionArgs]] = None,
shape_name: Optional[str] = None,
state: Optional[str] = None,
time_created: Optional[str] = None,
time_updated: Optional[str] = None) -> Replica
func GetReplica(ctx *Context, name string, id IDInput, state *ReplicaState, opts ...ResourceOption) (*Replica, error)
public static Replica Get(string name, Input<string> id, ReplicaState? state, CustomResourceOptions? opts = null)
public static Replica get(String name, Output<String> id, ReplicaState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Availability
Domain string - The name of the Availability Domain the read replica is located in.
- Compartment
Id string - The OCID of the compartment that contains the read replica.
- Configuration
Id string - The OCID of the Configuration to be used by the read replica.
- Db
System stringId - The OCID of the DB System the read replica is associated with.
- Dictionary<string, string>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- (Updatable) User provided description of the read replica.
- Display
Name string - (Updatable) The user-friendly name for the read replica. It does not have to be unique.
- Fault
Domain string - The name of the Fault Domain the read replica is located in.
- Dictionary<string, string>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Ip
Address string - The IP address the read replica is configured to listen on.
- Is
Delete boolProtected - (Updatable) 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 string - A message describing the state of the read replica.
- Mysql
Version string - 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
Overrides ReplicaReplica Overrides - (Updatable) 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 List<ReplicaSecure Connection> - Secure connection configuration details.
- Shape
Name 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.
- Time
Created string - The date and time the read replica was created, as described by RFC 3339.
- Time
Updated string - The time the read replica was last updated, as described by RFC 3339.
- Availability
Domain string - The name of the Availability Domain the read replica is located in.
- Compartment
Id string - The OCID of the compartment that contains the read replica.
- Configuration
Id string - The OCID of the Configuration to be used by the read replica.
- Db
System stringId - The OCID of the DB System the read replica is associated with.
- map[string]string
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- (Updatable) User provided description of the read replica.
- Display
Name string - (Updatable) The user-friendly name for the read replica. It does not have to be unique.
- Fault
Domain string - The name of the Fault Domain the read replica is located in.
- map[string]string
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Ip
Address string - The IP address the read replica is configured to listen on.
- Is
Delete boolProtected - (Updatable) 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 string - A message describing the state of the read replica.
- Mysql
Version string - 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
Overrides ReplicaReplica Overrides Args - (Updatable) 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 []ReplicaSecure Connection Args - Secure connection configuration details.
- Shape
Name 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.
- Time
Created string - The date and time the read replica was created, as described by RFC 3339.
- Time
Updated string - The time the read replica was last updated, as described by RFC 3339.
- availability
Domain String - The name of the Availability Domain the read replica is located in.
- compartment
Id String - The OCID of the compartment that contains the read replica.
- configuration
Id String - The OCID of the Configuration to be used by the read replica.
- db
System StringId - The OCID of the DB System the read replica is associated with.
- Map<String,String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- (Updatable) User provided description of the read replica.
- display
Name String - (Updatable) The user-friendly name for the read replica. It does not have to be unique.
- fault
Domain String - The name of the Fault Domain the read replica is located in.
- Map<String,String>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- ip
Address String - The IP address the read replica is configured to listen on.
- is
Delete BooleanProtected - (Updatable) 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 String - A message describing the state of the read replica.
- mysql
Version String - The MySQL version to be used by the read replica.
- port Integer
- The port the read replica is configured to listen on.
- port
X Integer - The TCP network port on which X Plugin listens for connections. This is the X Plugin equivalent of port.
- replica
Overrides ReplicaReplica Overrides - (Updatable) 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 List<ReplicaSecure Connection> - Secure connection configuration details.
- shape
Name 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.
- time
Created String - The date and time the read replica was created, as described by RFC 3339.
- time
Updated String - The time the read replica was last updated, as described by RFC 3339.
- availability
Domain string - The name of the Availability Domain the read replica is located in.
- compartment
Id string - The OCID of the compartment that contains the read replica.
- configuration
Id string - The OCID of the Configuration to be used by the read replica.
- db
System stringId - The OCID of the DB System the read replica is associated with.
- {[key: string]: string}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description string
- (Updatable) User provided description of the read replica.
- display
Name string - (Updatable) The user-friendly name for the read replica. It does not have to be unique.
- fault
Domain string - The name of the Fault Domain the read replica is located in.
- {[key: string]: string}
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- ip
Address string - The IP address the read replica is configured to listen on.
- is
Delete booleanProtected - (Updatable) 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 string - A message describing the state of the read replica.
- mysql
Version string - The MySQL version to be used by the read replica.
- port number
- The port the read replica is configured to listen on.
- port
X number - The TCP network port on which X Plugin listens for connections. This is the X Plugin equivalent of port.
- replica
Overrides ReplicaReplica Overrides - (Updatable) 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 ReplicaSecure Connection[] - Secure connection configuration details.
- shape
Name 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.
- time
Created string - The date and time the read replica was created, as described by RFC 3339.
- time
Updated 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]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description str
- (Updatable) User provided description of the read replica.
- display_
name str - (Updatable) 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]
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- ip_
address str - The IP address the read replica is configured to listen on.
- is_
delete_ boolprotected - (Updatable) 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_
overrides mysql.Replica Replica Overrides Args - (Updatable) 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[mysql.Replica Secure Connection Args] - 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.
- availability
Domain String - The name of the Availability Domain the read replica is located in.
- compartment
Id String - The OCID of the compartment that contains the read replica.
- configuration
Id String - The OCID of the Configuration to be used by the read replica.
- db
System StringId - The OCID of the DB System the read replica is associated with.
- Map<String>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- (Updatable) User provided description of the read replica.
- display
Name String - (Updatable) The user-friendly name for the read replica. It does not have to be unique.
- fault
Domain String - The name of the Fault Domain the read replica is located in.
- Map<String>
- (Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- ip
Address String - The IP address the read replica is configured to listen on.
- is
Delete BooleanProtected - (Updatable) 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 String - A message describing the state of the read replica.
- mysql
Version String - The MySQL version to be used by the read replica.
- port Number
- The port the read replica is configured to listen on.
- port
X Number - The TCP network port on which X Plugin listens for connections. This is the X Plugin equivalent of port.
- replica
Overrides Property Map - (Updatable) 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 List<Property Map> - Secure connection configuration details.
- shape
Name 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.
- time
Created String - The date and time the read replica was created, as described by RFC 3339.
- time
Updated String - The time the read replica was last updated, as described by RFC 3339.
Supporting Types
ReplicaReplicaOverrides, ReplicaReplicaOverridesArgs
- Configuration
Id string - (Updatable) The OCID of the Configuration to be used by the read replica.
- Mysql
Version string - (Updatable) The MySQL version to be used by the read replica.
- Shape
Name string (Updatable) The shape to be used 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Configuration
Id string - (Updatable) The OCID of the Configuration to be used by the read replica.
- Mysql
Version string - (Updatable) The MySQL version to be used by the read replica.
- Shape
Name string (Updatable) The shape to be used 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- configuration
Id String - (Updatable) The OCID of the Configuration to be used by the read replica.
- mysql
Version String - (Updatable) The MySQL version to be used by the read replica.
- shape
Name String (Updatable) The shape to be used 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- configuration
Id string - (Updatable) The OCID of the Configuration to be used by the read replica.
- mysql
Version string - (Updatable) The MySQL version to be used by the read replica.
- shape
Name string (Updatable) The shape to be used 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- configuration_
id str - (Updatable) The OCID of the Configuration to be used by the read replica.
- mysql_
version str - (Updatable) The MySQL version to be used by the read replica.
- shape_
name str (Updatable) The shape to be used 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- configuration
Id String - (Updatable) The OCID of the Configuration to be used by the read replica.
- mysql
Version String - (Updatable) The MySQL version to be used by the read replica.
- shape
Name String (Updatable) The shape to be used 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.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
ReplicaSecureConnection, ReplicaSecureConnectionArgs
- Certificate
Generation stringType - Select whether to use MySQL Database Service-managed certificate (SYSTEM) or your own certificate (BYOC).
- Certificate
Id string - The OCID of the certificate to use.
- Certificate
Generation stringType - Select whether to use MySQL Database Service-managed certificate (SYSTEM) or your own certificate (BYOC).
- Certificate
Id string - The OCID of the certificate to use.
- certificate
Generation StringType - Select whether to use MySQL Database Service-managed certificate (SYSTEM) or your own certificate (BYOC).
- certificate
Id String - The OCID of the certificate to use.
- certificate
Generation stringType - Select whether to use MySQL Database Service-managed certificate (SYSTEM) or your own certificate (BYOC).
- certificate
Id 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.
- certificate
Generation StringType - Select whether to use MySQL Database Service-managed certificate (SYSTEM) or your own certificate (BYOC).
- certificate
Id String - The OCID of the certificate to use.
Import
Replicas can be imported using the id
, e.g.
$ pulumi import oci:Mysql/replica:Replica test_replica "id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.