alicloud.apigateway.getApis
Explore with Pulumi AI
This data source provides the apis of the current Alibaba Cloud user.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var dataApigatwayApis = AliCloud.ApiGateway.GetApis.Invoke(new()
{
OutputFile = "output_ApiGatawayApis",
});
return new Dictionary<string, object?>
{
["firstApiId"] = data.Alicloud_api_gateway_apis.Data_apigatway.Apis[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 {
_, err := apigateway.GetApis(ctx, &apigateway.GetApisArgs{
OutputFile: pulumi.StringRef("output_ApiGatawayApis"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstApiId", data.Alicloud_api_gateway_apis.Data_apigatway.Apis[0].Id)
return nil
})
}
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.GetApisArgs;
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 dataApigatwayApis = ApigatewayFunctions.getApis(GetApisArgs.builder()
.outputFile("output_ApiGatawayApis")
.build());
ctx.export("firstApiId", data.alicloud_api_gateway_apis().data_apigatway().apis()[0].id());
}
}
import pulumi
import pulumi_alicloud as alicloud
data_apigatway_apis = alicloud.apigateway.get_apis(output_file="output_ApiGatawayApis")
pulumi.export("firstApiId", data["alicloud_api_gateway_apis"]["data_apigatway"]["apis"][0]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const dataApigatwayApis = alicloud.apigateway.getApis({
outputFile: "output_ApiGatawayApis",
});
export const firstApiId = data.alicloud_api_gateway_apis.data_apigatway.apis[0].id;
variables:
dataApigatwayApis:
fn::invoke:
Function: alicloud:apigateway:getApis
Arguments:
outputFile: output_ApiGatawayApis
outputs:
firstApiId: ${data.alicloud_api_gateway_apis.data_apigatway.apis[0].id}
Using getApis
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 getApis(args: GetApisArgs, opts?: InvokeOptions): Promise<GetApisResult>
function getApisOutput(args: GetApisOutputArgs, opts?: InvokeOptions): Output<GetApisResult>
def get_apis(api_id: Optional[str] = None,
group_id: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetApisResult
def get_apis_output(api_id: Optional[pulumi.Input[str]] = None,
group_id: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetApisResult]
func GetApis(ctx *Context, args *GetApisArgs, opts ...InvokeOption) (*GetApisResult, error)
func GetApisOutput(ctx *Context, args *GetApisOutputArgs, opts ...InvokeOption) GetApisResultOutput
> Note: This function is named GetApis
in the Go SDK.
public static class GetApis
{
public static Task<GetApisResult> InvokeAsync(GetApisArgs args, InvokeOptions? opts = null)
public static Output<GetApisResult> Invoke(GetApisInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetApisResult> getApis(GetApisArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:apigateway/getApis:getApis
arguments:
# arguments dictionary
The following arguments are supported:
- Api
Id string (It has been deprecated from version 1.52.2, and use field 'ids' to replace.) ID of the specified API.
Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.
- Group
Id string ID of the specified group.
- Ids List<string>
A list of api IDs.
- Name
Regex string A regex string to filter api gateway apis by name.
- Output
File string File name where to save data source results (after running
pulumi preview
).
- Api
Id string (It has been deprecated from version 1.52.2, and use field 'ids' to replace.) ID of the specified API.
Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.
- Group
Id string ID of the specified group.
- Ids []string
A list of api IDs.
- Name
Regex string A regex string to filter api gateway apis by name.
- Output
File string File name where to save data source results (after running
pulumi preview
).
- api
Id String (It has been deprecated from version 1.52.2, and use field 'ids' to replace.) ID of the specified API.
Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.
- group
Id String ID of the specified group.
- ids List<String>
A list of api IDs.
- name
Regex String A regex string to filter api gateway apis by name.
- output
File String File name where to save data source results (after running
pulumi preview
).
- api
Id string (It has been deprecated from version 1.52.2, and use field 'ids' to replace.) ID of the specified API.
Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.
- group
Id string ID of the specified group.
- ids string[]
A list of api IDs.
- name
Regex string A regex string to filter api gateway apis by name.
- output
File string File name where to save data source results (after running
pulumi preview
).
- api_
id str (It has been deprecated from version 1.52.2, and use field 'ids' to replace.) ID of the specified API.
Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.
- group_
id str ID of the specified group.
- ids Sequence[str]
A list of api IDs.
- name_
regex str A regex string to filter api gateway apis by name.
- output_
file str File name where to save data source results (after running
pulumi preview
).
- api
Id String (It has been deprecated from version 1.52.2, and use field 'ids' to replace.) ID of the specified API.
Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.
- group
Id String ID of the specified group.
- ids List<String>
A list of api IDs.
- name
Regex String A regex string to filter api gateway apis by name.
- output
File String File name where to save data source results (after running
pulumi preview
).
getApis Result
The following output properties are available:
- Apis
List<Pulumi.
Ali Cloud. Api Gateway. Outputs. Get Apis Api> A list of apis. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of api IDs.
- Names List<string>
A list of api names.
- Api
Id string Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.
- Group
Id string The group id that the apis belong to.
- Name
Regex string - Output
File string
- Apis
[]Get
Apis Api A list of apis. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of api IDs.
- Names []string
A list of api names.
- Api
Id string Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.
- Group
Id string The group id that the apis belong to.
- Name
Regex string - Output
File string
- apis
List<Get
Apis Api> A list of apis. Each element contains the following attributes:
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
A list of api IDs.
- names List<String>
A list of api names.
- api
Id String Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.
- group
Id String The group id that the apis belong to.
- name
Regex String - output
File String
- apis
Get
Apis Api[] A list of apis. Each element contains the following attributes:
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of api IDs.
- names string[]
A list of api names.
- api
Id string Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.
- group
Id string The group id that the apis belong to.
- name
Regex string - output
File string
- apis
Sequence[Get
Apis Api] A list of apis. Each element contains the following attributes:
- id str
The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
A list of api IDs.
- names Sequence[str]
A list of api names.
- api_
id str Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.
- group_
id str The group id that the apis belong to.
- name_
regex str - output_
file str
- apis List<Property Map>
A list of apis. Each element contains the following attributes:
- id String
The provider-assigned unique ID for this managed resource.
- ids List<String>
A list of api IDs.
- names List<String>
A list of api names.
- api
Id String Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.
- group
Id String The group id that the apis belong to.
- name
Regex String - output
File String
Supporting Types
GetApisApi
- description str
API description.
- group_
id str ID of the specified group.
- group_
name str The group name that the apis belong to.
- id str
API ID, which is generated by the system and globally unique.
- name str
API name.
- region_
id str The ID of the region where the API is located.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.