get Container Groups
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.Apply(getContainerGroupsResult => getContainerGroupsResult.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
A collection of arguments for invoking getContainerGroups.
Return
A collection of values returned by getContainerGroups.
Parameters
The name of ContainerGroup.
Default to false
. Set it to true
can output more details about resource attributes.
A list of Container Group IDs.
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.
A regex string to filter results by Container Group name.
File name where to save data source results (after running pulumi preview
).
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.
The status list. For more information, see the description of ContainerGroup arrays.
The ID of the vSwitch. Currently, container groups can only be deployed in VPC networks.
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
Builder for com.pulumi.alicloud.eci.kotlin.inputs.GetContainerGroupsPlainArgs.