tencentcloud.MariadbSwitchHa
Explore with Pulumi AI
Provides a resource to create a mariadb switch_h_a
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const switchHa = new tencentcloud.MariadbSwitchHa("switchHa", {
instanceId: "tdsql-9vqvls95",
zone: "ap-guangzhou-2",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
switch_ha = tencentcloud.MariadbSwitchHa("switchHa",
instance_id="tdsql-9vqvls95",
zone="ap-guangzhou-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.NewMariadbSwitchHa(ctx, "switchHa", &tencentcloud.MariadbSwitchHaArgs{
InstanceId: pulumi.String("tdsql-9vqvls95"),
Zone: pulumi.String("ap-guangzhou-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 switchHa = new Tencentcloud.MariadbSwitchHa("switchHa", new()
{
InstanceId = "tdsql-9vqvls95",
Zone = "ap-guangzhou-2",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.MariadbSwitchHa;
import com.pulumi.tencentcloud.MariadbSwitchHaArgs;
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 switchHa = new MariadbSwitchHa("switchHa", MariadbSwitchHaArgs.builder()
.instanceId("tdsql-9vqvls95")
.zone("ap-guangzhou-2")
.build());
}
}
resources:
switchHa:
type: tencentcloud:MariadbSwitchHa
properties:
instanceId: tdsql-9vqvls95
zone: ap-guangzhou-2
Create MariadbSwitchHa Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MariadbSwitchHa(name: string, args: MariadbSwitchHaArgs, opts?: CustomResourceOptions);
@overload
def MariadbSwitchHa(resource_name: str,
args: MariadbSwitchHaArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MariadbSwitchHa(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
zone: Optional[str] = None,
mariadb_switch_ha_id: Optional[str] = None)
func NewMariadbSwitchHa(ctx *Context, name string, args MariadbSwitchHaArgs, opts ...ResourceOption) (*MariadbSwitchHa, error)
public MariadbSwitchHa(string name, MariadbSwitchHaArgs args, CustomResourceOptions? opts = null)
public MariadbSwitchHa(String name, MariadbSwitchHaArgs args)
public MariadbSwitchHa(String name, MariadbSwitchHaArgs args, CustomResourceOptions options)
type: tencentcloud:MariadbSwitchHa
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 MariadbSwitchHaArgs
- 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 MariadbSwitchHaArgs
- 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 MariadbSwitchHaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MariadbSwitchHaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MariadbSwitchHaArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
MariadbSwitchHa 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 MariadbSwitchHa resource accepts the following input properties:
- Instance
Id string - Instance ID in the format of tdsql-ow728lmc.
- Zone string
- Target AZ. The node with the lowest delay in the target AZ will be automatically promoted to primary node.
- Mariadb
Switch stringHa Id - ID of the resource.
- Instance
Id string - Instance ID in the format of tdsql-ow728lmc.
- Zone string
- Target AZ. The node with the lowest delay in the target AZ will be automatically promoted to primary node.
- Mariadb
Switch stringHa Id - ID of the resource.
- instance
Id String - Instance ID in the format of tdsql-ow728lmc.
- zone String
- Target AZ. The node with the lowest delay in the target AZ will be automatically promoted to primary node.
- mariadb
Switch StringHa Id - ID of the resource.
- instance
Id string - Instance ID in the format of tdsql-ow728lmc.
- zone string
- Target AZ. The node with the lowest delay in the target AZ will be automatically promoted to primary node.
- mariadb
Switch stringHa Id - ID of the resource.
- instance_
id str - Instance ID in the format of tdsql-ow728lmc.
- zone str
- Target AZ. The node with the lowest delay in the target AZ will be automatically promoted to primary node.
- mariadb_
switch_ strha_ id - ID of the resource.
- instance
Id String - Instance ID in the format of tdsql-ow728lmc.
- zone String
- Target AZ. The node with the lowest delay in the target AZ will be automatically promoted to primary node.
- mariadb
Switch StringHa Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the MariadbSwitchHa 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 MariadbSwitchHa Resource
Get an existing MariadbSwitchHa 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?: MariadbSwitchHaState, opts?: CustomResourceOptions): MariadbSwitchHa
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
mariadb_switch_ha_id: Optional[str] = None,
zone: Optional[str] = None) -> MariadbSwitchHa
func GetMariadbSwitchHa(ctx *Context, name string, id IDInput, state *MariadbSwitchHaState, opts ...ResourceOption) (*MariadbSwitchHa, error)
public static MariadbSwitchHa Get(string name, Input<string> id, MariadbSwitchHaState? state, CustomResourceOptions? opts = null)
public static MariadbSwitchHa get(String name, Output<String> id, MariadbSwitchHaState state, CustomResourceOptions options)
resources: _: type: tencentcloud:MariadbSwitchHa 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.
- Instance
Id string - Instance ID in the format of tdsql-ow728lmc.
- Mariadb
Switch stringHa Id - ID of the resource.
- Zone string
- Target AZ. The node with the lowest delay in the target AZ will be automatically promoted to primary node.
- Instance
Id string - Instance ID in the format of tdsql-ow728lmc.
- Mariadb
Switch stringHa Id - ID of the resource.
- Zone string
- Target AZ. The node with the lowest delay in the target AZ will be automatically promoted to primary node.
- instance
Id String - Instance ID in the format of tdsql-ow728lmc.
- mariadb
Switch StringHa Id - ID of the resource.
- zone String
- Target AZ. The node with the lowest delay in the target AZ will be automatically promoted to primary node.
- instance
Id string - Instance ID in the format of tdsql-ow728lmc.
- mariadb
Switch stringHa Id - ID of the resource.
- zone string
- Target AZ. The node with the lowest delay in the target AZ will be automatically promoted to primary node.
- instance_
id str - Instance ID in the format of tdsql-ow728lmc.
- mariadb_
switch_ strha_ id - ID of the resource.
- zone str
- Target AZ. The node with the lowest delay in the target AZ will be automatically promoted to primary node.
- instance
Id String - Instance ID in the format of tdsql-ow728lmc.
- mariadb
Switch StringHa Id - ID of the resource.
- zone String
- Target AZ. The node with the lowest delay in the target AZ will be automatically promoted to primary node.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.