GetResourceGroups
This data source provides resource groups of the current Alibaba Cloud user.
NOTE: Available in v1.84.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(AliCloud.ResourceManager.GetResourceGroups.InvokeAsync(new AliCloud.ResourceManager.GetResourceGroupsArgs
{
NameRegex = "tftest",
}));
this.FirstResourceGroupId = example.Apply(example => example.Groups[0].Id);
}
[Output("firstResourceGroupId")]
public Output<string> FirstResourceGroupId { get; set; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.resourcemanager.get_resource_groups(name_regex="tftest")
pulumi.export("firstResourceGroupId", example.groups[0]["id"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = pulumi.output(alicloud.resourcemanager.getResourceGroups({
nameRegex: "tftest",
}, { async: true }));
export const firstResourceGroupId = example.groups[0].id;Using GetResourceGroups
function getResourceGroups(args: GetResourceGroupsArgs, opts?: InvokeOptions): Promise<GetResourceGroupsResult>function get_resource_groups(ids=None, name_regex=None, output_file=None, status=None, opts=None)func GetResourceGroups(ctx *Context, args *GetResourceGroupsArgs, opts ...InvokeOption) (*GetResourceGroupsResult, error)public static class GetResourceGroups {
public static Task<GetResourceGroupsResult> InvokeAsync(GetResourceGroupsArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Ids List<string>
A list of resource group IDs.
- Name
Regex string A regex string to filter results by resource group name.
- Output
File string - Status string
The status of the resource group. Possible values:
Creating,Deleted,OKandPendingDelete.
- ids List[str]
A list of resource group IDs.
- name_
regex str A regex string to filter results by resource group name.
- output_
file str - status str
The status of the resource group. Possible values:
Creating,Deleted,OKandPendingDelete.
GetResourceGroups Result
The following output properties are available:
- Groups
List<Pulumi.
Ali Cloud. Resource Manager. Outputs. Get Resource Groups Group> A list of resource groups. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of resource group IDs.
- Names List<string>
A list of resource group names.
- Name
Regex string - Output
File string - Status string
The status of the resource group. Possible values:
Creating,Deleted,OKandPendingDelete.
- Groups
[]Get
Resource Groups Group A list of resource groups. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of resource group IDs.
- Names []string
A list of resource group names.
- Name
Regex string - Output
File string - Status string
The status of the resource group. Possible values:
Creating,Deleted,OKandPendingDelete.
- groups
Get
Resource Groups Group[] A list of resource groups. Each element contains the following attributes:
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of resource group IDs.
- names string[]
A list of resource group names.
- name
Regex string - output
File string - status string
The status of the resource group. Possible values:
Creating,Deleted,OKandPendingDelete.
- groups
List[Get
Resource Groups Group] A list of resource groups. Each element contains the following attributes:
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of resource group IDs.
- names List[str]
A list of resource group names.
- name_
regex str - output_
file str - status str
The status of the resource group. Possible values:
Creating,Deleted,OKandPendingDelete.
Supporting Types
GetResourceGroupsGroup
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Account
Id string The ID of the Alibaba Cloud account to which the resource group belongs.
- Create
Date string The time when the resource group was created.
- Display
Name string The display name of the resource group.
- Id string
The ID of the resource group.
- Name string
The unique identifier of the resource group.
- Status string
The status of the resource group. Possible values:
Creating,Deleted,OKandPendingDelete.
- Account
Id string The ID of the Alibaba Cloud account to which the resource group belongs.
- Create
Date string The time when the resource group was created.
- Display
Name string The display name of the resource group.
- Id string
The ID of the resource group.
- Name string
The unique identifier of the resource group.
- Status string
The status of the resource group. Possible values:
Creating,Deleted,OKandPendingDelete.
- account
Id string The ID of the Alibaba Cloud account to which the resource group belongs.
- create
Date string The time when the resource group was created.
- display
Name string The display name of the resource group.
- id string
The ID of the resource group.
- name string
The unique identifier of the resource group.
- status string
The status of the resource group. Possible values:
Creating,Deleted,OKandPendingDelete.
- account_
id str The ID of the Alibaba Cloud account to which the resource group belongs.
- create_
date str The time when the resource group was created.
- display_
name str The display name of the resource group.
- id str
The ID of the resource group.
- name str
The unique identifier of the resource group.
- status str
The status of the resource group. Possible values:
Creating,Deleted,OKandPendingDelete.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.