Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.apigateway.getApps
Explore with Pulumi AI
This data source provides the apps of the current Alibaba Cloud user.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const dataApigatway = alicloud.apigateway.getApps({
outputFile: "outapps",
});
export const firstAppId = dataApigatway.then(dataApigatway => dataApigatway.apps?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
data_apigatway = alicloud.apigateway.get_apps(output_file="outapps")
pulumi.export("firstAppId", data_apigatway.apps[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 {
dataApigatway, err := apigateway.GetApps(ctx, &apigateway.GetAppsArgs{
OutputFile: pulumi.StringRef("outapps"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstAppId", dataApigatway.Apps[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var dataApigatway = AliCloud.ApiGateway.GetApps.Invoke(new()
{
OutputFile = "outapps",
});
return new Dictionary<string, object?>
{
["firstAppId"] = dataApigatway.Apply(getAppsResult => getAppsResult.Apps[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.GetAppsArgs;
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 dataApigatway = ApigatewayFunctions.getApps(GetAppsArgs.builder()
.outputFile("outapps")
.build());
ctx.export("firstAppId", dataApigatway.applyValue(getAppsResult -> getAppsResult.apps()[0].id()));
}
}
variables:
dataApigatway:
fn::invoke:
Function: alicloud:apigateway:getApps
Arguments:
outputFile: outapps
outputs:
firstAppId: ${dataApigatway.apps[0].id}
Using getApps
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 getApps(args: GetAppsArgs, opts?: InvokeOptions): Promise<GetAppsResult>
function getAppsOutput(args: GetAppsOutputArgs, opts?: InvokeOptions): Output<GetAppsResult>
def get_apps(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetAppsResult
def get_apps_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAppsResult]
func GetApps(ctx *Context, args *GetAppsArgs, opts ...InvokeOption) (*GetAppsResult, error)
func GetAppsOutput(ctx *Context, args *GetAppsOutputArgs, opts ...InvokeOption) GetAppsResultOutput
> Note: This function is named GetApps
in the Go SDK.
public static class GetApps
{
public static Task<GetAppsResult> InvokeAsync(GetAppsArgs args, InvokeOptions? opts = null)
public static Output<GetAppsResult> Invoke(GetAppsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppsResult> getApps(GetAppsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:apigateway/getApps:getApps
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of app IDs.
- Name
Regex string - A regex string to filter apps by name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Ids []string
- A list of app IDs.
- Name
Regex string - A regex string to filter apps by name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - map[string]string
- A mapping of tags to assign to the resource.
- ids List<String>
- A list of app IDs.
- name
Regex String - A regex string to filter apps by name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - Map<String,String>
- A mapping of tags to assign to the resource.
- ids string[]
- A list of app IDs.
- name
Regex string - A regex string to filter apps by name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - {[key: string]: string}
- A mapping of tags to assign to the resource.
- ids Sequence[str]
- A list of app IDs.
- name_
regex str - A regex string to filter apps by name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - Mapping[str, str]
- A mapping of tags to assign to the resource.
- ids List<String>
- A list of app IDs.
- name
Regex String - A regex string to filter apps by name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - Map<String>
- A mapping of tags to assign to the resource.
getApps Result
The following output properties are available:
- Apps
List<Pulumi.
Ali Cloud. Api Gateway. Outputs. Get Apps App> - A list of apps. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of app IDs.
- Names List<string>
- A list of app names.
- Name
Regex string - Output
File string - Dictionary<string, string>
- Apps
[]Get
Apps App - A list of apps. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of app IDs.
- Names []string
- A list of app names.
- Name
Regex string - Output
File string - map[string]string
- apps
List<Get
Apps App> - A list of apps. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of app IDs.
- names List<String>
- A list of app names.
- name
Regex String - output
File String - Map<String,String>
- apps
Get
Apps App[] - A list of apps. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of app IDs.
- names string[]
- A list of app names.
- name
Regex string - output
File string - {[key: string]: string}
- apps
Sequence[Get
Apps App] - A list of apps. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of app IDs.
- names Sequence[str]
- A list of app names.
- name_
regex str - output_
file str - Mapping[str, str]
- apps List<Property Map>
- A list of apps. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of app IDs.
- names List<String>
- A list of app names.
- name
Regex String - output
File String - Map<String>
Supporting Types
GetAppsApp
- App
Code string - App code.
- Created
Time string - Creation time (Greenwich mean time).
- Description string
- App description.
- Id int
- App ID, which is generated by the system and globally unique.
- Modified
Time string - Last modification time (Greenwich mean time).
- Name string
- App name.
- App
Code string - App code.
- Created
Time string - Creation time (Greenwich mean time).
- Description string
- App description.
- Id int
- App ID, which is generated by the system and globally unique.
- Modified
Time string - Last modification time (Greenwich mean time).
- Name string
- App name.
- app
Code String - App code.
- created
Time String - Creation time (Greenwich mean time).
- description String
- App description.
- id Integer
- App ID, which is generated by the system and globally unique.
- modified
Time String - Last modification time (Greenwich mean time).
- name String
- App name.
- app
Code string - App code.
- created
Time string - Creation time (Greenwich mean time).
- description string
- App description.
- id number
- App ID, which is generated by the system and globally unique.
- modified
Time string - Last modification time (Greenwich mean time).
- name string
- App name.
- app_
code str - App code.
- created_
time str - Creation time (Greenwich mean time).
- description str
- App description.
- id int
- App ID, which is generated by the system and globally unique.
- modified_
time str - Last modification time (Greenwich mean time).
- name str
- App name.
- app
Code String - App code.
- created
Time String - Creation time (Greenwich mean time).
- description String
- App description.
- id Number
- App ID, which is generated by the system and globally unique.
- modified
Time String - Last modification time (Greenwich mean time).
- name String
- App name.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.