getContainerGroups

This data source provides the Eci Container Groups of the current Alibaba Cloud user.

NOTE: Available in v1.111.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.eci.getContainerGroups({
ids: ["example_value"],
});
export const firstEciContainerGroupId = example.then(example => example.groups?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.eci.get_container_groups(ids=["example_value"])
pulumi.export("firstEciContainerGroupId", example.groups[0].id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.Eci.GetContainerGroups.Invoke(new()
{
Ids = new[]
{
"example_value",
},
});
return new Dictionary<string, object?>
{
["firstEciContainerGroupId"] = example&#46;Apply(getContainerGroupsResult => getContainerGroupsResult&#46;Groups[0]?.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eci"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := eci.GetContainerGroups(ctx, &eci.GetContainerGroupsArgs{
Ids: []string{
"example_value",
},
}, nil)
if err != nil {
return err
}
ctx.Export("firstEciContainerGroupId", example.Groups[0].Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.eci.EciFunctions;
import com.pulumi.alicloud.eci.inputs.GetContainerGroupsArgs;
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 example = EciFunctions.getContainerGroups(GetContainerGroupsArgs.builder()
.ids("example_value")
.build());
ctx.export("firstEciContainerGroupId", example.groups()[0].id());
}
}
variables:
example:
fn::invoke:
function: alicloud:eci:getContainerGroups
arguments:
ids:
- example_value
outputs:
firstEciContainerGroupId: ${example.groups[0].id}

Return

A collection of values returned by getContainerGroups.

Parameters

argument

A collection of arguments for invoking getContainerGroups.


suspend fun getContainerGroups(containerGroupName: String? = null, enableDetails: Boolean? = null, ids: List<String>? = null, limit: Int? = null, nameRegex: String? = null, outputFile: String? = null, resourceGroupId: String? = null, status: String? = null, tags: Map<String, String>? = null, vswitchId: String? = null, withEvent: Boolean? = null, zoneId: String? = null): GetContainerGroupsResult

Return

A collection of values returned by getContainerGroups.

Parameters

containerGroupName

The name of ContainerGroup.

enableDetails

Default to false. Set it to true can output more details about resource attributes.

ids

A list of Container Group IDs.

limit

The maximum number of resources returned in the response. Default value is 20. Maximum value: 20. The number of returned results is no greater than the specified number.

nameRegex

A regex string to filter results by Container Group name.

outputFile

File name where to save data source results (after running pulumi preview).

resourceGroupId

The ID of the resource group to which the container group belongs. If you have not specified a resource group for the container group, it is added to the default resource group.

status

The status list. For more information, see the description of ContainerGroup arrays.

tags
vswitchId

The ID of the vSwitch. Currently, container groups can only be deployed in VPC networks.

withEvent
zoneId

The ID of the zone where you want to deploy the container group. If no value is specified, the system assigns a zone to the container group. By default, no value is specified.

See also


Return

A collection of values returned by getContainerGroups.

Parameters

argument

Builder for com.pulumi.alicloud.eci.kotlin.inputs.GetContainerGroupsPlainArgs.

See also