Documentation
¶
Overview ¶
Use this data source to query scaling configuration information.
Example Usage ¶
```hcl
data "tencentcloud_as_scaling_configs" "as_configs" {
configuration_id = "asc-oqio4yyj"
result_output_file = "my_test_path"
}
```
Use this data source to query the detail information of an existing autoscaling group.
Example Usage ¶
```hcl
data "tencentcloud_as_scaling_groups" "as_scaling_groups" {
scaling_group_name = "myasgroup"
configureation_id = "asc-oqio4yyj"
result_output_file = "my_test_path"
}
```
Use this data source to query detailed information of scaling policy.
Example Usage ¶
```hcl
data "tencentcloud_as_scaling_policies" "as_scaling_policies" {
scaling_policy_id = "asg-mvyghxu7"
result_output_file = "mytestpath"
}
```
Use this data source to query detailed information of CBS snapshots.
Example Usage ¶
```hcl
data "tencentcloud_cbs_snapshots" "snapshots" {
snapshot_id = "snap-f3io7adt"
result_output_file = "mytestpath"
}
```
Use this data source to query detailed information of CBS storages.
Example Usage ¶
```hcl
data "tencentcloud_cbs_storages" "storages" {
storage_id = "disk-kdt0sq6m"
result_output_file = "mytestpath"
}
```
Use this data source to query detailed information of CCN bandwidth limits.
Example Usage ¶
```hcl
variable "other_region1" {
default = "ap-shanghai"
}
resource "tencentcloud_ccn" "main"{
name ="ci-temp-test-ccn"
description="ci-temp-test-ccn-des"
qos ="AG"
}
data "tencentcloud_ccn_bandwidth_limits" "limit" {
ccn_id ="${tencentcloud_ccn.main.id}"
}
resource "tencentcloud_ccn_bandwidth_limit" "limit1" {
ccn_id ="${tencentcloud_ccn.main.id}"
region ="${var.other_region1}"
bandwidth_limit = 500
}
```
Use this data source to query detailed information of CCN instances.
Example Usage ¶
```hcl
resource "tencentcloud_ccn" "main"{
name ="ci-temp-test-ccn"
description="ci-temp-test-ccn-des"
qos ="AG"
}
data "tencentcloud_ccn_instances" "id_instances"{
ccn_id = "${tencentcloud_ccn.main.id}"
}
data "tencentcloud_ccn_instances" "name_instances"{
name = "${tencentcloud_ccn.main.name}"
}
```
Use this data source to query the metadata of an object stored inside a bucket.
Example Usage ¶
```hcl
data "tencentcloud_cos_bucket_object" "mycos" {
bucket = "mycos-test-1258798060"
key = "hello-world.py"
result_output_file = "TFresults"
}
```
Use this data source to query the COS buckets of the current Tencent Cloud user.
Example Usage ¶
```hcl
data "tencentcloud_cos_buckets" "cos_buckets" {
bucket_prefix = "tf-bucket-"
result_output_file = "mytestpath"
}
```
Use this data source to query detailed information of direct connect gateway route entries.
Example Usage ¶
```hcl
resource "tencentcloud_ccn" "main" {
name = "ci-temp-test-ccn"
description = "ci-temp-test-ccn-des"
qos = "AG"
}
resource "tencentcloud_dc_gateway" "ccn_main" {
name = "ci-cdg-ccn-test"
network_instance_id = "${tencentcloud_ccn.main.id}"
network_type = "CCN"
gateway_type = "NORMAL"
}
resource "tencentcloud_dc_gateway_ccn_route" "route1" {
dcg_id = "${tencentcloud_dc_gateway.ccn_main.id}"
cidr_block = "10.1.1.0/32"
}
resource "tencentcloud_dc_gateway_ccn_route" "route2" {
dcg_id = "${tencentcloud_dc_gateway.ccn_main.id}"
cidr_block = "192.1.1.0/32"
}
#You need to sleep for a few seconds because there is a cache on the server
data "tencentcloud_dc_gateway_ccn_routes" "test" {
dcg_id = "${tencentcloud_dc_gateway.ccn_main.id}"
}
```
Use this data source to query detailed information of direct connect gateway instances.
Example Usage ¶
```hcl
resource "tencentcloud_ccn" "main" {
name = "ci-temp-test-ccn"
description = "ci-temp-test-ccn-des"
qos = "AG"
}
resource "tencentcloud_dc_gateway" "ccn_main" {
name = "ci-cdg-ccn-test"
network_instance_id = "${tencentcloud_ccn.main.id}"
network_type = "CCN"
gateway_type = "NORMAL"
}
#You need to sleep for a few seconds because there is a cache on the server
data "tencentcloud_dc_gateway_instances" "name_select"{
name = "${tencentcloud_dc_gateway.ccn_main.name}"
}
data "tencentcloud_dc_gateway_instances" "id_select" {
dcg_id = "${tencentcloud_dc_gateway.ccn_main.id}"
}
```
Use this data source to query detailed information of DC instances.
Example Usage ¶
```hcl
data "tencentcloud_dc_instances" "name_select"{
name = "t"
}
data "tencentcloud_dc_instances" "id" {
dcx_id = "dc-kax48sg7"
}
```
Use this data source to query detailed information of dedicated tunnels instances.
Example Usage ¶
```hcl
data "tencentcloud_dcx_instances" "name_select"{
name = "main"
}
data "tencentcloud_dcx_instances" "id" {
dcx_id = "dcx-3ikuw30k"
}
```
Use this data source to query detailed information of Mongodb instances.
Example Usage ¶
```hcl
data "tencentcloud_mongodb_instances" "mongodb" {
instance_id = "cmgo-l6lwdsel"
cluster_type = "REPLSET"
}
```
Use this data source to query the available mongodb specifications for different zone.
Example Usage ¶
```hcl
data "tencentcloud_mongodb_zone_config" "mongodb" {
available_zone = "ap-guangzhou-2"
}
```
Use this data source to query the list of backup databases.
Example Usage ¶
```hcl
data "tencentcloud_mysql_backup_list" "default" {
mysql_id = "my-test-database"
max_number = 10
result_output_file = "mytestpath"
}
```
Use this data source to get information about a MySQL instance.
Example Usage ¶
```hcl
data "tencentcloud_mysql_instance" "database"{
mysql_id = "my-test-database"
result_output_file = "mytestpath"
}
```
Use this data source to get information about a parameter group of a database instance.
Example Usage ¶
```hcl
data "tencentcloud_mysql_parameter_list" "mysql" {
mysql_id = "my-test-database"
engine_version = "5.5"
result_output_file = "mytestpath"
}
```
Use this data source to query the available database specifications for different regions. And a maximum of 20 requests can be initiated per second for this query.
Example Usage ¶
```hcl
data "tencentcloud_mysql_zone_config" "mysql" {
region = "ap-guangzhou"
result_output_file = "mytestpath"
}
```
Use this data source to query the detail information of redis instance.
Example Usage ¶
```hcl
data "tencentcloud_redis_instances" "redislab" {
zone = "ap-hongkong-1"
search_key = "myredis"
project_id = 0
limit = 20
result_output_file = "/tmp/redis_instances"
}
```
Use this data source to query which instance types of Redis are available in a specific region.
Example Usage ¶
```hcl
data "tencentcloud_redis_zone_config" "redislab" {
region = "ap-hongkong"
result_output_file = "/temp/mytestpath"
}
```
Use this data source to query detailed information of security group.
~> **NOTE:** It has been deprecated and replaced by tencentcloud_security_groups.
Example Usage ¶
```hcl
data "tencentcloud_security_group" "sglab" {
security_group_id = "${tencentcloud_security_group.sglab.id}"
}
```
Use this data source to query detailed information of security groups.
Example Usage ¶
```hcl
data "tencentcloud_security_groups" "sglab" {
security_group_id = "${tencentcloud_security_group.sglab.id}"
}
```
Use this data source to query vpc instances' information.
Example Usage ¶
```hcl
resource "tencentcloud_vpc" "foo" {
name="guagua_vpc_instance_test"
cidr_block="10.0.0.0/16"
}
data "tencentcloud_vpc_instances" "id_instances" {
vpc_id="${tencentcloud_vpc.foo.id}"
}
data "tencentcloud_vpc_instances" "name_instances" {
name="${tencentcloud_vpc.foo.name}"
}
```
Use this data source to query vpc route tables information.
Example Usage ¶
```hcl
variable "availability_zone" {
default = "ap-guangzhou-3"
}
resource "tencentcloud_vpc" "foo" {
name="guagua-ci-temp-test"
cidr_block="10.0.0.0/16"
}
resource "tencentcloud_route_table" "route_table" {
vpc_id = "${tencentcloud_vpc.foo.id}"
name = "ci-temp-test-rt"
}
data "tencentcloud_vpc_route_tables" "id_instances" {
route_table_id="${tencentcloud_route_table.route_table.id}"
}
data "tencentcloud_vpc_route_tables" "name_instances" {
name="${tencentcloud_route_table.route_table.name}"
}
```
Use this data source to query vpc subnets information.
Example Usage ¶
```hcl
variable "availability_zone" {
default = "ap-guangzhou-3"
}
resource "tencentcloud_vpc" "foo" {
name="guagua_vpc_instance_test"
cidr_block="10.0.0.0/16"
}
resource "tencentcloud_subnet" "subnet" {
availability_zone="${var.availability_zone}"
name="guagua_vpc_subnet_test"
vpc_id="${tencentcloud_vpc.foo.id}"
cidr_block="10.0.20.0/28"
is_multicast=false
}
data "tencentcloud_vpc_subnets" "id_instances" {
subnet_id="${tencentcloud_subnet.subnet.id}"
}
data "tencentcloud_vpc_subnets" "name_instances" {
name="${tencentcloud_subnet.subnet.name}"
}
```
The TencentCloud provider is used to interact with many resources supported by TencentCloud. The provider needs to be configured with the proper credentials before it can be used.
The TencentCloud provider is used to interact with the many resources supported by [TencentCloud](https://intl.cloud.tencent.com). The provider needs to be configured with the proper credentials before it can be used.
Use the navigation to the left to read about the available resources.
Example Usage ¶
```hcl # Configure the TencentCloud Provider
provider "tencentcloud" {
secret_id = "${var.secret_id}"
secret_key = "${var.secret_key}"
region = "${var.region}"
}
```
Resources List ¶
Data Sources
tencentcloud_as_scaling_configs tencentcloud_as_scaling_groups tencentcloud_as_scaling_policies tencentcloud_availability_zones tencentcloud_cbs_snapshots tencentcloud_cbs_storages tencentcloud_ccn_bandwidth_limits tencentcloud_ccn_instances tencentcloud_container_cluster_instances tencentcloud_container_clusters tencentcloud_cos_bucket_object tencentcloud_cos_buckets tencentcloud_dc_instances tencentcloud_dc_gateway_ccn_routes tencentcloud_dc_gateway_instances tencentcloud_dcx_instances tencentcloud_eip tencentcloud_image tencentcloud_instance_types tencentcloud_mongodb_instances tencentcloud_mongodb_zone_config tencentcloud_mysql_backup_list tencentcloud_mysql_instance tencentcloud_mysql_parameter_list tencentcloud_mysql_zone_config tencentcloud_nats tencentcloud_redis_instances tencentcloud_redis_zone_config tencentcloud_route_table tencentcloud_security_group tencentcloud_subnet tencentcloud_vpc tencentcloud_vpc_instances tencentcloud_vpc_route_tables tencentcloud_vpc_subnets
AS Resources
tencentcloud_as_scaling_config tencentcloud_as_scaling_group tencentcloud_as_attachment tencentcloud_as_scaling_policy tencentcloud_as_schedule tencentcloud_as_lifecycle_hook tencentcloud_as_notification
CBS Resources
tencentcloud_cbs_storage tencentcloud_cbs_storage_attachment tencentcloud_cbs_snapshot tencentcloud_cbs_snapshot_policy
CCN Resources
tencentcloud_ccn tencentcloud_ccn_attachment tencentcloud_ccn_bandwidth_limit
Container Cluster Resources
tencentcloud_container_cluster tencentcloud_container_cluster_instance
COS Resources
tencentcloud_cos_bucket tencentcloud_cos_bucket_object
DC Resources
tencentcloud_dcx
DCG Resources
tencentcloud_dc_gateway tencentcloud_dc_gateway_ccn_route
CVM Resources
tencentcloud_instance tencentcloud_eip tencentcloud_eip_association tencentcloud_key_pair
LB Resources
tencentcloud_lb tencentcloud_alb_server_attachment
MongoDB Resources
tencentcloud_mongodb_instance tencentcloud_mongodb_sharding_instance
MySQL Resources
tencentcloud_mysql_instance tencentcloud_mysql_readonly_instance tencentcloud_mysql_account tencentcloud_mysql_account_privilege tencentcloud_mysql_backup_policy
Redis Resources
tencentcloud_redis_instance tencentcloud_redis_backup_config
VPC Resources
tencentcloud_vpc tencentcloud_subnet tencentcloud_security_group tencentcloud_security_group_rule tencentcloud_route_table tencentcloud_route_entry tencentcloud_route_table_entry tencentcloud_dnat tencentcloud_nat_gateway
Provides a resource to attach or detach CVM instances to a specified scaling group.
Example Usage ¶
```hcl
resource "tencentcloud_as_attachment" "attachment" {
scaling_group_id = "sg-afasfa"
instance_ids = ["ins-01", "ins-02"]
}
```
Provides a resource for an AS (Auto scaling) lifecycle hook.
Example Usage ¶
```hcl
resource "tencentcloud_as_lifecycle_hook" "lifecycle_hook" {
scaling_group_id = "sg-12af45"
lifecycle_hook_name = "tf-as-lifecycle-hook"
lifecycle_transition = "INSTANCE_LAUNCHING"
default_result = "CONTINUE"
heartbeat_timeout = 500
notification_metadata = "tf test"
notification_target_type = "CMQ_QUEUE"
notification_queue_name = "lifcyclehook"
}
```
Provides a resource for an AS (Auto scaling) notification.
Example Usage ¶
```hcl
resource "tencentcloud_as_notification" "as_notification" {
scaling_group_id = "sg-12af45"
notification_type = ["SCALE_OUT_FAILED", "SCALE_IN_SUCCESSFUL", "SCALE_IN_FAILED", "REPLACE_UNHEALTHY_INSTANCE_FAILED"]
notification_user_group_ids = ["76955"]
}
```
Provides a resource to create a configuration for an AS (Auto scaling) instance.
Example Usage ¶
```hcl
resource "tencentcloud_as_scaling_config" "launch_configuration" {
configuration_name = "launch-configuration"
image_id = "img-9qabwvbn"
instance_types = ["SA1.SMALL1"]
project_id = 0
system_disk_type = "CLOUD_PREMIUM"
system_disk_size = "50"
data_disk = {
disk_type = "CLOUD_PREMIUM"
disk_size = 50
}
internet_charge_type = "TRAFFIC_POSTPAID_BY_HOUR"
internet_max_bandwidth_out = 10
public_ip_assigned = true
password = "test123#"
enhanced_security_service = false
enhanced_monitor_service = false
user_data = "dGVzdA=="
instance_tags = {
tag = "as"
}
}
```
Import ¶
AutoScaling Configuration can be imported using the id, e.g.
```hcl $ terraform import tencentcloud_as_scaling_config.scaling_config asc-n32ymck2 ```
Provides a resource to create a group of AS (Auto scaling) instances.
Example Usage ¶
```hcl
resource "tencentcloud_as_scaling_group" "scaling_group" {
scaling_group_name = "tf-as-scaling-group"
configuration_id = "asc-oqio4yyj"
max_size = 1
min_size = 0
vpc_id = "vpc-3efmz0z"
subnet_ids = ["subnet-mc3egos"]
project_id = 0
default_cooldown = 400
desired_capacity = 1
termination_policies = ["NEWEST_INSTANCE"]
retry_policy = "INCREMENTAL_INTERVALS"
}
```
Import ¶
AutoScaling Groups can be imported using the id, e.g.
```hcl $ terraform import tencentcloud_as_scaling_group.scaling_group asg-n32ymck2 ```
Provides a resource for an AS (Auto scaling) policy.
Example Usage ¶
```hcl
resource "tencentcloud_as_scaling_policy" "scaling_policy" {
scaling_group_id = "asg-n32ymck2"
policy_name = "tf-as-scaling-policy"
adjustment_type = "EXACT_CAPACITY"
adjustment_value = 0
comparison_operator = "GREATER_THAN"
metric_name = "CPU_UTILIZATION"
threshold = 80
period = 300
continuous_time = 10
statistic = "AVERAGE"
cooldown = 360
}
```
Provides a resource for an AS (Auto scaling) schedule.
Example Usage ¶
```hcl
resource "tencentcloud_as_schedule" "schedule" {
scaling_group_id = "sg-12af45"
schedule_action_name = "tf-as-schedule"
max_size = 10
min_size = 0
desired_capacity = 0
start_time = "2019-01-01T00:00:00+08:00"
end_time = "2019-12-01T00:00:00+08:00"
recurrence = "0 0 * * *"
}
```
Provides a resource to create a CBS snapshot.
Example Usage ¶
```hcl
resource "tencentcloud_cbs_snapshot" "snapshot" {
snapshot_name = "unnamed"
storage_id = "disk-kdt0sq6m"
}
```
Import ¶
CBS snapshot can be imported using the id, e.g.
``` $ terraform import tencentcloud_cbs_snapshot.snapshot snap-3sa3f39b ```
Provides a snapshot policy resource.
Example Usage ¶
```hcl
resource "tencentcloud-cbs_snapshot_policy" "snapshot_policy" {
snapshot_policy_name = "mysnapshotpolicyname"
repeat_weekdays = [1, 4]
repeat_hours = [1]
retention_days = 7
}
```
Import ¶
CBS snapshot policy can be imported using the id, e.g.
``` $ terraform import tencentcloud_cbs_snapshot_policy.snapshot_policy asp-jliex1tn ```
Provides a resource to create a CBS.
Example Usage ¶
```hcl
resource "tencentcloud_cbs_storage" "storage" {
storage_name = "mystorage"
storage_type = "CLOUD_SSD"
storage_size = "50"
availability_zone = "ap-guangzhou-3"
project_id = 0
encrypt = false
tags = {
test = "tf"
}
}
```
Import ¶
CBS storage can be imported using the id, e.g.
``` $ terraform import tencentcloud_cbs_storage.storage disk-41s6jwy4 ```
Provides a CBS storage attachment resource.
Example Usage ¶
```hcl
resource "tencentcloud_cbs_storage_attachment" "attachment" {
storage_id = "disk-kdt0sq6m"
instance_id = "ins-jqlegd42"
}
```
Provides a resource to create a CCN instance.
Example Usage ¶
```hcl
resource "tencentcloud_ccn" "main"{
name ="ci-temp-test-ccn"
description="ci-temp-test-ccn-des"
qos ="AG"
}
```
Import ¶
Ccn instance can be imported, e.g.
```hcl $ terraform import tencentcloud_ccn.test ccn-id ```
Provides a CCN attaching resource.
Example Usage ¶
```hcl
variable "region" {
default = "ap-guangzhou"
}
resource "tencentcloud_vpc" "vpc" {
name = "ci-temp-test-vpc"
cidr_block = "10.0.0.0/16"
dns_servers=["119.29.29.29","8.8.8.8"]
is_multicast=false
}
resource "tencentcloud_ccn" "main"{
name ="ci-temp-test-ccn"
description="ci-temp-test-ccn-des"
qos ="AG"
}
resource "tencentcloud_ccn_attachment" "attachment"{
ccn_id = "${tencentcloud_ccn.main.id}"
instance_type ="VPC"
instance_id ="${tencentcloud_vpc.vpc.id}"
instance_region="${var.region}"
}
```
Provides a resource to limit CCN bandwidth.
Example Usage ¶
```hcl
variable "other_region1" {
default = "ap-shanghai"
}
resource "tencentcloud_ccn" "main"{
name ="ci-temp-test-ccn"
description="ci-temp-test-ccn-des"
qos ="AG"
}
resource "tencentcloud_ccn_bandwidth_limit" "limit1" {
ccn_id ="${tencentcloud_ccn.main.id}"
region ="${var.other_region1}"
bandwidth_limit = 500
}
```
Provides a COS resource to create a COS bucket and set its attributes.
Example Usage ¶
Private Bucket ¶
```hcl
resource "tencentcloud_cos_bucket" "mycos" {
bucket = "mycos-1258798060"
acl = "private"
}
```
Static Website ¶
```hcl
resource "tencentcloud_cos_bucket" "mycos" {
bucket = "mycos-1258798060"
website = {
index_document = "index.html"
error_document = "error.html"
}
}
```
Using CORS ¶
```hcl
resource "tencentcloud_cos_bucket" "mycos" {
bucket = "mycos-1258798060"
acl = "public-read-write"
cors_rules {
allowed_origins = ["http://*.abc.com"]
allowed_methods = ["PUT", "POST"]
allowed_headers = ["*"]
max_age_seconds = 300
expose_headers = ["Etag"]
}
}
```
Using object lifecycle ¶
```hcl
resource "tencentcloud_cos_bucket" "mycos" {
bucket = "mycos-1258798060"
acl = "public-read-write"
lifecycle_rules {
filter_prefix = "path1/"
transition {
date = "2019-06-01"
storage_class = "STANDARD_IA"
}
expiration {
days = 90
}
}
}
```
Import ¶
COS bucket can be imported, e.g.
``` $ terraform import tencentcloud_cos_bucket.bucket bucket-name ```
Provides a COS object resource to put an object(content or file) to the bucket.
Example Usage ¶
Uploading a file to a bucket ¶
```hcl
resource "tencentcloud_cos_bucket_object" "myobject" {
bucket = "mycos-1258798060"
key = "new_object_key"
source = "path/to/file"
}
```
Uploading a content to a bucket ¶
```hcl
resource "tencentcloud_cos_bucket" "mycos" {
bucket = "mycos-1258798060"
acl = "public-read"
}
resource "tencentcloud_cos_bucket_object" "myobject" {
bucket = "${tencentcloud_cos_bucket.mycos.bucket}"
key = "new_object_key"
content = "the content that you want to upload."
}
```
Provides a resource to creating direct connect gateway instance.
Example Usage ¶
```hcl
resource "tencentcloud_vpc" "main" {
name="ci-vpc-instance-test"
cidr_block="10.0.0.0/16"
}
resource "tencentcloud_dc_gateway" "vpc_main" {
name = "ci-cdg-vpc-test"
network_instance_id = "${tencentcloud_vpc.main.id}"
network_type = "VPC"
gateway_type = "NAT"
}
```
Import ¶
Direct connect gateway instance can be imported, e.g.
``` $ terraform import tencentcloud_dc_gateway.instance dcg-id ```
Provides a resource to creating direct connect gateway route entry.
Example Usage ¶
```hcl
resource "tencentcloud_ccn" "main" {
name = "ci-temp-test-ccn"
description = "ci-temp-test-ccn-des"
qos = "AG"
}
resource "tencentcloud_dc_gateway" "ccn_main" {
name = "ci-cdg-ccn-test"
network_instance_id = "${tencentcloud_ccn.main.id}"
network_type = "CCN"
gateway_type = "NORMAL"
}
resource "tencentcloud_dc_gateway_ccn_route" "route1" {
dcg_id = "${tencentcloud_dc_gateway.ccn_main.id}"
cidr_block = "10.1.1.0/32"
}
resource "tencentcloud_dc_gateway_ccn_route" "route2" {
dcg_id = "${tencentcloud_dc_gateway.ccn_main.id}"
cidr_block = "192.1.1.0/32"
}
```
Provides a resource to creating dedicated tunnels instances.
~> **NOTE:** 1. ID of the DC is queried, can only apply for this resource offline.
Example Usage ¶
```hcl
variable "dc_id" {
default = "dc-kax48sg7"
}
variable "dcg_id" {
default = "dcg-dmbhf7jf"
}
variable "vpc_id" {
default = "vpc-4h9v4mo3"
}
resource "tencentcloud_dcx" "bgp_main" {
bandwidth = 900
dc_id = "${var.dc_id}"
dcg_id = "${var.dcg_id}"
name = "bgp_main"
network_type = "VPC"
route_type = "BGP"
vlan = 306
vpc_id = "${var.vpc_id}"
}
resource "tencentcloud_dcx" "static_main" {
bandwidth = 900
dc_id = "${var.dc_id}"
dcg_id = "${var.dcg_id}"
name = "static_main"
network_type = "VPC"
route_type = "STATIC"
vlan = 301
vpc_id = "${var.vpc_id}"
route_filter_prefixes =["10.10.10.101/32"]
tencent_address = "100.93.46.1/30"
customer_address = "100.93.46.2/30"
}
```
Provide a resource to create a Mongodb instance.
Example Usage ¶
```hcl
resource "tencentcloud_mongodb_instance" "mongodb" {
instance_name = "mongodb"
memory = 4
volume = 100
engine_version = "MONGO_3_WT"
machine_type = "GIO"
available_zone = "ap-guangzhou-2"
vpc_id = "vpc-mz3efvbw"
subnet_id = "subnet-lk0svi3p"
project_id = 0
password = "mypassword"
}
```
Import ¶
Mongodb instance can be imported using the id, e.g.
``` $ terraform import tencentcloud_mongodb_instance.mongodb cmgo-41s6jwy4 ```
Provide a resource to create a Mongodb sharding instance.
Example Usage ¶
```hcl
resource "tencentcloud_mongodb_sharding_instance" "mongodb" {
instance_name = "mongodb"
shard_quantity = 2
nodes_per_shard = 3
memory = 4
volume = 100
engine_version = "MONGO_3_WT"
machine_type = "GIO"
available_zone = "ap-guangzhou-3"
vpc_id = "vpc-mz3efvbw"
subnet_id = "subnet-lk0svi3p"
project_id = 0
password = "mypassword"
}
```
Import ¶
Mongodb sharding instance can be imported using the id, e.g.
``` $ terraform import tencentcloud_mongodb_sharding_instance.mongodb cmgo-41s6jwy4 ```
Provides a MySQL account resource for database management. A MySQL instance supports multiple database account.
Example Usage ¶
```hcl
resource "tencentcloud_mysql_account" "default" {
mysql_id = "my-test-database"
name = "tf_account"
password = "********"
description = "My test account"
}
```
Provides a mysql account privilege resource to grant different access privilege to different database. A database can be granted by multiple account.
Example Usage ¶
```hcl
resource "tencentcloud_mysql_account_privilege" "default" {
mysql_id = "my-test-database"
account_name= "tf_account"
privileges = ["SELECT"]
database_names = ["instance.name"]
}
```
Provides a mysql policy resource to create a backup policy.
Example Usage ¶
```hcl
resource "tencentcloud_mysql_backup_policy" "default" {
mysql_id = "cdb-dnqksd9f"
retention_period = 7
backup_model = "logical"
backup_time ="02:00–06:00"
}
```
Provides a mysql instance resource to create master database instances.
~> **NOTE:** If this mysql has readonly instance, the terminate operation of the mysql does NOT take effect immediately,maybe takes for several hours. so during that time, VPCs associated with that mysql instance can't be terminated also.
Example Usage ¶
```hcl
resource "tencentcloud_mysql_instance" "default" {
internet_service = 1
engine_version = "5.7"
root_password = "********"
slave_deploy_mode = 0
first_slave_zone = "ap-guangzhou-4"
second_slave_zone = "ap-guangzhou-4"
slave_sync_mode = 1
availability_zone = "ap-guangzhou-4"
project_id = 201901010001
instance_name = "myTestMysql"
mem_size = 128000
volume_size = 250
vpc_id = "vpc-12mt3l31"
subnet_id = "subnet-9uivyb1g"
intranet_port = 3306
security_groups = ["sg-ot8eclwz"]
tags = {
name = "test"
}
parameters = {
max_connections = "1000"
}
}
```
Provides a mysql instance resource to create read-only database instances.
~> **NOTE:** The terminate operation of read only mysql does NOT take effect immediately,maybe takes for several hours. so during that time, VPCs associated with that mysql instance can't be terminated also.
Example Usage ¶
```hcl
resource "tencentcloud_mysql_readonly_instance" "default" {
master_instance_id = "cdb-dnqksd9f"
instance_name = "myTestMysql"
mem_size = 128000
volume_size = 255
vpc_id = "vpc-12mt3l31"
subnet_id = "subnet-9uivyb1g"
intranet_port = 3306
security_groups = ["sg-ot8eclwz"]
tags = {
name = "test"
}
}
```
Use this data source to query which instance types of Redis are available in a specific region.
Example Usage ¶
```hcl
resource "tencentcloud_redis_backup_config" "redislab" {
redis_id = "crs-7yl0q0dd"
backup_time = "04:00-05:00"
backup_period = ["Monday"]
}
```
Import ¶
Redis backup config can be imported, e.g.
```hcl $ terraform import tencentcloud_redis_backup_config.redisconfig redis-id ```
Provides a resource to create a Redis instance and set its attributes.
Example Usage ¶
```hcl
resource "tencentcloud_redis_instance" "redis_instance_test"{
availability_zone="ap-hongkong-3"
type="master_slave_redis"
password="test12345789"
mem_size=8192
name="terrform_test"
port=6379
}
```
Import ¶
Redis instance can be imported, e.g.
```hcl $ terraform import tencentcloud_redis_instance.redislab redis-id ```
Provides a resource to create a VPC routing table.
Example Usage ¶
```hcl
resource "tencentcloud_vpc" "foo" {
name = "ci-temp-test"
cidr_block = "10.0.0.0/16"
}
resource "tencentcloud_route_table" "foo" {
vpc_id = "${tencentcloud_vpc.foo.id}"
name = "ci-temp-test-rt"
}
```
Import ¶
Vpc routetable instance can be imported, e.g.
```hcl $ terraform import tencentcloud_route_table.test route_table_id ```
Provides a resource to create an entry of a routing table.
Example Usage ¶
```hcl
variable "availability_zone" {
default = "na-siliconvalley-1"
}
resource "tencentcloud_vpc" "foo" {
name = "ci-temp-test"
cidr_block = "10.0.0.0/16"
}
resource "tencentcloud_subnet" "foo" {
vpc_id = "${tencentcloud_vpc.foo.id}"
name = "terraform test subnet"
cidr_block = "10.0.12.0/24"
availability_zone = "${var.availability_zone}"
route_table_id = "${tencentcloud_route_table.foo.id}"
}
resource "tencentcloud_route_table" "foo" {
vpc_id = "${tencentcloud_vpc.foo.id}"
name = "ci-temp-test-rt"
}
resource "tencentcloud_route_table_entry" "instance" {
route_table_id = "${tencentcloud_route_table.foo.id}"
destination_cidr_block = "10.4.4.0/24"
next_type = "EIP"
next_hub = "0"
description = "ci-test-route-table-entry"
}
```
Provides a resource to create security group.
Example Usage ¶
```hcl
resource "tencentcloud_security_group" "sglab" {
name = "mysg"
description = "favourite sg"
project_id = 0
}
```
Import ¶
Security group can be imported using the id, e.g.
```
$ terraform import tencentcloud_security_group.sglab sg-ey3wmiz1
```
Provides a resource to create security group rule.
Example Usage ¶
Source is CIDR ip ¶
```hcl
resource "tencentcloud_security_group" "sglab_1" {
name = "mysg_1"
description = "favourite sg_1"
project_id = 0
}
resource "tencentcloud_security_group_rule" "sglab_1" {
security_group_id = "${tencentcloud_security_group.sglab_1.id}"
type = "ingress"
cidr_ip = "10.0.0.0/16"
ip_protocol = "TCP"
port_range = "80"
policy = "ACCEPT"
description = "favourite sg rule_1"
}
```
Source is a security group id ¶
```hcl
resource "tencentcloud_security_group" "sglab_2" {
name = "mysg_2"
description = "favourite sg_2"
project_id = 0
}
resource "tencentcloud_security_group" "sglab_3" {
name = "mysg_3"
description = "favourite sg_3"
project_id = 0
}
resource "tencentcloud_security_group_rule" "sglab_2" {
security_group_id = "${tencentcloud_security_group.sglab_2.id}"
type = "ingress"
ip_protocol = "TCP"
port_range = "80"
policy = "ACCEPT"
source_sgid = "${tencentcloud_security_group.sglab_3.id}"
description = "favourite sg rule_2"
}
```
Provide a resource to create a VPC subnet.
Example Usage ¶
```hcl
variable "availability_zone" {
default = "ap-guangzhou-3"
}
resource "tencentcloud_vpc" "foo" {
name="guagua-ci-temp-test"
cidr_block="10.0.0.0/16"
}
resource "tencentcloud_subnet" "subnet" {
availability_zone="${var.availability_zone}"
name="guagua-ci-temp-test"
vpc_id="${tencentcloud_vpc.foo.id}"
cidr_block="10.0.20.0/28"
is_multicast=false
}
```
Import ¶
Vpc subnet instance can be imported, e.g.
```hcl $ terraform import tencentcloud_subnet.test subnet_id ```
Provide a resource to create a VPC.
Example Usage ¶
```hcl
resource "tencentcloud_vpc" "foo" {
name = "ci-temp-test-updated"
cidr_block = "10.0.0.0/16"
dns_servers=["119.29.29.29","8.8.8.8"]
is_multicast=false
}
```
Import ¶
Vpc instance can be imported, e.g.
```hcl $ terraform import tencentcloud_vpc.test vpc-id ```
Index ¶
- Constants
- Variables
- func GetLogId(ctx context.Context) string
- func LogElapsed(mark ...string) func()
- func Provider() *schema.Provider
- func TencentCloudMysqlParameterDetail() map[string]*schema.Schema
- func TencentMsyqlBasicInfo() map[string]*schema.Schema
- func TencentMysqlSellType() map[string]*schema.Schema
- func TencentMysqlZoneConfig() map[string]*schema.Schema
- type AsService
- func (me *AsService) AttachInstances(ctx context.Context, scalingGroupId string, instanceIds []string) error
- func (me *AsService) ClearScalingGroupInstance(ctx context.Context, scalingGroupId string) error
- func (me *AsService) DeleteLaunchConfiguration(ctx context.Context, configurationId string) error
- func (me *AsService) DeleteLifecycleHook(ctx context.Context, lifecycleHookId string) error
- func (me *AsService) DeleteNotification(ctx context.Context, notificationId string) error
- func (me *AsService) DeleteScalingGroup(ctx context.Context, scalingGroupId string) error
- func (me *AsService) DeleteScalingPolicy(ctx context.Context, scalingPolicyId string) error
- func (me *AsService) DeleteScheduledAction(ctx context.Context, scheduledActonId string) error
- func (me *AsService) DescribeActivityById(ctx context.Context, activityId string) (status string, errRet error)
- func (me *AsService) DescribeAutoScalingAttachment(ctx context.Context, scalingGroupId string) (instanceIds []string, errRet error)
- func (me *AsService) DescribeAutoScalingGroupByFilter(ctx context.Context, scalingGroupId, configurationId, scalingGroupName string) (scalingGroups []*as.AutoScalingGroup, errRet error)
- func (me *AsService) DescribeAutoScalingGroupById(ctx context.Context, scalingGroupId string) (scalingGroup *as.AutoScalingGroup, errRet error)
- func (me *AsService) DescribeLaunchConfigurationByFilter(ctx context.Context, configurationId, configurationName string) (configs []*as.LaunchConfiguration, errRet error)
- func (me *AsService) DescribeLaunchConfigurationById(ctx context.Context, configurationId string) (config *as.LaunchConfiguration, errRet error)
- func (me *AsService) DescribeLifecycleHookById(ctx context.Context, lifecycleHookId string) (lifecycleHook *as.LifecycleHook, errRet error)
- func (me *AsService) DescribeNotificationById(ctx context.Context, notificationId string) (notification *as.AutoScalingNotification, errRet error)
- func (me *AsService) DescribeScalingPolicyByFilter(ctx context.Context, policyId, policyName, scalingGroupId string) (scalingPolicies []*as.ScalingPolicy, errRet error)
- func (me *AsService) DescribeScalingPolicyById(ctx context.Context, scalingPolicyId string) (scalingPolicy *as.ScalingPolicy, errRet error)
- func (me *AsService) DescribeScheduledActionById(ctx context.Context, scheduledActionId string) (scheduledAction *as.ScheduledAction, errRet error)
- func (me *AsService) DetachInstances(ctx context.Context, scalingGroupId string, instanceIds []string) error
- type CbsService
- func (me *CbsService) ApplySnapshot(ctx context.Context, diskId, snapshotId string) error
- func (me *CbsService) AttachDisk(ctx context.Context, diskId, instanceId string) error
- func (me *CbsService) CreateSnapshot(ctx context.Context, diskId, snapshotName string) (snapshotId string, errRet error)
- func (me *CbsService) DeleteDiskById(ctx context.Context, diskId string) error
- func (me *CbsService) DeleteSnapshot(ctx context.Context, snapshotId string) error
- func (me *CbsService) DeleteSnapshotPolicy(ctx context.Context, policyId string) error
- func (me *CbsService) DescribeDiskById(ctx context.Context, diskId string) (disk *cbs.Disk, errRet error)
- func (me *CbsService) DescribeDisksByFilter(ctx context.Context, params map[string]string) (disks []*cbs.Disk, errRet error)
- func (me *CbsService) DescribeSnapshotById(ctx context.Context, snapshotId string) (snapshot *cbs.Snapshot, errRet error)
- func (me *CbsService) DescribeSnapshotPolicyById(ctx context.Context, policyId string) (policy *cbs.AutoSnapshotPolicy, errRet error)
- func (me *CbsService) DescribeSnapshotsByFilter(ctx context.Context, params map[string]string) (snapshots []*cbs.Snapshot, errRet error)
- func (me *CbsService) DetachDisk(ctx context.Context, diskId, instanceId string) error
- func (me *CbsService) ModifyDiskAttributes(ctx context.Context, diskId, diskName string, projectId int) error
- func (me *CbsService) ModifySnapshotName(ctx context.Context, snapshotId, snapshotName string) error
- func (me *CbsService) ResizeDisk(ctx context.Context, diskId string, diskSize int) error
- type CcnAttachedInstanceInfo
- type CcnBandwidthLimit
- type CcnBasicInfo
- type Config
- type CosService
- func (me *CosService) DeleteBucket(ctx context.Context, bucket string) (errRet error)
- func (me *CosService) DeleteObject(ctx context.Context, bucket, key string) (errRet error)
- func (me *CosService) GetBucketCors(ctx context.Context, bucket string) (corsRules []map[string]interface{}, errRet error)
- func (me *CosService) GetBucketLifecycle(ctx context.Context, bucket string) (lifecycleRules []map[string]interface{}, errRet error)
- func (me *CosService) GetBucketWebsite(ctx context.Context, bucket string) (websites []map[string]interface{}, errRet error)
- func (me *CosService) GetDataSourceBucketLifecycle(ctx context.Context, bucket string) (lifecycleRules []map[string]interface{}, errRet error)
- func (me *CosService) HeadBucket(ctx context.Context, bucket string) (errRet error)
- func (me *CosService) HeadObject(ctx context.Context, bucket, key string) (info *s3.HeadObjectOutput, errRet error)
- func (me *CosService) ListBuckets(ctx context.Context) (buckets []*s3.Bucket, errRet error)
- func (me *CosService) ListObjects(ctx context.Context, bucket string) (objects []*s3.Object, errRet error)
- func (me *CosService) PutBucket(ctx context.Context, bucket, acl string) (errRet error)
- func (me *CosService) PutObjectAcl(ctx context.Context, bucket, key, acl string) (errRet error)
- type DcService
- func (me *DcService) CreateDirectConnectTunnel(ctx context.Context, ...) (dcxId string, errRet error)
- func (me *DcService) DeleteDirectConnectTunnel(ctx context.Context, dcxId string) (errRet error)
- func (me *DcService) DescribeDirectConnectTunnel(ctx context.Context, dcxId string) (info dc.DirectConnectTunnel, has int64, errRet error)
- func (me *DcService) DescribeDirectConnectTunnels(ctx context.Context, dcxId, name string) (infos []dc.DirectConnectTunnel, errRet error)
- func (me *DcService) DescribeDirectConnects(ctx context.Context, dcId, name string) (infos []dc.DirectConnect, errRet error)
- func (me *DcService) ModifyDirectConnectTunnelAttribute(ctx context.Context, dcxId string, ...) (errRet error)
- type DcgInstanceInfo
- type DcgRouteInfo
- type MongodbService
- func (me *MongodbService) DeleteInstance(ctx context.Context, instanceId string) error
- func (me *MongodbService) DescribeInstanceById(ctx context.Context, instanceId string) (instance *mongodb.MongoDBInstanceDetail, errRet error)
- func (me *MongodbService) DescribeInstancesByFilter(ctx context.Context, instanceId string, clusterType int) (mongodbs []*mongodb.MongoDBInstanceDetail, errRet error)
- func (me *MongodbService) DescribeSpecInfo(ctx context.Context, zone string) (infos []*mongodb.SpecificationInfo, errRet error)
- func (me *MongodbService) ModifyInstanceName(ctx context.Context, instanceId, instanceName string) error
- func (me *MongodbService) ModifyProjectId(ctx context.Context, instanceId string, projectId int) error
- func (me *MongodbService) SetInstancePassword(ctx context.Context, instanceId, accountName, password string) error
- func (me *MongodbService) UpgradeInstance(ctx context.Context, instanceId string, memory, volume int) error
- type MysqlService
- func (me *MysqlService) CheckDBGTIDOpen(ctx context.Context, mysqlId string) (open int64, errRet error)
- func (me *MysqlService) CloseWanService(ctx context.Context, mysqlId string) (asyncRequestId string, errRet error)
- func (me *MysqlService) CreateAccount(ctx context.Context, mysqlId string, ...) (asyncRequestId string, errRet error)
- func (me *MysqlService) CreateBackup(ctx context.Context, mysqlId string) (backupId int64, errRet error)
- func (me *MysqlService) DeleteAccount(ctx context.Context, mysqlId string, accountName string) (asyncRequestId string, errRet error)
- func (me *MysqlService) DescribeAccountPrivileges(ctx context.Context, mysqlId string, accountName string, ...) (privileges []string, errRet error)
- func (me *MysqlService) DescribeAccounts(ctx context.Context, mysqlId string) (accountInfos []*cdb.AccountInfo, errRet error)
- func (me *MysqlService) DescribeAsyncRequestInfo(ctx context.Context, asyncRequestId string) (status, message string, errRet error)
- func (me *MysqlService) DescribeBackupConfigByMysqlId(ctx context.Context, mysqlId string) (desResponse *cdb.DescribeBackupConfigResponse, errRet error)
- func (me *MysqlService) DescribeBackupsByMysqlId(ctx context.Context, mysqlId string, leftNumber int64) (backupInfos []*cdb.BackupInfo, errRet error)
- func (me *MysqlService) DescribeCaresParameters(ctx context.Context, instanceId string, cares []string) (caresKv map[string]interface{}, errRet error)
- func (me *MysqlService) DescribeDBInstanceById(ctx context.Context, mysqlId string) (mysqlInfo *cdb.InstanceInfo, errRet error)
- func (me *MysqlService) DescribeDBInstanceConfig(ctx context.Context, mysqlId string) (backupConfig *cdb.DescribeDBInstanceConfigResponse, errRet error)
- func (me *MysqlService) DescribeDBSecurityGroups(ctx context.Context, mysqlId string) (securityGroups []string, errRet error)
- func (me *MysqlService) DescribeDBZoneConfig(ctx context.Context) (sellConfigures []*cdb.RegionSellConf, errRet error)
- func (me *MysqlService) DescribeDefaultParameters(ctx context.Context, engineVersion string) (parameterList []*cdb.ParameterDetail, errRet error)
- func (me *MysqlService) DescribeInstanceParameters(ctx context.Context, instanceId string) (parameterList []*cdb.ParameterDetail, errRet error)
- func (me *MysqlService) DescribeIsolatedDBInstanceById(ctx context.Context, mysqlId string) (mysqlInfo *cdb.InstanceInfo, errRet error)
- func (me *MysqlService) DescribeRunningDBInstanceById(ctx context.Context, mysqlId string) (mysqlInfo *cdb.InstanceInfo, errRet error)
- func (me *MysqlService) DescribeTagsOfInstanceId(ctx context.Context, mysqlId string) (tags map[string]string, errRet error)
- func (me *MysqlService) DisassociateSecurityGroup(ctx context.Context, mysqlId string, securityGroup string) (errRet error)
- func (me *MysqlService) InitDBInstances(ctx context.Context, mysqlId string, password string) (asyncRequestId string, errRet error)
- func (me *MysqlService) IsolateDBInstance(ctx context.Context, mysqlId string) (asyncRequestId string, errRet error)
- func (me *MysqlService) ModifyAccountDescription(ctx context.Context, mysqlId string, accountName, accountDescription string) (asyncRequestId string, errRet error)
- func (me *MysqlService) ModifyAccountPassword(ctx context.Context, mysqlId string, accountName, accountPassword string) (asyncRequestId string, errRet error)
- func (me *MysqlService) ModifyAccountPrivileges(ctx context.Context, mysqlId string, accountName string, ...) (asyncRequestId string, errRet error)
- func (me *MysqlService) ModifyAutoRenewFlag(ctx context.Context, mysqlId string, newRenewFlag int64) (errRet error)
- func (me *MysqlService) ModifyBackupConfigByMysqlId(ctx context.Context, mysqlId string, retentionPeriod int64, ...) (errRet error)
- func (me *MysqlService) ModifyDBInstanceName(ctx context.Context, mysqlId, newInstanceName string) (errRet error)
- func (me *MysqlService) ModifyDBInstanceProject(ctx context.Context, mysqlId string, newProjectId int64) (errRet error)
- func (me *MysqlService) ModifyDBInstanceSecurityGroups(ctx context.Context, mysqlId string, securityGroups []string) (errRet error)
- func (me *MysqlService) ModifyDBInstanceVipVport(ctx context.Context, mysqlId, vpcId, subnetId string, port int64) (errRet error)
- func (me *MysqlService) ModifyInstanceParam(ctx context.Context, instanceId string, params map[string]string) (asyncRequestId string, errRet error)
- func (me *MysqlService) ModifyInstanceTag(ctx context.Context, mysqlId string, deleteTags, modifyTags map[string]string) (errRet error)
- func (me *MysqlService) NotFoundMysqlInstance(err error) bool
- func (me *MysqlService) OfflineIsolatedInstances(ctx context.Context, mysqlId string) (errRet error)
- func (me *MysqlService) OpenDBInstanceGTID(ctx context.Context, mysqlId string) (asyncRequestId string, errRet error)
- func (me *MysqlService) OpenWanService(ctx context.Context, mysqlId string) (asyncRequestId string, errRet error)
- func (me *MysqlService) UpgradeDBInstance(ctx context.Context, mysqlId string, memSize, volumeSize int64) (asyncRequestId string, errRet error)
- type RedisService
- func (me *RedisService) CheckRedisCreateOk(ctx context.Context, redisId string) (has bool, online bool, info *redis.InstanceSet, errRet error)
- func (me *RedisService) CreateInstances(ctx context.Context, ...) (dealId string, errRet error)
- func (me *RedisService) DescribeAutoBackupConfig(ctx context.Context, redisId string) (weekDays []string, timePeriod string, errRet error)
- func (me *RedisService) DescribeInstanceDealDetail(ctx context.Context, dealId string) (done bool, redisId string, errRet error)
- func (me *RedisService) DescribeInstanceSecurityGroup(ctx context.Context, redisId string) (sg []string, errRet error)
- func (me *RedisService) DescribeInstances(ctx context.Context, zoneName, searchKey string, projectId, needLimit int64) (instances []TencentCloudRedisDetail, errRet error)
- func (me *RedisService) DescribeRedisZoneConfig(ctx context.Context) (sellConfigures []*redis.RegionConf, errRet error)
- func (me *RedisService) DescribeTaskInfo(ctx context.Context, redisId string, taskId int64) (ok bool, errRet error)
- func (me *RedisService) DestroyPostpaidInstance(ctx context.Context, redisId string) (taskId int64, errRet error)
- func (me *RedisService) ModifyAutoBackupConfig(ctx context.Context, redisId string, weekDays []string, timePeriod string) (errRet error)
- func (me *RedisService) ModifyInstanceName(ctx context.Context, redisId string, name string) (errRet error)
- func (me *RedisService) ModifyInstanceProjectId(ctx context.Context, redisId string, projectId int64) (errRet error)
- func (me *RedisService) ResetPassword(ctx context.Context, redisId string, newPassword string) (taskId int64, errRet error)
- func (me *RedisService) UpgradeInstance(ctx context.Context, redisId string, newMemSize int64) (dealId string, errRet error)
- type TencentCloudClient
- type TencentCloudRedisDetail
- type VpcBasicInfo
- type VpcRouteEntryBasicInfo
- type VpcRouteTableBasicInfo
- type VpcService
- func (me *VpcService) AttachCcnInstances(ctx context.Context, ccnId, instanceRegion, instanceType, instanceId string) (errRet error)
- func (me *VpcService) CreateCcn(ctx context.Context, name, description, qos string) (basicInfo CcnBasicInfo, errRet error)
- func (me *VpcService) CreateDirectConnectGateway(ctx context.Context, name, networkType, networkInstanceId, gatewayType string) (dcgId string, errRet error)
- func (me *VpcService) CreateDirectConnectGatewayCcnRoute(ctx context.Context, dcgId, cidr string, asPaths []string) (routeId string, errRet error)
- func (me *VpcService) CreateRouteTable(ctx context.Context, name, vpcId string) (routeTableId string, errRet error)
- func (me *VpcService) CreateRoutes(ctx context.Context, ...) (entryId int64, errRet error)
- func (me *VpcService) CreateSecurityGroup(ctx context.Context, name, desc string, projectId *int) (id string, err error)
- func (me *VpcService) CreateSecurityGroupPolicy(ctx context.Context, info securityGroupRuleBasicInfo) (ruleId string, err error)
- func (me *VpcService) CreateSubnet(ctx context.Context, vpcId, name, cidr, zone string) (subnetId string, errRet error)
- func (me *VpcService) CreateVpc(ctx context.Context, name, cidr string, isMulticast bool, dnsServers []string) (vpcId string, isDefault bool, errRet error)
- func (me *VpcService) DeleteCcn(ctx context.Context, ccnId string) (errRet error)
- func (me *VpcService) DeleteDirectConnectGateway(ctx context.Context, dcgId string) (errRet error)
- func (me *VpcService) DeleteDirectConnectGatewayCcnRoute(ctx context.Context, dcgId, routeId string) (errRet error)
- func (me *VpcService) DeleteRouteTable(ctx context.Context, routeTableId string) (errRet error)
- func (me *VpcService) DeleteRoutes(ctx context.Context, routeTableId string, entryId uint64) (errRet error)
- func (me *VpcService) DeleteSecurityGroup(ctx context.Context, id string) error
- func (me *VpcService) DeleteSecurityGroupPolicy(ctx context.Context, ruleId string) error
- func (me *VpcService) DeleteSubnet(ctx context.Context, subnetId string) (errRet error)
- func (me *VpcService) DeleteVpc(ctx context.Context, vpcId string) (errRet error)
- func (me *VpcService) DescribeCcn(ctx context.Context, ccnId string) (info CcnBasicInfo, has int, errRet error)
- func (me *VpcService) DescribeCcnAttachedInstance(ctx context.Context, ccnId, instanceRegion, instanceType, instanceId string) (info CcnAttachedInstanceInfo, has int, errRet error)
- func (me *VpcService) DescribeCcnAttachedInstances(ctx context.Context, ccnId string) (infos []CcnAttachedInstanceInfo, errRet error)
- func (me *VpcService) DescribeCcnRegionBandwidthLimit(ctx context.Context, ccnId, region string) (bandwidth int64, errRet error)
- func (me *VpcService) DescribeCcnRegionBandwidthLimits(ctx context.Context, ccnId string) (infos []CcnBandwidthLimit, errRet error)
- func (me *VpcService) DescribeCcns(ctx context.Context, ccnId, name string) (infos []CcnBasicInfo, errRet error)
- func (me *VpcService) DescribeDirectConnectGateway(ctx context.Context, dcgId string) (info DcgInstanceInfo, has int, errRet error)
- func (me *VpcService) DescribeDirectConnectGatewayCcnRoute(ctx context.Context, dcgId, routeId string) (infoRet DcgRouteInfo, has int, errRet error)
- func (me *VpcService) DescribeDirectConnectGatewayCcnRoutes(ctx context.Context, dcgId string) (infos []DcgRouteInfo, errRet error)
- func (me *VpcService) DescribeDirectConnectGateways(ctx context.Context, dcgId, name string) (infos []DcgInstanceInfo, errRet error)
- func (me *VpcService) DescribeRouteTable(ctx context.Context, routeTableId string) (info VpcRouteTableBasicInfo, has int, errRet error)
- func (me *VpcService) DescribeRouteTables(ctx context.Context, routeTableId, routeTableName, vpcId string) (infos []VpcRouteTableBasicInfo, errRet error)
- func (me *VpcService) DescribeSecurityGroup(ctx context.Context, id string) (sg *vpc.SecurityGroup, has int, err error)
- func (me *VpcService) DescribeSecurityGroupPolicy(ctx context.Context, ruleId string) (sgId string, policyType string, policy *vpc.SecurityGroupPolicy, errRet error)
- func (me *VpcService) DescribeSecurityGroups(ctx context.Context, sgId, sgName *string, projectId *int) (sgs []*vpc.SecurityGroup, err error)
- func (me *VpcService) DescribeSecurityGroupsAssociate(ctx context.Context, ids []string) ([]*vpc.SecurityGroupAssociationStatistics, error)
- func (me *VpcService) DescribeSubnet(ctx context.Context, subnetId string) (info VpcSubnetBasicInfo, has int, errRet error)
- func (me *VpcService) DescribeSubnets(ctx context.Context, subnet_id, vpc_id, subnet_name, zone string) (infos []VpcSubnetBasicInfo, errRet error)
- func (me *VpcService) DescribeVpc(ctx context.Context, vpcId string) (info VpcBasicInfo, has int, errRet error)
- func (me *VpcService) DescribeVpcs(ctx context.Context, vpcId, name string) (infos []VpcBasicInfo, errRet error)
- func (me *VpcService) DetachCcnInstances(ctx context.Context, ccnId, instanceRegion, instanceType, instanceId string) (errRet error)
- func (me *VpcService) GetCcnRouteId(ctx context.Context, dcgId, cidr string, asPaths []string) (routeId string, has int, errRet error)
- func (me *VpcService) GetRouteId(ctx context.Context, ...) (entryId int64, errRet error)
- func (me *VpcService) IsRouteTableInVpc(ctx context.Context, routeTableId, vpcId string) (info VpcRouteTableBasicInfo, has int, errRet error)
- func (me *VpcService) ModifyCcnAttribute(ctx context.Context, ccnId, name, description string) (errRet error)
- func (me *VpcService) ModifyDirectConnectGatewayAttribute(ctx context.Context, dcgId, name string) (errRet error)
- func (me *VpcService) ModifyRouteTableAttribute(ctx context.Context, routeTableId string, name string) (errRet error)
- func (me *VpcService) ModifySecurityGroup(ctx context.Context, id string, newName, newDesc *string) error
- func (me *VpcService) ModifySecurityGroupPolicy(ctx context.Context, ruleId string, desc *string) error
- func (me *VpcService) ModifySubnetAttribute(ctx context.Context, subnetId, name string, isMulticast bool) (errRet error)
- func (me *VpcService) ModifyVpcAttribute(ctx context.Context, vpcId, name string, isMulticast bool, dnsServers []string) (errRet error)
- func (me *VpcService) ReplaceRouteTableAssociation(ctx context.Context, subnetId string, routeTableId string) (errRet error)
- func (me *VpcService) SetCcnRegionBandwidthLimits(ctx context.Context, ccnId, region string, bandwidth int64) (errRet error)
- type VpcSubnetBasicInfo
Constants ¶
const ( // mysql MysqlInstanceIdNotFound = "InvalidParameter.InstanceNotFound" MysqlInstanceIdNotFound2 = "InvalidParameter" MysqlInstanceIdNotFound3 = "InternalError.DatabaseAccessError" // as AsScalingGroupInProgress = "ResourceInUse.ActivityInProgress" AsScalingGroupInstanceInGroup = "ResourceInUse.InstanceInGroup" AsScalingGroupNotFound = "ResourceNotFound.AutoScalingGroupNotFound" //vpc VPCNotFound = "ResourceNotFound" )
const ( SYSTEM_DISK_TYPE_LOCAL_BASIC = "LOCAL_BASIC" SYSTEM_DISK_TYPE_LOCAL_SSD = "LOCAL_SSD" SYSTEM_DISK_TYPE_CLOUD_BASIC = "CLOUD_BASIC" SYSTEM_DISK_TYPE_CLOUD_PREMIUM = "CLOUD_PREMIUM" SYSTEM_DISK_TYPE_CLOUD_SSD = "CLOUD_SSD" )
const ( INTERNET_CHARGE_TYPE_BANDWIDTH_PREPAID = "BANDWIDTH_PREPAID" INTERNET_CHARGE_TYPE_TRAFFIC_POSTPAID_BY_HOUR = "TRAFFIC_POSTPAID_BY_HOUR" INTERNET_CHARGE_TYPE_BANDWIDTH_POSTPAID_BY_HOUR = "BANDWIDTH_POSTPAID_BY_HOUR" INTERNET_CHARGE_TYPE_BANDWIDTH_PACKAGE = "BANDWIDTH_PACKAGE" )
const ( INSTANCE_CHARGE_TYPE_POSTPAID = "POSTPAID_BY_HOUR" INSTANCE_CHARGE_TYPE_SPOTPAID = "SPOTPAID" )
const ( SCALING_GROUP_TERMINATION_POLICY_NEWEST_INSTANCE = "NEWEST_INSTANCE" SCALING_GROUP_TERMINATION_POLICY_OLDEST_INSTANCE = "OLDEST_INSTANCE" )
const ( SCALING_GROUP_RETRY_POLICY_IMMEDIATE_RETRY = "IMMEDIATE_RETRY" SCALING_GROUP_RETRY_POLICY_INCREMENTAL_INTERVALS = "INCREMENTAL_INTERVALS" )
const ( SCALING_GROUP_ADJUSTMENT_TYPE_CHANGE_IN_CAPACITY = "CHANGE_IN_CAPACITY" SCALING_GROUP_ADJUSTMENT_TYPE_EXACT_CAPACITY = "EXACT_CAPACITY" SCALING_GROUP_ADJUSTMENT_TYPE_PERCENT_CHANGE_IN_CAPACITY = "PERCENT_CHANGE_IN_CAPACITY" )
const ( SCALING_GROUP_COMPARISON_OPERATOR_GREATER = "GREATER_THAN" SCALING_GROUP_COMPARISON_OPERATOR_GREATER_EQUAL = "GREATER_THAN_OR_EQUAL_TO" SCALING_GROUP_COMPARISON_OPERATOR_LESS = "LESS_THAN" SCALING_GROUP_COMPARISON_OPERATOR_LESS_EQUAL = "LESS_THAN_OR_EQUAL_TO" SCALING_GROUP_COMPARISON_OPERATOR_EQUAL = "EQUAL_TO" SCALING_GROUP_COMPARISON_OPERATOR_NOT_EQUAL = "NOT_EQUAL_TO" )
const ( SCALING_GROUP_METRIC_NAME_CPU_UTILIZATION = "CPU_UTILIZATION" SCALING_GROUP_METRIC_NAME_MEM_UTILIZATION = "MEM_UTILIZATION" SCALING_GROUP_METRIC_NAME_LAN_TRAFFIC_OUT = "LAN_TRAFFIC_OUT" SCALING_GROUP_METRIC_NAME_LAN_TRAFFIC_IN = "LAN_TRAFFIC_IN" SCALING_GROUP_METRIC_NAME_WAN_TRAFFIC_OUT = "WAN_TRAFFIC_OUT" SCALING_GROUP_METRIC_NAME_WAN_TRAFFIC_IN = "WAN_TRAFFIC_IN" )
const ( SCALING_GROUP_STATISTIC_AVERAGE = "AVERAGE" SCALING_GROUP_STATISTIC_MAXIMUM = "MAXIMUM" SCALING_GROUP_STATISTIC_MINIMUM = "MINIMUM" )
const ( SCALING_GROUP_NOTIFICATION_TYPE_SCALE_OUT_SUCCESS = "SCALE_OUT_SUCCESSFUL" SCALING_GROUP_NOTIFICATION_TYPE_SCALE_OUT_FAILED = "SCALE_OUT_FAILED" SCALING_GROUP_NOTIFICATION_TYPE_SCALE_IN_SUCCESS = "SCALE_IN_SUCCESSFUL" SCALING_GROUP_NOTIFICATION_TYPE_SCALE_IN_FAILED = "SCALE_IN_FAILED" SCALING_GROUP_NOTIFICATION_TYPE_REPLACE_SUCCESS = "REPLACE_UNHEALTHY_INSTANCE_SUCCESSFUL" SCALING_GROUP_NOTIFICATION_TYPE_REPLACE_FAILED = "REPLACE_UNHEALTHY_INSTANCE_FAILED" )
const ( SCALING_GROUP_ACTIVITY_STATUS_INIT = "INIT" SCALING_GROUP_ACTIVITY_STATUS_RUNNING = "RUNNING" SCALING_GROUP_ACTIVITY_STATUS_SUCCESSFUL = "SUCCESSFUL" SCALING_GROUP_ACTIVITY_STATUS_PARTIALLY_SUCCESSFUL = "PARTIALLY_SUCCESSFUL" SCALING_GROUP_ACTIVITY_STATUS_FAILED = "FAILED" SCALING_GROUP_ACTIVITY_STATUS_CANCELLED = "CANCELLED" )
const ( CBS_STORAGE_TYPE_CLOUD_BASIC = "CLOUD_BASIC" CBS_STORAGE_TYPE_CLOUD_PREMIUM = "CLOUD_PREMIUM" CBS_STORAGE_TYPE_CLOUD_SSD = "CLOUD_SSD" CBS_STORAGE_USAGE_SYSTEM_DISK = "SYSTEM_DISK" CBS_STORAGE_USAGE_DATA_DISK = "DATA_DISK" CBS_STORAGE_STATUS_UNATTACHED = "UNATTACHED" CBS_STORAGE_STATUS_ATTACHING = "ATTACHING" CBS_STORAGE_STATUS_ATTACHED = "ATTACHED" CBS_STORAGE_STATUS_EXPANDING = "EXPANDING" CBS_STORAGE_STATUS_ROLLBACKING = "ROLLBACKING" CBS_SNAPSHOT_STATUS_NORMAL = "NORMAL" CBS_SNAPSHOT_STATUS_CREATING = "CREATING" )
const ( DC_NETWORK_TYPE_VPC = "VPC" DC_NETWORK_TYPE_BMVPC = "BMVPC" DC_NETWORK_TYPE_CCN = "CCN" )
const ( DC_ROUTE_TYPE_BGP = "BGP" DC_ROUTE_TYPE_STATIC = "STATIC" )
const ( DCG_NETWORK_TYPE_VPC = "VPC" DCG_NETWORK_TYPE_CCN = "CCN" )
https://cloud.tencent.com/document/product/215/19192
const ( DCG_GATEWAY_TYPE_NORMAL = "NORMAL" DCG_GATEWAY_TYPE_NAT = "NAT" )
const ( DCG_CCN_ROUTE_TYPE_BGP = "BGP" DCG_CCN_ROUTE_TYPE_STATIC = "STATIC" )
https://cloud.tencent.com/document/product/215/30643
const ( MONGODB_INSTANCE_STATUS_INITIAL = 0 MONGODB_INSTANCE_STATUS_PROCESSING = 1 MONGODB_INSTANCE_STATUS_RUNNING = 2 MONGODB_ENGINE_VERSION_3_WT = "MONGO_3_WT" MONGODB_ENGINE_VERSION_36_WT = "MONGO_36_WT" MONGODB_ENGINE_VERSION_3_ROCKS = "MONGO_3_ROCKS" MONGODB_MACHINE_TYPE_GIO = "GIO" MONGODB_MACHINE_TYPE_TGIO = "TGIO" MONGODB_CLUSTER_TYPE_REPLSET = "REPLSET" MONGODB_CLUSTER_TYPE_SHARD = "SHARD" )
const ( ZONE_SELL_STATUS_ONLINE = 1 ZONE_SELL_STATUS_NEW = 2 )
const ( MYSQL_STATUS_DELIVING = 0 MYSQL_STATUS_RUNNING = 1 MYSQL_STATUS_ISOLATING = 4 MYSQL_STATUS_ISOLATED = 5 //https://cloud.tencent.com/document/api/236/36197 //Internal business state , not public MYSQL_STATUS_ISOLATED_1 = 6 MYSQL_STATUS_ISOLATED_2 = 7 )
mysql Status https://cloud.tencent.com/document/api/236/15872
const ( MYSQL_TASK_STATUS_INITIAL = "INITIAL" MYSQL_TASK_STATUS_RUNNING = "RUNNING" MYSQL_TASK_STATUS_SUCCESS = "SUCCESS" MYSQL_TASK_STATUS_FAILED = "FAILED" MYSQL_TASK_STATUS_REMOVED = "REMOVED" MYSQL_TASK_STATUS_PAUSED = "PAUSED " )
Async task status, from https://cloud.tencent.com/document/api/236/20410
const ( MYSQL_RENEW_NOUSE = 0 MYSQL_RENEW_OPEN = 1 MYSQL_RENEW_CLOSE = 2 )
automatic renewal status code
const ( REDIS_VERSION_MASTER_SLAVE_REDIS = 2 REDIS_VERSION_MASTER_SLAVE_CKV = 3 REDIS_VERSION_CLUSTER_CKV = 4 REDIS_VERSION_STANDALONE_REDIS = 5 REDIS_VERSION_CLUSTER_REDIS = 7 )
redis version https://cloud.tencent.com/document/api/239/20022#ProductConf
const ( REDIS_STATUS_INIT = 0 REDIS_STATUS_PROCESSING = 1 REDIS_STATUS_ONLINE = 2 REDIS_STATUS_ISOLATE = -2 REDIS_STATUS_TODELETE = -3 )
redis status https://cloud.tencent.com/document/product/239/20018
const ( REDIS_ORDER_SUCCESS_DELIVERY = 4 REDIS_ORDER_PAYMENT = 12 )
https://cloud.tencent.com/document/api/239/20022#TradeDealDetail Order status 1: unpaid 2: paid, not shipped 3: in shipment 4: successfully 5: shipped failed 6: refunded 7: closed order 8: expired 9: order no longer valid 10: product no longer valid 11: payment refused 12: in payment
const ( REDIS_TASK_PREPARING = "preparing" REDIS_TASK_RUNNING = "running" REDIS_TASK_SUCCEED = "succeed" REDIS_TASK_FAILED = "failed" REDIS_TASK_ERROR = "error" )
https://cloud.tencent.com/document/api/239/30601
const ( PROVIDER_SECRET_ID = "TENCENTCLOUD_SECRET_ID" PROVIDER_SECRET_KEY = "TENCENTCLOUD_SECRET_KEY" PROVIDER_REGION = "TENCENTCLOUD_REGION" )
const ( CLUSTER_NOT_FOUND_CODE = -16009 CLUSTER_LIFESTATE_RUNNING = "Running" )
const CNN_INSTANCE_TYPE_BMVPC = "BMVPC"
const CNN_INSTANCE_TYPE_DIRECTCONNECT = "DIRECTCONNECT"
const CNN_INSTANCE_TYPE_VPC = "VPC"
const CNN_QOS_AG = "AG"
const CNN_QOS_AU = "AU"
const CNN_QOS_PT = "PT"
const FILED_SP = "#"
const GATE_WAY_TYPE_CCN = "CCN"
const GATE_WAY_TYPE_CVM = "CVM"
all gate way types https://cloud.tencent.com/document/api/215/15824#Route
const GATE_WAY_TYPE_DIRECTCONNECT = "DIRECTCONNECT"
const GATE_WAY_TYPE_EIP = "EIP"
const GATE_WAY_TYPE_NAT = "NAT"
const GATE_WAY_TYPE_NORMAL_CVM = "NORMAL_CVM"
const GATE_WAY_TYPE_SSLVPN = "SSLVPN"
const GATE_WAY_TYPE_VPN = "VPN"
const (
INSTANCE_NOT_FOUND_CODE = -1
)
Variables ¶
var ( MysqlPayByMonth = 0 MysqlPayByUse = 1 )
type of pay
var ALL_GATE_WAY_TYPES = []string{GATE_WAY_TYPE_CVM, GATE_WAY_TYPE_VPN, GATE_WAY_TYPE_DIRECTCONNECT, GATE_WAY_TYPE_SSLVPN, GATE_WAY_TYPE_NAT, GATE_WAY_TYPE_NORMAL_CVM, GATE_WAY_TYPE_EIP, GATE_WAY_TYPE_CCN, }
var CBS_STORAGE_TYPE = []string{ CBS_STORAGE_TYPE_CLOUD_BASIC, CBS_STORAGE_TYPE_CLOUD_PREMIUM, CBS_STORAGE_TYPE_CLOUD_SSD, }
var CBS_STORAGE_USAGE = []string{ CBS_STORAGE_USAGE_SYSTEM_DISK, CBS_STORAGE_USAGE_DATA_DISK, }
var DCG_GATEWAY_TYPES = []string{DCG_GATEWAY_TYPE_NORMAL, DCG_GATEWAY_TYPE_NAT}
var DCG_NETWORK_TYPES = []string{DCG_NETWORK_TYPE_VPC, DCG_NETWORK_TYPE_CCN}
var DC_NETWORK_TYPES = []string{DC_NETWORK_TYPE_VPC, DC_NETWORK_TYPE_BMVPC, DC_NETWORK_TYPE_CCN}
var DC_ROUTE_TYPES = []string{DC_ROUTE_TYPE_BGP, DC_ROUTE_TYPE_STATIC}
var INTERNET_CHARGE_ALLOW_TYPE = []string{ INTERNET_CHARGE_TYPE_TRAFFIC_POSTPAID_BY_HOUR, }
var MONGODB_CLUSTER_TYPE = []string{ MONGODB_CLUSTER_TYPE_REPLSET, MONGODB_CLUSTER_TYPE_SHARD, }
var MONGODB_ENGINE_VERSION = []string{ MONGODB_ENGINE_VERSION_3_WT, MONGODB_ENGINE_VERSION_36_WT, MONGODB_ENGINE_VERSION_3_ROCKS, }
var MONGODB_MACHINE_TYPE = []string{ MONGODB_MACHINE_TYPE_GIO, MONGODB_MACHINE_TYPE_TGIO, }
var MYSQL_ALLOW_BACKUP_MODEL = []string{"logical", "physical"}
var MYSQL_ALLOW_BACKUP_TIME = []string{"02:00-06:00", "06:00-10:00", "10:00-14:00", "14:00-18:00", "18:00-22:00", "22:00-02:00"}
var MYSQL_AVAILABLE_PERIOD = []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 24, 36}
mysql available period value
var MYSQL_DATABASE_MUST_PRIVILEGE = "SHOW VIEW"
var MYSQL_DATABASE_PRIVILEGE = []string{"SELECT", "INSERT", "UPDATE", "DELETE",
"CREATE", "DROP", "REFERENCES", "INDEX",
"ALTER", "CREATE TEMPORARY TABLES", "LOCK TABLES",
"EXECUTE", "CREATE VIEW", "SHOW VIEW",
"CREATE ROUTINE", "ALTER ROUTINE", "EVENT", "TRIGGER"}
var MYSQL_DEFAULT_ACCOUNT_HOST = "%"
default to all host
var MYSQL_ROLE_MAP = map[int64]string{
1: "master",
2: "ro",
3: "dr",
}
var MYSQL_SUPPORTS_ENGINE = []string{"5.5", "5.6", "5.7"}
var REDIS_NAMES = map[int64]string{ REDIS_VERSION_MASTER_SLAVE_REDIS: "master_slave_redis", REDIS_VERSION_MASTER_SLAVE_CKV: "master_slave_ckv", REDIS_VERSION_CLUSTER_REDIS: "cluster_redis", REDIS_VERSION_CLUSTER_CKV: "cluster_ckv", REDIS_VERSION_STANDALONE_REDIS: "standalone_redis", }
var REDIS_STATUS = map[int64]string{ REDIS_STATUS_INIT: "init", REDIS_STATUS_PROCESSING: "processing", REDIS_STATUS_ONLINE: "online", REDIS_STATUS_ISOLATE: "isolate", REDIS_STATUS_TODELETE: "todelete", }
var REDIS_ZONE_ID2NAME = map[int64]string{
100001: "ap-guangzhou-1",
100002: "ap-guangzhou-2",
100003: "ap-guangzhou-3",
100004: "ap-guangzhou-4",
200001: "ap-shanghai-1",
200002: "ap-shanghai-2",
200003: "ap-shanghai-3",
200004: "ap-shanghai-4",
300001: "ap-hongkong-1",
300002: "ap-hongkong-2",
400001: "na-toronto-1",
700001: "ap-shanghai-fsi-1",
700002: "ap-shanghai-fsi-2",
800001: "ap-beijing-1",
800002: "ap-beijing-2",
800003: "ap-beijing-3",
800004: "ap-beijing-4",
900001: "ap-singapore-1",
110001: "ap-shenzhen-fsi-1",
110002: "ap-shenzhen-fsi-2",
150001: "na-siliconvalley-1",
150002: "na-siliconvalley-2",
160001: "ap-chengdu-1",
160002: "ap-chengdu-2",
170001: "en-frankfurt-1",
180001: "ap-seoul-1",
190001: "ap-chongqing-1",
210001: "ap-mumbai-1",
220001: "na-ashburn-1",
230001: "ap-bangkok-1",
240001: "eu-moscow-1",
250001: "ap-tokyo-1",
}
var SCALING_GROUP_ADJUSTMENT_TYPE = []string{ SCALING_GROUP_ADJUSTMENT_TYPE_CHANGE_IN_CAPACITY, SCALING_GROUP_ADJUSTMENT_TYPE_EXACT_CAPACITY, SCALING_GROUP_ADJUSTMENT_TYPE_PERCENT_CHANGE_IN_CAPACITY, }
var SCALING_GROUP_COMPARISON_OPERATOR = []string{ SCALING_GROUP_COMPARISON_OPERATOR_GREATER, SCALING_GROUP_COMPARISON_OPERATOR_GREATER_EQUAL, SCALING_GROUP_COMPARISON_OPERATOR_LESS, SCALING_GROUP_COMPARISON_OPERATOR_LESS_EQUAL, SCALING_GROUP_COMPARISON_OPERATOR_EQUAL, SCALING_GROUP_COMPARISON_OPERATOR_NOT_EQUAL, }
var SCALING_GROUP_METRIC_NAME = []string{ SCALING_GROUP_METRIC_NAME_CPU_UTILIZATION, SCALING_GROUP_METRIC_NAME_MEM_UTILIZATION, SCALING_GROUP_METRIC_NAME_LAN_TRAFFIC_OUT, SCALING_GROUP_METRIC_NAME_LAN_TRAFFIC_IN, SCALING_GROUP_METRIC_NAME_WAN_TRAFFIC_OUT, SCALING_GROUP_METRIC_NAME_WAN_TRAFFIC_IN, }
var SCALING_GROUP_NOTIFICATION_TYPE = []string{ SCALING_GROUP_NOTIFICATION_TYPE_SCALE_OUT_SUCCESS, SCALING_GROUP_NOTIFICATION_TYPE_SCALE_OUT_FAILED, SCALING_GROUP_NOTIFICATION_TYPE_SCALE_IN_SUCCESS, SCALING_GROUP_NOTIFICATION_TYPE_SCALE_IN_FAILED, SCALING_GROUP_NOTIFICATION_TYPE_REPLACE_SUCCESS, SCALING_GROUP_NOTIFICATION_TYPE_REPLACE_FAILED, }
var SCALING_GROUP_STATISTIC = []string{ SCALING_GROUP_STATISTIC_AVERAGE, SCALING_GROUP_STATISTIC_MAXIMUM, SCALING_GROUP_STATISTIC_MINIMUM, }
var SYSTEM_DISK_ALLOW_TYPE = []string{ SYSTEM_DISK_TYPE_CLOUD_PREMIUM, SYSTEM_DISK_TYPE_CLOUD_SSD, }
Functions ¶
func LogElapsed ¶ added in v1.5.0
func LogElapsed(mark ...string) func()
LogElapsed log elapsed time, using in defer
func TencentCloudMysqlParameterDetail ¶ added in v1.5.0
func TencentMsyqlBasicInfo ¶ added in v1.5.0
func TencentMysqlSellType ¶ added in v1.5.0
func TencentMysqlZoneConfig ¶ added in v1.5.0
Types ¶
type AsService ¶ added in v1.8.0
type AsService struct {
// contains filtered or unexported fields
}
func (*AsService) AttachInstances ¶ added in v1.8.0
func (*AsService) ClearScalingGroupInstance ¶ added in v1.8.0
set the scaling group desired capacity to 0
func (*AsService) DeleteLaunchConfiguration ¶ added in v1.8.0
func (*AsService) DeleteLifecycleHook ¶ added in v1.8.0
func (*AsService) DeleteNotification ¶ added in v1.8.0
func (*AsService) DeleteScalingGroup ¶ added in v1.8.0
func (*AsService) DeleteScalingPolicy ¶ added in v1.8.0
func (*AsService) DeleteScheduledAction ¶ added in v1.8.0
func (*AsService) DescribeActivityById ¶ added in v1.8.0
func (*AsService) DescribeAutoScalingAttachment ¶ added in v1.8.0
func (*AsService) DescribeAutoScalingGroupByFilter ¶ added in v1.8.0
func (*AsService) DescribeAutoScalingGroupById ¶ added in v1.8.0
func (*AsService) DescribeLaunchConfigurationByFilter ¶ added in v1.8.0
func (*AsService) DescribeLaunchConfigurationById ¶ added in v1.8.0
func (*AsService) DescribeLifecycleHookById ¶ added in v1.8.0
func (*AsService) DescribeNotificationById ¶ added in v1.8.0
func (*AsService) DescribeScalingPolicyByFilter ¶ added in v1.8.0
func (*AsService) DescribeScalingPolicyById ¶ added in v1.8.0
func (*AsService) DescribeScheduledActionById ¶ added in v1.8.0
type CbsService ¶ added in v1.10.0
type CbsService struct {
// contains filtered or unexported fields
}
func (*CbsService) ApplySnapshot ¶ added in v1.10.0
func (me *CbsService) ApplySnapshot(ctx context.Context, diskId, snapshotId string) error
func (*CbsService) AttachDisk ¶ added in v1.10.0
func (me *CbsService) AttachDisk(ctx context.Context, diskId, instanceId string) error
func (*CbsService) CreateSnapshot ¶ added in v1.10.0
func (*CbsService) DeleteDiskById ¶ added in v1.10.0
func (me *CbsService) DeleteDiskById(ctx context.Context, diskId string) error
func (*CbsService) DeleteSnapshot ¶ added in v1.10.0
func (me *CbsService) DeleteSnapshot(ctx context.Context, snapshotId string) error
func (*CbsService) DeleteSnapshotPolicy ¶ added in v1.10.0
func (me *CbsService) DeleteSnapshotPolicy(ctx context.Context, policyId string) error
func (*CbsService) DescribeDiskById ¶ added in v1.10.0
func (*CbsService) DescribeDisksByFilter ¶ added in v1.10.0
func (*CbsService) DescribeSnapshotById ¶ added in v1.10.0
func (*CbsService) DescribeSnapshotPolicyById ¶ added in v1.10.0
func (me *CbsService) DescribeSnapshotPolicyById(ctx context.Context, policyId string) (policy *cbs.AutoSnapshotPolicy, errRet error)
func (*CbsService) DescribeSnapshotsByFilter ¶ added in v1.10.0
func (*CbsService) DetachDisk ¶ added in v1.10.0
func (me *CbsService) DetachDisk(ctx context.Context, diskId, instanceId string) error
func (*CbsService) ModifyDiskAttributes ¶ added in v1.10.0
func (*CbsService) ModifySnapshotName ¶ added in v1.10.0
func (me *CbsService) ModifySnapshotName(ctx context.Context, snapshotId, snapshotName string) error
func (*CbsService) ResizeDisk ¶ added in v1.10.0
type CcnAttachedInstanceInfo ¶ added in v1.11.0
type CcnAttachedInstanceInfo struct {
// contains filtered or unexported fields
}
type CcnBandwidthLimit ¶ added in v1.11.0
type CcnBandwidthLimit struct {
// contains filtered or unexported fields
}
type CcnBasicInfo ¶ added in v1.11.0
type CcnBasicInfo struct {
// contains filtered or unexported fields
}
Ccn basic information
type CosService ¶ added in v1.6.0
type CosService struct {
// contains filtered or unexported fields
}
func (*CosService) DeleteBucket ¶ added in v1.6.0
func (me *CosService) DeleteBucket(ctx context.Context, bucket string) (errRet error)
func (*CosService) DeleteObject ¶ added in v1.6.0
func (me *CosService) DeleteObject(ctx context.Context, bucket, key string) (errRet error)
func (*CosService) GetBucketCors ¶ added in v1.6.0
func (*CosService) GetBucketLifecycle ¶ added in v1.6.0
func (*CosService) GetBucketWebsite ¶ added in v1.6.0
func (*CosService) GetDataSourceBucketLifecycle ¶ added in v1.6.0
func (*CosService) HeadBucket ¶ added in v1.6.0
func (me *CosService) HeadBucket(ctx context.Context, bucket string) (errRet error)
func (*CosService) HeadObject ¶ added in v1.6.0
func (me *CosService) HeadObject(ctx context.Context, bucket, key string) (info *s3.HeadObjectOutput, errRet error)
func (*CosService) ListBuckets ¶ added in v1.6.0
func (*CosService) ListObjects ¶ added in v1.6.0
func (*CosService) PutBucket ¶ added in v1.6.0
func (me *CosService) PutBucket(ctx context.Context, bucket, acl string) (errRet error)
func (*CosService) PutObjectAcl ¶ added in v1.6.0
func (me *CosService) PutObjectAcl(ctx context.Context, bucket, key, acl string) (errRet error)
type DcService ¶ added in v1.12.0
type DcService struct {
// contains filtered or unexported fields
}
func (*DcService) CreateDirectConnectTunnel ¶ added in v1.12.0
func (*DcService) DeleteDirectConnectTunnel ¶ added in v1.12.0
func (*DcService) DescribeDirectConnectTunnel ¶ added in v1.12.0
func (*DcService) DescribeDirectConnectTunnels ¶ added in v1.12.0
func (*DcService) DescribeDirectConnects ¶ added in v1.12.0
type DcgInstanceInfo ¶ added in v1.13.0
type DcgInstanceInfo struct {
// contains filtered or unexported fields
}
info for one direct connect gateway.
type DcgRouteInfo ¶ added in v1.13.0
type DcgRouteInfo struct {
// contains filtered or unexported fields
}
info for direct connect gateway[ ccn type] route.
type MongodbService ¶ added in v1.14.0
type MongodbService struct {
// contains filtered or unexported fields
}
func (*MongodbService) DeleteInstance ¶ added in v1.14.0
func (me *MongodbService) DeleteInstance(ctx context.Context, instanceId string) error
func (*MongodbService) DescribeInstanceById ¶ added in v1.14.0
func (me *MongodbService) DescribeInstanceById(ctx context.Context, instanceId string) (instance *mongodb.MongoDBInstanceDetail, errRet error)
func (*MongodbService) DescribeInstancesByFilter ¶ added in v1.14.0
func (me *MongodbService) DescribeInstancesByFilter(ctx context.Context, instanceId string, clusterType int) (mongodbs []*mongodb.MongoDBInstanceDetail, errRet error)
func (*MongodbService) DescribeSpecInfo ¶ added in v1.14.0
func (me *MongodbService) DescribeSpecInfo(ctx context.Context, zone string) (infos []*mongodb.SpecificationInfo, errRet error)
func (*MongodbService) ModifyInstanceName ¶ added in v1.14.0
func (me *MongodbService) ModifyInstanceName(ctx context.Context, instanceId, instanceName string) error
func (*MongodbService) ModifyProjectId ¶ added in v1.14.0
func (*MongodbService) SetInstancePassword ¶ added in v1.14.0
func (me *MongodbService) SetInstancePassword(ctx context.Context, instanceId, accountName, password string) error
func (*MongodbService) UpgradeInstance ¶ added in v1.14.0
type MysqlService ¶ added in v1.5.0
type MysqlService struct {
// contains filtered or unexported fields
}
func (*MysqlService) CheckDBGTIDOpen ¶ added in v1.5.0
func (*MysqlService) CloseWanService ¶ added in v1.5.0
func (*MysqlService) CreateAccount ¶ added in v1.5.0
func (*MysqlService) CreateBackup ¶ added in v1.5.0
func (*MysqlService) DeleteAccount ¶ added in v1.5.0
func (*MysqlService) DescribeAccountPrivileges ¶ added in v1.5.0
func (*MysqlService) DescribeAccounts ¶ added in v1.5.0
func (me *MysqlService) DescribeAccounts(ctx context.Context, mysqlId string) (accountInfos []*cdb.AccountInfo, errRet error)
func (*MysqlService) DescribeAsyncRequestInfo ¶ added in v1.5.0
func (*MysqlService) DescribeBackupConfigByMysqlId ¶ added in v1.5.0
func (me *MysqlService) DescribeBackupConfigByMysqlId(ctx context.Context, mysqlId string) (desResponse *cdb.DescribeBackupConfigResponse, errRet error)
func (*MysqlService) DescribeBackupsByMysqlId ¶ added in v1.5.0
func (me *MysqlService) DescribeBackupsByMysqlId(ctx context.Context, mysqlId string, leftNumber int64) (backupInfos []*cdb.BackupInfo, errRet error)
func (*MysqlService) DescribeCaresParameters ¶ added in v1.5.0
func (*MysqlService) DescribeDBInstanceById ¶ added in v1.5.0
func (me *MysqlService) DescribeDBInstanceById(ctx context.Context, mysqlId string) (mysqlInfo *cdb.InstanceInfo, errRet error)
func (*MysqlService) DescribeDBInstanceConfig ¶ added in v1.5.0
func (me *MysqlService) DescribeDBInstanceConfig(ctx context.Context, mysqlId string) (backupConfig *cdb.DescribeDBInstanceConfigResponse, errRet error)
func (*MysqlService) DescribeDBSecurityGroups ¶ added in v1.5.0
func (*MysqlService) DescribeDBZoneConfig ¶ added in v1.5.0
func (me *MysqlService) DescribeDBZoneConfig(ctx context.Context) (sellConfigures []*cdb.RegionSellConf, errRet error)
func (*MysqlService) DescribeDefaultParameters ¶ added in v1.5.0
func (me *MysqlService) DescribeDefaultParameters(ctx context.Context, engineVersion string) (parameterList []*cdb.ParameterDetail, errRet error)
func (*MysqlService) DescribeInstanceParameters ¶ added in v1.5.0
func (me *MysqlService) DescribeInstanceParameters(ctx context.Context, instanceId string) (parameterList []*cdb.ParameterDetail, errRet error)
func (*MysqlService) DescribeIsolatedDBInstanceById ¶ added in v1.13.0
func (me *MysqlService) DescribeIsolatedDBInstanceById(ctx context.Context, mysqlId string) (mysqlInfo *cdb.InstanceInfo, errRet error)
func (*MysqlService) DescribeRunningDBInstanceById ¶ added in v1.5.0
func (me *MysqlService) DescribeRunningDBInstanceById(ctx context.Context, mysqlId string) (mysqlInfo *cdb.InstanceInfo, errRet error)
func (*MysqlService) DescribeTagsOfInstanceId ¶ added in v1.5.0
func (*MysqlService) DisassociateSecurityGroup ¶ added in v1.5.0
func (*MysqlService) InitDBInstances ¶ added in v1.5.0
func (*MysqlService) IsolateDBInstance ¶ added in v1.5.0
func (*MysqlService) ModifyAccountDescription ¶ added in v1.5.0
func (*MysqlService) ModifyAccountPassword ¶ added in v1.5.0
func (*MysqlService) ModifyAccountPrivileges ¶ added in v1.5.0
func (*MysqlService) ModifyAutoRenewFlag ¶ added in v1.5.0
func (*MysqlService) ModifyBackupConfigByMysqlId ¶ added in v1.5.0
func (*MysqlService) ModifyDBInstanceName ¶ added in v1.5.0
func (me *MysqlService) ModifyDBInstanceName(ctx context.Context, mysqlId, newInstanceName string) (errRet error)
func (*MysqlService) ModifyDBInstanceProject ¶ added in v1.5.0
func (*MysqlService) ModifyDBInstanceSecurityGroups ¶ added in v1.5.0
func (*MysqlService) ModifyDBInstanceVipVport ¶ added in v1.5.0
func (*MysqlService) ModifyInstanceParam ¶ added in v1.5.0
func (*MysqlService) ModifyInstanceTag ¶ added in v1.5.0
func (*MysqlService) NotFoundMysqlInstance ¶ added in v1.5.0
func (me *MysqlService) NotFoundMysqlInstance(err error) bool
check if the err means the mysql_id is not found
func (*MysqlService) OfflineIsolatedInstances ¶ added in v1.12.0
func (me *MysqlService) OfflineIsolatedInstances(ctx context.Context, mysqlId string) (errRet error)
func (*MysqlService) OpenDBInstanceGTID ¶ added in v1.5.0
func (*MysqlService) OpenWanService ¶ added in v1.5.0
func (*MysqlService) UpgradeDBInstance ¶ added in v1.5.0
type RedisService ¶ added in v1.7.0
type RedisService struct {
// contains filtered or unexported fields
}
func (*RedisService) CheckRedisCreateOk ¶ added in v1.7.0
func (me *RedisService) CheckRedisCreateOk(ctx context.Context, redisId string) (has bool, online bool, info *redis.InstanceSet, errRet error)
func (*RedisService) CreateInstances ¶ added in v1.7.0
func (*RedisService) DescribeAutoBackupConfig ¶ added in v1.7.0
func (*RedisService) DescribeInstanceDealDetail ¶ added in v1.7.0
func (*RedisService) DescribeInstanceSecurityGroup ¶ added in v1.7.0
func (*RedisService) DescribeInstances ¶ added in v1.7.0
func (me *RedisService) DescribeInstances(ctx context.Context, zoneName, searchKey string, projectId, needLimit int64) (instances []TencentCloudRedisDetail, errRet error)
func (*RedisService) DescribeRedisZoneConfig ¶ added in v1.7.0
func (me *RedisService) DescribeRedisZoneConfig(ctx context.Context) (sellConfigures []*redis.RegionConf, errRet error)
func (*RedisService) DescribeTaskInfo ¶ added in v1.7.0
func (*RedisService) DestroyPostpaidInstance ¶ added in v1.7.0
func (*RedisService) ModifyAutoBackupConfig ¶ added in v1.7.0
func (*RedisService) ModifyInstanceName ¶ added in v1.7.0
func (*RedisService) ModifyInstanceProjectId ¶ added in v1.7.0
func (*RedisService) ResetPassword ¶ added in v1.7.0
func (*RedisService) UpgradeInstance ¶ added in v1.7.0
type TencentCloudClient ¶
type TencentCloudClient struct {
// contains filtered or unexported fields
}
func (*TencentCloudClient) DescribeDnat ¶
func (*TencentCloudClient) PollingVpcBillResult ¶
func (client *TencentCloudClient) PollingVpcBillResult(billId *string) (status bool, err error)
func (*TencentCloudClient) PollingVpcTaskResult ¶
func (client *TencentCloudClient) PollingVpcTaskResult(taskId *int) (status bool, err error)
type TencentCloudRedisDetail ¶ added in v1.7.0
type VpcBasicInfo ¶ added in v1.10.0
type VpcBasicInfo struct {
// contains filtered or unexported fields
}
VPC basic information
type VpcRouteEntryBasicInfo ¶ added in v1.10.0
type VpcRouteEntryBasicInfo struct {
// contains filtered or unexported fields
}
route entry basic information
type VpcRouteTableBasicInfo ¶ added in v1.10.0
type VpcRouteTableBasicInfo struct {
// contains filtered or unexported fields
}
route table basic information
type VpcService ¶ added in v1.10.0
type VpcService struct {
// contains filtered or unexported fields
}
func (*VpcService) AttachCcnInstances ¶ added in v1.11.0
func (me *VpcService) AttachCcnInstances(ctx context.Context, ccnId, instanceRegion, instanceType, instanceId string) (errRet error)
func (*VpcService) CreateCcn ¶ added in v1.11.0
func (me *VpcService) CreateCcn(ctx context.Context, name, description, qos string) (basicInfo CcnBasicInfo, errRet error)
func (*VpcService) CreateDirectConnectGateway ¶ added in v1.13.0
func (*VpcService) CreateDirectConnectGatewayCcnRoute ¶ added in v1.13.0
func (*VpcService) CreateRouteTable ¶ added in v1.10.0
func (*VpcService) CreateRoutes ¶ added in v1.10.0
func (*VpcService) CreateSecurityGroup ¶ added in v1.14.0
func (*VpcService) CreateSecurityGroupPolicy ¶ added in v1.14.0
func (me *VpcService) CreateSecurityGroupPolicy(ctx context.Context, info securityGroupRuleBasicInfo) (ruleId string, err error)
func (*VpcService) CreateSubnet ¶ added in v1.10.0
func (*VpcService) CreateVpc ¶ added in v1.10.0
func (me *VpcService) CreateVpc(ctx context.Context, name, cidr string, isMulticast bool, dnsServers []string) (vpcId string, isDefault bool, errRet error)
////////api
func (*VpcService) DeleteCcn ¶ added in v1.11.0
func (me *VpcService) DeleteCcn(ctx context.Context, ccnId string) (errRet error)
func (*VpcService) DeleteDirectConnectGateway ¶ added in v1.13.0
func (me *VpcService) DeleteDirectConnectGateway(ctx context.Context, dcgId string) (errRet error)
func (*VpcService) DeleteDirectConnectGatewayCcnRoute ¶ added in v1.13.0
func (me *VpcService) DeleteDirectConnectGatewayCcnRoute(ctx context.Context, dcgId, routeId string) (errRet error)
func (*VpcService) DeleteRouteTable ¶ added in v1.10.0
func (me *VpcService) DeleteRouteTable(ctx context.Context, routeTableId string) (errRet error)
func (*VpcService) DeleteRoutes ¶ added in v1.10.0
func (*VpcService) DeleteSecurityGroup ¶ added in v1.14.0
func (me *VpcService) DeleteSecurityGroup(ctx context.Context, id string) error
func (*VpcService) DeleteSecurityGroupPolicy ¶ added in v1.14.0
func (me *VpcService) DeleteSecurityGroupPolicy(ctx context.Context, ruleId string) error
func (*VpcService) DeleteSubnet ¶ added in v1.10.0
func (me *VpcService) DeleteSubnet(ctx context.Context, subnetId string) (errRet error)
func (*VpcService) DeleteVpc ¶ added in v1.10.0
func (me *VpcService) DeleteVpc(ctx context.Context, vpcId string) (errRet error)
func (*VpcService) DescribeCcn ¶ added in v1.11.0
func (me *VpcService) DescribeCcn(ctx context.Context, ccnId string) (info CcnBasicInfo, has int, errRet error)
func (*VpcService) DescribeCcnAttachedInstance ¶ added in v1.11.0
func (me *VpcService) DescribeCcnAttachedInstance(ctx context.Context, ccnId, instanceRegion, instanceType, instanceId string) (info CcnAttachedInstanceInfo, has int, errRet error)
func (*VpcService) DescribeCcnAttachedInstances ¶ added in v1.11.0
func (me *VpcService) DescribeCcnAttachedInstances(ctx context.Context, ccnId string) (infos []CcnAttachedInstanceInfo, errRet error)
func (*VpcService) DescribeCcnRegionBandwidthLimit ¶ added in v1.11.0
func (*VpcService) DescribeCcnRegionBandwidthLimits ¶ added in v1.11.0
func (me *VpcService) DescribeCcnRegionBandwidthLimits(ctx context.Context, ccnId string) (infos []CcnBandwidthLimit, errRet error)
func (*VpcService) DescribeCcns ¶ added in v1.11.0
func (me *VpcService) DescribeCcns(ctx context.Context, ccnId, name string) (infos []CcnBasicInfo, errRet error)
func (*VpcService) DescribeDirectConnectGateway ¶ added in v1.13.0
func (me *VpcService) DescribeDirectConnectGateway(ctx context.Context, dcgId string) (info DcgInstanceInfo, has int, errRet error)
func (*VpcService) DescribeDirectConnectGatewayCcnRoute ¶ added in v1.13.0
func (me *VpcService) DescribeDirectConnectGatewayCcnRoute(ctx context.Context, dcgId, routeId string) (infoRet DcgRouteInfo, has int, errRet error)
func (*VpcService) DescribeDirectConnectGatewayCcnRoutes ¶ added in v1.13.0
func (me *VpcService) DescribeDirectConnectGatewayCcnRoutes(ctx context.Context, dcgId string) (infos []DcgRouteInfo, errRet error)
func (*VpcService) DescribeDirectConnectGateways ¶ added in v1.13.0
func (me *VpcService) DescribeDirectConnectGateways(ctx context.Context, dcgId, name string) ( infos []DcgInstanceInfo, errRet error)
func (*VpcService) DescribeRouteTable ¶ added in v1.10.0
func (me *VpcService) DescribeRouteTable(ctx context.Context, routeTableId string) (info VpcRouteTableBasicInfo, has int, errRet error)
func (*VpcService) DescribeRouteTables ¶ added in v1.10.0
func (me *VpcService) DescribeRouteTables(ctx context.Context, routeTableId, routeTableName, vpcId string) (infos []VpcRouteTableBasicInfo, errRet error)
func (*VpcService) DescribeSecurityGroup ¶ added in v1.14.0
func (me *VpcService) DescribeSecurityGroup(ctx context.Context, id string) (sg *vpc.SecurityGroup, has int, err error)
func (*VpcService) DescribeSecurityGroupPolicy ¶ added in v1.14.0
func (me *VpcService) DescribeSecurityGroupPolicy(ctx context.Context, ruleId string) (sgId string, policyType string, policy *vpc.SecurityGroupPolicy, errRet error)
func (*VpcService) DescribeSecurityGroups ¶ added in v1.14.0
func (me *VpcService) DescribeSecurityGroups(ctx context.Context, sgId, sgName *string, projectId *int) (sgs []*vpc.SecurityGroup, err error)
func (*VpcService) DescribeSecurityGroupsAssociate ¶ added in v1.14.0
func (me *VpcService) DescribeSecurityGroupsAssociate(ctx context.Context, ids []string) ([]*vpc.SecurityGroupAssociationStatistics, error)
func (*VpcService) DescribeSubnet ¶ added in v1.10.0
func (me *VpcService) DescribeSubnet(ctx context.Context, subnetId string) (info VpcSubnetBasicInfo, has int, errRet error)
func (*VpcService) DescribeSubnets ¶ added in v1.10.0
func (me *VpcService) DescribeSubnets(ctx context.Context, subnet_id, vpc_id, subnet_name, zone string) (infos []VpcSubnetBasicInfo, errRet error)
func (*VpcService) DescribeVpc ¶ added in v1.10.0
func (me *VpcService) DescribeVpc(ctx context.Context, vpcId string) (info VpcBasicInfo, has int, errRet error)
func (*VpcService) DescribeVpcs ¶ added in v1.10.0
func (me *VpcService) DescribeVpcs(ctx context.Context, vpcId, name string) (infos []VpcBasicInfo, errRet error)
func (*VpcService) DetachCcnInstances ¶ added in v1.11.0
func (me *VpcService) DetachCcnInstances(ctx context.Context, ccnId, instanceRegion, instanceType, instanceId string) (errRet error)
func (*VpcService) GetCcnRouteId ¶ added in v1.13.0
func (*VpcService) GetRouteId ¶ added in v1.10.0
func (*VpcService) IsRouteTableInVpc ¶ added in v1.10.0
func (me *VpcService) IsRouteTableInVpc(ctx context.Context, routeTableId, vpcId string) (info VpcRouteTableBasicInfo, has int, errRet error)
func (*VpcService) ModifyCcnAttribute ¶ added in v1.11.0
func (me *VpcService) ModifyCcnAttribute(ctx context.Context, ccnId, name, description string) (errRet error)
func (*VpcService) ModifyDirectConnectGatewayAttribute ¶ added in v1.13.0
func (me *VpcService) ModifyDirectConnectGatewayAttribute(ctx context.Context, dcgId, name string) (errRet error)
func (*VpcService) ModifyRouteTableAttribute ¶ added in v1.10.0
func (*VpcService) ModifySecurityGroup ¶ added in v1.14.0
func (*VpcService) ModifySecurityGroupPolicy ¶ added in v1.14.0
func (*VpcService) ModifySubnetAttribute ¶ added in v1.10.0
func (*VpcService) ModifyVpcAttribute ¶ added in v1.10.0
func (*VpcService) ReplaceRouteTableAssociation ¶ added in v1.10.0
func (*VpcService) SetCcnRegionBandwidthLimits ¶ added in v1.11.0
type VpcSubnetBasicInfo ¶ added in v1.10.0
type VpcSubnetBasicInfo struct {
// contains filtered or unexported fields
}
subnet basic information
Source Files
¶
- common.go
- config.go
- data_source_tc_as_scaling_configs.go
- data_source_tc_as_scaling_groups.go
- data_source_tc_as_scaling_policies.go
- data_source_tc_availability_zones.go
- data_source_tc_cbs_snapshots.go
- data_source_tc_cbs_storages.go
- data_source_tc_ccn_bandwidth_limits.go
- data_source_tc_ccn_instances.go
- data_source_tc_common_schema.go
- data_source_tc_container_cluster_instances.go
- data_source_tc_container_clusters.go
- data_source_tc_cos_bucket_object.go
- data_source_tc_cos_buckets.go
- data_source_tc_dc_gateway_ccn_routes.go
- data_source_tc_dc_gateway_instances.go
- data_source_tc_dc_instances.go
- data_source_tc_dcx_instances.go
- data_source_tc_eip.go
- data_source_tc_image.go
- data_source_tc_instance_types.go
- data_source_tc_mongodb_instances.go
- data_source_tc_mongodb_zone_config.go
- data_source_tc_mysql_backup_list.go
- data_source_tc_mysql_instance.go
- data_source_tc_mysql_parameter_list.go
- data_source_tc_mysql_zone_config.go
- data_source_tc_nats.go
- data_source_tc_redis_instances.go
- data_source_tc_redis_zone_config.go
- data_source_tc_route_table.go
- data_source_tc_security_group.go
- data_source_tc_security_groups.go
- data_source_tc_subnet.go
- data_source_tc_vpc.go
- data_source_tc_vpc_instances.go
- data_source_tc_vpc_route_tables.go
- data_source_tc_vpc_subnets.go
- errors.go
- extension_as.go
- extension_cbs.go
- extension_cnn.go
- extension_dc.go
- extension_dc_gateway.go
- extension_mongodb.go
- extension_mysql.go
- extension_redis.go
- extension_vpc.go
- helper.go
- provider.go
- resource_tc_alb_server_attachment.go
- resource_tc_as_attachment.go
- resource_tc_as_lifecycle_hook.go
- resource_tc_as_notification.go
- resource_tc_as_scaling_config.go
- resource_tc_as_scaling_group.go
- resource_tc_as_scaling_policy.go
- resource_tc_as_schedule.go
- resource_tc_cbs_snapshot.go
- resource_tc_cbs_snapshot_policy.go
- resource_tc_cbs_storage.go
- resource_tc_cbs_storage_attachment.go
- resource_tc_ccn.go
- resource_tc_ccn_attachment.go
- resource_tc_ccn_bandwidth_limit.go
- resource_tc_container_cluster.go
- resource_tc_container_cluster_instance.go
- resource_tc_cos_bucket.go
- resource_tc_cos_bucket_object.go
- resource_tc_dc_gateway.go
- resource_tc_dc_gateway_ccn_route.go
- resource_tc_dcx.go
- resource_tc_dnat.go
- resource_tc_eip.go
- resource_tc_eip_association.go
- resource_tc_instance.go
- resource_tc_key_pair.go
- resource_tc_lb.go
- resource_tc_mongodb_instance.go
- resource_tc_mongodb_sharding_instance.go
- resource_tc_mysql_account.go
- resource_tc_mysql_account_privilege.go
- resource_tc_mysql_backup_policy.go
- resource_tc_mysql_instance.go
- resource_tc_mysql_readonly_instance.go
- resource_tc_nat_gateway.go
- resource_tc_redis_backup_config.go
- resource_tc_redis_instance.go
- resource_tc_route_entry.go
- resource_tc_route_table.go
- resource_tc_route_table_entry.go
- resource_tc_security_group.go
- resource_tc_security_group_rule.go
- resource_tc_subnet.go
- resource_tc_vpc.go
- service_eip.go
- service_instance.go
- service_key_pair.go
- service_lb.go
- service_security_group.go
- service_tencentcloud_as.go
- service_tencentcloud_cbs.go
- service_tencentcloud_ccn.go
- service_tencentcloud_cos.go
- service_tencentcloud_dc.go
- service_tencentcloud_dcg.go
- service_tencentcloud_mongodb.go
- service_tencentcloud_mysql.go
- service_tencentcloud_redis.go
- service_tencentcloud_vpc.go
- service_vpc.go
- validators.go