tencentcloud.ApiGatewayCustomDomain
Explore with Pulumi AI
Use this resource to create custom domain of API gateway.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const foo = new tencentcloud.ApiGatewayCustomDomain("foo", {
defaultDomain: "service-ohxqslqe-1259649581.gz.apigw.tencentcs.com",
isDefaultMapping: false,
netType: "OUTER",
pathMappings: [
"/good#test",
"/root#release",
],
protocol: "http",
serviceId: "service-ohxqslqe",
subDomain: "tic-test.dnsv1.com",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
foo = tencentcloud.ApiGatewayCustomDomain("foo",
default_domain="service-ohxqslqe-1259649581.gz.apigw.tencentcs.com",
is_default_mapping=False,
net_type="OUTER",
path_mappings=[
"/good#test",
"/root#release",
],
protocol="http",
service_id="service-ohxqslqe",
sub_domain="tic-test.dnsv1.com")
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.NewApiGatewayCustomDomain(ctx, "foo", &tencentcloud.ApiGatewayCustomDomainArgs{
DefaultDomain: pulumi.String("service-ohxqslqe-1259649581.gz.apigw.tencentcs.com"),
IsDefaultMapping: pulumi.Bool(false),
NetType: pulumi.String("OUTER"),
PathMappings: pulumi.StringArray{
pulumi.String("/good#test"),
pulumi.String("/root#release"),
},
Protocol: pulumi.String("http"),
ServiceId: pulumi.String("service-ohxqslqe"),
SubDomain: pulumi.String("tic-test.dnsv1.com"),
})
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 foo = new Tencentcloud.ApiGatewayCustomDomain("foo", new()
{
DefaultDomain = "service-ohxqslqe-1259649581.gz.apigw.tencentcs.com",
IsDefaultMapping = false,
NetType = "OUTER",
PathMappings = new[]
{
"/good#test",
"/root#release",
},
Protocol = "http",
ServiceId = "service-ohxqslqe",
SubDomain = "tic-test.dnsv1.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ApiGatewayCustomDomain;
import com.pulumi.tencentcloud.ApiGatewayCustomDomainArgs;
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 foo = new ApiGatewayCustomDomain("foo", ApiGatewayCustomDomainArgs.builder()
.defaultDomain("service-ohxqslqe-1259649581.gz.apigw.tencentcs.com")
.isDefaultMapping("false")
.netType("OUTER")
.pathMappings(
"/good#test",
"/root#release")
.protocol("http")
.serviceId("service-ohxqslqe")
.subDomain("tic-test.dnsv1.com")
.build());
}
}
resources:
foo:
type: tencentcloud:ApiGatewayCustomDomain
properties:
defaultDomain: service-ohxqslqe-1259649581.gz.apigw.tencentcs.com
isDefaultMapping: 'false'
netType: OUTER
pathMappings:
- /good#test
- /root#release
protocol: http
serviceId: service-ohxqslqe
subDomain: tic-test.dnsv1.com
Create ApiGatewayCustomDomain Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApiGatewayCustomDomain(name: string, args: ApiGatewayCustomDomainArgs, opts?: CustomResourceOptions);
@overload
def ApiGatewayCustomDomain(resource_name: str,
args: ApiGatewayCustomDomainArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApiGatewayCustomDomain(resource_name: str,
opts: Optional[ResourceOptions] = None,
default_domain: Optional[str] = None,
net_type: Optional[str] = None,
protocol: Optional[str] = None,
service_id: Optional[str] = None,
sub_domain: Optional[str] = None,
api_gateway_custom_domain_id: Optional[str] = None,
certificate_id: Optional[str] = None,
is_default_mapping: Optional[bool] = None,
is_forced_https: Optional[bool] = None,
path_mappings: Optional[Sequence[str]] = None)
func NewApiGatewayCustomDomain(ctx *Context, name string, args ApiGatewayCustomDomainArgs, opts ...ResourceOption) (*ApiGatewayCustomDomain, error)
public ApiGatewayCustomDomain(string name, ApiGatewayCustomDomainArgs args, CustomResourceOptions? opts = null)
public ApiGatewayCustomDomain(String name, ApiGatewayCustomDomainArgs args)
public ApiGatewayCustomDomain(String name, ApiGatewayCustomDomainArgs args, CustomResourceOptions options)
type: tencentcloud:ApiGatewayCustomDomain
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 ApiGatewayCustomDomainArgs
- 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 ApiGatewayCustomDomainArgs
- 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 ApiGatewayCustomDomainArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiGatewayCustomDomainArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiGatewayCustomDomainArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ApiGatewayCustomDomain 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 ApiGatewayCustomDomain resource accepts the following input properties:
- Default
Domain string - Default domain name.
- Net
Type string - Network type. Valid values:
OUTER
,INNER
. - Protocol string
- Protocol supported by service. Valid values:
http
,https
,http&https
. - Service
Id string - Unique service ID.
- Sub
Domain string - Custom domain name to be bound.
- Api
Gateway stringCustom Domain Id - ID of the resource.
- Certificate
Id string - Unique certificate ID of the custom domain name to be bound. You can choose to upload for the
protocol
attribute valuehttps
orhttp&https
. - Is
Default boolMapping - Whether the default path mapping is used. The default value is
true
. When it isfalse
, it means custom path mapping. In this case, thepath_mappings
attribute is required. - Is
Forced boolHttps - Whether to force HTTP requests to jump to HTTPS, default to false. When the parameter is true, the API gateway will redirect all HTTP protocol requests using the custom domain name to the HTTPS protocol for forwarding.
- Path
Mappings List<string> - Custom domain name path mapping. The data format is:
path#environment
. Optional values for the environment aretest
,prepub
, andrelease
.
- Default
Domain string - Default domain name.
- Net
Type string - Network type. Valid values:
OUTER
,INNER
. - Protocol string
- Protocol supported by service. Valid values:
http
,https
,http&https
. - Service
Id string - Unique service ID.
- Sub
Domain string - Custom domain name to be bound.
- Api
Gateway stringCustom Domain Id - ID of the resource.
- Certificate
Id string - Unique certificate ID of the custom domain name to be bound. You can choose to upload for the
protocol
attribute valuehttps
orhttp&https
. - Is
Default boolMapping - Whether the default path mapping is used. The default value is
true
. When it isfalse
, it means custom path mapping. In this case, thepath_mappings
attribute is required. - Is
Forced boolHttps - Whether to force HTTP requests to jump to HTTPS, default to false. When the parameter is true, the API gateway will redirect all HTTP protocol requests using the custom domain name to the HTTPS protocol for forwarding.
- Path
Mappings []string - Custom domain name path mapping. The data format is:
path#environment
. Optional values for the environment aretest
,prepub
, andrelease
.
- default
Domain String - Default domain name.
- net
Type String - Network type. Valid values:
OUTER
,INNER
. - protocol String
- Protocol supported by service. Valid values:
http
,https
,http&https
. - service
Id String - Unique service ID.
- sub
Domain String - Custom domain name to be bound.
- api
Gateway StringCustom Domain Id - ID of the resource.
- certificate
Id String - Unique certificate ID of the custom domain name to be bound. You can choose to upload for the
protocol
attribute valuehttps
orhttp&https
. - is
Default BooleanMapping - Whether the default path mapping is used. The default value is
true
. When it isfalse
, it means custom path mapping. In this case, thepath_mappings
attribute is required. - is
Forced BooleanHttps - Whether to force HTTP requests to jump to HTTPS, default to false. When the parameter is true, the API gateway will redirect all HTTP protocol requests using the custom domain name to the HTTPS protocol for forwarding.
- path
Mappings List<String> - Custom domain name path mapping. The data format is:
path#environment
. Optional values for the environment aretest
,prepub
, andrelease
.
- default
Domain string - Default domain name.
- net
Type string - Network type. Valid values:
OUTER
,INNER
. - protocol string
- Protocol supported by service. Valid values:
http
,https
,http&https
. - service
Id string - Unique service ID.
- sub
Domain string - Custom domain name to be bound.
- api
Gateway stringCustom Domain Id - ID of the resource.
- certificate
Id string - Unique certificate ID of the custom domain name to be bound. You can choose to upload for the
protocol
attribute valuehttps
orhttp&https
. - is
Default booleanMapping - Whether the default path mapping is used. The default value is
true
. When it isfalse
, it means custom path mapping. In this case, thepath_mappings
attribute is required. - is
Forced booleanHttps - Whether to force HTTP requests to jump to HTTPS, default to false. When the parameter is true, the API gateway will redirect all HTTP protocol requests using the custom domain name to the HTTPS protocol for forwarding.
- path
Mappings string[] - Custom domain name path mapping. The data format is:
path#environment
. Optional values for the environment aretest
,prepub
, andrelease
.
- default_
domain str - Default domain name.
- net_
type str - Network type. Valid values:
OUTER
,INNER
. - protocol str
- Protocol supported by service. Valid values:
http
,https
,http&https
. - service_
id str - Unique service ID.
- sub_
domain str - Custom domain name to be bound.
- api_
gateway_ strcustom_ domain_ id - ID of the resource.
- certificate_
id str - Unique certificate ID of the custom domain name to be bound. You can choose to upload for the
protocol
attribute valuehttps
orhttp&https
. - is_
default_ boolmapping - Whether the default path mapping is used. The default value is
true
. When it isfalse
, it means custom path mapping. In this case, thepath_mappings
attribute is required. - is_
forced_ boolhttps - Whether to force HTTP requests to jump to HTTPS, default to false. When the parameter is true, the API gateway will redirect all HTTP protocol requests using the custom domain name to the HTTPS protocol for forwarding.
- path_
mappings Sequence[str] - Custom domain name path mapping. The data format is:
path#environment
. Optional values for the environment aretest
,prepub
, andrelease
.
- default
Domain String - Default domain name.
- net
Type String - Network type. Valid values:
OUTER
,INNER
. - protocol String
- Protocol supported by service. Valid values:
http
,https
,http&https
. - service
Id String - Unique service ID.
- sub
Domain String - Custom domain name to be bound.
- api
Gateway StringCustom Domain Id - ID of the resource.
- certificate
Id String - Unique certificate ID of the custom domain name to be bound. You can choose to upload for the
protocol
attribute valuehttps
orhttp&https
. - is
Default BooleanMapping - Whether the default path mapping is used. The default value is
true
. When it isfalse
, it means custom path mapping. In this case, thepath_mappings
attribute is required. - is
Forced BooleanHttps - Whether to force HTTP requests to jump to HTTPS, default to false. When the parameter is true, the API gateway will redirect all HTTP protocol requests using the custom domain name to the HTTPS protocol for forwarding.
- path
Mappings List<String> - Custom domain name path mapping. The data format is:
path#environment
. Optional values for the environment aretest
,prepub
, andrelease
.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiGatewayCustomDomain resource produces the following output properties:
Look up Existing ApiGatewayCustomDomain Resource
Get an existing ApiGatewayCustomDomain 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?: ApiGatewayCustomDomainState, opts?: CustomResourceOptions): ApiGatewayCustomDomain
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_gateway_custom_domain_id: Optional[str] = None,
certificate_id: Optional[str] = None,
default_domain: Optional[str] = None,
is_default_mapping: Optional[bool] = None,
is_forced_https: Optional[bool] = None,
net_type: Optional[str] = None,
path_mappings: Optional[Sequence[str]] = None,
protocol: Optional[str] = None,
service_id: Optional[str] = None,
status: Optional[float] = None,
sub_domain: Optional[str] = None) -> ApiGatewayCustomDomain
func GetApiGatewayCustomDomain(ctx *Context, name string, id IDInput, state *ApiGatewayCustomDomainState, opts ...ResourceOption) (*ApiGatewayCustomDomain, error)
public static ApiGatewayCustomDomain Get(string name, Input<string> id, ApiGatewayCustomDomainState? state, CustomResourceOptions? opts = null)
public static ApiGatewayCustomDomain get(String name, Output<String> id, ApiGatewayCustomDomainState state, CustomResourceOptions options)
resources: _: type: tencentcloud:ApiGatewayCustomDomain 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.
- Api
Gateway stringCustom Domain Id - ID of the resource.
- Certificate
Id string - Unique certificate ID of the custom domain name to be bound. You can choose to upload for the
protocol
attribute valuehttps
orhttp&https
. - Default
Domain string - Default domain name.
- Is
Default boolMapping - Whether the default path mapping is used. The default value is
true
. When it isfalse
, it means custom path mapping. In this case, thepath_mappings
attribute is required. - Is
Forced boolHttps - Whether to force HTTP requests to jump to HTTPS, default to false. When the parameter is true, the API gateway will redirect all HTTP protocol requests using the custom domain name to the HTTPS protocol for forwarding.
- Net
Type string - Network type. Valid values:
OUTER
,INNER
. - Path
Mappings List<string> - Custom domain name path mapping. The data format is:
path#environment
. Optional values for the environment aretest
,prepub
, andrelease
. - Protocol string
- Protocol supported by service. Valid values:
http
,https
,http&https
. - Service
Id string - Unique service ID.
- Status double
- Domain name resolution status.
1
means normal analysis,0
means parsing failed. - Sub
Domain string - Custom domain name to be bound.
- Api
Gateway stringCustom Domain Id - ID of the resource.
- Certificate
Id string - Unique certificate ID of the custom domain name to be bound. You can choose to upload for the
protocol
attribute valuehttps
orhttp&https
. - Default
Domain string - Default domain name.
- Is
Default boolMapping - Whether the default path mapping is used. The default value is
true
. When it isfalse
, it means custom path mapping. In this case, thepath_mappings
attribute is required. - Is
Forced boolHttps - Whether to force HTTP requests to jump to HTTPS, default to false. When the parameter is true, the API gateway will redirect all HTTP protocol requests using the custom domain name to the HTTPS protocol for forwarding.
- Net
Type string - Network type. Valid values:
OUTER
,INNER
. - Path
Mappings []string - Custom domain name path mapping. The data format is:
path#environment
. Optional values for the environment aretest
,prepub
, andrelease
. - Protocol string
- Protocol supported by service. Valid values:
http
,https
,http&https
. - Service
Id string - Unique service ID.
- Status float64
- Domain name resolution status.
1
means normal analysis,0
means parsing failed. - Sub
Domain string - Custom domain name to be bound.
- api
Gateway StringCustom Domain Id - ID of the resource.
- certificate
Id String - Unique certificate ID of the custom domain name to be bound. You can choose to upload for the
protocol
attribute valuehttps
orhttp&https
. - default
Domain String - Default domain name.
- is
Default BooleanMapping - Whether the default path mapping is used. The default value is
true
. When it isfalse
, it means custom path mapping. In this case, thepath_mappings
attribute is required. - is
Forced BooleanHttps - Whether to force HTTP requests to jump to HTTPS, default to false. When the parameter is true, the API gateway will redirect all HTTP protocol requests using the custom domain name to the HTTPS protocol for forwarding.
- net
Type String - Network type. Valid values:
OUTER
,INNER
. - path
Mappings List<String> - Custom domain name path mapping. The data format is:
path#environment
. Optional values for the environment aretest
,prepub
, andrelease
. - protocol String
- Protocol supported by service. Valid values:
http
,https
,http&https
. - service
Id String - Unique service ID.
- status Double
- Domain name resolution status.
1
means normal analysis,0
means parsing failed. - sub
Domain String - Custom domain name to be bound.
- api
Gateway stringCustom Domain Id - ID of the resource.
- certificate
Id string - Unique certificate ID of the custom domain name to be bound. You can choose to upload for the
protocol
attribute valuehttps
orhttp&https
. - default
Domain string - Default domain name.
- is
Default booleanMapping - Whether the default path mapping is used. The default value is
true
. When it isfalse
, it means custom path mapping. In this case, thepath_mappings
attribute is required. - is
Forced booleanHttps - Whether to force HTTP requests to jump to HTTPS, default to false. When the parameter is true, the API gateway will redirect all HTTP protocol requests using the custom domain name to the HTTPS protocol for forwarding.
- net
Type string - Network type. Valid values:
OUTER
,INNER
. - path
Mappings string[] - Custom domain name path mapping. The data format is:
path#environment
. Optional values for the environment aretest
,prepub
, andrelease
. - protocol string
- Protocol supported by service. Valid values:
http
,https
,http&https
. - service
Id string - Unique service ID.
- status number
- Domain name resolution status.
1
means normal analysis,0
means parsing failed. - sub
Domain string - Custom domain name to be bound.
- api_
gateway_ strcustom_ domain_ id - ID of the resource.
- certificate_
id str - Unique certificate ID of the custom domain name to be bound. You can choose to upload for the
protocol
attribute valuehttps
orhttp&https
. - default_
domain str - Default domain name.
- is_
default_ boolmapping - Whether the default path mapping is used. The default value is
true
. When it isfalse
, it means custom path mapping. In this case, thepath_mappings
attribute is required. - is_
forced_ boolhttps - Whether to force HTTP requests to jump to HTTPS, default to false. When the parameter is true, the API gateway will redirect all HTTP protocol requests using the custom domain name to the HTTPS protocol for forwarding.
- net_
type str - Network type. Valid values:
OUTER
,INNER
. - path_
mappings Sequence[str] - Custom domain name path mapping. The data format is:
path#environment
. Optional values for the environment aretest
,prepub
, andrelease
. - protocol str
- Protocol supported by service. Valid values:
http
,https
,http&https
. - service_
id str - Unique service ID.
- status float
- Domain name resolution status.
1
means normal analysis,0
means parsing failed. - sub_
domain str - Custom domain name to be bound.
- api
Gateway StringCustom Domain Id - ID of the resource.
- certificate
Id String - Unique certificate ID of the custom domain name to be bound. You can choose to upload for the
protocol
attribute valuehttps
orhttp&https
. - default
Domain String - Default domain name.
- is
Default BooleanMapping - Whether the default path mapping is used. The default value is
true
. When it isfalse
, it means custom path mapping. In this case, thepath_mappings
attribute is required. - is
Forced BooleanHttps - Whether to force HTTP requests to jump to HTTPS, default to false. When the parameter is true, the API gateway will redirect all HTTP protocol requests using the custom domain name to the HTTPS protocol for forwarding.
- net
Type String - Network type. Valid values:
OUTER
,INNER
. - path
Mappings List<String> - Custom domain name path mapping. The data format is:
path#environment
. Optional values for the environment aretest
,prepub
, andrelease
. - protocol String
- Protocol supported by service. Valid values:
http
,https
,http&https
. - service
Id String - Unique service ID.
- status Number
- Domain name resolution status.
1
means normal analysis,0
means parsing failed. - sub
Domain String - Custom domain name to be bound.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.