alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.apigateway.getApis

This data source provides the apis of the current Alibaba Cloud user.

Example Usage

using System.Collections.Generic;
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:

ApiId string

(It has been deprecated from version 1.52.2, and use field 'ids' to replace.) ID of the specified API.

Deprecated:

Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.

GroupId string

ID of the specified group.

Ids List<string>

A list of api IDs.

NameRegex string

A regex string to filter api gateway apis by name.

OutputFile string
ApiId string

(It has been deprecated from version 1.52.2, and use field 'ids' to replace.) ID of the specified API.

Deprecated:

Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.

GroupId string

ID of the specified group.

Ids []string

A list of api IDs.

NameRegex string

A regex string to filter api gateway apis by name.

OutputFile string
apiId String

(It has been deprecated from version 1.52.2, and use field 'ids' to replace.) ID of the specified API.

Deprecated:

Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.

groupId String

ID of the specified group.

ids List<String>

A list of api IDs.

nameRegex String

A regex string to filter api gateway apis by name.

outputFile String
apiId string

(It has been deprecated from version 1.52.2, and use field 'ids' to replace.) ID of the specified API.

Deprecated:

Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.

groupId string

ID of the specified group.

ids string[]

A list of api IDs.

nameRegex string

A regex string to filter api gateway apis by name.

outputFile string
api_id str

(It has been deprecated from version 1.52.2, and use field 'ids' to replace.) ID of the specified API.

Deprecated:

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
apiId String

(It has been deprecated from version 1.52.2, and use field 'ids' to replace.) ID of the specified API.

Deprecated:

Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.

groupId String

ID of the specified group.

ids List<String>

A list of api IDs.

nameRegex String

A regex string to filter api gateway apis by name.

outputFile String

getApis Result

The following output properties are available:

Apis List<Pulumi.AliCloud.ApiGateway.Outputs.GetApisApi>

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.

ApiId string

Deprecated:

Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.

GroupId string

The group id that the apis belong to.

NameRegex string
OutputFile string
Apis []GetApisApi

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.

ApiId string

Deprecated:

Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.

GroupId string

The group id that the apis belong to.

NameRegex string
OutputFile string
apis List<GetApisApi>

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.

apiId String

Deprecated:

Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.

groupId String

The group id that the apis belong to.

nameRegex String
outputFile String
apis GetApisApi[]

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.

apiId string

Deprecated:

Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.

groupId string

The group id that the apis belong to.

nameRegex string
outputFile string
apis Sequence[GetApisApi]

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

Deprecated:

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.

apiId String

Deprecated:

Field 'api_id' has been deprecated from provider version 1.52.2. New field 'ids' replaces it.

groupId String

The group id that the apis belong to.

nameRegex String
outputFile String

Supporting Types

GetApisApi

Description string

API description.

GroupId string

ID of the specified group.

GroupName string

The group name that the apis belong to.

Id string

API ID, which is generated by the system and globally unique.

Name string

API name.

RegionId string

The ID of the region where the API is located.

Description string

API description.

GroupId string

ID of the specified group.

GroupName string

The group name that the apis belong to.

Id string

API ID, which is generated by the system and globally unique.

Name string

API name.

RegionId string

The ID of the region where the API is located.

description String

API description.

groupId String

ID of the specified group.

groupName String

The group name that the apis belong to.

id String

API ID, which is generated by the system and globally unique.

name String

API name.

regionId String

The ID of the region where the API is located.

description string

API description.

groupId string

ID of the specified group.

groupName string

The group name that the apis belong to.

id string

API ID, which is generated by the system and globally unique.

name string

API name.

regionId string

The ID of the region where the API is located.

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.

description String

API description.

groupId String

ID of the specified group.

groupName String

The group name that the apis belong to.

id String

API ID, which is generated by the system and globally unique.

name String

API name.

regionId String

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.