tencentcloud.ClbFunctionTargetsAttachment
Explore with Pulumi AI
Provides a resource to create a clb function_targets_attachment
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const functionTargets = new tencentcloud.ClbFunctionTargetsAttachment("functionTargets", {
domain: "xxx.com",
functionTargets: {
"function": {
functionName: "keep-tf-test-1675954233",
functionNamespace: "default",
functionQualifier: "$LATEST",
functionQualifierType: "VERSION",
},
weight: 10,
},
listenerId: "lbl-nonkgvc2",
loadBalancerId: "lb-5dnrkgry",
url: "/",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
function_targets = tencentcloud.ClbFunctionTargetsAttachment("functionTargets",
domain="xxx.com",
function_targets={
"function": {
"function_name": "keep-tf-test-1675954233",
"function_namespace": "default",
"function_qualifier": "$LATEST",
"function_qualifier_type": "VERSION",
},
"weight": 10,
},
listener_id="lbl-nonkgvc2",
load_balancer_id="lb-5dnrkgry",
url="/")
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.NewClbFunctionTargetsAttachment(ctx, "functionTargets", &tencentcloud.ClbFunctionTargetsAttachmentArgs{
Domain: pulumi.String("xxx.com"),
FunctionTargets: &tencentcloud.ClbFunctionTargetsAttachmentFunctionTargetsArgs{
Function: &tencentcloud.ClbFunctionTargetsAttachmentFunctionTargetsFunctionArgs{
FunctionName: pulumi.String("keep-tf-test-1675954233"),
FunctionNamespace: pulumi.String("default"),
FunctionQualifier: pulumi.String("$LATEST"),
FunctionQualifierType: pulumi.String("VERSION"),
},
Weight: pulumi.Float64(10),
},
ListenerId: pulumi.String("lbl-nonkgvc2"),
LoadBalancerId: pulumi.String("lb-5dnrkgry"),
Url: pulumi.String("/"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var functionTargets = new Tencentcloud.ClbFunctionTargetsAttachment("functionTargets", new()
{
Domain = "xxx.com",
FunctionTargets = new Tencentcloud.Inputs.ClbFunctionTargetsAttachmentFunctionTargetsArgs
{
Function = new Tencentcloud.Inputs.ClbFunctionTargetsAttachmentFunctionTargetsFunctionArgs
{
FunctionName = "keep-tf-test-1675954233",
FunctionNamespace = "default",
FunctionQualifier = "$LATEST",
FunctionQualifierType = "VERSION",
},
Weight = 10,
},
ListenerId = "lbl-nonkgvc2",
LoadBalancerId = "lb-5dnrkgry",
Url = "/",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClbFunctionTargetsAttachment;
import com.pulumi.tencentcloud.ClbFunctionTargetsAttachmentArgs;
import com.pulumi.tencentcloud.inputs.ClbFunctionTargetsAttachmentFunctionTargetsArgs;
import com.pulumi.tencentcloud.inputs.ClbFunctionTargetsAttachmentFunctionTargetsFunctionArgs;
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 functionTargets = new ClbFunctionTargetsAttachment("functionTargets", ClbFunctionTargetsAttachmentArgs.builder()
.domain("xxx.com")
.functionTargets(ClbFunctionTargetsAttachmentFunctionTargetsArgs.builder()
.function(ClbFunctionTargetsAttachmentFunctionTargetsFunctionArgs.builder()
.functionName("keep-tf-test-1675954233")
.functionNamespace("default")
.functionQualifier("$LATEST")
.functionQualifierType("VERSION")
.build())
.weight(10)
.build())
.listenerId("lbl-nonkgvc2")
.loadBalancerId("lb-5dnrkgry")
.url("/")
.build());
}
}
resources:
functionTargets:
type: tencentcloud:ClbFunctionTargetsAttachment
properties:
domain: xxx.com
functionTargets:
function:
functionName: keep-tf-test-1675954233
functionNamespace: default
functionQualifier: $LATEST
functionQualifierType: VERSION
weight: 10
listenerId: lbl-nonkgvc2
loadBalancerId: lb-5dnrkgry
url: /
Create ClbFunctionTargetsAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClbFunctionTargetsAttachment(name: string, args: ClbFunctionTargetsAttachmentArgs, opts?: CustomResourceOptions);
@overload
def ClbFunctionTargetsAttachment(resource_name: str,
args: ClbFunctionTargetsAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClbFunctionTargetsAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
function_targets: Optional[ClbFunctionTargetsAttachmentFunctionTargetsArgs] = None,
listener_id: Optional[str] = None,
load_balancer_id: Optional[str] = None,
clb_function_targets_attachment_id: Optional[str] = None,
domain: Optional[str] = None,
location_id: Optional[str] = None,
url: Optional[str] = None)
func NewClbFunctionTargetsAttachment(ctx *Context, name string, args ClbFunctionTargetsAttachmentArgs, opts ...ResourceOption) (*ClbFunctionTargetsAttachment, error)
public ClbFunctionTargetsAttachment(string name, ClbFunctionTargetsAttachmentArgs args, CustomResourceOptions? opts = null)
public ClbFunctionTargetsAttachment(String name, ClbFunctionTargetsAttachmentArgs args)
public ClbFunctionTargetsAttachment(String name, ClbFunctionTargetsAttachmentArgs args, CustomResourceOptions options)
type: tencentcloud:ClbFunctionTargetsAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ClbFunctionTargetsAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ClbFunctionTargetsAttachmentArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ClbFunctionTargetsAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClbFunctionTargetsAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClbFunctionTargetsAttachmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ClbFunctionTargetsAttachment 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 ClbFunctionTargetsAttachment resource accepts the following input properties:
- Function
Targets ClbFunction Targets Attachment Function Targets - List of cloud functions to be bound.
- Listener
Id string - Load Balancer Listener ID.
- Load
Balancer stringId - Load Balancer Instance ID.
- Clb
Function stringTargets Attachment Id - ID of the resource.
- Domain string
- The domain name of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- Location
Id string - The ID of the target forwarding rule. When binding the cloud function to a layer-7 forwarding rule, this parameter or the Domain+Url parameter must be entered.
- Url string
- The URL of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- Function
Targets ClbFunction Targets Attachment Function Targets Args - List of cloud functions to be bound.
- Listener
Id string - Load Balancer Listener ID.
- Load
Balancer stringId - Load Balancer Instance ID.
- Clb
Function stringTargets Attachment Id - ID of the resource.
- Domain string
- The domain name of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- Location
Id string - The ID of the target forwarding rule. When binding the cloud function to a layer-7 forwarding rule, this parameter or the Domain+Url parameter must be entered.
- Url string
- The URL of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- function
Targets ClbFunction Targets Attachment Function Targets - List of cloud functions to be bound.
- listener
Id String - Load Balancer Listener ID.
- load
Balancer StringId - Load Balancer Instance ID.
- clb
Function StringTargets Attachment Id - ID of the resource.
- domain String
- The domain name of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- location
Id String - The ID of the target forwarding rule. When binding the cloud function to a layer-7 forwarding rule, this parameter or the Domain+Url parameter must be entered.
- url String
- The URL of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- function
Targets ClbFunction Targets Attachment Function Targets - List of cloud functions to be bound.
- listener
Id string - Load Balancer Listener ID.
- load
Balancer stringId - Load Balancer Instance ID.
- clb
Function stringTargets Attachment Id - ID of the resource.
- domain string
- The domain name of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- location
Id string - The ID of the target forwarding rule. When binding the cloud function to a layer-7 forwarding rule, this parameter or the Domain+Url parameter must be entered.
- url string
- The URL of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- function_
targets ClbFunction Targets Attachment Function Targets Args - List of cloud functions to be bound.
- listener_
id str - Load Balancer Listener ID.
- load_
balancer_ strid - Load Balancer Instance ID.
- clb_
function_ strtargets_ attachment_ id - ID of the resource.
- domain str
- The domain name of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- location_
id str - The ID of the target forwarding rule. When binding the cloud function to a layer-7 forwarding rule, this parameter or the Domain+Url parameter must be entered.
- url str
- The URL of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- function
Targets Property Map - List of cloud functions to be bound.
- listener
Id String - Load Balancer Listener ID.
- load
Balancer StringId - Load Balancer Instance ID.
- clb
Function StringTargets Attachment Id - ID of the resource.
- domain String
- The domain name of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- location
Id String - The ID of the target forwarding rule. When binding the cloud function to a layer-7 forwarding rule, this parameter or the Domain+Url parameter must be entered.
- url String
- The URL of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClbFunctionTargetsAttachment 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 ClbFunctionTargetsAttachment Resource
Get an existing ClbFunctionTargetsAttachment 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?: ClbFunctionTargetsAttachmentState, opts?: CustomResourceOptions): ClbFunctionTargetsAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
clb_function_targets_attachment_id: Optional[str] = None,
domain: Optional[str] = None,
function_targets: Optional[ClbFunctionTargetsAttachmentFunctionTargetsArgs] = None,
listener_id: Optional[str] = None,
load_balancer_id: Optional[str] = None,
location_id: Optional[str] = None,
url: Optional[str] = None) -> ClbFunctionTargetsAttachment
func GetClbFunctionTargetsAttachment(ctx *Context, name string, id IDInput, state *ClbFunctionTargetsAttachmentState, opts ...ResourceOption) (*ClbFunctionTargetsAttachment, error)
public static ClbFunctionTargetsAttachment Get(string name, Input<string> id, ClbFunctionTargetsAttachmentState? state, CustomResourceOptions? opts = null)
public static ClbFunctionTargetsAttachment get(String name, Output<String> id, ClbFunctionTargetsAttachmentState state, CustomResourceOptions options)
resources: _: type: tencentcloud:ClbFunctionTargetsAttachment get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Clb
Function stringTargets Attachment Id - ID of the resource.
- Domain string
- The domain name of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- Function
Targets ClbFunction Targets Attachment Function Targets - List of cloud functions to be bound.
- Listener
Id string - Load Balancer Listener ID.
- Load
Balancer stringId - Load Balancer Instance ID.
- Location
Id string - The ID of the target forwarding rule. When binding the cloud function to a layer-7 forwarding rule, this parameter or the Domain+Url parameter must be entered.
- Url string
- The URL of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- Clb
Function stringTargets Attachment Id - ID of the resource.
- Domain string
- The domain name of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- Function
Targets ClbFunction Targets Attachment Function Targets Args - List of cloud functions to be bound.
- Listener
Id string - Load Balancer Listener ID.
- Load
Balancer stringId - Load Balancer Instance ID.
- Location
Id string - The ID of the target forwarding rule. When binding the cloud function to a layer-7 forwarding rule, this parameter or the Domain+Url parameter must be entered.
- Url string
- The URL of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- clb
Function StringTargets Attachment Id - ID of the resource.
- domain String
- The domain name of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- function
Targets ClbFunction Targets Attachment Function Targets - List of cloud functions to be bound.
- listener
Id String - Load Balancer Listener ID.
- load
Balancer StringId - Load Balancer Instance ID.
- location
Id String - The ID of the target forwarding rule. When binding the cloud function to a layer-7 forwarding rule, this parameter or the Domain+Url parameter must be entered.
- url String
- The URL of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- clb
Function stringTargets Attachment Id - ID of the resource.
- domain string
- The domain name of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- function
Targets ClbFunction Targets Attachment Function Targets - List of cloud functions to be bound.
- listener
Id string - Load Balancer Listener ID.
- load
Balancer stringId - Load Balancer Instance ID.
- location
Id string - The ID of the target forwarding rule. When binding the cloud function to a layer-7 forwarding rule, this parameter or the Domain+Url parameter must be entered.
- url string
- The URL of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- clb_
function_ strtargets_ attachment_ id - ID of the resource.
- domain str
- The domain name of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- function_
targets ClbFunction Targets Attachment Function Targets Args - List of cloud functions to be bound.
- listener_
id str - Load Balancer Listener ID.
- load_
balancer_ strid - Load Balancer Instance ID.
- location_
id str - The ID of the target forwarding rule. When binding the cloud function to a layer-7 forwarding rule, this parameter or the Domain+Url parameter must be entered.
- url str
- The URL of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- clb
Function StringTargets Attachment Id - ID of the resource.
- domain String
- The domain name of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
- function
Targets Property Map - List of cloud functions to be bound.
- listener
Id String - Load Balancer Listener ID.
- load
Balancer StringId - Load Balancer Instance ID.
- location
Id String - The ID of the target forwarding rule. When binding the cloud function to a layer-7 forwarding rule, this parameter or the Domain+Url parameter must be entered.
- url String
- The URL of the target forwarding rule. If the LocationId parameter has been entered, this parameter will not take effect.
Supporting Types
ClbFunctionTargetsAttachmentFunctionTargets, ClbFunctionTargetsAttachmentFunctionTargetsArgs
- Function
Clb
Function Targets Attachment Function Targets Function - Information about cloud functions.Note: This field may return null, indicating that no valid value can be obtained.
- Weight double
- Weight. The default is
10
.
- Function
Clb
Function Targets Attachment Function Targets Function - Information about cloud functions.Note: This field may return null, indicating that no valid value can be obtained.
- Weight float64
- Weight. The default is
10
.
- function
Clb
Function Targets Attachment Function Targets Function - Information about cloud functions.Note: This field may return null, indicating that no valid value can be obtained.
- weight Double
- Weight. The default is
10
.
- function
Clb
Function Targets Attachment Function Targets Function - Information about cloud functions.Note: This field may return null, indicating that no valid value can be obtained.
- weight number
- Weight. The default is
10
.
- function
Clb
Function Targets Attachment Function Targets Function - Information about cloud functions.Note: This field may return null, indicating that no valid value can be obtained.
- weight float
- Weight. The default is
10
.
- function Property Map
- Information about cloud functions.Note: This field may return null, indicating that no valid value can be obtained.
- weight Number
- Weight. The default is
10
.
ClbFunctionTargetsAttachmentFunctionTargetsFunction, ClbFunctionTargetsAttachmentFunctionTargetsFunctionArgs
- Function
Name string - The name of function.
- Function
Namespace string - The namespace of function.
- Function
Qualifier string - The version name or alias of the function.
- Function
Qualifier stringType - Identifies the type of FunctionQualifier parameter, possible values: VERSION, ALIAS.Note: This field may return null, indicating that no valid value can be obtained.
- Function
Name string - The name of function.
- Function
Namespace string - The namespace of function.
- Function
Qualifier string - The version name or alias of the function.
- Function
Qualifier stringType - Identifies the type of FunctionQualifier parameter, possible values: VERSION, ALIAS.Note: This field may return null, indicating that no valid value can be obtained.
- function
Name String - The name of function.
- function
Namespace String - The namespace of function.
- function
Qualifier String - The version name or alias of the function.
- function
Qualifier StringType - Identifies the type of FunctionQualifier parameter, possible values: VERSION, ALIAS.Note: This field may return null, indicating that no valid value can be obtained.
- function
Name string - The name of function.
- function
Namespace string - The namespace of function.
- function
Qualifier string - The version name or alias of the function.
- function
Qualifier stringType - Identifies the type of FunctionQualifier parameter, possible values: VERSION, ALIAS.Note: This field may return null, indicating that no valid value can be obtained.
- function_
name str - The name of function.
- function_
namespace str - The namespace of function.
- function_
qualifier str - The version name or alias of the function.
- function_
qualifier_ strtype - Identifies the type of FunctionQualifier parameter, possible values: VERSION, ALIAS.Note: This field may return null, indicating that no valid value can be obtained.
- function
Name String - The name of function.
- function
Namespace String - The namespace of function.
- function
Qualifier String - The version name or alias of the function.
- function
Qualifier StringType - Identifies the type of FunctionQualifier parameter, possible values: VERSION, ALIAS.Note: This field may return null, indicating that no valid value can be obtained.
Import
clb function_targets_attachment can be imported using the id, e.g.
$ pulumi import tencentcloud:index/clbFunctionTargetsAttachment:ClbFunctionTargetsAttachment function_targets loadBalancerId#listenerId#locationId or loadBalancerId#listenerId#domain#rule
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.