1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. ApiGatewayUpstream
tencentcloud 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack

tencentcloud.ApiGatewayUpstream

Explore with Pulumi AI

Provides a resource to create a apigateway upstream

Example Usage

Create a basic VPC channel

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const zones = tencentcloud.getAvailabilityZonesByProduct({
    product: "cvm",
});
const images = tencentcloud.getImages({
    imageTypes: ["PUBLIC_IMAGE"],
    imageNameRegex: "Final",
});
const instanceTypes = tencentcloud.getInstanceTypes({
    filters: [{
        name: "instance-family",
        values: ["S5"],
    }],
    cpuCoreCount: 2,
    excludeSoldOut: true,
});
const vpc = new tencentcloud.Vpc("vpc", {cidrBlock: "10.0.0.0/16"});
const subnet = new tencentcloud.Subnet("subnet", {
    availabilityZone: zones.then(zones => zones.zones?.[3]?.name),
    vpcId: vpc.vpcId,
    cidrBlock: "10.0.0.0/16",
    isMulticast: false,
});
const exampleInstance = new tencentcloud.Instance("exampleInstance", {
    instanceName: "tf_example",
    availabilityZone: zones.then(zones => zones.zones?.[3]?.name),
    imageId: images.then(images => images.images?.[0]?.imageId),
    instanceType: instanceTypes.then(instanceTypes => instanceTypes.instanceTypes?.[0]?.instanceType),
    systemDiskType: "CLOUD_PREMIUM",
    systemDiskSize: 50,
    hostname: "terraform",
    projectId: 0,
    vpcId: vpc.vpcId,
    subnetId: subnet.subnetId,
    dataDisks: [{
        dataDiskType: "CLOUD_PREMIUM",
        dataDiskSize: 50,
        encrypt: false,
    }],
    tags: {
        tagKey: "tagValue",
    },
});
const exampleApiGatewayUpstream = new tencentcloud.ApiGatewayUpstream("exampleApiGatewayUpstream", {
    scheme: "HTTP",
    algorithm: "ROUND-ROBIN",
    uniqVpcId: vpc.vpcId,
    upstreamName: "tf_example",
    upstreamDescription: "desc.",
    upstreamType: "IP_PORT",
    retries: 5,
    nodes: [{
        host: "1.1.1.1",
        port: 9090,
        weight: 10,
        vmInstanceId: exampleInstance.instanceId,
        tags: ["tags"],
    }],
    tags: {
        createdBy: "terraform",
    },
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

zones = tencentcloud.get_availability_zones_by_product(product="cvm")
images = tencentcloud.get_images(image_types=["PUBLIC_IMAGE"],
    image_name_regex="Final")
instance_types = tencentcloud.get_instance_types(filters=[{
        "name": "instance-family",
        "values": ["S5"],
    }],
    cpu_core_count=2,
    exclude_sold_out=True)
vpc = tencentcloud.Vpc("vpc", cidr_block="10.0.0.0/16")
subnet = tencentcloud.Subnet("subnet",
    availability_zone=zones.zones[3].name,
    vpc_id=vpc.vpc_id,
    cidr_block="10.0.0.0/16",
    is_multicast=False)
example_instance = tencentcloud.Instance("exampleInstance",
    instance_name="tf_example",
    availability_zone=zones.zones[3].name,
    image_id=images.images[0].image_id,
    instance_type=instance_types.instance_types[0].instance_type,
    system_disk_type="CLOUD_PREMIUM",
    system_disk_size=50,
    hostname="terraform",
    project_id=0,
    vpc_id=vpc.vpc_id,
    subnet_id=subnet.subnet_id,
    data_disks=[{
        "data_disk_type": "CLOUD_PREMIUM",
        "data_disk_size": 50,
        "encrypt": False,
    }],
    tags={
        "tagKey": "tagValue",
    })
example_api_gateway_upstream = tencentcloud.ApiGatewayUpstream("exampleApiGatewayUpstream",
    scheme="HTTP",
    algorithm="ROUND-ROBIN",
    uniq_vpc_id=vpc.vpc_id,
    upstream_name="tf_example",
    upstream_description="desc.",
    upstream_type="IP_PORT",
    retries=5,
    nodes=[{
        "host": "1.1.1.1",
        "port": 9090,
        "weight": 10,
        "vm_instance_id": example_instance.instance_id,
        "tags": ["tags"],
    }],
    tags={
        "createdBy": "terraform",
    })
Copy
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 {
		zones, err := tencentcloud.GetAvailabilityZonesByProduct(ctx, &tencentcloud.GetAvailabilityZonesByProductArgs{
			Product: "cvm",
		}, nil)
		if err != nil {
			return err
		}
		images, err := tencentcloud.GetImages(ctx, &tencentcloud.GetImagesArgs{
			ImageTypes: []string{
				"PUBLIC_IMAGE",
			},
			ImageNameRegex: pulumi.StringRef("Final"),
		}, nil)
		if err != nil {
			return err
		}
		instanceTypes, err := tencentcloud.GetInstanceTypes(ctx, &tencentcloud.GetInstanceTypesArgs{
			Filters: []tencentcloud.GetInstanceTypesFilter{
				{
					Name: "instance-family",
					Values: []string{
						"S5",
					},
				},
			},
			CpuCoreCount:   pulumi.Float64Ref(2),
			ExcludeSoldOut: pulumi.BoolRef(true),
		}, nil)
		if err != nil {
			return err
		}
		vpc, err := tencentcloud.NewVpc(ctx, "vpc", &tencentcloud.VpcArgs{
			CidrBlock: pulumi.String("10.0.0.0/16"),
		})
		if err != nil {
			return err
		}
		subnet, err := tencentcloud.NewSubnet(ctx, "subnet", &tencentcloud.SubnetArgs{
			AvailabilityZone: pulumi.String(zones.Zones[3].Name),
			VpcId:            vpc.VpcId,
			CidrBlock:        pulumi.String("10.0.0.0/16"),
			IsMulticast:      pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		exampleInstance, err := tencentcloud.NewInstance(ctx, "exampleInstance", &tencentcloud.InstanceArgs{
			InstanceName:     pulumi.String("tf_example"),
			AvailabilityZone: pulumi.String(zones.Zones[3].Name),
			ImageId:          pulumi.String(images.Images[0].ImageId),
			InstanceType:     pulumi.String(instanceTypes.InstanceTypes[0].InstanceType),
			SystemDiskType:   pulumi.String("CLOUD_PREMIUM"),
			SystemDiskSize:   pulumi.Float64(50),
			Hostname:         pulumi.String("terraform"),
			ProjectId:        pulumi.Float64(0),
			VpcId:            vpc.VpcId,
			SubnetId:         subnet.SubnetId,
			DataDisks: tencentcloud.InstanceDataDiskArray{
				&tencentcloud.InstanceDataDiskArgs{
					DataDiskType: pulumi.String("CLOUD_PREMIUM"),
					DataDiskSize: pulumi.Float64(50),
					Encrypt:      pulumi.Bool(false),
				},
			},
			Tags: pulumi.StringMap{
				"tagKey": pulumi.String("tagValue"),
			},
		})
		if err != nil {
			return err
		}
		_, err = tencentcloud.NewApiGatewayUpstream(ctx, "exampleApiGatewayUpstream", &tencentcloud.ApiGatewayUpstreamArgs{
			Scheme:              pulumi.String("HTTP"),
			Algorithm:           pulumi.String("ROUND-ROBIN"),
			UniqVpcId:           vpc.VpcId,
			UpstreamName:        pulumi.String("tf_example"),
			UpstreamDescription: pulumi.String("desc."),
			UpstreamType:        pulumi.String("IP_PORT"),
			Retries:             pulumi.Float64(5),
			Nodes: tencentcloud.ApiGatewayUpstreamNodeArray{
				&tencentcloud.ApiGatewayUpstreamNodeArgs{
					Host:         pulumi.String("1.1.1.1"),
					Port:         pulumi.Float64(9090),
					Weight:       pulumi.Float64(10),
					VmInstanceId: exampleInstance.InstanceId,
					Tags: pulumi.StringArray{
						pulumi.String("tags"),
					},
				},
			},
			Tags: pulumi.StringMap{
				"createdBy": pulumi.String("terraform"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var zones = Tencentcloud.GetAvailabilityZonesByProduct.Invoke(new()
    {
        Product = "cvm",
    });

    var images = Tencentcloud.GetImages.Invoke(new()
    {
        ImageTypes = new[]
        {
            "PUBLIC_IMAGE",
        },
        ImageNameRegex = "Final",
    });

    var instanceTypes = Tencentcloud.GetInstanceTypes.Invoke(new()
    {
        Filters = new[]
        {
            new Tencentcloud.Inputs.GetInstanceTypesFilterInputArgs
            {
                Name = "instance-family",
                Values = new[]
                {
                    "S5",
                },
            },
        },
        CpuCoreCount = 2,
        ExcludeSoldOut = true,
    });

    var vpc = new Tencentcloud.Vpc("vpc", new()
    {
        CidrBlock = "10.0.0.0/16",
    });

    var subnet = new Tencentcloud.Subnet("subnet", new()
    {
        AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[3]?.Name),
        VpcId = vpc.VpcId,
        CidrBlock = "10.0.0.0/16",
        IsMulticast = false,
    });

    var exampleInstance = new Tencentcloud.Instance("exampleInstance", new()
    {
        InstanceName = "tf_example",
        AvailabilityZone = zones.Apply(getAvailabilityZonesByProductResult => getAvailabilityZonesByProductResult.Zones[3]?.Name),
        ImageId = images.Apply(getImagesResult => getImagesResult.Images[0]?.ImageId),
        InstanceType = instanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.InstanceType),
        SystemDiskType = "CLOUD_PREMIUM",
        SystemDiskSize = 50,
        Hostname = "terraform",
        ProjectId = 0,
        VpcId = vpc.VpcId,
        SubnetId = subnet.SubnetId,
        DataDisks = new[]
        {
            new Tencentcloud.Inputs.InstanceDataDiskArgs
            {
                DataDiskType = "CLOUD_PREMIUM",
                DataDiskSize = 50,
                Encrypt = false,
            },
        },
        Tags = 
        {
            { "tagKey", "tagValue" },
        },
    });

    var exampleApiGatewayUpstream = new Tencentcloud.ApiGatewayUpstream("exampleApiGatewayUpstream", new()
    {
        Scheme = "HTTP",
        Algorithm = "ROUND-ROBIN",
        UniqVpcId = vpc.VpcId,
        UpstreamName = "tf_example",
        UpstreamDescription = "desc.",
        UpstreamType = "IP_PORT",
        Retries = 5,
        Nodes = new[]
        {
            new Tencentcloud.Inputs.ApiGatewayUpstreamNodeArgs
            {
                Host = "1.1.1.1",
                Port = 9090,
                Weight = 10,
                VmInstanceId = exampleInstance.InstanceId,
                Tags = new[]
                {
                    "tags",
                },
            },
        },
        Tags = 
        {
            { "createdBy", "terraform" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetAvailabilityZonesByProductArgs;
import com.pulumi.tencentcloud.inputs.GetImagesArgs;
import com.pulumi.tencentcloud.inputs.GetInstanceTypesArgs;
import com.pulumi.tencentcloud.Vpc;
import com.pulumi.tencentcloud.VpcArgs;
import com.pulumi.tencentcloud.Subnet;
import com.pulumi.tencentcloud.SubnetArgs;
import com.pulumi.tencentcloud.Instance;
import com.pulumi.tencentcloud.InstanceArgs;
import com.pulumi.tencentcloud.inputs.InstanceDataDiskArgs;
import com.pulumi.tencentcloud.ApiGatewayUpstream;
import com.pulumi.tencentcloud.ApiGatewayUpstreamArgs;
import com.pulumi.tencentcloud.inputs.ApiGatewayUpstreamNodeArgs;
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) {
        final var zones = TencentcloudFunctions.getAvailabilityZonesByProduct(GetAvailabilityZonesByProductArgs.builder()
            .product("cvm")
            .build());

        final var images = TencentcloudFunctions.getImages(GetImagesArgs.builder()
            .imageTypes("PUBLIC_IMAGE")
            .imageNameRegex("Final")
            .build());

        final var instanceTypes = TencentcloudFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
            .filters(GetInstanceTypesFilterArgs.builder()
                .name("instance-family")
                .values("S5")
                .build())
            .cpuCoreCount(2)
            .excludeSoldOut(true)
            .build());

        var vpc = new Vpc("vpc", VpcArgs.builder()
            .cidrBlock("10.0.0.0/16")
            .build());

        var subnet = new Subnet("subnet", SubnetArgs.builder()
            .availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[3].name()))
            .vpcId(vpc.vpcId())
            .cidrBlock("10.0.0.0/16")
            .isMulticast(false)
            .build());

        var exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
            .instanceName("tf_example")
            .availabilityZone(zones.applyValue(getAvailabilityZonesByProductResult -> getAvailabilityZonesByProductResult.zones()[3].name()))
            .imageId(images.applyValue(getImagesResult -> getImagesResult.images()[0].imageId()))
            .instanceType(instanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].instanceType()))
            .systemDiskType("CLOUD_PREMIUM")
            .systemDiskSize(50)
            .hostname("terraform")
            .projectId(0)
            .vpcId(vpc.vpcId())
            .subnetId(subnet.subnetId())
            .dataDisks(InstanceDataDiskArgs.builder()
                .dataDiskType("CLOUD_PREMIUM")
                .dataDiskSize(50)
                .encrypt(false)
                .build())
            .tags(Map.of("tagKey", "tagValue"))
            .build());

        var exampleApiGatewayUpstream = new ApiGatewayUpstream("exampleApiGatewayUpstream", ApiGatewayUpstreamArgs.builder()
            .scheme("HTTP")
            .algorithm("ROUND-ROBIN")
            .uniqVpcId(vpc.vpcId())
            .upstreamName("tf_example")
            .upstreamDescription("desc.")
            .upstreamType("IP_PORT")
            .retries(5)
            .nodes(ApiGatewayUpstreamNodeArgs.builder()
                .host("1.1.1.1")
                .port(9090)
                .weight(10)
                .vmInstanceId(exampleInstance.instanceId())
                .tags("tags")
                .build())
            .tags(Map.of("createdBy", "terraform"))
            .build());

    }
}
Copy
resources:
  vpc:
    type: tencentcloud:Vpc
    properties:
      cidrBlock: 10.0.0.0/16
  subnet:
    type: tencentcloud:Subnet
    properties:
      availabilityZone: ${zones.zones[3].name}
      vpcId: ${vpc.vpcId}
      cidrBlock: 10.0.0.0/16
      isMulticast: false
  exampleInstance:
    type: tencentcloud:Instance
    properties:
      instanceName: tf_example
      availabilityZone: ${zones.zones[3].name}
      imageId: ${images.images[0].imageId}
      instanceType: ${instanceTypes.instanceTypes[0].instanceType}
      systemDiskType: CLOUD_PREMIUM
      systemDiskSize: 50
      hostname: terraform
      projectId: 0
      vpcId: ${vpc.vpcId}
      subnetId: ${subnet.subnetId}
      dataDisks:
        - dataDiskType: CLOUD_PREMIUM
          dataDiskSize: 50
          encrypt: false
      tags:
        tagKey: tagValue
  exampleApiGatewayUpstream:
    type: tencentcloud:ApiGatewayUpstream
    properties:
      scheme: HTTP
      algorithm: ROUND-ROBIN
      uniqVpcId: ${vpc.vpcId}
      upstreamName: tf_example
      upstreamDescription: desc.
      upstreamType: IP_PORT
      retries: 5
      nodes:
        - host: 1.1.1.1
          port: 9090
          weight: 10
          vmInstanceId: ${exampleInstance.instanceId}
          tags:
            - tags
      tags:
        createdBy: terraform
variables:
  zones:
    fn::invoke:
      function: tencentcloud:getAvailabilityZonesByProduct
      arguments:
        product: cvm
  images:
    fn::invoke:
      function: tencentcloud:getImages
      arguments:
        imageTypes:
          - PUBLIC_IMAGE
        imageNameRegex: Final
  instanceTypes:
    fn::invoke:
      function: tencentcloud:getInstanceTypes
      arguments:
        filters:
          - name: instance-family
            values:
              - S5
        cpuCoreCount: 2
        excludeSoldOut: true
Copy

Create a complete VPC channel

import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";

const example = new tencentcloud.ApiGatewayUpstream("example", {
    scheme: "HTTP",
    algorithm: "ROUND-ROBIN",
    uniqVpcId: tencentcloud_vpc.vpc.id,
    upstreamName: "tf_example",
    upstreamDescription: "desc.",
    upstreamType: "IP_PORT",
    retries: 5,
    nodes: [{
        host: "1.1.1.1",
        port: 9090,
        weight: 10,
        vmInstanceId: tencentcloud_instance.example.id,
        tags: ["tags"],
    }],
    healthChecker: {
        enableActiveCheck: true,
        enablePassiveCheck: true,
        healthyHttpStatus: "200",
        unhealthyHttpStatus: "500",
        tcpFailureThreshold: 5,
        timeoutThreshold: 5,
        httpFailureThreshold: 3,
        activeCheckHttpPath: "/",
        activeCheckTimeout: 5,
        activeCheckInterval: 5,
        unhealthyTimeout: 30,
    },
    tags: {
        createdBy: "terraform",
    },
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

example = tencentcloud.ApiGatewayUpstream("example",
    scheme="HTTP",
    algorithm="ROUND-ROBIN",
    uniq_vpc_id=tencentcloud_vpc["vpc"]["id"],
    upstream_name="tf_example",
    upstream_description="desc.",
    upstream_type="IP_PORT",
    retries=5,
    nodes=[{
        "host": "1.1.1.1",
        "port": 9090,
        "weight": 10,
        "vm_instance_id": tencentcloud_instance["example"]["id"],
        "tags": ["tags"],
    }],
    health_checker={
        "enable_active_check": True,
        "enable_passive_check": True,
        "healthy_http_status": "200",
        "unhealthy_http_status": "500",
        "tcp_failure_threshold": 5,
        "timeout_threshold": 5,
        "http_failure_threshold": 3,
        "active_check_http_path": "/",
        "active_check_timeout": 5,
        "active_check_interval": 5,
        "unhealthy_timeout": 30,
    },
    tags={
        "createdBy": "terraform",
    })
Copy
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.NewApiGatewayUpstream(ctx, "example", &tencentcloud.ApiGatewayUpstreamArgs{
			Scheme:              pulumi.String("HTTP"),
			Algorithm:           pulumi.String("ROUND-ROBIN"),
			UniqVpcId:           pulumi.Any(tencentcloud_vpc.Vpc.Id),
			UpstreamName:        pulumi.String("tf_example"),
			UpstreamDescription: pulumi.String("desc."),
			UpstreamType:        pulumi.String("IP_PORT"),
			Retries:             pulumi.Float64(5),
			Nodes: tencentcloud.ApiGatewayUpstreamNodeArray{
				&tencentcloud.ApiGatewayUpstreamNodeArgs{
					Host:         pulumi.String("1.1.1.1"),
					Port:         pulumi.Float64(9090),
					Weight:       pulumi.Float64(10),
					VmInstanceId: pulumi.Any(tencentcloud_instance.Example.Id),
					Tags: pulumi.StringArray{
						pulumi.String("tags"),
					},
				},
			},
			HealthChecker: &tencentcloud.ApiGatewayUpstreamHealthCheckerArgs{
				EnableActiveCheck:    pulumi.Bool(true),
				EnablePassiveCheck:   pulumi.Bool(true),
				HealthyHttpStatus:    pulumi.String("200"),
				UnhealthyHttpStatus:  pulumi.String("500"),
				TcpFailureThreshold:  pulumi.Float64(5),
				TimeoutThreshold:     pulumi.Float64(5),
				HttpFailureThreshold: pulumi.Float64(3),
				ActiveCheckHttpPath:  pulumi.String("/"),
				ActiveCheckTimeout:   pulumi.Float64(5),
				ActiveCheckInterval:  pulumi.Float64(5),
				UnhealthyTimeout:     pulumi.Float64(30),
			},
			Tags: pulumi.StringMap{
				"createdBy": pulumi.String("terraform"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;

return await Deployment.RunAsync(() => 
{
    var example = new Tencentcloud.ApiGatewayUpstream("example", new()
    {
        Scheme = "HTTP",
        Algorithm = "ROUND-ROBIN",
        UniqVpcId = tencentcloud_vpc.Vpc.Id,
        UpstreamName = "tf_example",
        UpstreamDescription = "desc.",
        UpstreamType = "IP_PORT",
        Retries = 5,
        Nodes = new[]
        {
            new Tencentcloud.Inputs.ApiGatewayUpstreamNodeArgs
            {
                Host = "1.1.1.1",
                Port = 9090,
                Weight = 10,
                VmInstanceId = tencentcloud_instance.Example.Id,
                Tags = new[]
                {
                    "tags",
                },
            },
        },
        HealthChecker = new Tencentcloud.Inputs.ApiGatewayUpstreamHealthCheckerArgs
        {
            EnableActiveCheck = true,
            EnablePassiveCheck = true,
            HealthyHttpStatus = "200",
            UnhealthyHttpStatus = "500",
            TcpFailureThreshold = 5,
            TimeoutThreshold = 5,
            HttpFailureThreshold = 3,
            ActiveCheckHttpPath = "/",
            ActiveCheckTimeout = 5,
            ActiveCheckInterval = 5,
            UnhealthyTimeout = 30,
        },
        Tags = 
        {
            { "createdBy", "terraform" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ApiGatewayUpstream;
import com.pulumi.tencentcloud.ApiGatewayUpstreamArgs;
import com.pulumi.tencentcloud.inputs.ApiGatewayUpstreamNodeArgs;
import com.pulumi.tencentcloud.inputs.ApiGatewayUpstreamHealthCheckerArgs;
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 example = new ApiGatewayUpstream("example", ApiGatewayUpstreamArgs.builder()
            .scheme("HTTP")
            .algorithm("ROUND-ROBIN")
            .uniqVpcId(tencentcloud_vpc.vpc().id())
            .upstreamName("tf_example")
            .upstreamDescription("desc.")
            .upstreamType("IP_PORT")
            .retries(5)
            .nodes(ApiGatewayUpstreamNodeArgs.builder()
                .host("1.1.1.1")
                .port(9090)
                .weight(10)
                .vmInstanceId(tencentcloud_instance.example().id())
                .tags("tags")
                .build())
            .healthChecker(ApiGatewayUpstreamHealthCheckerArgs.builder()
                .enableActiveCheck(true)
                .enablePassiveCheck(true)
                .healthyHttpStatus("200")
                .unhealthyHttpStatus("500")
                .tcpFailureThreshold(5)
                .timeoutThreshold(5)
                .httpFailureThreshold(3)
                .activeCheckHttpPath("/")
                .activeCheckTimeout(5)
                .activeCheckInterval(5)
                .unhealthyTimeout(30)
                .build())
            .tags(Map.of("createdBy", "terraform"))
            .build());

    }
}
Copy
resources:
  example:
    type: tencentcloud:ApiGatewayUpstream
    properties:
      scheme: HTTP
      algorithm: ROUND-ROBIN
      uniqVpcId: ${tencentcloud_vpc.vpc.id}
      upstreamName: tf_example
      upstreamDescription: desc.
      upstreamType: IP_PORT
      retries: 5
      nodes:
        - host: 1.1.1.1
          port: 9090
          weight: 10
          vmInstanceId: ${tencentcloud_instance.example.id}
          tags:
            - tags
      healthChecker:
        enableActiveCheck: true
        enablePassiveCheck: true
        healthyHttpStatus: '200'
        unhealthyHttpStatus: '500'
        tcpFailureThreshold: 5
        timeoutThreshold: 5
        httpFailureThreshold: 3
        activeCheckHttpPath: /
        activeCheckTimeout: 5
        activeCheckInterval: 5
        unhealthyTimeout: 30
      tags:
        createdBy: terraform
Copy

Create ApiGatewayUpstream Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ApiGatewayUpstream(name: string, args: ApiGatewayUpstreamArgs, opts?: CustomResourceOptions);
@overload
def ApiGatewayUpstream(resource_name: str,
                       args: ApiGatewayUpstreamArgs,
                       opts: Optional[ResourceOptions] = None)

@overload
def ApiGatewayUpstream(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       algorithm: Optional[str] = None,
                       uniq_vpc_id: Optional[str] = None,
                       scheme: Optional[str] = None,
                       k8s_services: Optional[Sequence[ApiGatewayUpstreamK8sServiceArgs]] = None,
                       nodes: Optional[Sequence[ApiGatewayUpstreamNodeArgs]] = None,
                       retries: Optional[float] = None,
                       health_checker: Optional[ApiGatewayUpstreamHealthCheckerArgs] = None,
                       tags: Optional[Mapping[str, str]] = None,
                       api_gateway_upstream_id: Optional[str] = None,
                       upstream_description: Optional[str] = None,
                       upstream_host: Optional[str] = None,
                       upstream_name: Optional[str] = None,
                       upstream_type: Optional[str] = None)
func NewApiGatewayUpstream(ctx *Context, name string, args ApiGatewayUpstreamArgs, opts ...ResourceOption) (*ApiGatewayUpstream, error)
public ApiGatewayUpstream(string name, ApiGatewayUpstreamArgs args, CustomResourceOptions? opts = null)
public ApiGatewayUpstream(String name, ApiGatewayUpstreamArgs args)
public ApiGatewayUpstream(String name, ApiGatewayUpstreamArgs args, CustomResourceOptions options)
type: tencentcloud:ApiGatewayUpstream
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ApiGatewayUpstreamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ApiGatewayUpstreamArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ApiGatewayUpstreamArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ApiGatewayUpstreamArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ApiGatewayUpstreamArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ApiGatewayUpstream 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 ApiGatewayUpstream resource accepts the following input properties:

Algorithm This property is required. string
Load balancing algorithm, value range: ROUND-ROBIN.
Scheme This property is required. string
Backend protocol, value range: HTTP, HTTPS, gRPC, gRPCs.
UniqVpcId This property is required. string
VPC Unique ID.
ApiGatewayUpstreamId string
ID of the resource.
HealthChecker ApiGatewayUpstreamHealthChecker
Health check configuration, currently only supports VPC channels.
K8sServices List<ApiGatewayUpstreamK8sService>
Configuration of K8S container service.
Nodes List<ApiGatewayUpstreamNode>
Backend nodes.
Retries double
Request retry count, default to 3 times.
Tags Dictionary<string, string>
Tag description list.
UpstreamDescription string
Backend channel description.
UpstreamHost string
Host request header forwarded by gateway to backend.
UpstreamName string
Backend channel name.
UpstreamType string
Backend access type, value range: IP_PORT, K8S.
Algorithm This property is required. string
Load balancing algorithm, value range: ROUND-ROBIN.
Scheme This property is required. string
Backend protocol, value range: HTTP, HTTPS, gRPC, gRPCs.
UniqVpcId This property is required. string
VPC Unique ID.
ApiGatewayUpstreamId string
ID of the resource.
HealthChecker ApiGatewayUpstreamHealthCheckerArgs
Health check configuration, currently only supports VPC channels.
K8sServices []ApiGatewayUpstreamK8sServiceArgs
Configuration of K8S container service.
Nodes []ApiGatewayUpstreamNodeArgs
Backend nodes.
Retries float64
Request retry count, default to 3 times.
Tags map[string]string
Tag description list.
UpstreamDescription string
Backend channel description.
UpstreamHost string
Host request header forwarded by gateway to backend.
UpstreamName string
Backend channel name.
UpstreamType string
Backend access type, value range: IP_PORT, K8S.
algorithm This property is required. String
Load balancing algorithm, value range: ROUND-ROBIN.
scheme This property is required. String
Backend protocol, value range: HTTP, HTTPS, gRPC, gRPCs.
uniqVpcId This property is required. String
VPC Unique ID.
apiGatewayUpstreamId String
ID of the resource.
healthChecker ApiGatewayUpstreamHealthChecker
Health check configuration, currently only supports VPC channels.
k8sServices List<ApiGatewayUpstreamK8sService>
Configuration of K8S container service.
nodes List<ApiGatewayUpstreamNode>
Backend nodes.
retries Double
Request retry count, default to 3 times.
tags Map<String,String>
Tag description list.
upstreamDescription String
Backend channel description.
upstreamHost String
Host request header forwarded by gateway to backend.
upstreamName String
Backend channel name.
upstreamType String
Backend access type, value range: IP_PORT, K8S.
algorithm This property is required. string
Load balancing algorithm, value range: ROUND-ROBIN.
scheme This property is required. string
Backend protocol, value range: HTTP, HTTPS, gRPC, gRPCs.
uniqVpcId This property is required. string
VPC Unique ID.
apiGatewayUpstreamId string
ID of the resource.
healthChecker ApiGatewayUpstreamHealthChecker
Health check configuration, currently only supports VPC channels.
k8sServices ApiGatewayUpstreamK8sService[]
Configuration of K8S container service.
nodes ApiGatewayUpstreamNode[]
Backend nodes.
retries number
Request retry count, default to 3 times.
tags {[key: string]: string}
Tag description list.
upstreamDescription string
Backend channel description.
upstreamHost string
Host request header forwarded by gateway to backend.
upstreamName string
Backend channel name.
upstreamType string
Backend access type, value range: IP_PORT, K8S.
algorithm This property is required. str
Load balancing algorithm, value range: ROUND-ROBIN.
scheme This property is required. str
Backend protocol, value range: HTTP, HTTPS, gRPC, gRPCs.
uniq_vpc_id This property is required. str
VPC Unique ID.
api_gateway_upstream_id str
ID of the resource.
health_checker ApiGatewayUpstreamHealthCheckerArgs
Health check configuration, currently only supports VPC channels.
k8s_services Sequence[ApiGatewayUpstreamK8sServiceArgs]
Configuration of K8S container service.
nodes Sequence[ApiGatewayUpstreamNodeArgs]
Backend nodes.
retries float
Request retry count, default to 3 times.
tags Mapping[str, str]
Tag description list.
upstream_description str
Backend channel description.
upstream_host str
Host request header forwarded by gateway to backend.
upstream_name str
Backend channel name.
upstream_type str
Backend access type, value range: IP_PORT, K8S.
algorithm This property is required. String
Load balancing algorithm, value range: ROUND-ROBIN.
scheme This property is required. String
Backend protocol, value range: HTTP, HTTPS, gRPC, gRPCs.
uniqVpcId This property is required. String
VPC Unique ID.
apiGatewayUpstreamId String
ID of the resource.
healthChecker Property Map
Health check configuration, currently only supports VPC channels.
k8sServices List<Property Map>
Configuration of K8S container service.
nodes List<Property Map>
Backend nodes.
retries Number
Request retry count, default to 3 times.
tags Map<String>
Tag description list.
upstreamDescription String
Backend channel description.
upstreamHost String
Host request header forwarded by gateway to backend.
upstreamName String
Backend channel name.
upstreamType String
Backend access type, value range: IP_PORT, K8S.

Outputs

All input properties are implicitly available as output properties. Additionally, the ApiGatewayUpstream 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 ApiGatewayUpstream Resource

Get an existing ApiGatewayUpstream 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?: ApiGatewayUpstreamState, opts?: CustomResourceOptions): ApiGatewayUpstream
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        algorithm: Optional[str] = None,
        api_gateway_upstream_id: Optional[str] = None,
        health_checker: Optional[ApiGatewayUpstreamHealthCheckerArgs] = None,
        k8s_services: Optional[Sequence[ApiGatewayUpstreamK8sServiceArgs]] = None,
        nodes: Optional[Sequence[ApiGatewayUpstreamNodeArgs]] = None,
        retries: Optional[float] = None,
        scheme: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        uniq_vpc_id: Optional[str] = None,
        upstream_description: Optional[str] = None,
        upstream_host: Optional[str] = None,
        upstream_name: Optional[str] = None,
        upstream_type: Optional[str] = None) -> ApiGatewayUpstream
func GetApiGatewayUpstream(ctx *Context, name string, id IDInput, state *ApiGatewayUpstreamState, opts ...ResourceOption) (*ApiGatewayUpstream, error)
public static ApiGatewayUpstream Get(string name, Input<string> id, ApiGatewayUpstreamState? state, CustomResourceOptions? opts = null)
public static ApiGatewayUpstream get(String name, Output<String> id, ApiGatewayUpstreamState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:ApiGatewayUpstream    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
Algorithm string
Load balancing algorithm, value range: ROUND-ROBIN.
ApiGatewayUpstreamId string
ID of the resource.
HealthChecker ApiGatewayUpstreamHealthChecker
Health check configuration, currently only supports VPC channels.
K8sServices List<ApiGatewayUpstreamK8sService>
Configuration of K8S container service.
Nodes List<ApiGatewayUpstreamNode>
Backend nodes.
Retries double
Request retry count, default to 3 times.
Scheme string
Backend protocol, value range: HTTP, HTTPS, gRPC, gRPCs.
Tags Dictionary<string, string>
Tag description list.
UniqVpcId string
VPC Unique ID.
UpstreamDescription string
Backend channel description.
UpstreamHost string
Host request header forwarded by gateway to backend.
UpstreamName string
Backend channel name.
UpstreamType string
Backend access type, value range: IP_PORT, K8S.
Algorithm string
Load balancing algorithm, value range: ROUND-ROBIN.
ApiGatewayUpstreamId string
ID of the resource.
HealthChecker ApiGatewayUpstreamHealthCheckerArgs
Health check configuration, currently only supports VPC channels.
K8sServices []ApiGatewayUpstreamK8sServiceArgs
Configuration of K8S container service.
Nodes []ApiGatewayUpstreamNodeArgs
Backend nodes.
Retries float64
Request retry count, default to 3 times.
Scheme string
Backend protocol, value range: HTTP, HTTPS, gRPC, gRPCs.
Tags map[string]string
Tag description list.
UniqVpcId string
VPC Unique ID.
UpstreamDescription string
Backend channel description.
UpstreamHost string
Host request header forwarded by gateway to backend.
UpstreamName string
Backend channel name.
UpstreamType string
Backend access type, value range: IP_PORT, K8S.
algorithm String
Load balancing algorithm, value range: ROUND-ROBIN.
apiGatewayUpstreamId String
ID of the resource.
healthChecker ApiGatewayUpstreamHealthChecker
Health check configuration, currently only supports VPC channels.
k8sServices List<ApiGatewayUpstreamK8sService>
Configuration of K8S container service.
nodes List<ApiGatewayUpstreamNode>
Backend nodes.
retries Double
Request retry count, default to 3 times.
scheme String
Backend protocol, value range: HTTP, HTTPS, gRPC, gRPCs.
tags Map<String,String>
Tag description list.
uniqVpcId String
VPC Unique ID.
upstreamDescription String
Backend channel description.
upstreamHost String
Host request header forwarded by gateway to backend.
upstreamName String
Backend channel name.
upstreamType String
Backend access type, value range: IP_PORT, K8S.
algorithm string
Load balancing algorithm, value range: ROUND-ROBIN.
apiGatewayUpstreamId string
ID of the resource.
healthChecker ApiGatewayUpstreamHealthChecker
Health check configuration, currently only supports VPC channels.
k8sServices ApiGatewayUpstreamK8sService[]
Configuration of K8S container service.
nodes ApiGatewayUpstreamNode[]
Backend nodes.
retries number
Request retry count, default to 3 times.
scheme string
Backend protocol, value range: HTTP, HTTPS, gRPC, gRPCs.
tags {[key: string]: string}
Tag description list.
uniqVpcId string
VPC Unique ID.
upstreamDescription string
Backend channel description.
upstreamHost string
Host request header forwarded by gateway to backend.
upstreamName string
Backend channel name.
upstreamType string
Backend access type, value range: IP_PORT, K8S.
algorithm str
Load balancing algorithm, value range: ROUND-ROBIN.
api_gateway_upstream_id str
ID of the resource.
health_checker ApiGatewayUpstreamHealthCheckerArgs
Health check configuration, currently only supports VPC channels.
k8s_services Sequence[ApiGatewayUpstreamK8sServiceArgs]
Configuration of K8S container service.
nodes Sequence[ApiGatewayUpstreamNodeArgs]
Backend nodes.
retries float
Request retry count, default to 3 times.
scheme str
Backend protocol, value range: HTTP, HTTPS, gRPC, gRPCs.
tags Mapping[str, str]
Tag description list.
uniq_vpc_id str
VPC Unique ID.
upstream_description str
Backend channel description.
upstream_host str
Host request header forwarded by gateway to backend.
upstream_name str
Backend channel name.
upstream_type str
Backend access type, value range: IP_PORT, K8S.
algorithm String
Load balancing algorithm, value range: ROUND-ROBIN.
apiGatewayUpstreamId String
ID of the resource.
healthChecker Property Map
Health check configuration, currently only supports VPC channels.
k8sServices List<Property Map>
Configuration of K8S container service.
nodes List<Property Map>
Backend nodes.
retries Number
Request retry count, default to 3 times.
scheme String
Backend protocol, value range: HTTP, HTTPS, gRPC, gRPCs.
tags Map<String>
Tag description list.
uniqVpcId String
VPC Unique ID.
upstreamDescription String
Backend channel description.
upstreamHost String
Host request header forwarded by gateway to backend.
upstreamName String
Backend channel name.
upstreamType String
Backend access type, value range: IP_PORT, K8S.

Supporting Types

ApiGatewayUpstreamHealthChecker
, ApiGatewayUpstreamHealthCheckerArgs

EnableActiveCheck This property is required. bool
Identify whether active health checks are enabled.
EnablePassiveCheck This property is required. bool
Identify whether passive health checks are enabled.
HealthyHttpStatus This property is required. string
The HTTP status code that determines a successful request during a health check.
HttpFailureThreshold This property is required. double
HTTP continuous error threshold. 0 means HTTP checking is disabled. Value range: [0, 254].
TcpFailureThreshold This property is required. double
TCP continuous error threshold. 0 indicates disabling TCP checking. Value range: [0, 254].
TimeoutThreshold This property is required. double
Continuous timeout threshold. 0 indicates disabling timeout checking. Value range: [0, 254].
UnhealthyHttpStatus This property is required. string
The HTTP status code that determines a failed request during a health check.
ActiveCheckHttpPath string
Detect the requested path during active health checks. The default is'/'.
ActiveCheckInterval double
The time interval for active health checks is 5 seconds by default.
ActiveCheckTimeout double
The detection request for active health check timed out in seconds. The default is 5 seconds.
UnhealthyTimeout double
The automatic recovery time of abnormal node status, in seconds. When only passive checking is enabled, it must be set to a value>0, otherwise the passive exception node will not be able to recover. The default is 30 seconds.
EnableActiveCheck This property is required. bool
Identify whether active health checks are enabled.
EnablePassiveCheck This property is required. bool
Identify whether passive health checks are enabled.
HealthyHttpStatus This property is required. string
The HTTP status code that determines a successful request during a health check.
HttpFailureThreshold This property is required. float64
HTTP continuous error threshold. 0 means HTTP checking is disabled. Value range: [0, 254].
TcpFailureThreshold This property is required. float64
TCP continuous error threshold. 0 indicates disabling TCP checking. Value range: [0, 254].
TimeoutThreshold This property is required. float64
Continuous timeout threshold. 0 indicates disabling timeout checking. Value range: [0, 254].
UnhealthyHttpStatus This property is required. string
The HTTP status code that determines a failed request during a health check.
ActiveCheckHttpPath string
Detect the requested path during active health checks. The default is'/'.
ActiveCheckInterval float64
The time interval for active health checks is 5 seconds by default.
ActiveCheckTimeout float64
The detection request for active health check timed out in seconds. The default is 5 seconds.
UnhealthyTimeout float64
The automatic recovery time of abnormal node status, in seconds. When only passive checking is enabled, it must be set to a value>0, otherwise the passive exception node will not be able to recover. The default is 30 seconds.
enableActiveCheck This property is required. Boolean
Identify whether active health checks are enabled.
enablePassiveCheck This property is required. Boolean
Identify whether passive health checks are enabled.
healthyHttpStatus This property is required. String
The HTTP status code that determines a successful request during a health check.
httpFailureThreshold This property is required. Double
HTTP continuous error threshold. 0 means HTTP checking is disabled. Value range: [0, 254].
tcpFailureThreshold This property is required. Double
TCP continuous error threshold. 0 indicates disabling TCP checking. Value range: [0, 254].
timeoutThreshold This property is required. Double
Continuous timeout threshold. 0 indicates disabling timeout checking. Value range: [0, 254].
unhealthyHttpStatus This property is required. String
The HTTP status code that determines a failed request during a health check.
activeCheckHttpPath String
Detect the requested path during active health checks. The default is'/'.
activeCheckInterval Double
The time interval for active health checks is 5 seconds by default.
activeCheckTimeout Double
The detection request for active health check timed out in seconds. The default is 5 seconds.
unhealthyTimeout Double
The automatic recovery time of abnormal node status, in seconds. When only passive checking is enabled, it must be set to a value>0, otherwise the passive exception node will not be able to recover. The default is 30 seconds.
enableActiveCheck This property is required. boolean
Identify whether active health checks are enabled.
enablePassiveCheck This property is required. boolean
Identify whether passive health checks are enabled.
healthyHttpStatus This property is required. string
The HTTP status code that determines a successful request during a health check.
httpFailureThreshold This property is required. number
HTTP continuous error threshold. 0 means HTTP checking is disabled. Value range: [0, 254].
tcpFailureThreshold This property is required. number
TCP continuous error threshold. 0 indicates disabling TCP checking. Value range: [0, 254].
timeoutThreshold This property is required. number
Continuous timeout threshold. 0 indicates disabling timeout checking. Value range: [0, 254].
unhealthyHttpStatus This property is required. string
The HTTP status code that determines a failed request during a health check.
activeCheckHttpPath string
Detect the requested path during active health checks. The default is'/'.
activeCheckInterval number
The time interval for active health checks is 5 seconds by default.
activeCheckTimeout number
The detection request for active health check timed out in seconds. The default is 5 seconds.
unhealthyTimeout number
The automatic recovery time of abnormal node status, in seconds. When only passive checking is enabled, it must be set to a value>0, otherwise the passive exception node will not be able to recover. The default is 30 seconds.
enable_active_check This property is required. bool
Identify whether active health checks are enabled.
enable_passive_check This property is required. bool
Identify whether passive health checks are enabled.
healthy_http_status This property is required. str
The HTTP status code that determines a successful request during a health check.
http_failure_threshold This property is required. float
HTTP continuous error threshold. 0 means HTTP checking is disabled. Value range: [0, 254].
tcp_failure_threshold This property is required. float
TCP continuous error threshold. 0 indicates disabling TCP checking. Value range: [0, 254].
timeout_threshold This property is required. float
Continuous timeout threshold. 0 indicates disabling timeout checking. Value range: [0, 254].
unhealthy_http_status This property is required. str
The HTTP status code that determines a failed request during a health check.
active_check_http_path str
Detect the requested path during active health checks. The default is'/'.
active_check_interval float
The time interval for active health checks is 5 seconds by default.
active_check_timeout float
The detection request for active health check timed out in seconds. The default is 5 seconds.
unhealthy_timeout float
The automatic recovery time of abnormal node status, in seconds. When only passive checking is enabled, it must be set to a value>0, otherwise the passive exception node will not be able to recover. The default is 30 seconds.
enableActiveCheck This property is required. Boolean
Identify whether active health checks are enabled.
enablePassiveCheck This property is required. Boolean
Identify whether passive health checks are enabled.
healthyHttpStatus This property is required. String
The HTTP status code that determines a successful request during a health check.
httpFailureThreshold This property is required. Number
HTTP continuous error threshold. 0 means HTTP checking is disabled. Value range: [0, 254].
tcpFailureThreshold This property is required. Number
TCP continuous error threshold. 0 indicates disabling TCP checking. Value range: [0, 254].
timeoutThreshold This property is required. Number
Continuous timeout threshold. 0 indicates disabling timeout checking. Value range: [0, 254].
unhealthyHttpStatus This property is required. String
The HTTP status code that determines a failed request during a health check.
activeCheckHttpPath String
Detect the requested path during active health checks. The default is'/'.
activeCheckInterval Number
The time interval for active health checks is 5 seconds by default.
activeCheckTimeout Number
The detection request for active health check timed out in seconds. The default is 5 seconds.
unhealthyTimeout Number
The automatic recovery time of abnormal node status, in seconds. When only passive checking is enabled, it must be set to a value>0, otherwise the passive exception node will not be able to recover. The default is 30 seconds.

ApiGatewayUpstreamK8sService
, ApiGatewayUpstreamK8sServiceArgs

ClusterId This property is required. string
K8s cluster ID.
ExtraLabels This property is required. List<ApiGatewayUpstreamK8sServiceExtraLabel>
Additional Selected Pod Label.
Namespace This property is required. string
Container namespace.
Port This property is required. double
Port of service.
ServiceName This property is required. string
The name of the container service.
Weight This property is required. double
weight.
Name string
Customized service name, optional.
ClusterId This property is required. string
K8s cluster ID.
ExtraLabels This property is required. []ApiGatewayUpstreamK8sServiceExtraLabel
Additional Selected Pod Label.
Namespace This property is required. string
Container namespace.
Port This property is required. float64
Port of service.
ServiceName This property is required. string
The name of the container service.
Weight This property is required. float64
weight.
Name string
Customized service name, optional.
clusterId This property is required. String
K8s cluster ID.
extraLabels This property is required. List<ApiGatewayUpstreamK8sServiceExtraLabel>
Additional Selected Pod Label.
namespace This property is required. String
Container namespace.
port This property is required. Double
Port of service.
serviceName This property is required. String
The name of the container service.
weight This property is required. Double
weight.
name String
Customized service name, optional.
clusterId This property is required. string
K8s cluster ID.
extraLabels This property is required. ApiGatewayUpstreamK8sServiceExtraLabel[]
Additional Selected Pod Label.
namespace This property is required. string
Container namespace.
port This property is required. number
Port of service.
serviceName This property is required. string
The name of the container service.
weight This property is required. number
weight.
name string
Customized service name, optional.
cluster_id This property is required. str
K8s cluster ID.
extra_labels This property is required. Sequence[ApiGatewayUpstreamK8sServiceExtraLabel]
Additional Selected Pod Label.
namespace This property is required. str
Container namespace.
port This property is required. float
Port of service.
service_name This property is required. str
The name of the container service.
weight This property is required. float
weight.
name str
Customized service name, optional.
clusterId This property is required. String
K8s cluster ID.
extraLabels This property is required. List<Property Map>
Additional Selected Pod Label.
namespace This property is required. String
Container namespace.
port This property is required. Number
Port of service.
serviceName This property is required. String
The name of the container service.
weight This property is required. Number
weight.
name String
Customized service name, optional.

ApiGatewayUpstreamK8sServiceExtraLabel
, ApiGatewayUpstreamK8sServiceExtraLabelArgs

Key This property is required. string
Key of Label.
Value This property is required. string
Value of Label.
Key This property is required. string
Key of Label.
Value This property is required. string
Value of Label.
key This property is required. String
Key of Label.
value This property is required. String
Value of Label.
key This property is required. string
Key of Label.
value This property is required. string
Value of Label.
key This property is required. str
Key of Label.
value This property is required. str
Value of Label.
key This property is required. String
Key of Label.
value This property is required. String
Value of Label.

ApiGatewayUpstreamNode
, ApiGatewayUpstreamNodeArgs

Host This property is required. string
IP or domain name.
Port This property is required. double
Port [0, 65535].
Weight This property is required. double
Weight [0, 100], 0 is disabled.
ClusterId string
The ID of the TKE clusterNote: This field may return null, indicating that a valid value cannot be obtained.
NameSpace string
K8S namespaceNote: This field may return null, indicating that a valid value cannot be obtained.
ServiceName string
K8S container service nameNote: This field may return null, indicating that a valid value cannot be obtained.
Source string
Source of Node, value range: K8SNote: This field may return null, indicating that a valid value cannot be obtained.
Tags List<string>
Dye labelNote: This field may return null, indicating that a valid value cannot be obtained.
UniqueServiceName string
Unique service name recorded internally by API gatewayNote: This field may return null, indicating that a valid value cannot be obtained.
VmInstanceId string
CVM instance IDNote: This field may return null, indicating that a valid value cannot be obtained.
Host This property is required. string
IP or domain name.
Port This property is required. float64
Port [0, 65535].
Weight This property is required. float64
Weight [0, 100], 0 is disabled.
ClusterId string
The ID of the TKE clusterNote: This field may return null, indicating that a valid value cannot be obtained.
NameSpace string
K8S namespaceNote: This field may return null, indicating that a valid value cannot be obtained.
ServiceName string
K8S container service nameNote: This field may return null, indicating that a valid value cannot be obtained.
Source string
Source of Node, value range: K8SNote: This field may return null, indicating that a valid value cannot be obtained.
Tags []string
Dye labelNote: This field may return null, indicating that a valid value cannot be obtained.
UniqueServiceName string
Unique service name recorded internally by API gatewayNote: This field may return null, indicating that a valid value cannot be obtained.
VmInstanceId string
CVM instance IDNote: This field may return null, indicating that a valid value cannot be obtained.
host This property is required. String
IP or domain name.
port This property is required. Double
Port [0, 65535].
weight This property is required. Double
Weight [0, 100], 0 is disabled.
clusterId String
The ID of the TKE clusterNote: This field may return null, indicating that a valid value cannot be obtained.
nameSpace String
K8S namespaceNote: This field may return null, indicating that a valid value cannot be obtained.
serviceName String
K8S container service nameNote: This field may return null, indicating that a valid value cannot be obtained.
source String
Source of Node, value range: K8SNote: This field may return null, indicating that a valid value cannot be obtained.
tags List<String>
Dye labelNote: This field may return null, indicating that a valid value cannot be obtained.
uniqueServiceName String
Unique service name recorded internally by API gatewayNote: This field may return null, indicating that a valid value cannot be obtained.
vmInstanceId String
CVM instance IDNote: This field may return null, indicating that a valid value cannot be obtained.
host This property is required. string
IP or domain name.
port This property is required. number
Port [0, 65535].
weight This property is required. number
Weight [0, 100], 0 is disabled.
clusterId string
The ID of the TKE clusterNote: This field may return null, indicating that a valid value cannot be obtained.
nameSpace string
K8S namespaceNote: This field may return null, indicating that a valid value cannot be obtained.
serviceName string
K8S container service nameNote: This field may return null, indicating that a valid value cannot be obtained.
source string
Source of Node, value range: K8SNote: This field may return null, indicating that a valid value cannot be obtained.
tags string[]
Dye labelNote: This field may return null, indicating that a valid value cannot be obtained.
uniqueServiceName string
Unique service name recorded internally by API gatewayNote: This field may return null, indicating that a valid value cannot be obtained.
vmInstanceId string
CVM instance IDNote: This field may return null, indicating that a valid value cannot be obtained.
host This property is required. str
IP or domain name.
port This property is required. float
Port [0, 65535].
weight This property is required. float
Weight [0, 100], 0 is disabled.
cluster_id str
The ID of the TKE clusterNote: This field may return null, indicating that a valid value cannot be obtained.
name_space str
K8S namespaceNote: This field may return null, indicating that a valid value cannot be obtained.
service_name str
K8S container service nameNote: This field may return null, indicating that a valid value cannot be obtained.
source str
Source of Node, value range: K8SNote: This field may return null, indicating that a valid value cannot be obtained.
tags Sequence[str]
Dye labelNote: This field may return null, indicating that a valid value cannot be obtained.
unique_service_name str
Unique service name recorded internally by API gatewayNote: This field may return null, indicating that a valid value cannot be obtained.
vm_instance_id str
CVM instance IDNote: This field may return null, indicating that a valid value cannot be obtained.
host This property is required. String
IP or domain name.
port This property is required. Number
Port [0, 65535].
weight This property is required. Number
Weight [0, 100], 0 is disabled.
clusterId String
The ID of the TKE clusterNote: This field may return null, indicating that a valid value cannot be obtained.
nameSpace String
K8S namespaceNote: This field may return null, indicating that a valid value cannot be obtained.
serviceName String
K8S container service nameNote: This field may return null, indicating that a valid value cannot be obtained.
source String
Source of Node, value range: K8SNote: This field may return null, indicating that a valid value cannot be obtained.
tags List<String>
Dye labelNote: This field may return null, indicating that a valid value cannot be obtained.
uniqueServiceName String
Unique service name recorded internally by API gatewayNote: This field may return null, indicating that a valid value cannot be obtained.
vmInstanceId String
CVM instance IDNote: This field may return null, indicating that a valid value cannot be obtained.

Import

apigateway upstream can be imported using the id, e.g.

$ pulumi import tencentcloud:index/apiGatewayUpstream:ApiGatewayUpstream upstream upstream_id
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.