1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. TemApplicationService
tencentcloud 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack

tencentcloud.TemApplicationService

Explore with Pulumi AI

Provides a resource to create a tem application_service

Example Usage

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

const applicationService = new tencentcloud.TemApplicationService("applicationService", {
    applicationId: "app-jrl3346j",
    environmentId: "en-dpxyydl5",
    service: {
        portMappingItemLists: [{
            port: 80,
            protocol: "TCP",
            targetPort: 80,
        }],
        serviceName: "test0-1",
        type: "CLUSTER",
    },
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

application_service = tencentcloud.TemApplicationService("applicationService",
    application_id="app-jrl3346j",
    environment_id="en-dpxyydl5",
    service={
        "port_mapping_item_lists": [{
            "port": 80,
            "protocol": "TCP",
            "target_port": 80,
        }],
        "service_name": "test0-1",
        "type": "CLUSTER",
    })
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.NewTemApplicationService(ctx, "applicationService", &tencentcloud.TemApplicationServiceArgs{
			ApplicationId: pulumi.String("app-jrl3346j"),
			EnvironmentId: pulumi.String("en-dpxyydl5"),
			Service: &tencentcloud.TemApplicationServiceServiceArgs{
				PortMappingItemLists: tencentcloud.TemApplicationServiceServicePortMappingItemListArray{
					&tencentcloud.TemApplicationServiceServicePortMappingItemListArgs{
						Port:       pulumi.Float64(80),
						Protocol:   pulumi.String("TCP"),
						TargetPort: pulumi.Float64(80),
					},
				},
				ServiceName: pulumi.String("test0-1"),
				Type:        pulumi.String("CLUSTER"),
			},
		})
		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 applicationService = new Tencentcloud.TemApplicationService("applicationService", new()
    {
        ApplicationId = "app-jrl3346j",
        EnvironmentId = "en-dpxyydl5",
        Service = new Tencentcloud.Inputs.TemApplicationServiceServiceArgs
        {
            PortMappingItemLists = new[]
            {
                new Tencentcloud.Inputs.TemApplicationServiceServicePortMappingItemListArgs
                {
                    Port = 80,
                    Protocol = "TCP",
                    TargetPort = 80,
                },
            },
            ServiceName = "test0-1",
            Type = "CLUSTER",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TemApplicationService;
import com.pulumi.tencentcloud.TemApplicationServiceArgs;
import com.pulumi.tencentcloud.inputs.TemApplicationServiceServiceArgs;
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 applicationService = new TemApplicationService("applicationService", TemApplicationServiceArgs.builder()
            .applicationId("app-jrl3346j")
            .environmentId("en-dpxyydl5")
            .service(TemApplicationServiceServiceArgs.builder()
                .portMappingItemLists(TemApplicationServiceServicePortMappingItemListArgs.builder()
                    .port(80)
                    .protocol("TCP")
                    .targetPort(80)
                    .build())
                .serviceName("test0-1")
                .type("CLUSTER")
                .build())
            .build());

    }
}
Copy
resources:
  applicationService:
    type: tencentcloud:TemApplicationService
    properties:
      applicationId: app-jrl3346j
      environmentId: en-dpxyydl5
      service:
        portMappingItemLists:
          - port: 80
            protocol: TCP
            targetPort: 80
        serviceName: test0-1
        type: CLUSTER
Copy

Create TemApplicationService Resource

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

Constructor syntax

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

@overload
def TemApplicationService(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          application_id: Optional[str] = None,
                          environment_id: Optional[str] = None,
                          service: Optional[TemApplicationServiceServiceArgs] = None,
                          tem_application_service_id: Optional[str] = None)
func NewTemApplicationService(ctx *Context, name string, args TemApplicationServiceArgs, opts ...ResourceOption) (*TemApplicationService, error)
public TemApplicationService(string name, TemApplicationServiceArgs args, CustomResourceOptions? opts = null)
public TemApplicationService(String name, TemApplicationServiceArgs args)
public TemApplicationService(String name, TemApplicationServiceArgs args, CustomResourceOptions options)
type: tencentcloud:TemApplicationService
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. TemApplicationServiceArgs
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. TemApplicationServiceArgs
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. TemApplicationServiceArgs
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. TemApplicationServiceArgs
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. TemApplicationServiceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

ApplicationId This property is required. string
application ID.
EnvironmentId This property is required. string
environment ID.
Service TemApplicationServiceService
service detail list.
TemApplicationServiceId string
ID of the resource.
ApplicationId This property is required. string
application ID.
EnvironmentId This property is required. string
environment ID.
Service TemApplicationServiceServiceArgs
service detail list.
TemApplicationServiceId string
ID of the resource.
applicationId This property is required. String
application ID.
environmentId This property is required. String
environment ID.
service TemApplicationServiceService
service detail list.
temApplicationServiceId String
ID of the resource.
applicationId This property is required. string
application ID.
environmentId This property is required. string
environment ID.
service TemApplicationServiceService
service detail list.
temApplicationServiceId string
ID of the resource.
application_id This property is required. str
application ID.
environment_id This property is required. str
environment ID.
service TemApplicationServiceServiceArgs
service detail list.
tem_application_service_id str
ID of the resource.
applicationId This property is required. String
application ID.
environmentId This property is required. String
environment ID.
service Property Map
service detail list.
temApplicationServiceId String
ID of the resource.

Outputs

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

Get an existing TemApplicationService 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?: TemApplicationServiceState, opts?: CustomResourceOptions): TemApplicationService
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        application_id: Optional[str] = None,
        environment_id: Optional[str] = None,
        service: Optional[TemApplicationServiceServiceArgs] = None,
        tem_application_service_id: Optional[str] = None) -> TemApplicationService
func GetTemApplicationService(ctx *Context, name string, id IDInput, state *TemApplicationServiceState, opts ...ResourceOption) (*TemApplicationService, error)
public static TemApplicationService Get(string name, Input<string> id, TemApplicationServiceState? state, CustomResourceOptions? opts = null)
public static TemApplicationService get(String name, Output<String> id, TemApplicationServiceState state, CustomResourceOptions options)
resources:  _:    type: tencentcloud:TemApplicationService    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:
ApplicationId string
application ID.
EnvironmentId string
environment ID.
Service TemApplicationServiceService
service detail list.
TemApplicationServiceId string
ID of the resource.
ApplicationId string
application ID.
EnvironmentId string
environment ID.
Service TemApplicationServiceServiceArgs
service detail list.
TemApplicationServiceId string
ID of the resource.
applicationId String
application ID.
environmentId String
environment ID.
service TemApplicationServiceService
service detail list.
temApplicationServiceId String
ID of the resource.
applicationId string
application ID.
environmentId string
environment ID.
service TemApplicationServiceService
service detail list.
temApplicationServiceId string
ID of the resource.
application_id str
application ID.
environment_id str
environment ID.
service TemApplicationServiceServiceArgs
service detail list.
tem_application_service_id str
ID of the resource.
applicationId String
application ID.
environmentId String
environment ID.
service Property Map
service detail list.
temApplicationServiceId String
ID of the resource.

Supporting Types

TemApplicationServiceService
, TemApplicationServiceServiceArgs

Ip string
ip address of application service.
PortMappingItemLists List<TemApplicationServiceServicePortMappingItemList>
port mapping item list.
ServiceName string
application service name.
SubnetId string
ID of subnet instance, required when type is VPC.
Type string
application service type: EXTERNAL | VPC | CLUSTER.
VpcId string
ID of vpc instance, required when type is VPC.
Ip string
ip address of application service.
PortMappingItemLists []TemApplicationServiceServicePortMappingItemList
port mapping item list.
ServiceName string
application service name.
SubnetId string
ID of subnet instance, required when type is VPC.
Type string
application service type: EXTERNAL | VPC | CLUSTER.
VpcId string
ID of vpc instance, required when type is VPC.
ip String
ip address of application service.
portMappingItemLists List<TemApplicationServiceServicePortMappingItemList>
port mapping item list.
serviceName String
application service name.
subnetId String
ID of subnet instance, required when type is VPC.
type String
application service type: EXTERNAL | VPC | CLUSTER.
vpcId String
ID of vpc instance, required when type is VPC.
ip string
ip address of application service.
portMappingItemLists TemApplicationServiceServicePortMappingItemList[]
port mapping item list.
serviceName string
application service name.
subnetId string
ID of subnet instance, required when type is VPC.
type string
application service type: EXTERNAL | VPC | CLUSTER.
vpcId string
ID of vpc instance, required when type is VPC.
ip str
ip address of application service.
port_mapping_item_lists Sequence[TemApplicationServiceServicePortMappingItemList]
port mapping item list.
service_name str
application service name.
subnet_id str
ID of subnet instance, required when type is VPC.
type str
application service type: EXTERNAL | VPC | CLUSTER.
vpc_id str
ID of vpc instance, required when type is VPC.
ip String
ip address of application service.
portMappingItemLists List<Property Map>
port mapping item list.
serviceName String
application service name.
subnetId String
ID of subnet instance, required when type is VPC.
type String
application service type: EXTERNAL | VPC | CLUSTER.
vpcId String
ID of vpc instance, required when type is VPC.

TemApplicationServiceServicePortMappingItemList
, TemApplicationServiceServicePortMappingItemListArgs

Port double
container port.
Protocol string
UDP or TCP.
TargetPort double
application listen port.
Port float64
container port.
Protocol string
UDP or TCP.
TargetPort float64
application listen port.
port Double
container port.
protocol String
UDP or TCP.
targetPort Double
application listen port.
port number
container port.
protocol string
UDP or TCP.
targetPort number
application listen port.
port float
container port.
protocol str
UDP or TCP.
target_port float
application listen port.
port Number
container port.
protocol String
UDP or TCP.
targetPort Number
application listen port.

Import

tem application_service can be imported using the environmentId#applicationId#serviceName, e.g.

$ pulumi import tencentcloud:index/temApplicationService:TemApplicationService application_service en-dpxyydl5#app-jrl3346j#test0-1
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.