tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
tencentcloud.getApiGatewayIpStrategies
Explore with Pulumi AI
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack
Use this data source to query API gateway IP strategy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const service = new tencentcloud.ApiGatewayService("service", {
serviceName: "ck",
protocol: "http&https",
serviceDesc: "your nice service",
netTypes: [
"INNER",
"OUTER",
],
ipVersion: "IPv4",
});
const test = new tencentcloud.ApiGatewayIpStrategy("test", {
serviceId: service.apiGatewayServiceId,
strategyName: "tf_test",
strategyType: "BLACK",
strategyData: "9.9.9.9",
});
const id = tencentcloud.getApiGatewayIpStrategiesOutput({
serviceId: test.serviceId,
});
const name = tencentcloud.getApiGatewayIpStrategiesOutput({
serviceId: test.serviceId,
strategyName: test.strategyName,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
service = tencentcloud.ApiGatewayService("service",
service_name="ck",
protocol="http&https",
service_desc="your nice service",
net_types=[
"INNER",
"OUTER",
],
ip_version="IPv4")
test = tencentcloud.ApiGatewayIpStrategy("test",
service_id=service.api_gateway_service_id,
strategy_name="tf_test",
strategy_type="BLACK",
strategy_data="9.9.9.9")
id = tencentcloud.get_api_gateway_ip_strategies_output(service_id=test.service_id)
name = tencentcloud.get_api_gateway_ip_strategies_output(service_id=test.service_id,
strategy_name=test.strategy_name)
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("ck"),
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
}
test, err := tencentcloud.NewApiGatewayIpStrategy(ctx, "test", &tencentcloud.ApiGatewayIpStrategyArgs{
ServiceId: service.ApiGatewayServiceId,
StrategyName: pulumi.String("tf_test"),
StrategyType: pulumi.String("BLACK"),
StrategyData: pulumi.String("9.9.9.9"),
})
if err != nil {
return err
}
_ = tencentcloud.GetApiGatewayIpStrategiesOutput(ctx, tencentcloud.GetApiGatewayIpStrategiesOutputArgs{
ServiceId: test.ServiceId,
}, nil)
_ = tencentcloud.GetApiGatewayIpStrategiesOutput(ctx, tencentcloud.GetApiGatewayIpStrategiesOutputArgs{
ServiceId: test.ServiceId,
StrategyName: test.StrategyName,
}, 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 = "ck",
Protocol = "http&https",
ServiceDesc = "your nice service",
NetTypes = new[]
{
"INNER",
"OUTER",
},
IpVersion = "IPv4",
});
var test = new Tencentcloud.ApiGatewayIpStrategy("test", new()
{
ServiceId = service.ApiGatewayServiceId,
StrategyName = "tf_test",
StrategyType = "BLACK",
StrategyData = "9.9.9.9",
});
var id = Tencentcloud.GetApiGatewayIpStrategies.Invoke(new()
{
ServiceId = test.ServiceId,
});
var name = Tencentcloud.GetApiGatewayIpStrategies.Invoke(new()
{
ServiceId = test.ServiceId,
StrategyName = test.StrategyName,
});
});
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.ApiGatewayIpStrategy;
import com.pulumi.tencentcloud.ApiGatewayIpStrategyArgs;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetApiGatewayIpStrategiesArgs;
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("ck")
.protocol("http&https")
.serviceDesc("your nice service")
.netTypes(
"INNER",
"OUTER")
.ipVersion("IPv4")
.build());
var test = new ApiGatewayIpStrategy("test", ApiGatewayIpStrategyArgs.builder()
.serviceId(service.apiGatewayServiceId())
.strategyName("tf_test")
.strategyType("BLACK")
.strategyData("9.9.9.9")
.build());
final var id = TencentcloudFunctions.getApiGatewayIpStrategies(GetApiGatewayIpStrategiesArgs.builder()
.serviceId(test.serviceId())
.build());
final var name = TencentcloudFunctions.getApiGatewayIpStrategies(GetApiGatewayIpStrategiesArgs.builder()
.serviceId(test.serviceId())
.strategyName(test.strategyName())
.build());
}
}
resources:
service:
type: tencentcloud:ApiGatewayService
properties:
serviceName: ck
protocol: http&https
serviceDesc: your nice service
netTypes:
- INNER
- OUTER
ipVersion: IPv4
test:
type: tencentcloud:ApiGatewayIpStrategy
properties:
serviceId: ${service.apiGatewayServiceId}
strategyName: tf_test
strategyType: BLACK
strategyData: 9.9.9.9
variables:
id:
fn::invoke:
function: tencentcloud:getApiGatewayIpStrategies
arguments:
serviceId: ${test.serviceId}
name:
fn::invoke:
function: tencentcloud:getApiGatewayIpStrategies
arguments:
serviceId: ${test.serviceId}
strategyName: ${test.strategyName}
Using getApiGatewayIpStrategies
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 getApiGatewayIpStrategies(args: GetApiGatewayIpStrategiesArgs, opts?: InvokeOptions): Promise<GetApiGatewayIpStrategiesResult>
function getApiGatewayIpStrategiesOutput(args: GetApiGatewayIpStrategiesOutputArgs, opts?: InvokeOptions): Output<GetApiGatewayIpStrategiesResult>
def get_api_gateway_ip_strategies(id: Optional[str] = None,
result_output_file: Optional[str] = None,
service_id: Optional[str] = None,
strategy_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetApiGatewayIpStrategiesResult
def get_api_gateway_ip_strategies_output(id: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
service_id: Optional[pulumi.Input[str]] = None,
strategy_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetApiGatewayIpStrategiesResult]
func GetApiGatewayIpStrategies(ctx *Context, args *GetApiGatewayIpStrategiesArgs, opts ...InvokeOption) (*GetApiGatewayIpStrategiesResult, error)
func GetApiGatewayIpStrategiesOutput(ctx *Context, args *GetApiGatewayIpStrategiesOutputArgs, opts ...InvokeOption) GetApiGatewayIpStrategiesResultOutput
> Note: This function is named GetApiGatewayIpStrategies
in the Go SDK.
public static class GetApiGatewayIpStrategies
{
public static Task<GetApiGatewayIpStrategiesResult> InvokeAsync(GetApiGatewayIpStrategiesArgs args, InvokeOptions? opts = null)
public static Output<GetApiGatewayIpStrategiesResult> Invoke(GetApiGatewayIpStrategiesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetApiGatewayIpStrategiesResult> getApiGatewayIpStrategies(GetApiGatewayIpStrategiesArgs args, InvokeOptions options)
public static Output<GetApiGatewayIpStrategiesResult> getApiGatewayIpStrategies(GetApiGatewayIpStrategiesArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getApiGatewayIpStrategies:getApiGatewayIpStrategies
arguments:
# arguments dictionary
The following arguments are supported:
- Service
Id string - The service ID to be queried.
- Id string
- Result
Output stringFile - Used to save results.
- Strategy
Name string - Name of IP policy.
- Service
Id string - The service ID to be queried.
- Id string
- Result
Output stringFile - Used to save results.
- Strategy
Name string - Name of IP policy.
- service
Id String - The service ID to be queried.
- id String
- result
Output StringFile - Used to save results.
- strategy
Name String - Name of IP policy.
- service
Id string - The service ID to be queried.
- id string
- result
Output stringFile - Used to save results.
- strategy
Name string - Name of IP policy.
- service_
id str - The service ID to be queried.
- id str
- result_
output_ strfile - Used to save results.
- strategy_
name str - Name of IP policy.
- service
Id String - The service ID to be queried.
- id String
- result
Output StringFile - Used to save results.
- strategy
Name String - Name of IP policy.
getApiGatewayIpStrategies Result
The following output properties are available:
- Id string
- Lists
List<Get
Api Gateway Ip Strategies List> - A list of strategy.
- Service
Id string - The service ID.
- Result
Output stringFile - Strategy
Name string - Name of the strategy.
- Id string
- Lists
[]Get
Api Gateway Ip Strategies List - A list of strategy.
- Service
Id string - The service ID.
- Result
Output stringFile - Strategy
Name string - Name of the strategy.
- id String
- lists
List<Get
Api Gateway Ip Strategies List> - A list of strategy.
- service
Id String - The service ID.
- result
Output StringFile - strategy
Name String - Name of the strategy.
- id string
- lists
Get
Api Gateway Ip Strategies List[] - A list of strategy.
- service
Id string - The service ID.
- result
Output stringFile - strategy
Name string - Name of the strategy.
- id str
- lists
Sequence[Get
Api Gateway Ip Strategies List] - A list of strategy.
- service_
id str - The service ID.
- result_
output_ strfile - strategy_
name str - Name of the strategy.
- id String
- lists List<Property Map>
- A list of strategy.
- service
Id String - The service ID.
- result
Output StringFile - strategy
Name String - Name of the strategy.
Supporting Types
GetApiGatewayIpStrategiesList
- Attach
Lists List<GetApi Gateway Ip Strategies List Attach List> - List of bound API details.
- Bind
Api doubleTotal Count - The number of API bound to the strategy.
- Create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Ip
List string - The list of IP.
- Modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Service
Id string - The service ID to be queried.
- Strategy
Id string - The strategy ID.
- Strategy
Name string - Name of IP policy.
- Strategy
Type string - Type of the strategy.
- Attach
Lists []GetApi Gateway Ip Strategies List Attach List - List of bound API details.
- Bind
Api float64Total Count - The number of API bound to the strategy.
- Create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Ip
List string - The list of IP.
- Modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Service
Id string - The service ID to be queried.
- Strategy
Id string - The strategy ID.
- Strategy
Name string - Name of IP policy.
- Strategy
Type string - Type of the strategy.
- attach
Lists List<GetApi Gateway Ip Strategies List Attach List> - List of bound API details.
- bind
Api DoubleTotal Count - The number of API bound to the strategy.
- create
Time String - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- ip
List String - The list of IP.
- modify
Time String - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- service
Id String - The service ID to be queried.
- strategy
Id String - The strategy ID.
- strategy
Name String - Name of IP policy.
- strategy
Type String - Type of the strategy.
- attach
Lists GetApi Gateway Ip Strategies List Attach List[] - List of bound API details.
- bind
Api numberTotal Count - The number of API bound to the strategy.
- create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- ip
List string - The list of IP.
- modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- service
Id string - The service ID to be queried.
- strategy
Id string - The strategy ID.
- strategy
Name string - Name of IP policy.
- strategy
Type string - Type of the strategy.
- attach_
lists Sequence[GetApi Gateway Ip Strategies List Attach List] - List of bound API details.
- bind_
api_ floattotal_ count - The number of API bound to the strategy.
- create_
time str - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- ip_
list str - The list of IP.
- modify_
time str - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- service_
id str - The service ID to be queried.
- strategy_
id str - The strategy ID.
- strategy_
name str - Name of IP policy.
- strategy_
type str - Type of the strategy.
- attach
Lists List<Property Map> - List of bound API details.
- bind
Api NumberTotal Count - The number of API bound to the strategy.
- create
Time String - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- ip
List String - The list of IP.
- modify
Time String - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- service
Id String - The service ID to be queried.
- strategy
Id String - The strategy ID.
- strategy
Name String - Name of IP policy.
- strategy
Type String - Type of the strategy.
GetApiGatewayIpStrategiesListAttachList
- Api
Business stringType - The type of oauth API. This field is valid when the
auth_type
isOAUTH
, and the values areNORMAL
(business API) andOAUTH
(authorization API). - Api
Desc string - API interface description.
- Api
Id string - The API ID.
- Api
Name string - API name.
- Api
Type string - API type. Valid values:
NORMAL
,TSF
.NORMAL
means common API,TSF
means microservice API. - Auth
Relation stringApi Id - The unique ID of the associated authorization API, which takes effect when the authType is
OAUTH
andApiBusinessType
is normal. Identifies the unique ID of the oauth2.0 authorization API bound to the business API. - Auth
Type string - API authentication type. Valid values:
SECRET
,NONE
,OAUTH
.SECRET
means key pair authentication,NONE
means no authentication. - Create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Method string
- API request method.
- Modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Oauth
Config Dictionary<string, string> - OAUTH configuration information. It takes effect when authType is
OAUTH
. - Path string
- API path.
- Protocol string
- API protocol.
- Relation
Business List<string>Api Ids - List of business API associated with authorized API.
- Service
Id string - The service ID to be queried.
- List<string>
- The label information associated with the API.
- Uniq
Vpc stringId - VPC unique ID.
- Vpc
Id double - VPC ID.
- Api
Business stringType - The type of oauth API. This field is valid when the
auth_type
isOAUTH
, and the values areNORMAL
(business API) andOAUTH
(authorization API). - Api
Desc string - API interface description.
- Api
Id string - The API ID.
- Api
Name string - API name.
- Api
Type string - API type. Valid values:
NORMAL
,TSF
.NORMAL
means common API,TSF
means microservice API. - Auth
Relation stringApi Id - The unique ID of the associated authorization API, which takes effect when the authType is
OAUTH
andApiBusinessType
is normal. Identifies the unique ID of the oauth2.0 authorization API bound to the business API. - Auth
Type string - API authentication type. Valid values:
SECRET
,NONE
,OAUTH
.SECRET
means key pair authentication,NONE
means no authentication. - Create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Method string
- API request method.
- Modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- Oauth
Config map[string]string - OAUTH configuration information. It takes effect when authType is
OAUTH
. - Path string
- API path.
- Protocol string
- API protocol.
- Relation
Business []stringApi Ids - List of business API associated with authorized API.
- Service
Id string - The service ID to be queried.
- []string
- The label information associated with the API.
- Uniq
Vpc stringId - VPC unique ID.
- Vpc
Id float64 - VPC ID.
- api
Business StringType - The type of oauth API. This field is valid when the
auth_type
isOAUTH
, and the values areNORMAL
(business API) andOAUTH
(authorization API). - api
Desc String - API interface description.
- api
Id String - The API ID.
- api
Name String - API name.
- api
Type String - API type. Valid values:
NORMAL
,TSF
.NORMAL
means common API,TSF
means microservice API. - auth
Relation StringApi Id - The unique ID of the associated authorization API, which takes effect when the authType is
OAUTH
andApiBusinessType
is normal. Identifies the unique ID of the oauth2.0 authorization API bound to the business API. - auth
Type String - API authentication type. Valid values:
SECRET
,NONE
,OAUTH
.SECRET
means key pair authentication,NONE
means no authentication. - create
Time String - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- method String
- API request method.
- modify
Time String - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- oauth
Config Map<String,String> - OAUTH configuration information. It takes effect when authType is
OAUTH
. - path String
- API path.
- protocol String
- API protocol.
- relation
Business List<String>Api Ids - List of business API associated with authorized API.
- service
Id String - The service ID to be queried.
- List<String>
- The label information associated with the API.
- uniq
Vpc StringId - VPC unique ID.
- vpc
Id Double - VPC ID.
- api
Business stringType - The type of oauth API. This field is valid when the
auth_type
isOAUTH
, and the values areNORMAL
(business API) andOAUTH
(authorization API). - api
Desc string - API interface description.
- api
Id string - The API ID.
- api
Name string - API name.
- api
Type string - API type. Valid values:
NORMAL
,TSF
.NORMAL
means common API,TSF
means microservice API. - auth
Relation stringApi Id - The unique ID of the associated authorization API, which takes effect when the authType is
OAUTH
andApiBusinessType
is normal. Identifies the unique ID of the oauth2.0 authorization API bound to the business API. - auth
Type string - API authentication type. Valid values:
SECRET
,NONE
,OAUTH
.SECRET
means key pair authentication,NONE
means no authentication. - create
Time string - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- method string
- API request method.
- modify
Time string - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- oauth
Config {[key: string]: string} - OAUTH configuration information. It takes effect when authType is
OAUTH
. - path string
- API path.
- protocol string
- API protocol.
- relation
Business string[]Api Ids - List of business API associated with authorized API.
- service
Id string - The service ID to be queried.
- string[]
- The label information associated with the API.
- uniq
Vpc stringId - VPC unique ID.
- vpc
Id number - VPC ID.
- api_
business_ strtype - The type of oauth API. This field is valid when the
auth_type
isOAUTH
, and the values areNORMAL
(business API) andOAUTH
(authorization API). - api_
desc str - API interface description.
- api_
id str - The API ID.
- api_
name str - API name.
- api_
type str - API type. Valid values:
NORMAL
,TSF
.NORMAL
means common API,TSF
means microservice API. - auth_
relation_ strapi_ id - The unique ID of the associated authorization API, which takes effect when the authType is
OAUTH
andApiBusinessType
is normal. Identifies the unique ID of the oauth2.0 authorization API bound to the business API. - auth_
type str - API authentication type. Valid values:
SECRET
,NONE
,OAUTH
.SECRET
means key pair authentication,NONE
means no authentication. - create_
time str - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- method str
- API request method.
- modify_
time str - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- oauth_
config Mapping[str, str] - OAUTH configuration information. It takes effect when authType is
OAUTH
. - path str
- API path.
- protocol str
- API protocol.
- relation_
business_ Sequence[str]api_ ids - List of business API associated with authorized API.
- service_
id str - The service ID to be queried.
- Sequence[str]
- The label information associated with the API.
- uniq_
vpc_ strid - VPC unique ID.
- vpc_
id float - VPC ID.
- api
Business StringType - The type of oauth API. This field is valid when the
auth_type
isOAUTH
, and the values areNORMAL
(business API) andOAUTH
(authorization API). - api
Desc String - API interface description.
- api
Id String - The API ID.
- api
Name String - API name.
- api
Type String - API type. Valid values:
NORMAL
,TSF
.NORMAL
means common API,TSF
means microservice API. - auth
Relation StringApi Id - The unique ID of the associated authorization API, which takes effect when the authType is
OAUTH
andApiBusinessType
is normal. Identifies the unique ID of the oauth2.0 authorization API bound to the business API. - auth
Type String - API authentication type. Valid values:
SECRET
,NONE
,OAUTH
.SECRET
means key pair authentication,NONE
means no authentication. - create
Time String - Creation time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- method String
- API request method.
- modify
Time String - Last modified time in the format of YYYY-MM-DDThh:mm:ssZ according to ISO 8601 standard. UTC time is used.
- oauth
Config Map<String> - OAUTH configuration information. It takes effect when authType is
OAUTH
. - path String
- API path.
- protocol String
- API protocol.
- relation
Business List<String>Api Ids - List of business API associated with authorized API.
- service
Id String - The service ID to be queried.
- List<String>
- The label information associated with the API.
- uniq
Vpc StringId - VPC unique ID.
- vpc
Id Number - VPC ID.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloud
Terraform Provider.
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack