tencentcloud.ScfCustomDomain
Explore with Pulumi AI
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.
- Endpoints
Configs List<ScfCustom Domain Endpoints Config> - Routing configuration.
- Protocol string
- Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
- Cert
Config ScfCustom Domain Cert Config - Certificate configuration information, required for HTTPS protocol.
- Scf
Custom stringDomain Id - ID of the resource.
- Waf
Config ScfCustom Domain Waf Config - Web Application Firewall Configuration.
- Domain string
- Domain names, pan-domain names are not supported.
- Endpoints
Configs []ScfCustom Domain Endpoints Config Args - Routing configuration.
- Protocol string
- Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
- Cert
Config ScfCustom Domain Cert Config Args - Certificate configuration information, required for HTTPS protocol.
- Scf
Custom stringDomain Id - ID of the resource.
- Waf
Config ScfCustom Domain Waf Config Args - Web Application Firewall Configuration.
- domain String
- Domain names, pan-domain names are not supported.
- endpoints
Configs List<ScfCustom Domain Endpoints Config> - Routing configuration.
- protocol String
- Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
- cert
Config ScfCustom Domain Cert Config - Certificate configuration information, required for HTTPS protocol.
- scf
Custom StringDomain Id - ID of the resource.
- waf
Config ScfCustom Domain Waf Config - Web Application Firewall Configuration.
- domain string
- Domain names, pan-domain names are not supported.
- endpoints
Configs ScfCustom Domain Endpoints Config[] - Routing configuration.
- protocol string
- Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
- cert
Config ScfCustom Domain Cert Config - Certificate configuration information, required for HTTPS protocol.
- scf
Custom stringDomain Id - ID of the resource.
- waf
Config ScfCustom Domain Waf Config - Web Application Firewall Configuration.
- domain str
- Domain names, pan-domain names are not supported.
- endpoints_
configs Sequence[ScfCustom Domain Endpoints Config Args] - Routing configuration.
- protocol str
- Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
- cert_
config ScfCustom Domain Cert Config Args - Certificate configuration information, required for HTTPS protocol.
- scf_
custom_ strdomain_ id - ID of the resource.
- waf_
config ScfCustom Domain Waf Config Args - Web Application Firewall Configuration.
- domain String
- Domain names, pan-domain names are not supported.
- endpoints
Configs List<Property Map> - Routing configuration.
- protocol String
- Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
- cert
Config Property Map - Certificate configuration information, required for HTTPS protocol.
- scf
Custom StringDomain Id - ID of the resource.
- waf
Config 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.
- Cert
Config ScfCustom Domain Cert Config - Certificate configuration information, required for HTTPS protocol.
- Domain string
- Domain names, pan-domain names are not supported.
- Endpoints
Configs List<ScfCustom Domain Endpoints Config> - Routing configuration.
- Protocol string
- Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
- Scf
Custom stringDomain Id - ID of the resource.
- Waf
Config ScfCustom Domain Waf Config - Web Application Firewall Configuration.
- Cert
Config ScfCustom Domain Cert Config Args - Certificate configuration information, required for HTTPS protocol.
- Domain string
- Domain names, pan-domain names are not supported.
- Endpoints
Configs []ScfCustom Domain Endpoints Config Args - Routing configuration.
- Protocol string
- Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
- Scf
Custom stringDomain Id - ID of the resource.
- Waf
Config ScfCustom Domain Waf Config Args - Web Application Firewall Configuration.
- cert
Config ScfCustom Domain Cert Config - Certificate configuration information, required for HTTPS protocol.
- domain String
- Domain names, pan-domain names are not supported.
- endpoints
Configs List<ScfCustom Domain Endpoints Config> - Routing configuration.
- protocol String
- Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
- scf
Custom StringDomain Id - ID of the resource.
- waf
Config ScfCustom Domain Waf Config - Web Application Firewall Configuration.
- cert
Config ScfCustom Domain Cert Config - Certificate configuration information, required for HTTPS protocol.
- domain string
- Domain names, pan-domain names are not supported.
- endpoints
Configs ScfCustom Domain Endpoints Config[] - Routing configuration.
- protocol string
- Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
- scf
Custom stringDomain Id - ID of the resource.
- waf
Config ScfCustom Domain Waf Config - Web Application Firewall Configuration.
- cert_
config ScfCustom Domain Cert Config Args - Certificate configuration information, required for HTTPS protocol.
- domain str
- Domain names, pan-domain names are not supported.
- endpoints_
configs Sequence[ScfCustom Domain Endpoints Config Args] - Routing configuration.
- protocol str
- Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
- scf_
custom_ strdomain_ id - ID of the resource.
- waf_
config ScfCustom Domain Waf Config Args - Web Application Firewall Configuration.
- cert
Config Property Map - Certificate configuration information, required for HTTPS protocol.
- domain String
- Domain names, pan-domain names are not supported.
- endpoints
Configs List<Property Map> - Routing configuration.
- protocol String
- Protocol, value range: HTTP, HTTPS, HTTP&HTTPS.
- scf
Custom StringDomain Id - ID of the resource.
- waf
Config Property Map - Web Application Firewall Configuration.
Supporting Types
ScfCustomDomainCertConfig, ScfCustomDomainCertConfigArgs
- Certificate
Id string - SSL Certificates ID.
- Certificate
Id string - SSL Certificates ID.
- certificate
Id String - SSL Certificates ID.
- certificate
Id string - SSL Certificates ID.
- certificate_
id str - SSL Certificates ID.
- certificate
Id String - SSL Certificates ID.
ScfCustomDomainEndpointsConfig, ScfCustomDomainEndpointsConfigArgs
- Function
Name string - Function name.
- Namespace string
- Function namespace.
- Path
Match string - Path, value specification: /,/,/xxx,/xxx/a,/xxx/.
- Qualifier string
- Function alias or version.
- Path
Rewrites List<ScfCustom Domain Endpoints Config Path Rewrite> - Path rewriting policy.
- Function
Name string - Function name.
- Namespace string
- Function namespace.
- Path
Match string - Path, value specification: /,/,/xxx,/xxx/a,/xxx/.
- Qualifier string
- Function alias or version.
- Path
Rewrites []ScfCustom Domain Endpoints Config Path Rewrite - Path rewriting policy.
- function
Name String - Function name.
- namespace String
- Function namespace.
- path
Match String - Path, value specification: /,/,/xxx,/xxx/a,/xxx/.
- qualifier String
- Function alias or version.
- path
Rewrites List<ScfCustom Domain Endpoints Config Path Rewrite> - Path rewriting policy.
- function
Name string - Function name.
- namespace string
- Function namespace.
- path
Match string - Path, value specification: /,/,/xxx,/xxx/a,/xxx/.
- qualifier string
- Function alias or version.
- path
Rewrites ScfCustom Domain Endpoints Config Path Rewrite[] - 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[ScfCustom Domain Endpoints Config Path Rewrite] - Path rewriting policy.
- function
Name String - Function name.
- namespace String
- Function namespace.
- path
Match String - Path, value specification: /,/,/xxx,/xxx/a,/xxx/.
- qualifier String
- Function alias or version.
- path
Rewrites List<Property Map> - Path rewriting policy.
ScfCustomDomainEndpointsConfigPathRewrite, ScfCustomDomainEndpointsConfigPathRewriteArgs
ScfCustomDomainWafConfig, ScfCustomDomainWafConfigArgs
- Waf
Instance stringId - Web Application Firewall Instance ID.
- Waf
Open string - Whether the Web Application Firewall is turned on, value range:OPEN, CLOSE.
- Waf
Instance stringId - Web Application Firewall Instance ID.
- Waf
Open string - Whether the Web Application Firewall is turned on, value range:OPEN, CLOSE.
- waf
Instance StringId - Web Application Firewall Instance ID.
- waf
Open String - Whether the Web Application Firewall is turned on, value range:OPEN, CLOSE.
- waf
Instance stringId - Web Application Firewall Instance ID.
- waf
Open string - Whether the Web Application Firewall is turned on, value range:OPEN, CLOSE.
- waf_
instance_ strid - Web Application Firewall Instance ID.
- waf_
open str - Whether the Web Application Firewall is turned on, value range:OPEN, CLOSE.
- waf
Instance StringId - Web Application Firewall Instance ID.
- waf
Open 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.