alicloud.fc.V3CustomDomain
Explore with Pulumi AI
Provides a FCV3 Custom Domain resource.
Custom Domain names allow users to access FC functions through custom domain names, providing convenience for building Web services using function compute. You can bind a custom domain name to Function Compute and set different paths to different functions of different services.
For information about FCV3 Custom Domain and how to use it, see What is Custom Domain.
NOTE: This content is a technical preview, and should not be relied on in a production environment.
NOTE: Available since v1.228.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "flask-07ap.fcv3.1511928242963727.cn-shanghai.fc.devsapp.net";
const functionName1 = config.get("functionName1") || "terraform-custom-domain-t1";
const authConfig = config.get("authConfig") || `{
"jwks": {
"keys": [
{
"p": "8AdUVeldoE4LueFuzEF_C8tvJ7NhlkzS58Gz9KJTPXPr5DADSUVLWJCr5OdFE79q513SneT0UhGo-JfQ1lNMoNv5-YZ1AxIo9fZUEPIe-KyX9ttaglpzCAUE3TeKdm5J-_HZQzBPKbyUwJHAILNgB2-4IBZZwK7LAfbmfi9TmFM",
"kty": "RSA",
"q": "x8m5ydXwC8AAp9I-hOnUAx6yQJz1Nx-jXPCfn--XdHpJuNcuwRQsuUCSRQs_h3SoCI3qZZdzswQnPrtHFxgUJtQFuMj-QZpyMnebDb81rmczl2KPVUtaVDVagJEF6U9Ov3PfrLhvHUEv5u7p6s4Z6maBUaByfFlhEVPv4_ao8Us",
"d": "bjIQAKD2e65gwJ38_Sqq_EmLFuMMey3gjDv1bSCHFH8fyONJTq-utrZfvspz6EegRwW2mSHW9kq87hRwIBW9y7ED5N4KG5gHDjyh57BRE0SKv0Dz1igtKLyp-nl8-aHc1DbONwr1d7tZfFt255TxIN8cPTakXOp2Av_ztql_JotVUGK8eHmXNJFlvq5tc180sKWMHNSNsCUhQgcB1TWb_gwcqxdsIWPsLZI491XKeTGQ98J7z5h6R1cTC97lfJZ0vNtJahd2jHd3WfTUDj5-untMKyZpYYak2Vr8xtFz8H6Q5Rsz8uX_7gtEqYH2CMjPdbXcebrnD1igRSJMYiP0lQ",
"e": "AQAB",
"use": "sig",
"qi": "MTCCRu8AcvvjbHms7V_sDFO7wX0YNyvOJAAbuTmHvQbJ0NDeDta-f-hi8cjkMk7Fpk2hej158E5gDyO62UG99wHZSbmHT34MvIdmhQ5mnbL-5KK9rxde0nayO1ebGepD_GJThPAg9iskzeWpCg5X2etNo2bHoG_ZLQGXj2BQ1VM",
"dp": "J4_ttKNcTTnP8PlZO81n1VfYoGCOqylKceyZbq76rVxX-yp2wDLtslFWI8qCtjiMtEnglynPo19JzH-pakocjT70us4Qp0rs-W16ebiOpko8WfHZvzaNUzsQjC3FYrPW-fHo74wc4DI3Cm57jmhCYbdmT9OfQ4UL7Oz3HMFMNAU",
"alg": "RS256",
"dq": "H4-VgvYB-sk1EU3cRIDv1iJWRHDHKBMeaoM0pD5kLalX1hRgNW4rdoRl1vRk79AU720D11Kqm2APlxBctaA_JrcdxEg0KkbsvV45p11KbKeu9b5DKFVECsN27ZJ7XZUCuqnibtWf7_4pRBD_8PDoFShmS2_ORiiUdflNjzSbEas",
"n": "u1LWgoomekdOMfB1lEe96OHehd4XRNCbZRm96RqwOYTTc28Sc_U5wKV2umDzolfoI682ct2BNnRRahYgZPhbOCzHYM6i8sRXjz9Ghx3QHw9zrYACtArwQxrTFiejbfzDPGdPrMQg7T8wjtLtkSyDmCzeXpbIdwmxuLyt_ahLfHelr94kEksMDa42V4Fi5bMW4cCLjlEKzBEHGmFdT8UbLPCvpgsM84JK63e5ifdeI9NdadbC8ZMiR--dFCujT7AgRRyMzxgdn2l-nZJ2ZaYzbLUtAW5_U2kfRVkDNa8d1g__2V5zjU6nfLJ1S2MoXMgRgDPeHpEehZVu2kNaSFvDUQ"
}
]
},
"tokenLookup": "header:auth",
"claimPassBy": "header:name:name"
}
`;
const certificate = config.get("certificate") || `-----BEGIN CERTIFICATE-----
MIIDRjCCAq+gAwIBAgIJAJn3ox4K13PoMA0GCSqGSIb3DQEBBQUAMHYxCz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XTtI90EAxEG/bJJyOm5LqoiA=
-----END CERTIFICATE-----
`;
const privateKey = config.get("privateKey") || `-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQDO0kt3vfjY9BygLEbiAzUrEt1Cum/utmEG9rroSq6dRzKzsetV
kg0dqpAJwXKBtNFM9/BBPvQy2DVFUASu2koCz+TNQJOMK+BqhsgoI3o884dw7IVM
ywgstq6KJCjskU5T1/kOZe6xNX3Ejc4HqXGnuYtrBNV118y0SAyL0MXLKQIDAQAB
AoGAfe3NxbsGKhN42o4bGsKZPQDfeCHMxayGp5bTd10BtQIE/ST4BcJH+ihAS7Bd
6FwQlKzivNd4GP1MckemklCXfsVckdL94e8ZbJl23GdWul3v8V+KndJHqv5zVJmP
hwWoKimwIBTb2s0ctVryr2f18N4hhyFw1yGp0VxclGHkjgECQQD9CvllsnOwHpP4
MdrDHbdb29QrobKyKW8pPcDd+sth+kP6Y8MnCVuAKXCKj5FeIsgVtfluPOsZjPzz
71QQWS1dAkEA0T0KXO8gaBQwJhIoo/w6hy5JGZnrNSpOPp5xvJuMAafs2eyvmhJm
Ev9SN/Pf2VYa1z6FEnBaLOVD6hf6YQIsPQJAX/CZPoW6dzwgvimo1/GcY6eleiWE
qygqjWhsh71e/3bz7yuEAnj5yE3t7Zshcp+dXR3xxGo0eSuLfLFxHgGxwQJAAxf8
9DzQ5NkPkTCJi0sqbl8/03IUKTgT6hcbpWdDXa7m8J3wRr3o5nUB+TPQ5nzAbthM
zWX931YQeACcwhxvHQJBAN5mTzzJD4w4Ma6YTaNHyXakdYfyAWrOkPIWZxfhMfXe
DrlNdiysTI4Dd1dLeErVpjsckAaOW/JDG5PCSwkaMxk=
-----END RSA PRIVATE KEY-----
`;
const _default = new alicloud.fc.V3CustomDomain("default", {
customDomainName: name,
routeConfig: {
routes: [
{
functionName: functionName1,
rewriteConfig: {
regexRules: [
{
match: "/api/*",
replacement: "$1",
},
{
match: "/api1/*",
replacement: "$1",
},
{
match: "/api2/*",
replacement: "$1",
},
],
wildcardRules: [
{
match: "^/api1/.+?/(.*)",
replacement: "/api/v1/$1",
},
{
match: "^/api2/.+?/(.*)",
replacement: "/api/v2/$1",
},
{
match: "^/api2/.+?/(.*)",
replacement: "/api/v3/$1",
},
],
equalRules: [
{
match: "/old",
replacement: "/new",
},
{
replacement: "/new1",
match: "/old1",
},
{
match: "/old2",
replacement: "/new2",
},
],
},
methods: [
"GET",
"POST",
"DELETE",
"HEAD",
],
path: "/a",
qualifier: "LATEST",
},
{
functionName: functionName1,
methods: ["GET"],
path: "/b",
qualifier: "LATEST",
},
{
functionName: functionName1,
methods: ["POST"],
path: "/c",
qualifier: "1",
},
],
},
authConfig: {
authType: "jwt",
authInfo: authConfig,
},
protocol: "HTTP,HTTPS",
certConfig: {
certName: "cert-name",
certificate: certificate,
privateKey: privateKey,
},
tlsConfig: {
cipherSuites: [
"TLS_RSA_WITH_AES_128_CBC_SHA",
"TLS_RSA_WITH_AES_256_CBC_SHA",
"TLS_RSA_WITH_AES_128_GCM_SHA256",
"TLS_RSA_WITH_AES_256_GCM_SHA384",
],
maxVersion: "TLSv1.3",
minVersion: "TLSv1.0",
},
wafConfig: {
enableWaf: false,
},
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "flask-07ap.fcv3.1511928242963727.cn-shanghai.fc.devsapp.net"
function_name1 = config.get("functionName1")
if function_name1 is None:
function_name1 = "terraform-custom-domain-t1"
auth_config = config.get("authConfig")
if auth_config is None:
auth_config = """{
"jwks": {
"keys": [
{
"p": "8AdUVeldoE4LueFuzEF_C8tvJ7NhlkzS58Gz9KJTPXPr5DADSUVLWJCr5OdFE79q513SneT0UhGo-JfQ1lNMoNv5-YZ1AxIo9fZUEPIe-KyX9ttaglpzCAUE3TeKdm5J-_HZQzBPKbyUwJHAILNgB2-4IBZZwK7LAfbmfi9TmFM",
"kty": "RSA",
"q": "x8m5ydXwC8AAp9I-hOnUAx6yQJz1Nx-jXPCfn--Xd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OYTTc28Sc_U5wKV2umDzolfoI682ct2BNnRRahYgZPhbOCzHYM6i8sRXjz9Ghx3QHw9zrYACtArwQxrTFiejbfzDPGdPrMQg7T8wjtLtkSyDmCzeXpbIdwmxuLyt_ahLfHelr94kEksMDa42V4Fi5bMW4cCLjlEKzBEHGmFdT8UbLPCvpgsM84JK63e5ifdeI9NdadbC8ZMiR--dFCujT7AgRRyMzxgdn2l-nZJ2ZaYzbLUtAW5_U2kfRVkDNa8d1g__2V5zjU6nfLJ1S2MoXMgRgDPeHpEehZVu2kNaSFvDUQ"
}
]
},
"tokenLookup": "header:auth",
"claimPassBy": "header:name:name"
}
"""
certificate = config.get("certificate")
if certificate is None:
certificate = """-----BEGIN CERTIFICATE-----
MIIDRjCCAq+gAwIBAgIJAJn3ox4K13PoMA0GCSqGSIb3DQEBBQUAMHYxCzAJBgNV
BAYTAkNOMQswCQYDVQQIEwJCSjELMAkGA1UEBxMCQkoxDDAKBgNVBAoTA0FMSTEP
MA0GA1UECxMGQUxJWVVOMQ0wCwYDVQQDEwR0ZXN0MR8wHQYJKoZIhvcNAQkBFhB0
ZXN0QGhvdG1haWwuY29tMB4XDTE0MTEyNDA2MDQyNVoXDTI0MTEyMTA2MDQyNVow
djELMAkGA1UEBhMCQ04xCzAJBgNVBAgTAkJKMQswCQYDVQQHEwJCSjEMMAoGA1UE
ChMDQUxJMQ8wDQYDVQQLEwZBTElZVU4xDTALBgNVBAMTBHRlc3QxHzAdBgkqhkiG
9w0BCQEWEHRlc3RAaG90bWFpbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ
AoGBAM7SS3e9+Nj0HKAsRuIDNSsS3UK6b+62YQb2uuhKrp1HMrOx61WSDR2qkAnB
coG00Uz38EE+9DLYNUVQBK7aSgLP5M1Ak4wr4GqGyCgjejzzh3DshUzLCCy2rook
KOyRTlPX+Q5l7rE1fcSNzgepcae5i2sE1XXXzLRIDIvQxcspAgMBAAGjgdswgdgw
HQYDVR0OBBYEFBdy+OuMsvbkV7R14f0OyoLoh2z4MIGoBgNVHSMEgaAwgZ2AFBdy
+OuMsvbkV7R14f0OyoLoh2z4oXqkeDB2MQswCQYDVQQGEwJDTjELMAkGA1UECBMC
QkoxCzAJBgNVBAcTAkJKMQwwCgYDVQQKEwNBTEkxDzANBgNVBAsTBkFMSVlVTjEN
MAsGA1UEAxMEdGVzdDEfMB0GCSqGSIb3DQEJARYQdGVzdEBob3RtYWlsLmNvbYIJ
AJn3ox4K13PoMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAY7KOsnyT
cQzfhiiG7ASjiPakw5wXoycHt5GCvLG5htp2TKVzgv9QTliA3gtfv6oV4zRZx7X1
Ofi6hVgErtHaXJheuPVeW6eAW8mHBoEfvDAfU3y9waYrtUevSl07643bzKL6v+Qd
DUBTxOAvSYfXTtI90EAxEG/bJJyOm5LqoiA=
-----END CERTIFICATE-----
"""
private_key = config.get("privateKey")
if private_key is None:
private_key = """-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQDO0kt3vfjY9BygLEbiAzUrEt1Cum/utmEG9rroSq6dRzKzsetV
kg0dqpAJwXKBtNFM9/BBPvQy2DVFUASu2koCz+TNQJOMK+BqhsgoI3o884dw7IVM
ywgstq6KJCjskU5T1/kOZe6xNX3Ejc4HqXGnuYtrBNV118y0SAyL0MXLKQIDAQAB
AoGAfe3NxbsGKhN42o4bGsKZPQDfeCHMxayGp5bTd10BtQIE/ST4BcJH+ihAS7Bd
6FwQlKzivNd4GP1MckemklCXfsVckdL94e8ZbJl23GdWul3v8V+KndJHqv5zVJmP
hwWoKimwIBTb2s0ctVryr2f18N4hhyFw1yGp0VxclGHkjgECQQD9CvllsnOwHpP4
MdrDHbdb29QrobKyKW8pPcDd+sth+kP6Y8MnCVuAKXCKj5FeIsgVtfluPOsZjPzz
71QQWS1dAkEA0T0KXO8gaBQwJhIoo/w6hy5JGZnrNSpOPp5xvJuMAafs2eyvmhJm
Ev9SN/Pf2VYa1z6FEnBaLOVD6hf6YQIsPQJAX/CZPoW6dzwgvimo1/GcY6eleiWE
qygqjWhsh71e/3bz7yuEAnj5yE3t7Zshcp+dXR3xxGo0eSuLfLFxHgGxwQJAAxf8
9DzQ5NkPkTCJi0sqbl8/03IUKTgT6hcbpWdDXa7m8J3wRr3o5nUB+TPQ5nzAbthM
zWX931YQeACcwhxvHQJBAN5mTzzJD4w4Ma6YTaNHyXakdYfyAWrOkPIWZxfhMfXe
DrlNdiysTI4Dd1dLeErVpjsckAaOW/JDG5PCSwkaMxk=
-----END RSA PRIVATE KEY-----
"""
default = alicloud.fc.V3CustomDomain("default",
custom_domain_name=name,
route_config={
"routes": [
{
"function_name": function_name1,
"rewrite_config": {
"regex_rules": [
{
"match": "/api/*",
"replacement": "$1",
},
{
"match": "/api1/*",
"replacement": "$1",
},
{
"match": "/api2/*",
"replacement": "$1",
},
],
"wildcard_rules": [
{
"match": "^/api1/.+?/(.*)",
"replacement": "/api/v1/$1",
},
{
"match": "^/api2/.+?/(.*)",
"replacement": "/api/v2/$1",
},
{
"match": "^/api2/.+?/(.*)",
"replacement": "/api/v3/$1",
},
],
"equal_rules": [
{
"match": "/old",
"replacement": "/new",
},
{
"replacement": "/new1",
"match": "/old1",
},
{
"match": "/old2",
"replacement": "/new2",
},
],
},
"methods": [
"GET",
"POST",
"DELETE",
"HEAD",
],
"path": "/a",
"qualifier": "LATEST",
},
{
"function_name": function_name1,
"methods": ["GET"],
"path": "/b",
"qualifier": "LATEST",
},
{
"function_name": function_name1,
"methods": ["POST"],
"path": "/c",
"qualifier": "1",
},
],
},
auth_config={
"auth_type": "jwt",
"auth_info": auth_config,
},
protocol="HTTP,HTTPS",
cert_config={
"cert_name": "cert-name",
"certificate": certificate,
"private_key": private_key,
},
tls_config={
"cipher_suites": [
"TLS_RSA_WITH_AES_128_CBC_SHA",
"TLS_RSA_WITH_AES_256_CBC_SHA",
"TLS_RSA_WITH_AES_128_GCM_SHA256",
"TLS_RSA_WITH_AES_256_GCM_SHA384",
],
"max_version": "TLSv1.3",
"min_version": "TLSv1.0",
},
waf_config={
"enable_waf": False,
})
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/fc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "flask-07ap.fcv3.1511928242963727.cn-shanghai.fc.devsapp.net"
if param := cfg.Get("name"); param != "" {
name = param
}
functionName1 := "terraform-custom-domain-t1"
if param := cfg.Get("functionName1"); param != "" {
functionName1 = param
}
authConfig := `{
"jwks": {
"keys": [
{
"p": "8AdUVeldoE4LueFuzEF_C8tvJ7NhlkzS58Gz9KJTPXPr5DADSUVLWJCr5OdFE79q513SneT0UhGo-JfQ1lNMoNv5-YZ1AxIo9fZUEPIe-KyX9ttaglpzCAUE3TeKdm5J-_HZQzBPKbyUwJHAILNgB2-4IBZZwK7LAfbmfi9TmFM",
"kty": "RSA",
"q": "x8m5ydXwC8AAp9I-hOnUAx6yQJz1Nx-jXPCfn--XdHpJuNcuwRQsuUCSRQs_h3SoCI3qZZdzswQnPrtHFxgUJtQFuMj-QZpyMnebDb81rmczl2KPVUtaVDVagJEF6U9Ov3PfrLhvHUEv5u7p6s4Z6maBUaByfFlhEVPv4_ao8Us",
"d": "bjIQAKD2e65gwJ38_Sqq_EmLFuMMey3gjDv1bSCHFH8fyONJTq-utrZfvspz6EegRwW2mSHW9kq87hRwIBW9y7ED5N4KG5gHDjyh57BRE0SKv0Dz1igtKLyp-nl8-aHc1DbONwr1d7tZfFt255TxIN8cPTakXOp2Av_ztql_JotVUGK8eHmXNJFlvq5tc180sKWMHNSNsCUhQgcB1TWb_gwcqxdsIWPsLZI491XKeTGQ98J7z5h6R1cTC97lfJZ0vNtJahd2jHd3WfTUDj5-untMKyZpYYak2Vr8xtFz8H6Q5Rsz8uX_7gtEqYH2CMjPdbXcebrnD1igRSJMYiP0lQ",
"e": "AQAB",
"use": "sig",
"qi": "MTCCRu8AcvvjbHms7V_sDFO7wX0YNyvOJAAbuTmHvQbJ0NDeDta-f-hi8cjkMk7Fpk2hej158E5gDyO62UG99wHZSbmHT34MvIdmhQ5mnbL-5KK9rxde0nayO1ebGepD_GJThPAg9iskzeWpCg5X2etNo2bHoG_ZLQGXj2BQ1VM",
"dp": "J4_ttKNcTTnP8PlZO81n1VfYoGCOqylKceyZbq76rVxX-yp2wDLtslFWI8qCtjiMtEnglynPo19JzH-pakocjT70us4Qp0rs-W16ebiOpko8WfHZvzaNUzsQjC3FYrPW-fHo74wc4DI3Cm57jmhCYbdmT9OfQ4UL7Oz3HMFMNAU",
"alg": "RS256",
"dq": "H4-VgvYB-sk1EU3cRIDv1iJWRHDHKBMeaoM0pD5kLalX1hRgNW4rdoRl1vRk79AU720D11Kqm2APlxBctaA_JrcdxEg0KkbsvV45p11KbKeu9b5DKFVECsN27ZJ7XZUCuqnibtWf7_4pRBD_8PDoFShmS2_ORiiUdflNjzSbEas",
"n": "u1LWgoomekdOMfB1lEe96OHehd4XRNCbZRm96RqwOYTTc28Sc_U5wKV2umDzolfoI682ct2BNnRRahYgZPhbOCzHYM6i8sRXjz9Ghx3QHw9zrYACtArwQxrTFiejbfzDPGdPrMQg7T8wjtLtkSyDmCzeXpbIdwmxuLyt_ahLfHelr94kEksMDa42V4Fi5bMW4cCLjlEKzBEHGmFdT8UbLPCvpgsM84JK63e5ifdeI9NdadbC8ZMiR--dFCujT7AgRRyMzxgdn2l-nZJ2ZaYzbLUtAW5_U2kfRVkDNa8d1g__2V5zjU6nfLJ1S2MoXMgRgDPeHpEehZVu2kNaSFvDUQ"
}
]
},
"tokenLookup": "header:auth",
"claimPassBy": "header:name:name"
}
`
if param := cfg.Get("authConfig"); param != "" {
authConfig = param
}
certificate := `-----BEGIN CERTIFICATE-----
MIIDRjCCAq+gAwIBAgIJAJn3ox4K13PoMA0GCSqGSIb3DQEBBQU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xOAvSYfXTtI90EAxEG/bJJyOm5LqoiA=
-----END CERTIFICATE-----
`
if param := cfg.Get("certificate"); param != "" {
certificate = param
}
privateKey := `-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQDO0kt3vfjY9BygLEbiAzUrEt1Cum/utmEG9rroSq6dRzKzsetV
kg0dqpAJwXKBtNFM9/BBPvQy2DVFUASu2koCz+TNQJOMK+BqhsgoI3o884dw7IVM
ywgstq6KJCjskU5T1/kOZe6xNX3Ejc4HqXGnuYtrBNV118y0SAyL0MXLKQIDAQAB
AoGAfe3NxbsGKhN42o4bGsKZPQDfeCHMxayGp5bTd10BtQIE/ST4BcJH+ihAS7Bd
6FwQlKzivNd4GP1MckemklCXfsVckdL94e8ZbJl23GdWul3v8V+KndJHqv5zVJmP
hwWoKimwIBTb2s0ctVryr2f18N4hhyFw1yGp0VxclGHkjgECQQD9CvllsnOwHpP4
MdrDHbdb29QrobKyKW8pPcDd+sth+kP6Y8MnCVuAKXCKj5FeIsgVtfluPOsZjPzz
71QQWS1dAkEA0T0KXO8gaBQwJhIoo/w6hy5JGZnrNSpOPp5xvJuMAafs2eyvmhJm
Ev9SN/Pf2VYa1z6FEnBaLOVD6hf6YQIsPQJAX/CZPoW6dzwgvimo1/GcY6eleiWE
qygqjWhsh71e/3bz7yuEAnj5yE3t7Zshcp+dXR3xxGo0eSuLfLFxHgGxwQJAAxf8
9DzQ5NkPkTCJi0sqbl8/03IUKTgT6hcbpWdDXa7m8J3wRr3o5nUB+TPQ5nzAbthM
zWX931YQeACcwhxvHQJBAN5mTzzJD4w4Ma6YTaNHyXakdYfyAWrOkPIWZxfhMfXe
DrlNdiysTI4Dd1dLeErVpjsckAaOW/JDG5PCSwkaMxk=
-----END RSA PRIVATE KEY-----
`
if param := cfg.Get("privateKey"); param != "" {
privateKey = param
}
_, err := fc.NewV3CustomDomain(ctx, "default", &fc.V3CustomDomainArgs{
CustomDomainName: pulumi.String(name),
RouteConfig: &fc.V3CustomDomainRouteConfigArgs{
Routes: fc.V3CustomDomainRouteConfigRouteArray{
&fc.V3CustomDomainRouteConfigRouteArgs{
FunctionName: pulumi.String(functionName1),
RewriteConfig: &fc.V3CustomDomainRouteConfigRouteRewriteConfigArgs{
RegexRules: fc.V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArray{
&fc.V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArgs{
Match: pulumi.String("/api/*"),
Replacement: pulumi.String("$1"),
},
&fc.V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArgs{
Match: pulumi.String("/api1/*"),
Replacement: pulumi.String("$1"),
},
&fc.V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArgs{
Match: pulumi.String("/api2/*"),
Replacement: pulumi.String("$1"),
},
},
WildcardRules: fc.V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArray{
&fc.V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArgs{
Match: pulumi.String("^/api1/.+?/(.*)"),
Replacement: pulumi.String("/api/v1/$1"),
},
&fc.V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArgs{
Match: pulumi.String("^/api2/.+?/(.*)"),
Replacement: pulumi.String("/api/v2/$1"),
},
&fc.V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArgs{
Match: pulumi.String("^/api2/.+?/(.*)"),
Replacement: pulumi.String("/api/v3/$1"),
},
},
EqualRules: fc.V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArray{
&fc.V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArgs{
Match: pulumi.String("/old"),
Replacement: pulumi.String("/new"),
},
&fc.V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArgs{
Replacement: pulumi.String("/new1"),
Match: pulumi.String("/old1"),
},
&fc.V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArgs{
Match: pulumi.String("/old2"),
Replacement: pulumi.String("/new2"),
},
},
},
Methods: pulumi.StringArray{
pulumi.String("GET"),
pulumi.String("POST"),
pulumi.String("DELETE"),
pulumi.String("HEAD"),
},
Path: pulumi.String("/a"),
Qualifier: pulumi.String("LATEST"),
},
&fc.V3CustomDomainRouteConfigRouteArgs{
FunctionName: pulumi.String(functionName1),
Methods: pulumi.StringArray{
pulumi.String("GET"),
},
Path: pulumi.String("/b"),
Qualifier: pulumi.String("LATEST"),
},
&fc.V3CustomDomainRouteConfigRouteArgs{
FunctionName: pulumi.String(functionName1),
Methods: pulumi.StringArray{
pulumi.String("POST"),
},
Path: pulumi.String("/c"),
Qualifier: pulumi.String("1"),
},
},
},
AuthConfig: &fc.V3CustomDomainAuthConfigArgs{
AuthType: pulumi.String("jwt"),
AuthInfo: pulumi.String(authConfig),
},
Protocol: pulumi.String("HTTP,HTTPS"),
CertConfig: &fc.V3CustomDomainCertConfigArgs{
CertName: pulumi.String("cert-name"),
Certificate: pulumi.String(certificate),
PrivateKey: pulumi.String(privateKey),
},
TlsConfig: &fc.V3CustomDomainTlsConfigArgs{
CipherSuites: pulumi.StringArray{
pulumi.String("TLS_RSA_WITH_AES_128_CBC_SHA"),
pulumi.String("TLS_RSA_WITH_AES_256_CBC_SHA"),
pulumi.String("TLS_RSA_WITH_AES_128_GCM_SHA256"),
pulumi.String("TLS_RSA_WITH_AES_256_GCM_SHA384"),
},
MaxVersion: pulumi.String("TLSv1.3"),
MinVersion: pulumi.String("TLSv1.0"),
},
WafConfig: &fc.V3CustomDomainWafConfigArgs{
EnableWaf: pulumi.Bool(false),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "flask-07ap.fcv3.1511928242963727.cn-shanghai.fc.devsapp.net";
var functionName1 = config.Get("functionName1") ?? "terraform-custom-domain-t1";
var authConfig = config.Get("authConfig") ?? @"{
""jwks"": {
""keys"": [
{
""p"": ""8AdUVeldoE4LueFuzEF_C8tvJ7NhlkzS58Gz9KJTP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",
""dq"": ""H4-VgvYB-sk1EU3cRIDv1iJWRHDHKBMeaoM0pD5kLalX1hRgNW4rdoRl1vRk79AU720D11Kqm2APlxBctaA_JrcdxEg0KkbsvV45p11KbKeu9b5DKFVECsN27ZJ7XZUCuqnibtWf7_4pRBD_8PDoFShmS2_ORiiUdflNjzSbEas"",
""n"": ""u1LWgoomekdOMfB1lEe96OHehd4XRNCbZRm96RqwOYTTc28Sc_U5wKV2umDzolfoI682ct2BNnRRahYgZPhbOCzHYM6i8sRXjz9Ghx3QHw9zrYACtArwQxrTFiejbfzDPGdPrMQg7T8wjtLtkSyDmCzeXpbIdwmxuLyt_ahLfHelr94kEksMDa42V4Fi5bMW4cCLjlEKzBEHGmFdT8UbLPCvpgsM84JK63e5ifdeI9NdadbC8ZMiR--dFCujT7AgRRyMzxgdn2l-nZJ2ZaYzbLUtAW5_U2kfRVkDNa8d1g__2V5zjU6nfLJ1S2MoXMgRgDPeHpEehZVu2kNaSFvDUQ""
}
]
},
""tokenLookup"": ""header:auth"",
""claimPassBy"": ""header:name:name""
}
";
var certificate = config.Get("certificate") ?? @"-----BEGIN CERTIFICATE-----
MIIDRjCCAq+gAwIBAgIJAJn3ox4K13PoMA0GCSqGSIb3DQEBBQUAMHYxCzAJBgNV
BAYTAkNOMQswCQYDVQQIEwJCSjELMAkGA1UEBxMCQkoxDDAKBgNVBAoTA0FMSTEP
MA0GA1UECxMGQUxJWVVOMQ0wCwYDVQQDEwR0ZXN0MR8wHQYJKoZIhvcNAQkBFhB0
ZXN0QGhvdG1haWwuY29tMB4XDTE0MTEyNDA2MDQyNVoXDTI0MTEyMTA2MDQyNVow
djELMAkGA1UEBhMCQ04xCzAJBgNVBAgTAkJKMQswCQYDVQQHEwJCSjEMMAoGA1UE
ChMDQUxJMQ8wDQYDVQQLEwZBTElZVU4xDTALBgNVBAMTBHRlc3QxHzAdBgkqhkiG
9w0BCQEWEHRlc3RAaG90bWFpbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADg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5zVJmP
hwWoKimwIBTb2s0ctVryr2f18N4hhyFw1yGp0VxclGHkjgECQQD9CvllsnOwHpP4
MdrDHbdb29QrobKyKW8pPcDd+sth+kP6Y8MnCVuAKXCKj5FeIsgVtfluPOsZjPzz
71QQWS1dAkEA0T0KXO8gaBQwJhIoo/w6hy5JGZnrNSpOPp5xvJuMAafs2eyvmhJm
Ev9SN/Pf2VYa1z6FEnBaLOVD6hf6YQIsPQJAX/CZPoW6dzwgvimo1/GcY6eleiWE
qygqjWhsh71e/3bz7yuEAnj5yE3t7Zshcp+dXR3xxGo0eSuLfLFxHgGxwQJAAxf8
9DzQ5NkPkTCJi0sqbl8/03IUKTgT6hcbpWdDXa7m8J3wRr3o5nUB+TPQ5nzAbthM
zWX931YQeACcwhxvHQJBAN5mTzzJD4w4Ma6YTaNHyXakdYfyAWrOkPIWZxfhMfXe
DrlNdiysTI4Dd1dLeErVpjsckAaOW/JDG5PCSwkaMxk=
-----END RSA PRIVATE KEY-----
";
var @default = new AliCloud.FC.V3CustomDomain("default", new()
{
CustomDomainName = name,
RouteConfig = new AliCloud.FC.Inputs.V3CustomDomainRouteConfigArgs
{
Routes = new[]
{
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteArgs
{
FunctionName = functionName1,
RewriteConfig = new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigArgs
{
RegexRules = new[]
{
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArgs
{
Match = "/api/*",
Replacement = "$1",
},
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArgs
{
Match = "/api1/*",
Replacement = "$1",
},
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArgs
{
Match = "/api2/*",
Replacement = "$1",
},
},
WildcardRules = new[]
{
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArgs
{
Match = "^/api1/.+?/(.*)",
Replacement = "/api/v1/$1",
},
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArgs
{
Match = "^/api2/.+?/(.*)",
Replacement = "/api/v2/$1",
},
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArgs
{
Match = "^/api2/.+?/(.*)",
Replacement = "/api/v3/$1",
},
},
EqualRules = new[]
{
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArgs
{
Match = "/old",
Replacement = "/new",
},
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArgs
{
Replacement = "/new1",
Match = "/old1",
},
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArgs
{
Match = "/old2",
Replacement = "/new2",
},
},
},
Methods = new[]
{
"GET",
"POST",
"DELETE",
"HEAD",
},
Path = "/a",
Qualifier = "LATEST",
},
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteArgs
{
FunctionName = functionName1,
Methods = new[]
{
"GET",
},
Path = "/b",
Qualifier = "LATEST",
},
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteArgs
{
FunctionName = functionName1,
Methods = new[]
{
"POST",
},
Path = "/c",
Qualifier = "1",
},
},
},
AuthConfig = new AliCloud.FC.Inputs.V3CustomDomainAuthConfigArgs
{
AuthType = "jwt",
AuthInfo = authConfig,
},
Protocol = "HTTP,HTTPS",
CertConfig = new AliCloud.FC.Inputs.V3CustomDomainCertConfigArgs
{
CertName = "cert-name",
Certificate = certificate,
PrivateKey = privateKey,
},
TlsConfig = new AliCloud.FC.Inputs.V3CustomDomainTlsConfigArgs
{
CipherSuites = new[]
{
"TLS_RSA_WITH_AES_128_CBC_SHA",
"TLS_RSA_WITH_AES_256_CBC_SHA",
"TLS_RSA_WITH_AES_128_GCM_SHA256",
"TLS_RSA_WITH_AES_256_GCM_SHA384",
},
MaxVersion = "TLSv1.3",
MinVersion = "TLSv1.0",
},
WafConfig = new AliCloud.FC.Inputs.V3CustomDomainWafConfigArgs
{
EnableWaf = false,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.fc.V3CustomDomain;
import com.pulumi.alicloud.fc.V3CustomDomainArgs;
import com.pulumi.alicloud.fc.inputs.V3CustomDomainRouteConfigArgs;
import com.pulumi.alicloud.fc.inputs.V3CustomDomainAuthConfigArgs;
import com.pulumi.alicloud.fc.inputs.V3CustomDomainCertConfigArgs;
import com.pulumi.alicloud.fc.inputs.V3CustomDomainTlsConfigArgs;
import com.pulumi.alicloud.fc.inputs.V3CustomDomainWafConfigArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("flask-07ap.fcv3.1511928242963727.cn-shanghai.fc.devsapp.net");
final var functionName1 = config.get("functionName1").orElse("terraform-custom-domain-t1");
final var authConfig = config.get("authConfig").orElse("""
{
"jwks": {
"keys": [
{
"p": "8AdUVeldoE4LueFuzEF_C8tvJ7NhlkzS58Gz9KJTPXPr5DADSUVLWJCr5OdFE79q513SneT0UhGo-JfQ1lNMoNv5-YZ1AxIo9fZUEPIe-KyX9ttaglpzCAUE3TeKdm5J-_HZQzBPKbyUwJHAILNgB2-4IBZZwK7LAfbmfi9TmFM",
"kty": "RSA",
"q": "x8m5ydXwC8AAp9I-hOnUAx6yQJz1Nx-jXPCfn--XdHpJuNcuwRQsuUCSRQs_h3SoCI3qZZdzswQnPrtHFxgUJtQFuMj-QZpyMnebDb81rmczl2KPVUtaVDVagJEF6U9Ov3PfrLhvHUEv5u7p6s4Z6maBUaByfFlhEVPv4_ao8Us",
"d": "bjIQAKD2e65gwJ38_Sqq_EmLFuMMey3gjDv1bSCHFH8fyONJTq-utrZfvspz6E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ZMiR--dFCujT7AgRRyMzxgdn2l-nZJ2ZaYzbLUtAW5_U2kfRVkDNa8d1g__2V5zjU6nfLJ1S2MoXMgRgDPeHpEehZVu2kNaSFvDUQ"
}
]
},
"tokenLookup": "header:auth",
"claimPassBy": "header:name:name"
}
""");
final var certificate = config.get("certificate").orElse("""
-----BEGIN CERTIFICATE-----
MIIDRjCCAq+gAwIBAgIJAJn3ox4K13PoMA0GCSqGSIb3DQEBBQUAMHYxCzAJBgNV
BAYTAkNOMQswCQYDVQQIEwJCSjELMAkGA1UEBxMCQkoxDDAKBgNVBAoTA0FMSTEP
MA0GA1UECxMGQUxJWVVOMQ0wCwYDVQQDEwR0ZXN0MR8wHQYJKoZIhvcNAQkBFhB0
ZXN0QGhvdG1haWwuY29tMB4XDTE0MTEyNDA2MDQyNVoXDTI0MTEyMTA2MDQyNVow
djELMAkGA1UEBhMCQ04xCzAJBgNVBAgTAkJKMQswCQYDVQQHEwJCSjEMMAoGA1UE
ChMDQUxJMQ8wDQYDVQQLEwZBTElZVU4xDTALBgNVBAMTBHRlc3QxHzAdBgkqhkiG
9w0BCQEWEHRlc3RAaG90bWFpbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ
AoGBAM7SS3e9+Nj0HKAsRuIDNSsS3UK6b+62YQb2uuhKrp1HMrOx61WSDR2qkAnB
coG00Uz38EE+9DLYNUVQBK7aSgLP5M1Ak4wr4GqGyCgjejzzh3DshUzLCCy2rook
KOyRTlPX+Q5l7rE1fcSNzgepcae5i2sE1XXXzLRIDIvQxcspAgMBAAGjgdswgdgw
HQYDVR0OBBYEFBdy+OuMsvbkV7R14f0OyoLoh2z4MIGoBgNVHSMEgaAwgZ2AFBdy
+OuMsvbkV7R14f0OyoLoh2z4oXqkeDB2MQswCQYDVQQGEwJDTjELMAkGA1UECBMC
QkoxCzAJBgNVBAcTAkJKMQwwCgYDVQQKEwNBTEkxDzANBgNVBAsTBkFMSVlVTjEN
MAsGA1UEAxMEdGVzdDEfMB0GCSqGSIb3DQEJARYQdGVzdEBob3RtYWlsLmNvbYIJ
AJn3ox4K13PoMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAY7KOsnyT
cQzfhiiG7ASjiPakw5wXoycHt5GCvLG5htp2TKVzgv9QTliA3gtfv6oV4zRZx7X1
Ofi6hVgErtHaXJheuPVeW6eAW8mHBoEfvDAfU3y9waYrtUevSl07643bzKL6v+Qd
DUBTxOAvSYfXTtI90EAxEG/bJJyOm5LqoiA=
-----END CERTIFICATE-----
""");
final var privateKey = config.get("privateKey").orElse("""
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQDO0kt3vfjY9BygLEbiAzUrEt1Cum/utmEG9rroSq6dRzKzsetV
kg0dqpAJwXKBtNFM9/BBPvQy2DVFUASu2koCz+TNQJOMK+BqhsgoI3o884dw7IVM
ywgstq6KJCjskU5T1/kOZe6xNX3Ejc4HqXGnuYtrBNV118y0SAyL0MXLKQIDAQAB
AoGAfe3NxbsGKhN42o4bGsKZPQDfeCHMxayGp5bTd10BtQIE/ST4BcJH+ihAS7Bd
6FwQlKzivNd4GP1MckemklCXfsVckdL94e8ZbJl23GdWul3v8V+KndJHqv5zVJmP
hwWoKimwIBTb2s0ctVryr2f18N4hhyFw1yGp0VxclGHkjgECQQD9CvllsnOwHpP4
MdrDHbdb29QrobKyKW8pPcDd+sth+kP6Y8MnCVuAKXCKj5FeIsgVtfluPOsZjPzz
71QQWS1dAkEA0T0KXO8gaBQwJhIoo/w6hy5JGZnrNSpOPp5xvJuMAafs2eyvmhJm
Ev9SN/Pf2VYa1z6FEnBaLOVD6hf6YQIsPQJAX/CZPoW6dzwgvimo1/GcY6eleiWE
qygqjWhsh71e/3bz7yuEAnj5yE3t7Zshcp+dXR3xxGo0eSuLfLFxHgGxwQJAAxf8
9DzQ5NkPkTCJi0sqbl8/03IUKTgT6hcbpWdDXa7m8J3wRr3o5nUB+TPQ5nzAbthM
zWX931YQeACcwhxvHQJBAN5mTzzJD4w4Ma6YTaNHyXakdYfyAWrOkPIWZxfhMfXe
DrlNdiysTI4Dd1dLeErVpjsckAaOW/JDG5PCSwkaMxk=
-----END RSA PRIVATE KEY-----
""");
var default_ = new V3CustomDomain("default", V3CustomDomainArgs.builder()
.customDomainName(name)
.routeConfig(V3CustomDomainRouteConfigArgs.builder()
.routes(
V3CustomDomainRouteConfigRouteArgs.builder()
.functionName(functionName1)
.rewriteConfig(V3CustomDomainRouteConfigRouteRewriteConfigArgs.builder()
.regexRules(
V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArgs.builder()
.match("/api/*")
.replacement("$1")
.build(),
V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArgs.builder()
.match("/api1/*")
.replacement("$1")
.build(),
V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArgs.builder()
.match("/api2/*")
.replacement("$1")
.build())
.wildcardRules(
V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArgs.builder()
.match("^/api1/.+?/(.*)")
.replacement("/api/v1/$1")
.build(),
V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArgs.builder()
.match("^/api2/.+?/(.*)")
.replacement("/api/v2/$1")
.build(),
V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArgs.builder()
.match("^/api2/.+?/(.*)")
.replacement("/api/v3/$1")
.build())
.equalRules(
V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArgs.builder()
.match("/old")
.replacement("/new")
.build(),
V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArgs.builder()
.replacement("/new1")
.match("/old1")
.build(),
V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArgs.builder()
.match("/old2")
.replacement("/new2")
.build())
.build())
.methods(
"GET",
"POST",
"DELETE",
"HEAD")
.path("/a")
.qualifier("LATEST")
.build(),
V3CustomDomainRouteConfigRouteArgs.builder()
.functionName(functionName1)
.methods("GET")
.path("/b")
.qualifier("LATEST")
.build(),
V3CustomDomainRouteConfigRouteArgs.builder()
.functionName(functionName1)
.methods("POST")
.path("/c")
.qualifier("1")
.build())
.build())
.authConfig(V3CustomDomainAuthConfigArgs.builder()
.authType("jwt")
.authInfo(authConfig)
.build())
.protocol("HTTP,HTTPS")
.certConfig(V3CustomDomainCertConfigArgs.builder()
.certName("cert-name")
.certificate(certificate)
.privateKey(privateKey)
.build())
.tlsConfig(V3CustomDomainTlsConfigArgs.builder()
.cipherSuites(
"TLS_RSA_WITH_AES_128_CBC_SHA",
"TLS_RSA_WITH_AES_256_CBC_SHA",
"TLS_RSA_WITH_AES_128_GCM_SHA256",
"TLS_RSA_WITH_AES_256_GCM_SHA384")
.maxVersion("TLSv1.3")
.minVersion("TLSv1.0")
.build())
.wafConfig(V3CustomDomainWafConfigArgs.builder()
.enableWaf("false")
.build())
.build());
}
}
configuration:
name:
type: string
default: flask-07ap.fcv3.1511928242963727.cn-shanghai.fc.devsapp.net
functionName1:
type: string
default: terraform-custom-domain-t1
authConfig:
type: string
default: |
{
"jwks": {
"keys": [
{
"p": "8AdUVeldoE4LueFuzEF_C8tvJ7NhlkzS58Gz9KJTPXPr5DADSUVLWJCr5OdFE79q513SneT0UhGo-JfQ1lNMoNv5-YZ1AxIo9fZUEPIe-KyX9ttaglpzCAUE3TeKdm5J-_HZQzBPKbyUwJHAILNgB2-4IBZZwK7LAfbmfi9TmFM",
"kty": "RSA",
"q": "x8m5ydXwC8AAp9I-hOnUAx6yQJz1Nx-jXPCfn--XdHpJuNcuwRQsuUCSRQs_h3SoCI3qZZdzswQnPrtHFxgUJtQFuMj-QZpyMnebDb81rmczl2KPVUtaVDVagJEF6U9Ov3PfrLhvHUEv5u7p6s4Z6maBUaByfFlhEVPv4_ao8Us",
"d": "bjIQAKD2e65gwJ38_Sqq_EmLFuMMey3gjDv1bSCHFH8fyONJTq-utrZfvspz6EegRwW2mSHW9kq87hRwIBW9y7ED5N4KG5gHDjyh57BRE0SKv0Dz1igtKLyp-nl8-aHc1DbONwr1d7tZfFt255TxIN8cPTak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EAY7KOsnyT
cQzfhiiG7ASjiPakw5wXoycHt5GCvLG5htp2TKVzgv9QTliA3gtfv6oV4zRZx7X1
Ofi6hVgErtHaXJheuPVeW6eAW8mHBoEfvDAfU3y9waYrtUevSl07643bzKL6v+Qd
DUBTxOAvSYfXTtI90EAxEG/bJJyOm5LqoiA=
-----END CERTIFICATE-----
privateKey:
type: string
default: |
-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQDO0kt3vfjY9BygLEbiAzUrEt1Cum/utmEG9rroSq6dRzKzsetV
kg0dqpAJwXKBtNFM9/BBPvQy2DVFUASu2koCz+TNQJOMK+BqhsgoI3o884dw7IVM
ywgstq6KJCjskU5T1/kOZe6xNX3Ejc4HqXGnuYtrBNV118y0SAyL0MXLKQIDAQAB
AoGAfe3NxbsGKhN42o4bGsKZPQDfeCHMxayGp5bTd10BtQIE/ST4BcJH+ihAS7Bd
6FwQlKzivNd4GP1MckemklCXfsVckdL94e8ZbJl23GdWul3v8V+KndJHqv5zVJmP
hwWoKimwIBTb2s0ctVryr2f18N4hhyFw1yGp0VxclGHkjgECQQD9CvllsnOwHpP4
MdrDHbdb29QrobKyKW8pPcDd+sth+kP6Y8MnCVuAKXCKj5FeIsgVtfluPOsZjPzz
71QQWS1dAkEA0T0KXO8gaBQwJhIoo/w6hy5JGZnrNSpOPp5xvJuMAafs2eyvmhJm
Ev9SN/Pf2VYa1z6FEnBaLOVD6hf6YQIsPQJAX/CZPoW6dzwgvimo1/GcY6eleiWE
qygqjWhsh71e/3bz7yuEAnj5yE3t7Zshcp+dXR3xxGo0eSuLfLFxHgGxwQJAAxf8
9DzQ5NkPkTCJi0sqbl8/03IUKTgT6hcbpWdDXa7m8J3wRr3o5nUB+TPQ5nzAbthM
zWX931YQeACcwhxvHQJBAN5mTzzJD4w4Ma6YTaNHyXakdYfyAWrOkPIWZxfhMfXe
DrlNdiysTI4Dd1dLeErVpjsckAaOW/JDG5PCSwkaMxk=
-----END RSA PRIVATE KEY-----
resources:
default:
type: alicloud:fc:V3CustomDomain
properties:
customDomainName: ${name}
routeConfig:
routes:
- functionName: ${functionName1}
rewriteConfig:
regexRules:
- match: /api/*
replacement: $1
- match: /api1/*
replacement: $1
- match: /api2/*
replacement: $1
wildcardRules:
- match: ^/api1/.+?/(.*)
replacement: /api/v1/$1
- match: ^/api2/.+?/(.*)
replacement: /api/v2/$1
- match: ^/api2/.+?/(.*)
replacement: /api/v3/$1
equalRules:
- match: /old
replacement: /new
- replacement: /new1
match: /old1
- match: /old2
replacement: /new2
methods:
- GET
- POST
- DELETE
- HEAD
path: /a
qualifier: LATEST
- functionName: ${functionName1}
methods:
- GET
path: /b
qualifier: LATEST
- functionName: ${functionName1}
methods:
- POST
path: /c
qualifier: '1'
authConfig:
authType: jwt
authInfo: ${authConfig}
protocol: HTTP,HTTPS
certConfig:
certName: cert-name
certificate: ${certificate}
privateKey: ${privateKey}
tlsConfig:
cipherSuites:
- TLS_RSA_WITH_AES_128_CBC_SHA
- TLS_RSA_WITH_AES_256_CBC_SHA
- TLS_RSA_WITH_AES_128_GCM_SHA256
- TLS_RSA_WITH_AES_256_GCM_SHA384
maxVersion: TLSv1.3
minVersion: TLSv1.0
wafConfig:
enableWaf: 'false'
Create V3CustomDomain Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new V3CustomDomain(name: string, args?: V3CustomDomainArgs, opts?: CustomResourceOptions);
@overload
def V3CustomDomain(resource_name: str,
args: Optional[V3CustomDomainArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def V3CustomDomain(resource_name: str,
opts: Optional[ResourceOptions] = None,
auth_config: Optional[V3CustomDomainAuthConfigArgs] = None,
cert_config: Optional[V3CustomDomainCertConfigArgs] = None,
custom_domain_name: Optional[str] = None,
protocol: Optional[str] = None,
route_config: Optional[V3CustomDomainRouteConfigArgs] = None,
tls_config: Optional[V3CustomDomainTlsConfigArgs] = None,
waf_config: Optional[V3CustomDomainWafConfigArgs] = None)
func NewV3CustomDomain(ctx *Context, name string, args *V3CustomDomainArgs, opts ...ResourceOption) (*V3CustomDomain, error)
public V3CustomDomain(string name, V3CustomDomainArgs? args = null, CustomResourceOptions? opts = null)
public V3CustomDomain(String name, V3CustomDomainArgs args)
public V3CustomDomain(String name, V3CustomDomainArgs args, CustomResourceOptions options)
type: alicloud:fc:V3CustomDomain
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 V3CustomDomainArgs
- 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 V3CustomDomainArgs
- 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 V3CustomDomainArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args V3CustomDomainArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args V3CustomDomainArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var v3customDomainResource = new AliCloud.FC.V3CustomDomain("v3customDomainResource", new()
{
AuthConfig = new AliCloud.FC.Inputs.V3CustomDomainAuthConfigArgs
{
AuthInfo = "string",
AuthType = "string",
},
CertConfig = new AliCloud.FC.Inputs.V3CustomDomainCertConfigArgs
{
CertName = "string",
Certificate = "string",
PrivateKey = "string",
},
CustomDomainName = "string",
Protocol = "string",
RouteConfig = new AliCloud.FC.Inputs.V3CustomDomainRouteConfigArgs
{
Routes = new[]
{
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteArgs
{
FunctionName = "string",
Methods = new[]
{
"string",
},
Path = "string",
Qualifier = "string",
RewriteConfig = new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigArgs
{
EqualRules = new[]
{
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArgs
{
Match = "string",
Replacement = "string",
},
},
RegexRules = new[]
{
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArgs
{
Match = "string",
Replacement = "string",
},
},
WildcardRules = new[]
{
new AliCloud.FC.Inputs.V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArgs
{
Match = "string",
Replacement = "string",
},
},
},
},
},
},
TlsConfig = new AliCloud.FC.Inputs.V3CustomDomainTlsConfigArgs
{
CipherSuites = new[]
{
"string",
},
MaxVersion = "string",
MinVersion = "string",
},
WafConfig = new AliCloud.FC.Inputs.V3CustomDomainWafConfigArgs
{
EnableWaf = false,
},
});
example, err := fc.NewV3CustomDomain(ctx, "v3customDomainResource", &fc.V3CustomDomainArgs{
AuthConfig: &fc.V3CustomDomainAuthConfigArgs{
AuthInfo: pulumi.String("string"),
AuthType: pulumi.String("string"),
},
CertConfig: &fc.V3CustomDomainCertConfigArgs{
CertName: pulumi.String("string"),
Certificate: pulumi.String("string"),
PrivateKey: pulumi.String("string"),
},
CustomDomainName: pulumi.String("string"),
Protocol: pulumi.String("string"),
RouteConfig: &fc.V3CustomDomainRouteConfigArgs{
Routes: fc.V3CustomDomainRouteConfigRouteArray{
&fc.V3CustomDomainRouteConfigRouteArgs{
FunctionName: pulumi.String("string"),
Methods: pulumi.StringArray{
pulumi.String("string"),
},
Path: pulumi.String("string"),
Qualifier: pulumi.String("string"),
RewriteConfig: &fc.V3CustomDomainRouteConfigRouteRewriteConfigArgs{
EqualRules: fc.V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArray{
&fc.V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArgs{
Match: pulumi.String("string"),
Replacement: pulumi.String("string"),
},
},
RegexRules: fc.V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArray{
&fc.V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArgs{
Match: pulumi.String("string"),
Replacement: pulumi.String("string"),
},
},
WildcardRules: fc.V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArray{
&fc.V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArgs{
Match: pulumi.String("string"),
Replacement: pulumi.String("string"),
},
},
},
},
},
},
TlsConfig: &fc.V3CustomDomainTlsConfigArgs{
CipherSuites: pulumi.StringArray{
pulumi.String("string"),
},
MaxVersion: pulumi.String("string"),
MinVersion: pulumi.String("string"),
},
WafConfig: &fc.V3CustomDomainWafConfigArgs{
EnableWaf: pulumi.Bool(false),
},
})
var v3customDomainResource = new V3CustomDomain("v3customDomainResource", V3CustomDomainArgs.builder()
.authConfig(V3CustomDomainAuthConfigArgs.builder()
.authInfo("string")
.authType("string")
.build())
.certConfig(V3CustomDomainCertConfigArgs.builder()
.certName("string")
.certificate("string")
.privateKey("string")
.build())
.customDomainName("string")
.protocol("string")
.routeConfig(V3CustomDomainRouteConfigArgs.builder()
.routes(V3CustomDomainRouteConfigRouteArgs.builder()
.functionName("string")
.methods("string")
.path("string")
.qualifier("string")
.rewriteConfig(V3CustomDomainRouteConfigRouteRewriteConfigArgs.builder()
.equalRules(V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArgs.builder()
.match("string")
.replacement("string")
.build())
.regexRules(V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArgs.builder()
.match("string")
.replacement("string")
.build())
.wildcardRules(V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArgs.builder()
.match("string")
.replacement("string")
.build())
.build())
.build())
.build())
.tlsConfig(V3CustomDomainTlsConfigArgs.builder()
.cipherSuites("string")
.maxVersion("string")
.minVersion("string")
.build())
.wafConfig(V3CustomDomainWafConfigArgs.builder()
.enableWaf(false)
.build())
.build());
v3custom_domain_resource = alicloud.fc.V3CustomDomain("v3customDomainResource",
auth_config={
"auth_info": "string",
"auth_type": "string",
},
cert_config={
"cert_name": "string",
"certificate": "string",
"private_key": "string",
},
custom_domain_name="string",
protocol="string",
route_config={
"routes": [{
"function_name": "string",
"methods": ["string"],
"path": "string",
"qualifier": "string",
"rewrite_config": {
"equal_rules": [{
"match": "string",
"replacement": "string",
}],
"regex_rules": [{
"match": "string",
"replacement": "string",
}],
"wildcard_rules": [{
"match": "string",
"replacement": "string",
}],
},
}],
},
tls_config={
"cipher_suites": ["string"],
"max_version": "string",
"min_version": "string",
},
waf_config={
"enable_waf": False,
})
const v3customDomainResource = new alicloud.fc.V3CustomDomain("v3customDomainResource", {
authConfig: {
authInfo: "string",
authType: "string",
},
certConfig: {
certName: "string",
certificate: "string",
privateKey: "string",
},
customDomainName: "string",
protocol: "string",
routeConfig: {
routes: [{
functionName: "string",
methods: ["string"],
path: "string",
qualifier: "string",
rewriteConfig: {
equalRules: [{
match: "string",
replacement: "string",
}],
regexRules: [{
match: "string",
replacement: "string",
}],
wildcardRules: [{
match: "string",
replacement: "string",
}],
},
}],
},
tlsConfig: {
cipherSuites: ["string"],
maxVersion: "string",
minVersion: "string",
},
wafConfig: {
enableWaf: false,
},
});
type: alicloud:fc:V3CustomDomain
properties:
authConfig:
authInfo: string
authType: string
certConfig:
certName: string
certificate: string
privateKey: string
customDomainName: string
protocol: string
routeConfig:
routes:
- functionName: string
methods:
- string
path: string
qualifier: string
rewriteConfig:
equalRules:
- match: string
replacement: string
regexRules:
- match: string
replacement: string
wildcardRules:
- match: string
replacement: string
tlsConfig:
cipherSuites:
- string
maxVersion: string
minVersion: string
wafConfig:
enableWaf: false
V3CustomDomain 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 V3CustomDomain resource accepts the following input properties:
- Auth
Config Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Auth Config - Permission authentication configuration See
auth_config
below. - Cert
Config Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Cert Config - HTTPS certificate information See
cert_config
below. - Custom
Domain stringName - The name of the resource
- Protocol string
- The protocol type supported by the domain name. HTTP: only HTTP protocol is supported. HTTPS: only HTTPS is supported. HTTP,HTTPS: Supports HTTP and HTTPS protocols.
- Route
Config Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Route Config - Route matching rule configuration See
route_config
below. - Tls
Config Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Tls Config - TLS configuration information See
tls_config
below. - Waf
Config Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Waf Config - Web application firewall configuration information See
waf_config
below.
- Auth
Config V3CustomDomain Auth Config Args - Permission authentication configuration See
auth_config
below. - Cert
Config V3CustomDomain Cert Config Args - HTTPS certificate information See
cert_config
below. - Custom
Domain stringName - The name of the resource
- Protocol string
- The protocol type supported by the domain name. HTTP: only HTTP protocol is supported. HTTPS: only HTTPS is supported. HTTP,HTTPS: Supports HTTP and HTTPS protocols.
- Route
Config V3CustomDomain Route Config Args - Route matching rule configuration See
route_config
below. - Tls
Config V3CustomDomain Tls Config Args - TLS configuration information See
tls_config
below. - Waf
Config V3CustomDomain Waf Config Args - Web application firewall configuration information See
waf_config
below.
- auth
Config V3CustomDomain Auth Config - Permission authentication configuration See
auth_config
below. - cert
Config V3CustomDomain Cert Config - HTTPS certificate information See
cert_config
below. - custom
Domain StringName - The name of the resource
- protocol String
- The protocol type supported by the domain name. HTTP: only HTTP protocol is supported. HTTPS: only HTTPS is supported. HTTP,HTTPS: Supports HTTP and HTTPS protocols.
- route
Config V3CustomDomain Route Config - Route matching rule configuration See
route_config
below. - tls
Config V3CustomDomain Tls Config - TLS configuration information See
tls_config
below. - waf
Config V3CustomDomain Waf Config - Web application firewall configuration information See
waf_config
below.
- auth
Config V3CustomDomain Auth Config - Permission authentication configuration See
auth_config
below. - cert
Config V3CustomDomain Cert Config - HTTPS certificate information See
cert_config
below. - custom
Domain stringName - The name of the resource
- protocol string
- The protocol type supported by the domain name. HTTP: only HTTP protocol is supported. HTTPS: only HTTPS is supported. HTTP,HTTPS: Supports HTTP and HTTPS protocols.
- route
Config V3CustomDomain Route Config - Route matching rule configuration See
route_config
below. - tls
Config V3CustomDomain Tls Config - TLS configuration information See
tls_config
below. - waf
Config V3CustomDomain Waf Config - Web application firewall configuration information See
waf_config
below.
- auth_
config V3CustomDomain Auth Config Args - Permission authentication configuration See
auth_config
below. - cert_
config V3CustomDomain Cert Config Args - HTTPS certificate information See
cert_config
below. - custom_
domain_ strname - The name of the resource
- protocol str
- The protocol type supported by the domain name. HTTP: only HTTP protocol is supported. HTTPS: only HTTPS is supported. HTTP,HTTPS: Supports HTTP and HTTPS protocols.
- route_
config V3CustomDomain Route Config Args - Route matching rule configuration See
route_config
below. - tls_
config V3CustomDomain Tls Config Args - TLS configuration information See
tls_config
below. - waf_
config V3CustomDomain Waf Config Args - Web application firewall configuration information See
waf_config
below.
- auth
Config Property Map - Permission authentication configuration See
auth_config
below. - cert
Config Property Map - HTTPS certificate information See
cert_config
below. - custom
Domain StringName - The name of the resource
- protocol String
- The protocol type supported by the domain name. HTTP: only HTTP protocol is supported. HTTPS: only HTTPS is supported. HTTP,HTTPS: Supports HTTP and HTTPS protocols.
- route
Config Property Map - Route matching rule configuration See
route_config
below. - tls
Config Property Map - TLS configuration information See
tls_config
below. - waf
Config Property Map - Web application firewall configuration information See
waf_config
below.
Outputs
All input properties are implicitly available as output properties. Additionally, the V3CustomDomain resource produces the following output properties:
- Account
Id string - (Available since v1.234.0) The ID of your Alibaba Cloud account (primary account).
- Api
Version string - (Available since v1.234.0) API version of Function Compute
- Create
Time string - The creation time of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified stringTime - (Available since v1.234.0) The last time the custom domain name was Updated
- Subdomain
Count string - (Available since v1.234.0) Number of subdomains
- Account
Id string - (Available since v1.234.0) The ID of your Alibaba Cloud account (primary account).
- Api
Version string - (Available since v1.234.0) API version of Function Compute
- Create
Time string - The creation time of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified stringTime - (Available since v1.234.0) The last time the custom domain name was Updated
- Subdomain
Count string - (Available since v1.234.0) Number of subdomains
- account
Id String - (Available since v1.234.0) The ID of your Alibaba Cloud account (primary account).
- api
Version String - (Available since v1.234.0) API version of Function Compute
- create
Time String - The creation time of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified StringTime - (Available since v1.234.0) The last time the custom domain name was Updated
- subdomain
Count String - (Available since v1.234.0) Number of subdomains
- account
Id string - (Available since v1.234.0) The ID of your Alibaba Cloud account (primary account).
- api
Version string - (Available since v1.234.0) API version of Function Compute
- create
Time string - The creation time of the resource
- id string
- The provider-assigned unique ID for this managed resource.
- last
Modified stringTime - (Available since v1.234.0) The last time the custom domain name was Updated
- subdomain
Count string - (Available since v1.234.0) Number of subdomains
- account_
id str - (Available since v1.234.0) The ID of your Alibaba Cloud account (primary account).
- api_
version str - (Available since v1.234.0) API version of Function Compute
- create_
time str - The creation time of the resource
- id str
- The provider-assigned unique ID for this managed resource.
- last_
modified_ strtime - (Available since v1.234.0) The last time the custom domain name was Updated
- subdomain_
count str - (Available since v1.234.0) Number of subdomains
- account
Id String - (Available since v1.234.0) The ID of your Alibaba Cloud account (primary account).
- api
Version String - (Available since v1.234.0) API version of Function Compute
- create
Time String - The creation time of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified StringTime - (Available since v1.234.0) The last time the custom domain name was Updated
- subdomain
Count String - (Available since v1.234.0) Number of subdomains
Look up Existing V3CustomDomain Resource
Get an existing V3CustomDomain 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?: V3CustomDomainState, opts?: CustomResourceOptions): V3CustomDomain
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
api_version: Optional[str] = None,
auth_config: Optional[V3CustomDomainAuthConfigArgs] = None,
cert_config: Optional[V3CustomDomainCertConfigArgs] = None,
create_time: Optional[str] = None,
custom_domain_name: Optional[str] = None,
last_modified_time: Optional[str] = None,
protocol: Optional[str] = None,
route_config: Optional[V3CustomDomainRouteConfigArgs] = None,
subdomain_count: Optional[str] = None,
tls_config: Optional[V3CustomDomainTlsConfigArgs] = None,
waf_config: Optional[V3CustomDomainWafConfigArgs] = None) -> V3CustomDomain
func GetV3CustomDomain(ctx *Context, name string, id IDInput, state *V3CustomDomainState, opts ...ResourceOption) (*V3CustomDomain, error)
public static V3CustomDomain Get(string name, Input<string> id, V3CustomDomainState? state, CustomResourceOptions? opts = null)
public static V3CustomDomain get(String name, Output<String> id, V3CustomDomainState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Account
Id string - (Available since v1.234.0) The ID of your Alibaba Cloud account (primary account).
- Api
Version string - (Available since v1.234.0) API version of Function Compute
- Auth
Config Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Auth Config - Permission authentication configuration See
auth_config
below. - Cert
Config Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Cert Config - HTTPS certificate information See
cert_config
below. - Create
Time string - The creation time of the resource
- Custom
Domain stringName - The name of the resource
- Last
Modified stringTime - (Available since v1.234.0) The last time the custom domain name was Updated
- Protocol string
- The protocol type supported by the domain name. HTTP: only HTTP protocol is supported. HTTPS: only HTTPS is supported. HTTP,HTTPS: Supports HTTP and HTTPS protocols.
- Route
Config Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Route Config - Route matching rule configuration See
route_config
below. - Subdomain
Count string - (Available since v1.234.0) Number of subdomains
- Tls
Config Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Tls Config - TLS configuration information See
tls_config
below. - Waf
Config Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Waf Config - Web application firewall configuration information See
waf_config
below.
- Account
Id string - (Available since v1.234.0) The ID of your Alibaba Cloud account (primary account).
- Api
Version string - (Available since v1.234.0) API version of Function Compute
- Auth
Config V3CustomDomain Auth Config Args - Permission authentication configuration See
auth_config
below. - Cert
Config V3CustomDomain Cert Config Args - HTTPS certificate information See
cert_config
below. - Create
Time string - The creation time of the resource
- Custom
Domain stringName - The name of the resource
- Last
Modified stringTime - (Available since v1.234.0) The last time the custom domain name was Updated
- Protocol string
- The protocol type supported by the domain name. HTTP: only HTTP protocol is supported. HTTPS: only HTTPS is supported. HTTP,HTTPS: Supports HTTP and HTTPS protocols.
- Route
Config V3CustomDomain Route Config Args - Route matching rule configuration See
route_config
below. - Subdomain
Count string - (Available since v1.234.0) Number of subdomains
- Tls
Config V3CustomDomain Tls Config Args - TLS configuration information See
tls_config
below. - Waf
Config V3CustomDomain Waf Config Args - Web application firewall configuration information See
waf_config
below.
- account
Id String - (Available since v1.234.0) The ID of your Alibaba Cloud account (primary account).
- api
Version String - (Available since v1.234.0) API version of Function Compute
- auth
Config V3CustomDomain Auth Config - Permission authentication configuration See
auth_config
below. - cert
Config V3CustomDomain Cert Config - HTTPS certificate information See
cert_config
below. - create
Time String - The creation time of the resource
- custom
Domain StringName - The name of the resource
- last
Modified StringTime - (Available since v1.234.0) The last time the custom domain name was Updated
- protocol String
- The protocol type supported by the domain name. HTTP: only HTTP protocol is supported. HTTPS: only HTTPS is supported. HTTP,HTTPS: Supports HTTP and HTTPS protocols.
- route
Config V3CustomDomain Route Config - Route matching rule configuration See
route_config
below. - subdomain
Count String - (Available since v1.234.0) Number of subdomains
- tls
Config V3CustomDomain Tls Config - TLS configuration information See
tls_config
below. - waf
Config V3CustomDomain Waf Config - Web application firewall configuration information See
waf_config
below.
- account
Id string - (Available since v1.234.0) The ID of your Alibaba Cloud account (primary account).
- api
Version string - (Available since v1.234.0) API version of Function Compute
- auth
Config V3CustomDomain Auth Config - Permission authentication configuration See
auth_config
below. - cert
Config V3CustomDomain Cert Config - HTTPS certificate information See
cert_config
below. - create
Time string - The creation time of the resource
- custom
Domain stringName - The name of the resource
- last
Modified stringTime - (Available since v1.234.0) The last time the custom domain name was Updated
- protocol string
- The protocol type supported by the domain name. HTTP: only HTTP protocol is supported. HTTPS: only HTTPS is supported. HTTP,HTTPS: Supports HTTP and HTTPS protocols.
- route
Config V3CustomDomain Route Config - Route matching rule configuration See
route_config
below. - subdomain
Count string - (Available since v1.234.0) Number of subdomains
- tls
Config V3CustomDomain Tls Config - TLS configuration information See
tls_config
below. - waf
Config V3CustomDomain Waf Config - Web application firewall configuration information See
waf_config
below.
- account_
id str - (Available since v1.234.0) The ID of your Alibaba Cloud account (primary account).
- api_
version str - (Available since v1.234.0) API version of Function Compute
- auth_
config V3CustomDomain Auth Config Args - Permission authentication configuration See
auth_config
below. - cert_
config V3CustomDomain Cert Config Args - HTTPS certificate information See
cert_config
below. - create_
time str - The creation time of the resource
- custom_
domain_ strname - The name of the resource
- last_
modified_ strtime - (Available since v1.234.0) The last time the custom domain name was Updated
- protocol str
- The protocol type supported by the domain name. HTTP: only HTTP protocol is supported. HTTPS: only HTTPS is supported. HTTP,HTTPS: Supports HTTP and HTTPS protocols.
- route_
config V3CustomDomain Route Config Args - Route matching rule configuration See
route_config
below. - subdomain_
count str - (Available since v1.234.0) Number of subdomains
- tls_
config V3CustomDomain Tls Config Args - TLS configuration information See
tls_config
below. - waf_
config V3CustomDomain Waf Config Args - Web application firewall configuration information See
waf_config
below.
- account
Id String - (Available since v1.234.0) The ID of your Alibaba Cloud account (primary account).
- api
Version String - (Available since v1.234.0) API version of Function Compute
- auth
Config Property Map - Permission authentication configuration See
auth_config
below. - cert
Config Property Map - HTTPS certificate information See
cert_config
below. - create
Time String - The creation time of the resource
- custom
Domain StringName - The name of the resource
- last
Modified StringTime - (Available since v1.234.0) The last time the custom domain name was Updated
- protocol String
- The protocol type supported by the domain name. HTTP: only HTTP protocol is supported. HTTPS: only HTTPS is supported. HTTP,HTTPS: Supports HTTP and HTTPS protocols.
- route
Config Property Map - Route matching rule configuration See
route_config
below. - subdomain
Count String - (Available since v1.234.0) Number of subdomains
- tls
Config Property Map - TLS configuration information See
tls_config
below. - waf
Config Property Map - Web application firewall configuration information See
waf_config
below.
Supporting Types
V3CustomDomainAuthConfig, V3CustomDomainAuthConfigArgs
V3CustomDomainCertConfig, V3CustomDomainCertConfigArgs
- Cert
Name string - Certificate Name
- Certificate string
- PEM format certificate
- Private
Key string - Private Key in PEM format
- Cert
Name string - Certificate Name
- Certificate string
- PEM format certificate
- Private
Key string - Private Key in PEM format
- cert
Name String - Certificate Name
- certificate String
- PEM format certificate
- private
Key String - Private Key in PEM format
- cert
Name string - Certificate Name
- certificate string
- PEM format certificate
- private
Key string - Private Key in PEM format
- cert_
name str - Certificate Name
- certificate str
- PEM format certificate
- private_
key str - Private Key in PEM format
- cert
Name String - Certificate Name
- certificate String
- PEM format certificate
- private
Key String - Private Key in PEM format
V3CustomDomainRouteConfig, V3CustomDomainRouteConfigArgs
- Routes
List<Pulumi.
Ali Cloud. FC. Inputs. V3Custom Domain Route Config Route> - Routing Configuration List See
routes
below.
- Routes
[]V3Custom
Domain Route Config Route - Routing Configuration List See
routes
below.
- routes
List<V3Custom
Domain Route Config Route> - Routing Configuration List See
routes
below.
- routes
V3Custom
Domain Route Config Route[] - Routing Configuration List See
routes
below.
- routes
Sequence[V3Custom
Domain Route Config Route] - Routing Configuration List See
routes
below.
- routes List<Property Map>
- Routing Configuration List See
routes
below.
V3CustomDomainRouteConfigRoute, V3CustomDomainRouteConfigRouteArgs
- Function
Name string - Function name
- Methods List<string>
- List of supported HTTP methods
- Path string
- Route matching rule
- Qualifier string
- Version or Alias
- Rewrite
Config Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Route Config Route Rewrite Config - Override Configuration See
rewrite_config
below.
- Function
Name string - Function name
- Methods []string
- List of supported HTTP methods
- Path string
- Route matching rule
- Qualifier string
- Version or Alias
- Rewrite
Config V3CustomDomain Route Config Route Rewrite Config - Override Configuration See
rewrite_config
below.
- function
Name String - Function name
- methods List<String>
- List of supported HTTP methods
- path String
- Route matching rule
- qualifier String
- Version or Alias
- rewrite
Config V3CustomDomain Route Config Route Rewrite Config - Override Configuration See
rewrite_config
below.
- function
Name string - Function name
- methods string[]
- List of supported HTTP methods
- path string
- Route matching rule
- qualifier string
- Version or Alias
- rewrite
Config V3CustomDomain Route Config Route Rewrite Config - Override Configuration See
rewrite_config
below.
- function_
name str - Function name
- methods Sequence[str]
- List of supported HTTP methods
- path str
- Route matching rule
- qualifier str
- Version or Alias
- rewrite_
config V3CustomDomain Route Config Route Rewrite Config - Override Configuration See
rewrite_config
below.
- function
Name String - Function name
- methods List<String>
- List of supported HTTP methods
- path String
- Route matching rule
- qualifier String
- Version or Alias
- rewrite
Config Property Map - Override Configuration See
rewrite_config
below.
V3CustomDomainRouteConfigRouteRewriteConfig, V3CustomDomainRouteConfigRouteRewriteConfigArgs
- Equal
Rules List<Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Route Config Route Rewrite Config Equal Rule> - Exact Match Rule List See
equal_rules
below. - Regex
Rules List<Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Route Config Route Rewrite Config Regex Rule> - Regular match rule list See
regex_rules
below. - Wildcard
Rules List<Pulumi.Ali Cloud. FC. Inputs. V3Custom Domain Route Config Route Rewrite Config Wildcard Rule> - List of wildcard matching rules See
wildcard_rules
below.
- Equal
Rules []V3CustomDomain Route Config Route Rewrite Config Equal Rule - Exact Match Rule List See
equal_rules
below. - Regex
Rules []V3CustomDomain Route Config Route Rewrite Config Regex Rule - Regular match rule list See
regex_rules
below. - Wildcard
Rules []V3CustomDomain Route Config Route Rewrite Config Wildcard Rule - List of wildcard matching rules See
wildcard_rules
below.
- equal
Rules List<V3CustomDomain Route Config Route Rewrite Config Equal Rule> - Exact Match Rule List See
equal_rules
below. - regex
Rules List<V3CustomDomain Route Config Route Rewrite Config Regex Rule> - Regular match rule list See
regex_rules
below. - wildcard
Rules List<V3CustomDomain Route Config Route Rewrite Config Wildcard Rule> - List of wildcard matching rules See
wildcard_rules
below.
- equal
Rules V3CustomDomain Route Config Route Rewrite Config Equal Rule[] - Exact Match Rule List See
equal_rules
below. - regex
Rules V3CustomDomain Route Config Route Rewrite Config Regex Rule[] - Regular match rule list See
regex_rules
below. - wildcard
Rules V3CustomDomain Route Config Route Rewrite Config Wildcard Rule[] - List of wildcard matching rules See
wildcard_rules
below.
- equal_
rules Sequence[V3CustomDomain Route Config Route Rewrite Config Equal Rule] - Exact Match Rule List See
equal_rules
below. - regex_
rules Sequence[V3CustomDomain Route Config Route Rewrite Config Regex Rule] - Regular match rule list See
regex_rules
below. - wildcard_
rules Sequence[V3CustomDomain Route Config Route Rewrite Config Wildcard Rule] - List of wildcard matching rules See
wildcard_rules
below.
- equal
Rules List<Property Map> - Exact Match Rule List See
equal_rules
below. - regex
Rules List<Property Map> - Regular match rule list See
regex_rules
below. - wildcard
Rules List<Property Map> - List of wildcard matching rules See
wildcard_rules
below.
V3CustomDomainRouteConfigRouteRewriteConfigEqualRule, V3CustomDomainRouteConfigRouteRewriteConfigEqualRuleArgs
- Match string
- Matching Rules
- Replacement string
- Replace Rules
- Match string
- Matching Rules
- Replacement string
- Replace Rules
- match String
- Matching Rules
- replacement String
- Replace Rules
- match string
- Matching Rules
- replacement string
- Replace Rules
- match str
- Matching Rules
- replacement str
- Replace Rules
- match String
- Matching Rules
- replacement String
- Replace Rules
V3CustomDomainRouteConfigRouteRewriteConfigRegexRule, V3CustomDomainRouteConfigRouteRewriteConfigRegexRuleArgs
- Match string
- Matching Rules
- Replacement string
- Replace Rules
- Match string
- Matching Rules
- Replacement string
- Replace Rules
- match String
- Matching Rules
- replacement String
- Replace Rules
- match string
- Matching Rules
- replacement string
- Replace Rules
- match str
- Matching Rules
- replacement str
- Replace Rules
- match String
- Matching Rules
- replacement String
- Replace Rules
V3CustomDomainRouteConfigRouteRewriteConfigWildcardRule, V3CustomDomainRouteConfigRouteRewriteConfigWildcardRuleArgs
- Match string
- Matching Rules
- Replacement string
- Replace Rules
- Match string
- Matching Rules
- Replacement string
- Replace Rules
- match String
- Matching Rules
- replacement String
- Replace Rules
- match string
- Matching Rules
- replacement string
- Replace Rules
- match str
- Matching Rules
- replacement str
- Replace Rules
- match String
- Matching Rules
- replacement String
- Replace Rules
V3CustomDomainTlsConfig, V3CustomDomainTlsConfigArgs
- Cipher
Suites List<string> - List of TLS cipher suites
- Max
Version string - The maximum version of TLS. Enumeration values: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1.0
- Min
Version string - TLS minimum version number. Enumeration values: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1.0
- Cipher
Suites []string - List of TLS cipher suites
- Max
Version string - The maximum version of TLS. Enumeration values: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1.0
- Min
Version string - TLS minimum version number. Enumeration values: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1.0
- cipher
Suites List<String> - List of TLS cipher suites
- max
Version String - The maximum version of TLS. Enumeration values: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1.0
- min
Version String - TLS minimum version number. Enumeration values: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1.0
- cipher
Suites string[] - List of TLS cipher suites
- max
Version string - The maximum version of TLS. Enumeration values: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1.0
- min
Version string - TLS minimum version number. Enumeration values: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1.0
- cipher_
suites Sequence[str] - List of TLS cipher suites
- max_
version str - The maximum version of TLS. Enumeration values: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1.0
- min_
version str - TLS minimum version number. Enumeration values: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1.0
- cipher
Suites List<String> - List of TLS cipher suites
- max
Version String - The maximum version of TLS. Enumeration values: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1.0
- min
Version String - TLS minimum version number. Enumeration values: TLSv1.3, TLSv1.2, TLSv1.1, TLSv1.0
V3CustomDomainWafConfig, V3CustomDomainWafConfigArgs
- Enable
Waf bool - Enable WAF protection
- Enable
Waf bool - Enable WAF protection
- enable
Waf Boolean - Enable WAF protection
- enable
Waf boolean - Enable WAF protection
- enable_
waf bool - Enable WAF protection
- enable
Waf Boolean - Enable WAF protection
Import
FCV3 Custom Domain can be imported using the id, e.g.
$ pulumi import alicloud:fc/v3CustomDomain:V3CustomDomain example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.