oci.Nosql.TableReplica
Explore with Pulumi AI
This resource provides the Table Replica resource in Oracle Cloud Infrastructure NoSQL Database service.
Add a replica for this table
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testTableReplica = new oci.nosql.TableReplica("test_table_replica", {
region: tableReplicaRegion,
tableNameOrId: testTableNameOr.id,
compartmentId: compartmentId,
maxReadUnits: tableReplicaMaxReadUnits,
maxWriteUnits: tableReplicaMaxWriteUnits,
});
import pulumi
import pulumi_oci as oci
test_table_replica = oci.nosql.TableReplica("test_table_replica",
region=table_replica_region,
table_name_or_id=test_table_name_or["id"],
compartment_id=compartment_id,
max_read_units=table_replica_max_read_units,
max_write_units=table_replica_max_write_units)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Nosql"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Nosql.NewTableReplica(ctx, "test_table_replica", &Nosql.TableReplicaArgs{
Region: pulumi.Any(tableReplicaRegion),
TableNameOrId: pulumi.Any(testTableNameOr.Id),
CompartmentId: pulumi.Any(compartmentId),
MaxReadUnits: pulumi.Any(tableReplicaMaxReadUnits),
MaxWriteUnits: pulumi.Any(tableReplicaMaxWriteUnits),
})
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 testTableReplica = new Oci.Nosql.TableReplica("test_table_replica", new()
{
Region = tableReplicaRegion,
TableNameOrId = testTableNameOr.Id,
CompartmentId = compartmentId,
MaxReadUnits = tableReplicaMaxReadUnits,
MaxWriteUnits = tableReplicaMaxWriteUnits,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Nosql.TableReplica;
import com.pulumi.oci.Nosql.TableReplicaArgs;
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 testTableReplica = new TableReplica("testTableReplica", TableReplicaArgs.builder()
.region(tableReplicaRegion)
.tableNameOrId(testTableNameOr.id())
.compartmentId(compartmentId)
.maxReadUnits(tableReplicaMaxReadUnits)
.maxWriteUnits(tableReplicaMaxWriteUnits)
.build());
}
}
resources:
testTableReplica:
type: oci:Nosql:TableReplica
name: test_table_replica
properties:
region: ${tableReplicaRegion}
tableNameOrId: ${testTableNameOr.id}
compartmentId: ${compartmentId}
maxReadUnits: ${tableReplicaMaxReadUnits}
maxWriteUnits: ${tableReplicaMaxWriteUnits}
Create TableReplica Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TableReplica(name: string, args: TableReplicaArgs, opts?: CustomResourceOptions);
@overload
def TableReplica(resource_name: str,
args: TableReplicaInitArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TableReplica(resource_name: str,
opts: Optional[ResourceOptions] = None,
region: Optional[str] = None,
table_name_or_id: Optional[str] = None,
compartment_id: Optional[str] = None,
max_read_units: Optional[int] = None,
max_write_units: Optional[int] = None)
func NewTableReplica(ctx *Context, name string, args TableReplicaArgs, opts ...ResourceOption) (*TableReplica, error)
public TableReplica(string name, TableReplicaArgs args, CustomResourceOptions? opts = null)
public TableReplica(String name, TableReplicaArgs args)
public TableReplica(String name, TableReplicaArgs args, CustomResourceOptions options)
type: oci:Nosql:TableReplica
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 TableReplicaArgs
- 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 TableReplicaInitArgs
- 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 TableReplicaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TableReplicaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TableReplicaArgs
- 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 tableReplicaResource = new Oci.Nosql.TableReplica("tableReplicaResource", new()
{
Region = "string",
TableNameOrId = "string",
CompartmentId = "string",
MaxReadUnits = 0,
MaxWriteUnits = 0,
});
example, err := Nosql.NewTableReplica(ctx, "tableReplicaResource", &Nosql.TableReplicaArgs{
Region: pulumi.String("string"),
TableNameOrId: pulumi.String("string"),
CompartmentId: pulumi.String("string"),
MaxReadUnits: pulumi.Int(0),
MaxWriteUnits: pulumi.Int(0),
})
var tableReplicaResource = new TableReplica("tableReplicaResource", TableReplicaArgs.builder()
.region("string")
.tableNameOrId("string")
.compartmentId("string")
.maxReadUnits(0)
.maxWriteUnits(0)
.build());
table_replica_resource = oci.nosql.TableReplica("tableReplicaResource",
region="string",
table_name_or_id="string",
compartment_id="string",
max_read_units=0,
max_write_units=0)
const tableReplicaResource = new oci.nosql.TableReplica("tableReplicaResource", {
region: "string",
tableNameOrId: "string",
compartmentId: "string",
maxReadUnits: 0,
maxWriteUnits: 0,
});
type: oci:Nosql:TableReplica
properties:
compartmentId: string
maxReadUnits: 0
maxWriteUnits: 0
region: string
tableNameOrId: string
TableReplica 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 TableReplica resource accepts the following input properties:
- Region string
- Name of the remote region in standard Oracle Cloud Infrastructure format, i.e. us-ashburn-1
- Table
Name stringOr Id A table name within the compartment, or a table OCID.
** 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
- Compartment
Id string - The OCID of the table's compartment. Required if the tableNameOrId path parameter is a table name. Optional if tableNameOrId is an OCID. If tableNameOrId is an OCID, and compartmentId is supplied, the latter must match the identified table's compartmentId.
- Max
Read intUnits - Maximum sustained read throughput limit for the new replica table. If not specified, the local table's read limit is used.
- Max
Write intUnits - Maximum sustained write throughput limit for the new replica table. If not specified, the local table's write limit is used.
- Region string
- Name of the remote region in standard Oracle Cloud Infrastructure format, i.e. us-ashburn-1
- Table
Name stringOr Id A table name within the compartment, or a table OCID.
** 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
- Compartment
Id string - The OCID of the table's compartment. Required if the tableNameOrId path parameter is a table name. Optional if tableNameOrId is an OCID. If tableNameOrId is an OCID, and compartmentId is supplied, the latter must match the identified table's compartmentId.
- Max
Read intUnits - Maximum sustained read throughput limit for the new replica table. If not specified, the local table's read limit is used.
- Max
Write intUnits - Maximum sustained write throughput limit for the new replica table. If not specified, the local table's write limit is used.
- region String
- Name of the remote region in standard Oracle Cloud Infrastructure format, i.e. us-ashburn-1
- table
Name StringOr Id A table name within the compartment, or a table OCID.
** 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
- compartment
Id String - The OCID of the table's compartment. Required if the tableNameOrId path parameter is a table name. Optional if tableNameOrId is an OCID. If tableNameOrId is an OCID, and compartmentId is supplied, the latter must match the identified table's compartmentId.
- max
Read IntegerUnits - Maximum sustained read throughput limit for the new replica table. If not specified, the local table's read limit is used.
- max
Write IntegerUnits - Maximum sustained write throughput limit for the new replica table. If not specified, the local table's write limit is used.
- region string
- Name of the remote region in standard Oracle Cloud Infrastructure format, i.e. us-ashburn-1
- table
Name stringOr Id A table name within the compartment, or a table OCID.
** 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
- compartment
Id string - The OCID of the table's compartment. Required if the tableNameOrId path parameter is a table name. Optional if tableNameOrId is an OCID. If tableNameOrId is an OCID, and compartmentId is supplied, the latter must match the identified table's compartmentId.
- max
Read numberUnits - Maximum sustained read throughput limit for the new replica table. If not specified, the local table's read limit is used.
- max
Write numberUnits - Maximum sustained write throughput limit for the new replica table. If not specified, the local table's write limit is used.
- region str
- Name of the remote region in standard Oracle Cloud Infrastructure format, i.e. us-ashburn-1
- table_
name_ stror_ id A table name within the compartment, or a table OCID.
** 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
- compartment_
id str - The OCID of the table's compartment. Required if the tableNameOrId path parameter is a table name. Optional if tableNameOrId is an OCID. If tableNameOrId is an OCID, and compartmentId is supplied, the latter must match the identified table's compartmentId.
- max_
read_ intunits - Maximum sustained read throughput limit for the new replica table. If not specified, the local table's read limit is used.
- max_
write_ intunits - Maximum sustained write throughput limit for the new replica table. If not specified, the local table's write limit is used.
- region String
- Name of the remote region in standard Oracle Cloud Infrastructure format, i.e. us-ashburn-1
- table
Name StringOr Id A table name within the compartment, or a table OCID.
** 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
- compartment
Id String - The OCID of the table's compartment. Required if the tableNameOrId path parameter is a table name. Optional if tableNameOrId is an OCID. If tableNameOrId is an OCID, and compartmentId is supplied, the latter must match the identified table's compartmentId.
- max
Read NumberUnits - Maximum sustained read throughput limit for the new replica table. If not specified, the local table's read limit is used.
- max
Write NumberUnits - Maximum sustained write throughput limit for the new replica table. If not specified, the local table's write limit is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the TableReplica resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TableReplica Resource
Get an existing TableReplica 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?: TableReplicaState, opts?: CustomResourceOptions): TableReplica
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
max_read_units: Optional[int] = None,
max_write_units: Optional[int] = None,
region: Optional[str] = None,
table_name_or_id: Optional[str] = None) -> TableReplica
func GetTableReplica(ctx *Context, name string, id IDInput, state *TableReplicaState, opts ...ResourceOption) (*TableReplica, error)
public static TableReplica Get(string name, Input<string> id, TableReplicaState? state, CustomResourceOptions? opts = null)
public static TableReplica get(String name, Output<String> id, TableReplicaState 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.
- Compartment
Id string - The OCID of the table's compartment. Required if the tableNameOrId path parameter is a table name. Optional if tableNameOrId is an OCID. If tableNameOrId is an OCID, and compartmentId is supplied, the latter must match the identified table's compartmentId.
- Max
Read intUnits - Maximum sustained read throughput limit for the new replica table. If not specified, the local table's read limit is used.
- Max
Write intUnits - Maximum sustained write throughput limit for the new replica table. If not specified, the local table's write limit is used.
- Region string
- Name of the remote region in standard Oracle Cloud Infrastructure format, i.e. us-ashburn-1
- Table
Name stringOr Id A table name within the compartment, or a table OCID.
** 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
- Compartment
Id string - The OCID of the table's compartment. Required if the tableNameOrId path parameter is a table name. Optional if tableNameOrId is an OCID. If tableNameOrId is an OCID, and compartmentId is supplied, the latter must match the identified table's compartmentId.
- Max
Read intUnits - Maximum sustained read throughput limit for the new replica table. If not specified, the local table's read limit is used.
- Max
Write intUnits - Maximum sustained write throughput limit for the new replica table. If not specified, the local table's write limit is used.
- Region string
- Name of the remote region in standard Oracle Cloud Infrastructure format, i.e. us-ashburn-1
- Table
Name stringOr Id A table name within the compartment, or a table OCID.
** 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
- compartment
Id String - The OCID of the table's compartment. Required if the tableNameOrId path parameter is a table name. Optional if tableNameOrId is an OCID. If tableNameOrId is an OCID, and compartmentId is supplied, the latter must match the identified table's compartmentId.
- max
Read IntegerUnits - Maximum sustained read throughput limit for the new replica table. If not specified, the local table's read limit is used.
- max
Write IntegerUnits - Maximum sustained write throughput limit for the new replica table. If not specified, the local table's write limit is used.
- region String
- Name of the remote region in standard Oracle Cloud Infrastructure format, i.e. us-ashburn-1
- table
Name StringOr Id A table name within the compartment, or a table OCID.
** 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
- compartment
Id string - The OCID of the table's compartment. Required if the tableNameOrId path parameter is a table name. Optional if tableNameOrId is an OCID. If tableNameOrId is an OCID, and compartmentId is supplied, the latter must match the identified table's compartmentId.
- max
Read numberUnits - Maximum sustained read throughput limit for the new replica table. If not specified, the local table's read limit is used.
- max
Write numberUnits - Maximum sustained write throughput limit for the new replica table. If not specified, the local table's write limit is used.
- region string
- Name of the remote region in standard Oracle Cloud Infrastructure format, i.e. us-ashburn-1
- table
Name stringOr Id A table name within the compartment, or a table OCID.
** 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
- compartment_
id str - The OCID of the table's compartment. Required if the tableNameOrId path parameter is a table name. Optional if tableNameOrId is an OCID. If tableNameOrId is an OCID, and compartmentId is supplied, the latter must match the identified table's compartmentId.
- max_
read_ intunits - Maximum sustained read throughput limit for the new replica table. If not specified, the local table's read limit is used.
- max_
write_ intunits - Maximum sustained write throughput limit for the new replica table. If not specified, the local table's write limit is used.
- region str
- Name of the remote region in standard Oracle Cloud Infrastructure format, i.e. us-ashburn-1
- table_
name_ stror_ id A table name within the compartment, or a table OCID.
** 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
- compartment
Id String - The OCID of the table's compartment. Required if the tableNameOrId path parameter is a table name. Optional if tableNameOrId is an OCID. If tableNameOrId is an OCID, and compartmentId is supplied, the latter must match the identified table's compartmentId.
- max
Read NumberUnits - Maximum sustained read throughput limit for the new replica table. If not specified, the local table's read limit is used.
- max
Write NumberUnits - Maximum sustained write throughput limit for the new replica table. If not specified, the local table's write limit is used.
- region String
- Name of the remote region in standard Oracle Cloud Infrastructure format, i.e. us-ashburn-1
- table
Name StringOr Id A table name within the compartment, or a table OCID.
** 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
Import
TableReplicas can be imported using the id
, e.g.
$ pulumi import oci:Nosql/tableReplica:TableReplica test_table_replica "tables/{tableNameOrId}/replicas/{region}"
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.