volcenginecc.apig.GatewayService
服务是一组路由对外暴露的入口,用于区分流量的来源和协议,实现业务、环境、逻辑租户隔离。服务可以绑定独立的访问域名,以域名维度访问业务。
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcenginecc from "@volcengine/pulumi-volcenginecc";
const apigGatewayServiceDemo = new volcenginecc.apig.GatewayService("ApigGatewayServiceDemo", {
serviceName: "ApigGatewayServiceDemo",
gatewayId: "gd3vehjs7npja181xxxxx",
protocols: [
"HTTP",
"HTTPS",
],
authSpec: {
enable: false,
},
comments: "ApigGatewayServiceDemo-test",
});
import pulumi
import pulumi_volcenginecc as volcenginecc
apig_gateway_service_demo = volcenginecc.apig.GatewayService("ApigGatewayServiceDemo",
service_name="ApigGatewayServiceDemo",
gateway_id="gd3vehjs7npja181xxxxx",
protocols=[
"HTTP",
"HTTPS",
],
auth_spec={
"enable": False,
},
comments="ApigGatewayServiceDemo-test")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc/apig"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apig.NewGatewayService(ctx, "ApigGatewayServiceDemo", &apig.GatewayServiceArgs{
ServiceName: pulumi.String("ApigGatewayServiceDemo"),
GatewayId: pulumi.String("gd3vehjs7npja181xxxxx"),
Protocols: pulumi.StringArray{
pulumi.String("HTTP"),
pulumi.String("HTTPS"),
},
AuthSpec: &apig.GatewayServiceAuthSpecArgs{
Enable: pulumi.Bool(false),
},
Comments: pulumi.String("ApigGatewayServiceDemo-test"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcenginecc = Volcengine.Pulumi.Volcenginecc;
return await Deployment.RunAsync(() =>
{
var apigGatewayServiceDemo = new Volcenginecc.Apig.GatewayService("ApigGatewayServiceDemo", new()
{
ServiceName = "ApigGatewayServiceDemo",
GatewayId = "gd3vehjs7npja181xxxxx",
Protocols = new[]
{
"HTTP",
"HTTPS",
},
AuthSpec = new Volcenginecc.Apig.Inputs.GatewayServiceAuthSpecArgs
{
Enable = false,
},
Comments = "ApigGatewayServiceDemo-test",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.volcengine.volcenginecc.apig.GatewayService;
import com.volcengine.volcenginecc.apig.GatewayServiceArgs;
import com.pulumi.volcenginecc.apig.inputs.GatewayServiceAuthSpecArgs;
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 apigGatewayServiceDemo = new GatewayService("apigGatewayServiceDemo", GatewayServiceArgs.builder()
.serviceName("ApigGatewayServiceDemo")
.gatewayId("gd3vehjs7npja181xxxxx")
.protocols(
"HTTP",
"HTTPS")
.authSpec(GatewayServiceAuthSpecArgs.builder()
.enable(false)
.build())
.comments("ApigGatewayServiceDemo-test")
.build());
}
}
resources:
apigGatewayServiceDemo:
type: volcenginecc:apig:GatewayService
name: ApigGatewayServiceDemo
properties:
serviceName: ApigGatewayServiceDemo
gatewayId: gd3vehjs7npja181xxxxx
protocols:
- HTTP
- HTTPS
authSpec:
enable: false
comments: ApigGatewayServiceDemo-test
Create GatewayService Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GatewayService(name: string, args: GatewayServiceArgs, opts?: CustomResourceOptions);@overload
def GatewayService(resource_name: str,
args: GatewayServiceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GatewayService(resource_name: str,
opts: Optional[ResourceOptions] = None,
auth_spec: Optional[GatewayServiceAuthSpecArgs] = None,
gateway_id: Optional[str] = None,
protocols: Optional[Sequence[str]] = None,
service_name: Optional[str] = None,
comments: Optional[str] = None)func NewGatewayService(ctx *Context, name string, args GatewayServiceArgs, opts ...ResourceOption) (*GatewayService, error)public GatewayService(string name, GatewayServiceArgs args, CustomResourceOptions? opts = null)
public GatewayService(String name, GatewayServiceArgs args)
public GatewayService(String name, GatewayServiceArgs args, CustomResourceOptions options)
type: volcenginecc:apig:GatewayService
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 GatewayServiceArgs
- 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 GatewayServiceArgs
- 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 GatewayServiceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GatewayServiceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GatewayServiceArgs
- 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 gatewayServiceResource = new Volcenginecc.Apig.GatewayService("gatewayServiceResource", new()
{
AuthSpec = new Volcenginecc.Apig.Inputs.GatewayServiceAuthSpecArgs
{
Enable = false,
},
GatewayId = "string",
Protocols = new[]
{
"string",
},
ServiceName = "string",
Comments = "string",
});
example, err := apig.NewGatewayService(ctx, "gatewayServiceResource", &apig.GatewayServiceArgs{
AuthSpec: &apig.GatewayServiceAuthSpecArgs{
Enable: pulumi.Bool(false),
},
GatewayId: pulumi.String("string"),
Protocols: pulumi.StringArray{
pulumi.String("string"),
},
ServiceName: pulumi.String("string"),
Comments: pulumi.String("string"),
})
var gatewayServiceResource = new GatewayService("gatewayServiceResource", GatewayServiceArgs.builder()
.authSpec(GatewayServiceAuthSpecArgs.builder()
.enable(false)
.build())
.gatewayId("string")
.protocols("string")
.serviceName("string")
.comments("string")
.build());
gateway_service_resource = volcenginecc.apig.GatewayService("gatewayServiceResource",
auth_spec={
"enable": False,
},
gateway_id="string",
protocols=["string"],
service_name="string",
comments="string")
const gatewayServiceResource = new volcenginecc.apig.GatewayService("gatewayServiceResource", {
authSpec: {
enable: false,
},
gatewayId: "string",
protocols: ["string"],
serviceName: "string",
comments: "string",
});
type: volcenginecc:apig:GatewayService
properties:
authSpec:
enable: false
comments: string
gatewayId: string
protocols:
- string
serviceName: string
GatewayService 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 GatewayService resource accepts the following input properties:
- Auth
Spec Volcengine.Gateway Service Auth Spec - 认证配置。
- Gateway
Id string - 网关ID。
- Protocols List<string>
- 服务支持的协议。取值:HTTP:HTTP。HTTPS:HTTPS。
- Service
Name string - 服务名称。支持大小写字母、数字和中划线(-),长度限制为2~128个字符。不能以中划线(-)开头。。
- Comments string
- 备注,长度限制为0~253个字符。
- Auth
Spec GatewayService Auth Spec Args - 认证配置。
- Gateway
Id string - 网关ID。
- Protocols []string
- 服务支持的协议。取值:HTTP:HTTP。HTTPS:HTTPS。
- Service
Name string - 服务名称。支持大小写字母、数字和中划线(-),长度限制为2~128个字符。不能以中划线(-)开头。。
- Comments string
- 备注,长度限制为0~253个字符。
- auth
Spec GatewayService Auth Spec - 认证配置。
- gateway
Id String - 网关ID。
- protocols List<String>
- 服务支持的协议。取值:HTTP:HTTP。HTTPS:HTTPS。
- service
Name String - 服务名称。支持大小写字母、数字和中划线(-),长度限制为2~128个字符。不能以中划线(-)开头。。
- comments String
- 备注,长度限制为0~253个字符。
- auth
Spec GatewayService Auth Spec - 认证配置。
- gateway
Id string - 网关ID。
- protocols string[]
- 服务支持的协议。取值:HTTP:HTTP。HTTPS:HTTPS。
- service
Name string - 服务名称。支持大小写字母、数字和中划线(-),长度限制为2~128个字符。不能以中划线(-)开头。。
- comments string
- 备注,长度限制为0~253个字符。
- auth_
spec GatewayService Auth Spec Args - 认证配置。
- gateway_
id str - 网关ID。
- protocols Sequence[str]
- 服务支持的协议。取值:HTTP:HTTP。HTTPS:HTTPS。
- service_
name str - 服务名称。支持大小写字母、数字和中划线(-),长度限制为2~128个字符。不能以中划线(-)开头。。
- comments str
- 备注,长度限制为0~253个字符。
- auth
Spec Property Map - 认证配置。
- gateway
Id String - 网关ID。
- protocols List<String>
- 服务支持的协议。取值:HTTP:HTTP。HTTPS:HTTPS。
- service
Name String - 服务名称。支持大小写字母、数字和中划线(-),长度限制为2~128个字符。不能以中划线(-)开头。。
- comments String
- 备注,长度限制为0~253个字符。
Outputs
All input properties are implicitly available as output properties. Additionally, the GatewayService resource produces the following output properties:
- Created
Time string - 创建时间。
- Custom
Domains List<Volcengine.Gateway Service Custom Domain> - Domain
Spec Volcengine.Gateway Service Domain Spec - 域名详情。
- Domains
List<Volcengine.
Gateway Service Domain> - Gateway
Name string - 网关名称。
- Id string
- The provider-assigned unique ID for this managed resource.
- Message string
- 服务创建失败、删除失败或异常时的错误信息。
- Service
Id string - 服务ID。
- Status string
- Creating:创建中。CreatedFailed:创建失败。Running:运行中。Deleting:删除中。DeletedFailed:删除失败。Abnormal:异常。
- Created
Time string - 创建时间。
- Custom
Domains []GatewayService Custom Domain - Domain
Spec GatewayService Domain Spec - 域名详情。
- Domains
[]Gateway
Service Domain - Gateway
Name string - 网关名称。
- Id string
- The provider-assigned unique ID for this managed resource.
- Message string
- 服务创建失败、删除失败或异常时的错误信息。
- Service
Id string - 服务ID。
- Status string
- Creating:创建中。CreatedFailed:创建失败。Running:运行中。Deleting:删除中。DeletedFailed:删除失败。Abnormal:异常。
- created
Time String - 创建时间。
- custom
Domains List<GatewayService Custom Domain> - domain
Spec GatewayService Domain Spec - 域名详情。
- domains
List<Gateway
Service Domain> - gateway
Name String - 网关名称。
- id String
- The provider-assigned unique ID for this managed resource.
- message String
- 服务创建失败、删除失败或异常时的错误信息。
- service
Id String - 服务ID。
- status String
- Creating:创建中。CreatedFailed:创建失败。Running:运行中。Deleting:删除中。DeletedFailed:删除失败。Abnormal:异常。
- created
Time string - 创建时间。
- custom
Domains GatewayService Custom Domain[] - domain
Spec GatewayService Domain Spec - 域名详情。
- domains
Gateway
Service Domain[] - gateway
Name string - 网关名称。
- id string
- The provider-assigned unique ID for this managed resource.
- message string
- 服务创建失败、删除失败或异常时的错误信息。
- service
Id string - 服务ID。
- status string
- Creating:创建中。CreatedFailed:创建失败。Running:运行中。Deleting:删除中。DeletedFailed:删除失败。Abnormal:异常。
- created_
time str - 创建时间。
- custom_
domains Sequence[GatewayService Custom Domain] - domain_
spec GatewayService Domain Spec - 域名详情。
- domains
Sequence[Gateway
Service Domain] - gateway_
name str - 网关名称。
- id str
- The provider-assigned unique ID for this managed resource.
- message str
- 服务创建失败、删除失败或异常时的错误信息。
- service_
id str - 服务ID。
- status str
- Creating:创建中。CreatedFailed:创建失败。Running:运行中。Deleting:删除中。DeletedFailed:删除失败。Abnormal:异常。
- created
Time String - 创建时间。
- custom
Domains List<Property Map> - domain
Spec Property Map - 域名详情。
- domains List<Property Map>
- gateway
Name String - 网关名称。
- id String
- The provider-assigned unique ID for this managed resource.
- message String
- 服务创建失败、删除失败或异常时的错误信息。
- service
Id String - 服务ID。
- status String
- Creating:创建中。CreatedFailed:创建失败。Running:运行中。Deleting:删除中。DeletedFailed:删除失败。Abnormal:异常。
Look up Existing GatewayService Resource
Get an existing GatewayService 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?: GatewayServiceState, opts?: CustomResourceOptions): GatewayService@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
auth_spec: Optional[GatewayServiceAuthSpecArgs] = None,
comments: Optional[str] = None,
created_time: Optional[str] = None,
custom_domains: Optional[Sequence[GatewayServiceCustomDomainArgs]] = None,
domain_spec: Optional[GatewayServiceDomainSpecArgs] = None,
domains: Optional[Sequence[GatewayServiceDomainArgs]] = None,
gateway_id: Optional[str] = None,
gateway_name: Optional[str] = None,
message: Optional[str] = None,
protocols: Optional[Sequence[str]] = None,
service_id: Optional[str] = None,
service_name: Optional[str] = None,
status: Optional[str] = None) -> GatewayServicefunc GetGatewayService(ctx *Context, name string, id IDInput, state *GatewayServiceState, opts ...ResourceOption) (*GatewayService, error)public static GatewayService Get(string name, Input<string> id, GatewayServiceState? state, CustomResourceOptions? opts = null)public static GatewayService get(String name, Output<String> id, GatewayServiceState state, CustomResourceOptions options)resources: _: type: volcenginecc:apig:GatewayService 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.
- Auth
Spec Volcengine.Gateway Service Auth Spec - 认证配置。
- Comments string
- 备注,长度限制为0~253个字符。
- Created
Time string - 创建时间。
- Custom
Domains List<Volcengine.Gateway Service Custom Domain> - Domain
Spec Volcengine.Gateway Service Domain Spec - 域名详情。
- Domains
List<Volcengine.
Gateway Service Domain> - Gateway
Id string - 网关ID。
- Gateway
Name string - 网关名称。
- Message string
- 服务创建失败、删除失败或异常时的错误信息。
- Protocols List<string>
- 服务支持的协议。取值:HTTP:HTTP。HTTPS:HTTPS。
- Service
Id string - 服务ID。
- Service
Name string - 服务名称。支持大小写字母、数字和中划线(-),长度限制为2~128个字符。不能以中划线(-)开头。。
- Status string
- Creating:创建中。CreatedFailed:创建失败。Running:运行中。Deleting:删除中。DeletedFailed:删除失败。Abnormal:异常。
- Auth
Spec GatewayService Auth Spec Args - 认证配置。
- Comments string
- 备注,长度限制为0~253个字符。
- Created
Time string - 创建时间。
- Custom
Domains []GatewayService Custom Domain Args - Domain
Spec GatewayService Domain Spec Args - 域名详情。
- Domains
[]Gateway
Service Domain Args - Gateway
Id string - 网关ID。
- Gateway
Name string - 网关名称。
- Message string
- 服务创建失败、删除失败或异常时的错误信息。
- Protocols []string
- 服务支持的协议。取值:HTTP:HTTP。HTTPS:HTTPS。
- Service
Id string - 服务ID。
- Service
Name string - 服务名称。支持大小写字母、数字和中划线(-),长度限制为2~128个字符。不能以中划线(-)开头。。
- Status string
- Creating:创建中。CreatedFailed:创建失败。Running:运行中。Deleting:删除中。DeletedFailed:删除失败。Abnormal:异常。
- auth
Spec GatewayService Auth Spec - 认证配置。
- comments String
- 备注,长度限制为0~253个字符。
- created
Time String - 创建时间。
- custom
Domains List<GatewayService Custom Domain> - domain
Spec GatewayService Domain Spec - 域名详情。
- domains
List<Gateway
Service Domain> - gateway
Id String - 网关ID。
- gateway
Name String - 网关名称。
- message String
- 服务创建失败、删除失败或异常时的错误信息。
- protocols List<String>
- 服务支持的协议。取值:HTTP:HTTP。HTTPS:HTTPS。
- service
Id String - 服务ID。
- service
Name String - 服务名称。支持大小写字母、数字和中划线(-),长度限制为2~128个字符。不能以中划线(-)开头。。
- status String
- Creating:创建中。CreatedFailed:创建失败。Running:运行中。Deleting:删除中。DeletedFailed:删除失败。Abnormal:异常。
- auth
Spec GatewayService Auth Spec - 认证配置。
- comments string
- 备注,长度限制为0~253个字符。
- created
Time string - 创建时间。
- custom
Domains GatewayService Custom Domain[] - domain
Spec GatewayService Domain Spec - 域名详情。
- domains
Gateway
Service Domain[] - gateway
Id string - 网关ID。
- gateway
Name string - 网关名称。
- message string
- 服务创建失败、删除失败或异常时的错误信息。
- protocols string[]
- 服务支持的协议。取值:HTTP:HTTP。HTTPS:HTTPS。
- service
Id string - 服务ID。
- service
Name string - 服务名称。支持大小写字母、数字和中划线(-),长度限制为2~128个字符。不能以中划线(-)开头。。
- status string
- Creating:创建中。CreatedFailed:创建失败。Running:运行中。Deleting:删除中。DeletedFailed:删除失败。Abnormal:异常。
- auth_
spec GatewayService Auth Spec Args - 认证配置。
- comments str
- 备注,长度限制为0~253个字符。
- created_
time str - 创建时间。
- custom_
domains Sequence[GatewayService Custom Domain Args] - domain_
spec GatewayService Domain Spec Args - 域名详情。
- domains
Sequence[Gateway
Service Domain Args] - gateway_
id str - 网关ID。
- gateway_
name str - 网关名称。
- message str
- 服务创建失败、删除失败或异常时的错误信息。
- protocols Sequence[str]
- 服务支持的协议。取值:HTTP:HTTP。HTTPS:HTTPS。
- service_
id str - 服务ID。
- service_
name str - 服务名称。支持大小写字母、数字和中划线(-),长度限制为2~128个字符。不能以中划线(-)开头。。
- status str
- Creating:创建中。CreatedFailed:创建失败。Running:运行中。Deleting:删除中。DeletedFailed:删除失败。Abnormal:异常。
- auth
Spec Property Map - 认证配置。
- comments String
- 备注,长度限制为0~253个字符。
- created
Time String - 创建时间。
- custom
Domains List<Property Map> - domain
Spec Property Map - 域名详情。
- domains List<Property Map>
- gateway
Id String - 网关ID。
- gateway
Name String - 网关名称。
- message String
- 服务创建失败、删除失败或异常时的错误信息。
- protocols List<String>
- 服务支持的协议。取值:HTTP:HTTP。HTTPS:HTTPS。
- service
Id String - 服务ID。
- service
Name String - 服务名称。支持大小写字母、数字和中划线(-),长度限制为2~128个字符。不能以中划线(-)开头。。
- status String
- Creating:创建中。CreatedFailed:创建失败。Running:运行中。Deleting:删除中。DeletedFailed:删除失败。Abnormal:异常。
Supporting Types
GatewayServiceAuthSpec, GatewayServiceAuthSpecArgs
- Enable bool
- 是否开启认证。
- Enable bool
- 是否开启认证。
- enable Boolean
- 是否开启认证。
- enable boolean
- 是否开启认证。
- enable bool
- 是否开启认证。
- enable Boolean
- 是否开启认证。
GatewayServiceCustomDomain, GatewayServiceCustomDomainArgs
GatewayServiceDomain, GatewayServiceDomainArgs
GatewayServiceDomainSpec, GatewayServiceDomainSpecArgs
- Enable
Public boolResolution - 开启私网域名公网解析。
- Enable
Public boolResolution - 开启私网域名公网解析。
- enable
Public BooleanResolution - 开启私网域名公网解析。
- enable
Public booleanResolution - 开启私网域名公网解析。
- enable_
public_ boolresolution - 开启私网域名公网解析。
- enable
Public BooleanResolution - 开启私网域名公网解析。
Import
$ pulumi import volcenginecc:apig/gatewayService:GatewayService example "service_id"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcenginecc volcengine/pulumi-volcenginecc
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
volcengineccTerraform Provider.
