Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.apigateway.getPlugins
Explore with Pulumi AI
This data source provides the Api Gateway Plugins of the current Alibaba Cloud user.
NOTE: Available in v1.187.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.apigateway.getPlugins({});
export const apiGatewayPluginId1 = ids.then(ids => ids.plugins?.[0]?.id);
const nameRegex = alicloud.apigateway.getPlugins({
nameRegex: "^my-Plugin",
});
export const apiGatewayPluginId2 = nameRegex.then(nameRegex => nameRegex.plugins?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.apigateway.get_plugins()
pulumi.export("apiGatewayPluginId1", ids.plugins[0].id)
name_regex = alicloud.apigateway.get_plugins(name_regex="^my-Plugin")
pulumi.export("apiGatewayPluginId2", name_regex.plugins[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/apigateway"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := apigateway.GetPlugins(ctx, nil, nil)
if err != nil {
return err
}
ctx.Export("apiGatewayPluginId1", ids.Plugins[0].Id)
nameRegex, err := apigateway.GetPlugins(ctx, &apigateway.GetPluginsArgs{
NameRegex: pulumi.StringRef("^my-Plugin"),
}, nil)
if err != nil {
return err
}
ctx.Export("apiGatewayPluginId2", nameRegex.Plugins[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.ApiGateway.GetPlugins.Invoke();
var nameRegex = AliCloud.ApiGateway.GetPlugins.Invoke(new()
{
NameRegex = "^my-Plugin",
});
return new Dictionary<string, object?>
{
["apiGatewayPluginId1"] = ids.Apply(getPluginsResult => getPluginsResult.Plugins[0]?.Id),
["apiGatewayPluginId2"] = nameRegex.Apply(getPluginsResult => getPluginsResult.Plugins[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.apigateway.ApigatewayFunctions;
import com.pulumi.alicloud.apigateway.inputs.GetPluginsArgs;
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 ids = ApigatewayFunctions.getPlugins();
ctx.export("apiGatewayPluginId1", ids.applyValue(getPluginsResult -> getPluginsResult.plugins()[0].id()));
final var nameRegex = ApigatewayFunctions.getPlugins(GetPluginsArgs.builder()
.nameRegex("^my-Plugin")
.build());
ctx.export("apiGatewayPluginId2", nameRegex.applyValue(getPluginsResult -> getPluginsResult.plugins()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:apigateway:getPlugins
Arguments: {}
nameRegex:
fn::invoke:
Function: alicloud:apigateway:getPlugins
Arguments:
nameRegex: ^my-Plugin
outputs:
apiGatewayPluginId1: ${ids.plugins[0].id}
apiGatewayPluginId2: ${nameRegex.plugins[0].id}
Using getPlugins
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 getPlugins(args: GetPluginsArgs, opts?: InvokeOptions): Promise<GetPluginsResult>
function getPluginsOutput(args: GetPluginsOutputArgs, opts?: InvokeOptions): Output<GetPluginsResult>
def get_plugins(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
page_number: Optional[int] = None,
page_size: Optional[int] = None,
plugin_name: Optional[str] = None,
plugin_type: Optional[str] = None,
tags: Optional[Mapping[str, Any]] = None,
opts: Optional[InvokeOptions] = None) -> GetPluginsResult
def get_plugins_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
page_number: Optional[pulumi.Input[int]] = None,
page_size: Optional[pulumi.Input[int]] = None,
plugin_name: Optional[pulumi.Input[str]] = None,
plugin_type: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPluginsResult]
func GetPlugins(ctx *Context, args *GetPluginsArgs, opts ...InvokeOption) (*GetPluginsResult, error)
func GetPluginsOutput(ctx *Context, args *GetPluginsOutputArgs, opts ...InvokeOption) GetPluginsResultOutput
> Note: This function is named GetPlugins
in the Go SDK.
public static class GetPlugins
{
public static Task<GetPluginsResult> InvokeAsync(GetPluginsArgs args, InvokeOptions? opts = null)
public static Output<GetPluginsResult> Invoke(GetPluginsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPluginsResult> getPlugins(GetPluginsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:apigateway/getPlugins:getPlugins
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Plugin IDs.
- Name
Regex string - A regex string to filter results by Plugin name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int - Plugin
Name string - The name of the plug-in that you want to create. It can contain uppercase English letters, lowercase English letters, Chinese characters, numbers, and underscores (). It must be 4 to 50 characters in length and cannot start with an underscore ().
- Plugin
Type string - The type of the plug-in. Valid values:
backendSignature
,caching
,cors
,ipControl
,jwtAuth
,trafficControl
. - Dictionary<string, object>
- A mapping of tags to assign to the resource.
- Ids []string
- A list of Plugin IDs.
- Name
Regex string - A regex string to filter results by Plugin name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int - Plugin
Name string - The name of the plug-in that you want to create. It can contain uppercase English letters, lowercase English letters, Chinese characters, numbers, and underscores (). It must be 4 to 50 characters in length and cannot start with an underscore ().
- Plugin
Type string - The type of the plug-in. Valid values:
backendSignature
,caching
,cors
,ipControl
,jwtAuth
,trafficControl
. - map[string]interface{}
- A mapping of tags to assign to the resource.
- ids List<String>
- A list of Plugin IDs.
- name
Regex String - A regex string to filter results by Plugin name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Integer - page
Size Integer - plugin
Name String - The name of the plug-in that you want to create. It can contain uppercase English letters, lowercase English letters, Chinese characters, numbers, and underscores (). It must be 4 to 50 characters in length and cannot start with an underscore ().
- plugin
Type String - The type of the plug-in. Valid values:
backendSignature
,caching
,cors
,ipControl
,jwtAuth
,trafficControl
. - Map<String,Object>
- A mapping of tags to assign to the resource.
- ids string[]
- A list of Plugin IDs.
- name
Regex string - A regex string to filter results by Plugin name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - page
Number number - page
Size number - plugin
Name string - The name of the plug-in that you want to create. It can contain uppercase English letters, lowercase English letters, Chinese characters, numbers, and underscores (). It must be 4 to 50 characters in length and cannot start with an underscore ().
- plugin
Type string - The type of the plug-in. Valid values:
backendSignature
,caching
,cors
,ipControl
,jwtAuth
,trafficControl
. - {[key: string]: any}
- A mapping of tags to assign to the resource.
- ids Sequence[str]
- A list of Plugin IDs.
- name_
regex str - A regex string to filter results by Plugin name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - page_
number int - page_
size int - plugin_
name str - The name of the plug-in that you want to create. It can contain uppercase English letters, lowercase English letters, Chinese characters, numbers, and underscores (). It must be 4 to 50 characters in length and cannot start with an underscore ().
- plugin_
type str - The type of the plug-in. Valid values:
backendSignature
,caching
,cors
,ipControl
,jwtAuth
,trafficControl
. - Mapping[str, Any]
- A mapping of tags to assign to the resource.
- ids List<String>
- A list of Plugin IDs.
- name
Regex String - A regex string to filter results by Plugin name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Number - page
Size Number - plugin
Name String - The name of the plug-in that you want to create. It can contain uppercase English letters, lowercase English letters, Chinese characters, numbers, and underscores (). It must be 4 to 50 characters in length and cannot start with an underscore ().
- plugin
Type String - The type of the plug-in. Valid values:
backendSignature
,caching
,cors
,ipControl
,jwtAuth
,trafficControl
. - Map<Any>
- A mapping of tags to assign to the resource.
getPlugins Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Plugins
List<Pulumi.
Ali Cloud. Api Gateway. Outputs. Get Plugins Plugin> - Name
Regex string - Output
File string - Page
Number int - Page
Size int - Plugin
Name string - Plugin
Type string - Dictionary<string, object>
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Plugins
[]Get
Plugins Plugin - Name
Regex string - Output
File string - Page
Number int - Page
Size int - Plugin
Name string - Plugin
Type string - map[string]interface{}
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- plugins
List<Get
Plugins Plugin> - name
Regex String - output
File String - page
Number Integer - page
Size Integer - plugin
Name String - plugin
Type String - Map<String,Object>
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- plugins
Get
Plugins Plugin[] - name
Regex string - output
File string - page
Number number - page
Size number - plugin
Name string - plugin
Type string - {[key: string]: any}
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- plugins
Sequence[Get
Plugins Plugin] - name_
regex str - output_
file str - page_
number int - page_
size int - plugin_
name str - plugin_
type str - Mapping[str, Any]
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- plugins List<Property Map>
- name
Regex String - output
File String - page
Number Number - page
Size Number - plugin
Name String - plugin
Type String - Map<Any>
Supporting Types
GetPluginsPlugin
- Create
Time string - The CreateTime of the resource.
- Description string
- The description of the plug-in, which cannot exceed 200 characters.
- Id string
- The ID of the Plugin.
- Modified
Time string - The ModifiedTime of the resource.
- Plugin
Data string - The definition statement of the plug-in. Plug-in definition statements in the JSON and YAML formats are supported.
- Plugin
Id string - The first ID of the resource.
- Plugin
Name string - The name of the plug-in that you want to create.
- Plugin
Type string - The type of the plug-in.
- Dictionary<string, object>
- The tag of the resource.
- Create
Time string - The CreateTime of the resource.
- Description string
- The description of the plug-in, which cannot exceed 200 characters.
- Id string
- The ID of the Plugin.
- Modified
Time string - The ModifiedTime of the resource.
- Plugin
Data string - The definition statement of the plug-in. Plug-in definition statements in the JSON and YAML formats are supported.
- Plugin
Id string - The first ID of the resource.
- Plugin
Name string - The name of the plug-in that you want to create.
- Plugin
Type string - The type of the plug-in.
- map[string]interface{}
- The tag of the resource.
- create
Time String - The CreateTime of the resource.
- description String
- The description of the plug-in, which cannot exceed 200 characters.
- id String
- The ID of the Plugin.
- modified
Time String - The ModifiedTime of the resource.
- plugin
Data String - The definition statement of the plug-in. Plug-in definition statements in the JSON and YAML formats are supported.
- plugin
Id String - The first ID of the resource.
- plugin
Name String - The name of the plug-in that you want to create.
- plugin
Type String - The type of the plug-in.
- Map<String,Object>
- The tag of the resource.
- create
Time string - The CreateTime of the resource.
- description string
- The description of the plug-in, which cannot exceed 200 characters.
- id string
- The ID of the Plugin.
- modified
Time string - The ModifiedTime of the resource.
- plugin
Data string - The definition statement of the plug-in. Plug-in definition statements in the JSON and YAML formats are supported.
- plugin
Id string - The first ID of the resource.
- plugin
Name string - The name of the plug-in that you want to create.
- plugin
Type string - The type of the plug-in.
- {[key: string]: any}
- The tag of the resource.
- create_
time str - The CreateTime of the resource.
- description str
- The description of the plug-in, which cannot exceed 200 characters.
- id str
- The ID of the Plugin.
- modified_
time str - The ModifiedTime of the resource.
- plugin_
data str - The definition statement of the plug-in. Plug-in definition statements in the JSON and YAML formats are supported.
- plugin_
id str - The first ID of the resource.
- plugin_
name str - The name of the plug-in that you want to create.
- plugin_
type str - The type of the plug-in.
- Mapping[str, Any]
- The tag of the resource.
- create
Time String - The CreateTime of the resource.
- description String
- The description of the plug-in, which cannot exceed 200 characters.
- id String
- The ID of the Plugin.
- modified
Time String - The ModifiedTime of the resource.
- plugin
Data String - The definition statement of the plug-in. Plug-in definition statements in the JSON and YAML formats are supported.
- plugin
Id String - The first ID of the resource.
- plugin
Name String - The name of the plug-in that you want to create.
- plugin
Type String - The type of the plug-in.
- Map<Any>
- The tag of the resource.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.