1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. ScfCustomDomain
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.ScfCustomDomain

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a scf custom domain

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const scfCustomDomain = new tencentcloud.ScfCustomDomain("scfCustomDomain", {
        domain: "xxxxxx",
        endpointsConfigs: [{
            functionName: "xxxxxx",
            namespace: "default",
            pathMatch: "/aa/*",
            qualifier: "$LATEST",
        }],
        protocol: "HTTP",
        wafConfig: {
            wafOpen: "CLOSE",
        },
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    scf_custom_domain = tencentcloud.ScfCustomDomain("scfCustomDomain",
        domain="xxxxxx",
        endpoints_configs=[{
            "function_name": "xxxxxx",
            "namespace": "default",
            "path_match": "/aa/*",
            "qualifier": "$LATEST",
        }],
        protocol="HTTP",
        waf_config={
            "waf_open": "CLOSE",
        })
    
    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.NewScfCustomDomain(ctx, "scfCustomDomain", &tencentcloud.ScfCustomDomainArgs{
    			Domain: pulumi.String("xxxxxx"),
    			EndpointsConfigs: tencentcloud.ScfCustomDomainEndpointsConfigArray{
    				&tencentcloud.ScfCustomDomainEndpointsConfigArgs{
    					FunctionName: pulumi.String("xxxxxx"),
    					Namespace:    pulumi.String("default"),
    					PathMatch:    pulumi.String("/aa/*"),
    					Qualifier:    pulumi.String("$LATEST"),
    				},
    			},
    			Protocol: pulumi.String("HTTP"),
    			WafConfig: &tencentcloud.ScfCustomDomainWafConfigArgs{
    				WafOpen: pulumi.String("CLOSE"),
    			},
    		})
    		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 scfCustomDomain = new Tencentcloud.ScfCustomDomain("scfCustomDomain", new()
        {
            Domain = "xxxxxx",
            EndpointsConfigs = new[]
            {
                new Tencentcloud.Inputs.ScfCustomDomainEndpointsConfigArgs
                {
                    FunctionName = "xxxxxx",
                    Namespace = "default",
                    PathMatch = "/aa/*",
                    Qualifier = "$LATEST",
                },
            },
            Protocol = "HTTP",
            WafConfig = new Tencentcloud.Inputs.ScfCustomDomainWafConfigArgs
            {
                WafOpen = "CLOSE",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ScfCustomDomain;
    import com.pulumi.tencentcloud.ScfCustomDomainArgs;
    import com.pulumi.tencentcloud.inputs.ScfCustomDomainEndpointsConfigArgs;
    import com.pulumi.tencentcloud.inputs.ScfCustomDomainWafConfigArgs;
    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 scfCustomDomain = new ScfCustomDomain("scfCustomDomain", ScfCustomDomainArgs.builder()
                .domain("xxxxxx")
                .endpointsConfigs(ScfCustomDomainEndpointsConfigArgs.builder()
                    .functionName("xxxxxx")
                    .namespace("default")
                    .pathMatch("/aa/*")
                    .qualifier("$LATEST")
                    .build())
                .protocol("HTTP")
                .wafConfig(ScfCustomDomainWafConfigArgs.builder()
                    .wafOpen("CLOSE")
                    .build())
                .build());
    
        }
    }
    
    resources:
      scfCustomDomain:
        type: tencentcloud:ScfCustomDomain
        properties:
          domain: xxxxxx
          endpointsConfigs:
            - functionName: xxxxxx
              namespace: default
              pathMatch: /aa/*
              qualifier: $LATEST
          protocol: HTTP
          wafConfig:
            wafOpen: CLOSE
    

    Create ScfCustomDomain Resource

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

    Constructor syntax

    new ScfCustomDomain(name: string, args: ScfCustomDomainArgs, opts?: CustomResourceOptions);
    @overload
    def ScfCustomDomain(resource_name: str,
                        args: ScfCustomDomainArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def ScfCustomDomain(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        domain: Optional[str] = None,
                        endpoints_configs: Optional[Sequence[ScfCustomDomainEndpointsConfigArgs]] = None,
                        protocol: Optional[str] = None,
                        cert_config: Optional[ScfCustomDomainCertConfigArgs] = None,
                        scf_custom_domain_id: Optional[str] = None,
                        waf_config: Optional[ScfCustomDomainWafConfigArgs] = None)
    func NewScfCustomDomain(ctx *Context, name string, args ScfCustomDomainArgs, opts ...ResourceOption) (*ScfCustomDomain, error)
    public ScfCustomDomain(string name, ScfCustomDomainArgs args, CustomResourceOptions? opts = null)
    public ScfCustomDomain(String name, ScfCustomDomainArgs args)
    public ScfCustomDomain(String name, ScfCustomDomainArgs args, CustomResourceOptions options)
    
    type: tencentcloud:ScfCustomDomain
    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 ScfCustomDomainArgs
    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 ScfCustomDomainArgs
    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 ScfCustomDomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScfCustomDomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScfCustomDomainArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Domain string
    Domain names, pan-domain names are not supported.
    EndpointsConfigs List<ScfCustomDomainEndpointsConfig>
    Routing configuration.
    Protocol string
    Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
    CertConfig ScfCustomDomainCertConfig
    Certificate configuration information, required for HTTPS protocol.
    ScfCustomDomainId string
    ID of the resource.
    WafConfig ScfCustomDomainWafConfig
    Web Application Firewall Configuration.
    Domain string
    Domain names, pan-domain names are not supported.
    EndpointsConfigs []ScfCustomDomainEndpointsConfigArgs
    Routing configuration.
    Protocol string
    Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
    CertConfig ScfCustomDomainCertConfigArgs
    Certificate configuration information, required for HTTPS protocol.
    ScfCustomDomainId string
    ID of the resource.
    WafConfig ScfCustomDomainWafConfigArgs
    Web Application Firewall Configuration.
    domain String
    Domain names, pan-domain names are not supported.
    endpointsConfigs List<ScfCustomDomainEndpointsConfig>
    Routing configuration.
    protocol String
    Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
    certConfig ScfCustomDomainCertConfig
    Certificate configuration information, required for HTTPS protocol.
    scfCustomDomainId String
    ID of the resource.
    wafConfig ScfCustomDomainWafConfig
    Web Application Firewall Configuration.
    domain string
    Domain names, pan-domain names are not supported.
    endpointsConfigs ScfCustomDomainEndpointsConfig[]
    Routing configuration.
    protocol string
    Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
    certConfig ScfCustomDomainCertConfig
    Certificate configuration information, required for HTTPS protocol.
    scfCustomDomainId string
    ID of the resource.
    wafConfig ScfCustomDomainWafConfig
    Web Application Firewall Configuration.
    domain str
    Domain names, pan-domain names are not supported.
    endpoints_configs Sequence[ScfCustomDomainEndpointsConfigArgs]
    Routing configuration.
    protocol str
    Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
    cert_config ScfCustomDomainCertConfigArgs
    Certificate configuration information, required for HTTPS protocol.
    scf_custom_domain_id str
    ID of the resource.
    waf_config ScfCustomDomainWafConfigArgs
    Web Application Firewall Configuration.
    domain String
    Domain names, pan-domain names are not supported.
    endpointsConfigs List<Property Map>
    Routing configuration.
    protocol String
    Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
    certConfig Property Map
    Certificate configuration information, required for HTTPS protocol.
    scfCustomDomainId String
    ID of the resource.
    wafConfig Property Map
    Web Application Firewall Configuration.

    Outputs

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

    Get an existing ScfCustomDomain 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?: ScfCustomDomainState, opts?: CustomResourceOptions): ScfCustomDomain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cert_config: Optional[ScfCustomDomainCertConfigArgs] = None,
            domain: Optional[str] = None,
            endpoints_configs: Optional[Sequence[ScfCustomDomainEndpointsConfigArgs]] = None,
            protocol: Optional[str] = None,
            scf_custom_domain_id: Optional[str] = None,
            waf_config: Optional[ScfCustomDomainWafConfigArgs] = None) -> ScfCustomDomain
    func GetScfCustomDomain(ctx *Context, name string, id IDInput, state *ScfCustomDomainState, opts ...ResourceOption) (*ScfCustomDomain, error)
    public static ScfCustomDomain Get(string name, Input<string> id, ScfCustomDomainState? state, CustomResourceOptions? opts = null)
    public static ScfCustomDomain get(String name, Output<String> id, ScfCustomDomainState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:ScfCustomDomain    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.
    The following state arguments are supported:
    CertConfig ScfCustomDomainCertConfig
    Certificate configuration information, required for HTTPS protocol.
    Domain string
    Domain names, pan-domain names are not supported.
    EndpointsConfigs List<ScfCustomDomainEndpointsConfig>
    Routing configuration.
    Protocol string
    Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
    ScfCustomDomainId string
    ID of the resource.
    WafConfig ScfCustomDomainWafConfig
    Web Application Firewall Configuration.
    CertConfig ScfCustomDomainCertConfigArgs
    Certificate configuration information, required for HTTPS protocol.
    Domain string
    Domain names, pan-domain names are not supported.
    EndpointsConfigs []ScfCustomDomainEndpointsConfigArgs
    Routing configuration.
    Protocol string
    Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
    ScfCustomDomainId string
    ID of the resource.
    WafConfig ScfCustomDomainWafConfigArgs
    Web Application Firewall Configuration.
    certConfig ScfCustomDomainCertConfig
    Certificate configuration information, required for HTTPS protocol.
    domain String
    Domain names, pan-domain names are not supported.
    endpointsConfigs List<ScfCustomDomainEndpointsConfig>
    Routing configuration.
    protocol String
    Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
    scfCustomDomainId String
    ID of the resource.
    wafConfig ScfCustomDomainWafConfig
    Web Application Firewall Configuration.
    certConfig ScfCustomDomainCertConfig
    Certificate configuration information, required for HTTPS protocol.
    domain string
    Domain names, pan-domain names are not supported.
    endpointsConfigs ScfCustomDomainEndpointsConfig[]
    Routing configuration.
    protocol string
    Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
    scfCustomDomainId string
    ID of the resource.
    wafConfig ScfCustomDomainWafConfig
    Web Application Firewall Configuration.
    cert_config ScfCustomDomainCertConfigArgs
    Certificate configuration information, required for HTTPS protocol.
    domain str
    Domain names, pan-domain names are not supported.
    endpoints_configs Sequence[ScfCustomDomainEndpointsConfigArgs]
    Routing configuration.
    protocol str
    Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
    scf_custom_domain_id str
    ID of the resource.
    waf_config ScfCustomDomainWafConfigArgs
    Web Application Firewall Configuration.
    certConfig Property Map
    Certificate configuration information, required for HTTPS protocol.
    domain String
    Domain names, pan-domain names are not supported.
    endpointsConfigs List<Property Map>
    Routing configuration.
    protocol String
    Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
    scfCustomDomainId String
    ID of the resource.
    wafConfig Property Map
    Web Application Firewall Configuration.

    Supporting Types

    ScfCustomDomainCertConfig, ScfCustomDomainCertConfigArgs

    CertificateId string
    SSL Certificates ID.
    CertificateId string
    SSL Certificates ID.
    certificateId String
    SSL Certificates ID.
    certificateId string
    SSL Certificates ID.
    certificate_id str
    SSL Certificates ID.
    certificateId String
    SSL Certificates ID.

    ScfCustomDomainEndpointsConfig, ScfCustomDomainEndpointsConfigArgs

    FunctionName string
    Function name.
    Namespace string
    Function namespace.
    PathMatch string
    Path, value specification: /,/,/xxx,/xxx/a,/xxx/.
    Qualifier string
    Function alias or version.
    PathRewrites List<ScfCustomDomainEndpointsConfigPathRewrite>
    Path rewriting policy.
    FunctionName string
    Function name.
    Namespace string
    Function namespace.
    PathMatch string
    Path, value specification: /,/,/xxx,/xxx/a,/xxx/.
    Qualifier string
    Function alias or version.
    PathRewrites []ScfCustomDomainEndpointsConfigPathRewrite
    Path rewriting policy.
    functionName String
    Function name.
    namespace String
    Function namespace.
    pathMatch String
    Path, value specification: /,/,/xxx,/xxx/a,/xxx/.
    qualifier String
    Function alias or version.
    pathRewrites List<ScfCustomDomainEndpointsConfigPathRewrite>
    Path rewriting policy.
    functionName string
    Function name.
    namespace string
    Function namespace.
    pathMatch string
    Path, value specification: /,/,/xxx,/xxx/a,/xxx/.
    qualifier string
    Function alias or version.
    pathRewrites ScfCustomDomainEndpointsConfigPathRewrite[]
    Path rewriting policy.
    function_name str
    Function name.
    namespace str
    Function namespace.
    path_match str
    Path, value specification: /,/,/xxx,/xxx/a,/xxx/.
    qualifier str
    Function alias or version.
    path_rewrites Sequence[ScfCustomDomainEndpointsConfigPathRewrite]
    Path rewriting policy.
    functionName String
    Function name.
    namespace String
    Function namespace.
    pathMatch String
    Path, value specification: /,/,/xxx,/xxx/a,/xxx/.
    qualifier String
    Function alias or version.
    pathRewrites List<Property Map>
    Path rewriting policy.

    ScfCustomDomainEndpointsConfigPathRewrite, ScfCustomDomainEndpointsConfigPathRewriteArgs

    Path string
    Path that needs to be rerouted, value specification: /,/,/xxx,/xxx/a,/xxx/.
    Rewrite string
    Replacement values: such as/, /$.
    Type string
    Matching rules, value range: WildcardRules wildcard matching, ExactRules exact matching.
    Path string
    Path that needs to be rerouted, value specification: /,/,/xxx,/xxx/a,/xxx/.
    Rewrite string
    Replacement values: such as/, /$.
    Type string
    Matching rules, value range: WildcardRules wildcard matching, ExactRules exact matching.
    path String
    Path that needs to be rerouted, value specification: /,/,/xxx,/xxx/a,/xxx/.
    rewrite String
    Replacement values: such as/, /$.
    type String
    Matching rules, value range: WildcardRules wildcard matching, ExactRules exact matching.
    path string
    Path that needs to be rerouted, value specification: /,/,/xxx,/xxx/a,/xxx/.
    rewrite string
    Replacement values: such as/, /$.
    type string
    Matching rules, value range: WildcardRules wildcard matching, ExactRules exact matching.
    path str
    Path that needs to be rerouted, value specification: /,/,/xxx,/xxx/a,/xxx/.
    rewrite str
    Replacement values: such as/, /$.
    type str
    Matching rules, value range: WildcardRules wildcard matching, ExactRules exact matching.
    path String
    Path that needs to be rerouted, value specification: /,/,/xxx,/xxx/a,/xxx/.
    rewrite String
    Replacement values: such as/, /$.
    type String
    Matching rules, value range: WildcardRules wildcard matching, ExactRules exact matching.

    ScfCustomDomainWafConfig, ScfCustomDomainWafConfigArgs

    WafInstanceId string
    Web Application Firewall Instance ID.
    WafOpen string
    Whether the Web Application Firewall is turned on, value range:OPEN, CLOSE.
    WafInstanceId string
    Web Application Firewall Instance ID.
    WafOpen string
    Whether the Web Application Firewall is turned on, value range:OPEN, CLOSE.
    wafInstanceId String
    Web Application Firewall Instance ID.
    wafOpen String
    Whether the Web Application Firewall is turned on, value range:OPEN, CLOSE.
    wafInstanceId string
    Web Application Firewall Instance ID.
    wafOpen string
    Whether the Web Application Firewall is turned on, value range:OPEN, CLOSE.
    waf_instance_id str
    Web Application Firewall Instance ID.
    waf_open str
    Whether the Web Application Firewall is turned on, value range:OPEN, CLOSE.
    wafInstanceId String
    Web Application Firewall Instance ID.
    wafOpen String
    Whether the Web Application Firewall is turned on, value range:OPEN, CLOSE.

    Import

    scf scf_custom_domain can be imported using the id, e.g.

    $ pulumi import tencentcloud:index/scfCustomDomain:ScfCustomDomain scf_custom_domain ${domain}
    

    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.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack