tencentcloud.DcdbDbSyncModeConfig
Explore with Pulumi AI
Provides a resource to create a dcdb db_sync_mode_config
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const config = new tencentcloud.DcdbDbSyncModeConfig("config", {
instanceId: "%s",
syncMode: 2,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
config = tencentcloud.DcdbDbSyncModeConfig("config",
instance_id="%s",
sync_mode=2)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewDcdbDbSyncModeConfig(ctx, "config", &tencentcloud.DcdbDbSyncModeConfigArgs{
InstanceId: pulumi.String("%s"),
SyncMode: pulumi.Float64(2),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var config = new Tencentcloud.DcdbDbSyncModeConfig("config", new()
{
InstanceId = "%s",
SyncMode = 2,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.DcdbDbSyncModeConfig;
import com.pulumi.tencentcloud.DcdbDbSyncModeConfigArgs;
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 config = new DcdbDbSyncModeConfig("config", DcdbDbSyncModeConfigArgs.builder()
.instanceId("%s")
.syncMode(2)
.build());
}
}
resources:
config:
type: tencentcloud:DcdbDbSyncModeConfig
properties:
instanceId: '%s'
syncMode: 2
Create DcdbDbSyncModeConfig Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DcdbDbSyncModeConfig(name: string, args: DcdbDbSyncModeConfigArgs, opts?: CustomResourceOptions);
@overload
def DcdbDbSyncModeConfig(resource_name: str,
args: DcdbDbSyncModeConfigArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DcdbDbSyncModeConfig(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
sync_mode: Optional[float] = None,
dcdb_db_sync_mode_config_id: Optional[str] = None)
func NewDcdbDbSyncModeConfig(ctx *Context, name string, args DcdbDbSyncModeConfigArgs, opts ...ResourceOption) (*DcdbDbSyncModeConfig, error)
public DcdbDbSyncModeConfig(string name, DcdbDbSyncModeConfigArgs args, CustomResourceOptions? opts = null)
public DcdbDbSyncModeConfig(String name, DcdbDbSyncModeConfigArgs args)
public DcdbDbSyncModeConfig(String name, DcdbDbSyncModeConfigArgs args, CustomResourceOptions options)
type: tencentcloud:DcdbDbSyncModeConfig
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 DcdbDbSyncModeConfigArgs
- 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 DcdbDbSyncModeConfigArgs
- 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 DcdbDbSyncModeConfigArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DcdbDbSyncModeConfigArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DcdbDbSyncModeConfigArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DcdbDbSyncModeConfig 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 DcdbDbSyncModeConfig resource accepts the following input properties:
- Instance
Id string - ID of the instance for which to modify the sync mode. The ID is in the format of
tdsql-ow728lmc
. - Sync
Mode double - Sync mode. Valid values:
0
(async),1
(strong sync),2
(downgradable strong sync). - Dcdb
Db stringSync Mode Config Id - ID of the resource.
- Instance
Id string - ID of the instance for which to modify the sync mode. The ID is in the format of
tdsql-ow728lmc
. - Sync
Mode float64 - Sync mode. Valid values:
0
(async),1
(strong sync),2
(downgradable strong sync). - Dcdb
Db stringSync Mode Config Id - ID of the resource.
- instance
Id String - ID of the instance for which to modify the sync mode. The ID is in the format of
tdsql-ow728lmc
. - sync
Mode Double - Sync mode. Valid values:
0
(async),1
(strong sync),2
(downgradable strong sync). - dcdb
Db StringSync Mode Config Id - ID of the resource.
- instance
Id string - ID of the instance for which to modify the sync mode. The ID is in the format of
tdsql-ow728lmc
. - sync
Mode number - Sync mode. Valid values:
0
(async),1
(strong sync),2
(downgradable strong sync). - dcdb
Db stringSync Mode Config Id - ID of the resource.
- instance_
id str - ID of the instance for which to modify the sync mode. The ID is in the format of
tdsql-ow728lmc
. - sync_
mode float - Sync mode. Valid values:
0
(async),1
(strong sync),2
(downgradable strong sync). - dcdb_
db_ strsync_ mode_ config_ id - ID of the resource.
- instance
Id String - ID of the instance for which to modify the sync mode. The ID is in the format of
tdsql-ow728lmc
. - sync
Mode Number - Sync mode. Valid values:
0
(async),1
(strong sync),2
(downgradable strong sync). - dcdb
Db StringSync Mode Config Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the DcdbDbSyncModeConfig 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 DcdbDbSyncModeConfig Resource
Get an existing DcdbDbSyncModeConfig 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?: DcdbDbSyncModeConfigState, opts?: CustomResourceOptions): DcdbDbSyncModeConfig
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dcdb_db_sync_mode_config_id: Optional[str] = None,
instance_id: Optional[str] = None,
sync_mode: Optional[float] = None) -> DcdbDbSyncModeConfig
func GetDcdbDbSyncModeConfig(ctx *Context, name string, id IDInput, state *DcdbDbSyncModeConfigState, opts ...ResourceOption) (*DcdbDbSyncModeConfig, error)
public static DcdbDbSyncModeConfig Get(string name, Input<string> id, DcdbDbSyncModeConfigState? state, CustomResourceOptions? opts = null)
public static DcdbDbSyncModeConfig get(String name, Output<String> id, DcdbDbSyncModeConfigState state, CustomResourceOptions options)
resources: _: type: tencentcloud:DcdbDbSyncModeConfig get: id: ${id}
- 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.
- Dcdb
Db stringSync Mode Config Id - ID of the resource.
- Instance
Id string - ID of the instance for which to modify the sync mode. The ID is in the format of
tdsql-ow728lmc
. - Sync
Mode double - Sync mode. Valid values:
0
(async),1
(strong sync),2
(downgradable strong sync).
- Dcdb
Db stringSync Mode Config Id - ID of the resource.
- Instance
Id string - ID of the instance for which to modify the sync mode. The ID is in the format of
tdsql-ow728lmc
. - Sync
Mode float64 - Sync mode. Valid values:
0
(async),1
(strong sync),2
(downgradable strong sync).
- dcdb
Db StringSync Mode Config Id - ID of the resource.
- instance
Id String - ID of the instance for which to modify the sync mode. The ID is in the format of
tdsql-ow728lmc
. - sync
Mode Double - Sync mode. Valid values:
0
(async),1
(strong sync),2
(downgradable strong sync).
- dcdb
Db stringSync Mode Config Id - ID of the resource.
- instance
Id string - ID of the instance for which to modify the sync mode. The ID is in the format of
tdsql-ow728lmc
. - sync
Mode number - Sync mode. Valid values:
0
(async),1
(strong sync),2
(downgradable strong sync).
- dcdb_
db_ strsync_ mode_ config_ id - ID of the resource.
- instance_
id str - ID of the instance for which to modify the sync mode. The ID is in the format of
tdsql-ow728lmc
. - sync_
mode float - Sync mode. Valid values:
0
(async),1
(strong sync),2
(downgradable strong sync).
- dcdb
Db StringSync Mode Config Id - ID of the resource.
- instance
Id String - ID of the instance for which to modify the sync mode. The ID is in the format of
tdsql-ow728lmc
. - sync
Mode Number - Sync mode. Valid values:
0
(async),1
(strong sync),2
(downgradable strong sync).
Import
dcdb db_sync_mode_config can be imported using the id, e.g.
$ pulumi import tencentcloud:index/dcdbDbSyncModeConfig:DcdbDbSyncModeConfig db_sync_mode_config db_sync_mode_config_id
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.