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

tencentcloud.getApiGatewayServices

Explore with Pulumi AI

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

    Use this data source to query API gateway services.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const service = new tencentcloud.ApiGatewayService("service", {
        serviceName: "niceservice",
        protocol: "http&https",
        serviceDesc: "your nice service",
        netTypes: [
            "INNER",
            "OUTER",
        ],
        ipVersion: "IPv4",
    });
    const name = tencentcloud.getApiGatewayServicesOutput({
        serviceName: service.serviceName,
    });
    const id = tencentcloud.getApiGatewayServicesOutput({
        serviceId: service.apiGatewayServiceId,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    service = tencentcloud.ApiGatewayService("service",
        service_name="niceservice",
        protocol="http&https",
        service_desc="your nice service",
        net_types=[
            "INNER",
            "OUTER",
        ],
        ip_version="IPv4")
    name = tencentcloud.get_api_gateway_services_output(service_name=service.service_name)
    id = tencentcloud.get_api_gateway_services_output(service_id=service.api_gateway_service_id)
    
    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 {
    		service, err := tencentcloud.NewApiGatewayService(ctx, "service", &tencentcloud.ApiGatewayServiceArgs{
    			ServiceName: pulumi.String("niceservice"),
    			Protocol:    pulumi.String("http&https"),
    			ServiceDesc: pulumi.String("your nice service"),
    			NetTypes: pulumi.StringArray{
    				pulumi.String("INNER"),
    				pulumi.String("OUTER"),
    			},
    			IpVersion: pulumi.String("IPv4"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = tencentcloud.GetApiGatewayServicesOutput(ctx, tencentcloud.GetApiGatewayServicesOutputArgs{
    			ServiceName: service.ServiceName,
    		}, nil)
    		_ = tencentcloud.GetApiGatewayServicesOutput(ctx, tencentcloud.GetApiGatewayServicesOutputArgs{
    			ServiceId: service.ApiGatewayServiceId,
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var service = new Tencentcloud.ApiGatewayService("service", new()
        {
            ServiceName = "niceservice",
            Protocol = "http&https",
            ServiceDesc = "your nice service",
            NetTypes = new[]
            {
                "INNER",
                "OUTER",
            },
            IpVersion = "IPv4",
        });
    
        var name = Tencentcloud.GetApiGatewayServices.Invoke(new()
        {
            ServiceName = service.ServiceName,
        });
    
        var id = Tencentcloud.GetApiGatewayServices.Invoke(new()
        {
            ServiceId = service.ApiGatewayServiceId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.ApiGatewayService;
    import com.pulumi.tencentcloud.ApiGatewayServiceArgs;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetApiGatewayServicesArgs;
    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 service = new ApiGatewayService("service", ApiGatewayServiceArgs.builder()
                .serviceName("niceservice")
                .protocol("http&https")
                .serviceDesc("your nice service")
                .netTypes(            
                    "INNER",
                    "OUTER")
                .ipVersion("IPv4")
                .build());
    
            final var name = TencentcloudFunctions.getApiGatewayServices(GetApiGatewayServicesArgs.builder()
                .serviceName(service.serviceName())
                .build());
    
            final var id = TencentcloudFunctions.getApiGatewayServices(GetApiGatewayServicesArgs.builder()
                .serviceId(service.apiGatewayServiceId())
                .build());
    
        }
    }
    
    resources:
      service:
        type: tencentcloud:ApiGatewayService
        properties:
          serviceName: niceservice
          protocol: http&https
          serviceDesc: your nice service
          netTypes:
            - INNER
            - OUTER
          ipVersion: IPv4
    variables:
      name:
        fn::invoke:
          function: tencentcloud:getApiGatewayServices
          arguments:
            serviceName: ${service.serviceName}
      id:
        fn::invoke:
          function: tencentcloud:getApiGatewayServices
          arguments:
            serviceId: ${service.apiGatewayServiceId}
    

    Using getApiGatewayServices

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getApiGatewayServices(args: GetApiGatewayServicesArgs, opts?: InvokeOptions): Promise<GetApiGatewayServicesResult>
    function getApiGatewayServicesOutput(args: GetApiGatewayServicesOutputArgs, opts?: InvokeOptions): Output<GetApiGatewayServicesResult>
    def get_api_gateway_services(id: Optional[str] = None,
                                 result_output_file: Optional[str] = None,
                                 service_id: Optional[str] = None,
                                 service_name: Optional[str] = None,
                                 opts: Optional[InvokeOptions] = None) -> GetApiGatewayServicesResult
    def get_api_gateway_services_output(id: Optional[pulumi.Input[str]] = None,
                                 result_output_file: Optional[pulumi.Input[str]] = None,
                                 service_id: Optional[pulumi.Input[str]] = None,
                                 service_name: Optional[pulumi.Input[str]] = None,
                                 opts: Optional[InvokeOptions] = None) -> Output[GetApiGatewayServicesResult]
    func GetApiGatewayServices(ctx *Context, args *GetApiGatewayServicesArgs, opts ...InvokeOption) (*GetApiGatewayServicesResult, error)
    func GetApiGatewayServicesOutput(ctx *Context, args *GetApiGatewayServicesOutputArgs, opts ...InvokeOption) GetApiGatewayServicesResultOutput

    > Note: This function is named GetApiGatewayServices in the Go SDK.

    public static class GetApiGatewayServices 
    {
        public static Task<GetApiGatewayServicesResult> InvokeAsync(GetApiGatewayServicesArgs args, InvokeOptions? opts = null)
        public static Output<GetApiGatewayServicesResult> Invoke(GetApiGatewayServicesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetApiGatewayServicesResult> getApiGatewayServices(GetApiGatewayServicesArgs args, InvokeOptions options)
    public static Output<GetApiGatewayServicesResult> getApiGatewayServices(GetApiGatewayServicesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getApiGatewayServices:getApiGatewayServices
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    ResultOutputFile string
    Used to save results.
    ServiceId string
    Service ID for query.
    ServiceName string
    Service name for query.
    Id string
    ResultOutputFile string
    Used to save results.
    ServiceId string
    Service ID for query.
    ServiceName string
    Service name for query.
    id String
    resultOutputFile String
    Used to save results.
    serviceId String
    Service ID for query.
    serviceName String
    Service name for query.
    id string
    resultOutputFile string
    Used to save results.
    serviceId string
    Service ID for query.
    serviceName string
    Service name for query.
    id str
    result_output_file str
    Used to save results.
    service_id str
    Service ID for query.
    service_name str
    Service name for query.
    id String
    resultOutputFile String
    Used to save results.
    serviceId String
    Service ID for query.
    serviceName String
    Service name for query.

    getApiGatewayServices Result

    The following output properties are available:

    Id string
    Lists List<GetApiGatewayServicesList>
    A list of services.
    ResultOutputFile string
    ServiceId string
    Custom service ID.
    ServiceName string
    Custom service name.
    Id string
    Lists []GetApiGatewayServicesList
    A list of services.
    ResultOutputFile string
    ServiceId string
    Custom service ID.
    ServiceName string
    Custom service name.
    id String
    lists List<GetApiGatewayServicesList>
    A list of services.
    resultOutputFile String
    serviceId String
    Custom service ID.
    serviceName String
    Custom service name.
    id string
    lists GetApiGatewayServicesList[]
    A list of services.
    resultOutputFile string
    serviceId string
    Custom service ID.
    serviceName string
    Custom service name.
    id str
    lists Sequence[GetApiGatewayServicesList]
    A list of services.
    result_output_file str
    service_id str
    Custom service ID.
    service_name str
    Custom service name.
    id String
    lists List<Property Map>
    A list of services.
    resultOutputFile String
    serviceId String
    Custom service ID.
    serviceName String
    Custom service name.

    Supporting Types

    GetApiGatewayServicesList

    CreateTime string
    Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
    ExclusiveSetName string
    (Deprecated) It has been deprecated from version 1.81.9. Self-deployed cluster name, which is used to specify the self-deployed cluster where the service is to be created.
    InnerHttpPort double
    Port number for http access over private network.
    InnerHttpsPort double
    Port number for https access over private network.
    InternalSubDomain string
    Private network access sub-domain name.
    IpVersion string
    IP version number.
    ModifyTime string
    Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
    NetTypes List<string>
    Network type list, which is used to specify the supported network types. Valid values: INNER, OUTER. INNER indicates access over private network, and OUTER indicates access over public network.
    OuterSubDomain string
    Public network access subdomain name.
    Protocol string
    Service frontend request type. Valid values: http, https, http&https.
    ServiceDesc string
    Custom service description.
    ServiceId string
    Service ID for query.
    ServiceName string
    Service name for query.
    UsagePlanLists List<GetApiGatewayServicesListUsagePlanList>
    A list of attach usage plans. Each element contains the following attributes:
    CreateTime string
    Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
    ExclusiveSetName string
    (Deprecated) It has been deprecated from version 1.81.9. Self-deployed cluster name, which is used to specify the self-deployed cluster where the service is to be created.
    InnerHttpPort float64
    Port number for http access over private network.
    InnerHttpsPort float64
    Port number for https access over private network.
    InternalSubDomain string
    Private network access sub-domain name.
    IpVersion string
    IP version number.
    ModifyTime string
    Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
    NetTypes []string
    Network type list, which is used to specify the supported network types. Valid values: INNER, OUTER. INNER indicates access over private network, and OUTER indicates access over public network.
    OuterSubDomain string
    Public network access subdomain name.
    Protocol string
    Service frontend request type. Valid values: http, https, http&https.
    ServiceDesc string
    Custom service description.
    ServiceId string
    Service ID for query.
    ServiceName string
    Service name for query.
    UsagePlanLists []GetApiGatewayServicesListUsagePlanList
    A list of attach usage plans. Each element contains the following attributes:
    createTime String
    Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
    exclusiveSetName String
    (Deprecated) It has been deprecated from version 1.81.9. Self-deployed cluster name, which is used to specify the self-deployed cluster where the service is to be created.
    innerHttpPort Double
    Port number for http access over private network.
    innerHttpsPort Double
    Port number for https access over private network.
    internalSubDomain String
    Private network access sub-domain name.
    ipVersion String
    IP version number.
    modifyTime String
    Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
    netTypes List<String>
    Network type list, which is used to specify the supported network types. Valid values: INNER, OUTER. INNER indicates access over private network, and OUTER indicates access over public network.
    outerSubDomain String
    Public network access subdomain name.
    protocol String
    Service frontend request type. Valid values: http, https, http&https.
    serviceDesc String
    Custom service description.
    serviceId String
    Service ID for query.
    serviceName String
    Service name for query.
    usagePlanLists List<GetApiGatewayServicesListUsagePlanList>
    A list of attach usage plans. Each element contains the following attributes:
    createTime string
    Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
    exclusiveSetName string
    (Deprecated) It has been deprecated from version 1.81.9. Self-deployed cluster name, which is used to specify the self-deployed cluster where the service is to be created.
    innerHttpPort number
    Port number for http access over private network.
    innerHttpsPort number
    Port number for https access over private network.
    internalSubDomain string
    Private network access sub-domain name.
    ipVersion string
    IP version number.
    modifyTime string
    Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
    netTypes string[]
    Network type list, which is used to specify the supported network types. Valid values: INNER, OUTER. INNER indicates access over private network, and OUTER indicates access over public network.
    outerSubDomain string
    Public network access subdomain name.
    protocol string
    Service frontend request type. Valid values: http, https, http&https.
    serviceDesc string
    Custom service description.
    serviceId string
    Service ID for query.
    serviceName string
    Service name for query.
    usagePlanLists GetApiGatewayServicesListUsagePlanList[]
    A list of attach usage plans. Each element contains the following attributes:
    create_time str
    Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
    exclusive_set_name str
    (Deprecated) It has been deprecated from version 1.81.9. Self-deployed cluster name, which is used to specify the self-deployed cluster where the service is to be created.
    inner_http_port float
    Port number for http access over private network.
    inner_https_port float
    Port number for https access over private network.
    internal_sub_domain str
    Private network access sub-domain name.
    ip_version str
    IP version number.
    modify_time str
    Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
    net_types Sequence[str]
    Network type list, which is used to specify the supported network types. Valid values: INNER, OUTER. INNER indicates access over private network, and OUTER indicates access over public network.
    outer_sub_domain str
    Public network access subdomain name.
    protocol str
    Service frontend request type. Valid values: http, https, http&https.
    service_desc str
    Custom service description.
    service_id str
    Service ID for query.
    service_name str
    Service name for query.
    usage_plan_lists Sequence[GetApiGatewayServicesListUsagePlanList]
    A list of attach usage plans. Each element contains the following attributes:
    createTime String
    Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
    exclusiveSetName String
    (Deprecated) It has been deprecated from version 1.81.9. Self-deployed cluster name, which is used to specify the self-deployed cluster where the service is to be created.
    innerHttpPort Number
    Port number for http access over private network.
    innerHttpsPort Number
    Port number for https access over private network.
    internalSubDomain String
    Private network access sub-domain name.
    ipVersion String
    IP version number.
    modifyTime String
    Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
    netTypes List<String>
    Network type list, which is used to specify the supported network types. Valid values: INNER, OUTER. INNER indicates access over private network, and OUTER indicates access over public network.
    outerSubDomain String
    Public network access subdomain name.
    protocol String
    Service frontend request type. Valid values: http, https, http&https.
    serviceDesc String
    Custom service description.
    serviceId String
    Service ID for query.
    serviceName String
    Service name for query.
    usagePlanLists List<Property Map>
    A list of attach usage plans. Each element contains the following attributes:

    GetApiGatewayServicesListUsagePlanList

    ApiId string
    ID of the API.
    BindType string
    Binding type.
    UsagePlanId string
    ID of the usage plan.
    UsagePlanName string
    Name of the usage plan.
    ApiId string
    ID of the API.
    BindType string
    Binding type.
    UsagePlanId string
    ID of the usage plan.
    UsagePlanName string
    Name of the usage plan.
    apiId String
    ID of the API.
    bindType String
    Binding type.
    usagePlanId String
    ID of the usage plan.
    usagePlanName String
    Name of the usage plan.
    apiId string
    ID of the API.
    bindType string
    Binding type.
    usagePlanId string
    ID of the usage plan.
    usagePlanName string
    Name of the usage plan.
    api_id str
    ID of the API.
    bind_type str
    Binding type.
    usage_plan_id str
    ID of the usage plan.
    usage_plan_name str
    Name of the usage plan.
    apiId String
    ID of the API.
    bindType String
    Binding type.
    usagePlanId String
    ID of the usage plan.
    usagePlanName String
    Name of the usage plan.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack