Alibaba Cloud v3.65.0 published on Monday, Nov 4, 2024 by Pulumi
alicloud.dfs.getAccessGroups
Explore with Pulumi AI
This data source provides the Apsara File Storage for HDFS Access Groups of the current Alibaba Cloud user.
NOTE: Available in v1.133.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.dfs.getAccessGroups({
ids: ["example_id"],
});
export const dfsAccessGroupId1 = ids.then(ids => ids.groups?.[0]?.id);
const nameRegex = alicloud.dfs.getAccessGroups({
nameRegex: "^my-AccessGroup",
});
export const dfsAccessGroupId2 = nameRegex.then(nameRegex => nameRegex.groups?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.dfs.get_access_groups(ids=["example_id"])
pulumi.export("dfsAccessGroupId1", ids.groups[0].id)
name_regex = alicloud.dfs.get_access_groups(name_regex="^my-AccessGroup")
pulumi.export("dfsAccessGroupId2", name_regex.groups[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dfs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := dfs.GetAccessGroups(ctx, &dfs.GetAccessGroupsArgs{
Ids: []string{
"example_id",
},
}, nil)
if err != nil {
return err
}
ctx.Export("dfsAccessGroupId1", ids.Groups[0].Id)
nameRegex, err := dfs.GetAccessGroups(ctx, &dfs.GetAccessGroupsArgs{
NameRegex: pulumi.StringRef("^my-AccessGroup"),
}, nil)
if err != nil {
return err
}
ctx.Export("dfsAccessGroupId2", nameRegex.Groups[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Dfs.GetAccessGroups.Invoke(new()
{
Ids = new[]
{
"example_id",
},
});
var nameRegex = AliCloud.Dfs.GetAccessGroups.Invoke(new()
{
NameRegex = "^my-AccessGroup",
});
return new Dictionary<string, object?>
{
["dfsAccessGroupId1"] = ids.Apply(getAccessGroupsResult => getAccessGroupsResult.Groups[0]?.Id),
["dfsAccessGroupId2"] = nameRegex.Apply(getAccessGroupsResult => getAccessGroupsResult.Groups[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dfs.DfsFunctions;
import com.pulumi.alicloud.dfs.inputs.GetAccessGroupsArgs;
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 ids = DfsFunctions.getAccessGroups(GetAccessGroupsArgs.builder()
.ids("example_id")
.build());
ctx.export("dfsAccessGroupId1", ids.applyValue(getAccessGroupsResult -> getAccessGroupsResult.groups()[0].id()));
final var nameRegex = DfsFunctions.getAccessGroups(GetAccessGroupsArgs.builder()
.nameRegex("^my-AccessGroup")
.build());
ctx.export("dfsAccessGroupId2", nameRegex.applyValue(getAccessGroupsResult -> getAccessGroupsResult.groups()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:dfs:getAccessGroups
Arguments:
ids:
- example_id
nameRegex:
fn::invoke:
Function: alicloud:dfs:getAccessGroups
Arguments:
nameRegex: ^my-AccessGroup
outputs:
dfsAccessGroupId1: ${ids.groups[0].id}
dfsAccessGroupId2: ${nameRegex.groups[0].id}
Using getAccessGroups
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 getAccessGroups(args: GetAccessGroupsArgs, opts?: InvokeOptions): Promise<GetAccessGroupsResult>
function getAccessGroupsOutput(args: GetAccessGroupsOutputArgs, opts?: InvokeOptions): Output<GetAccessGroupsResult>
def get_access_groups(ids: Optional[Sequence[str]] = None,
limit: Optional[int] = None,
name_regex: Optional[str] = None,
order_by: Optional[str] = None,
order_type: Optional[str] = None,
output_file: Optional[str] = None,
start_offset: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetAccessGroupsResult
def get_access_groups_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
limit: Optional[pulumi.Input[int]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
order_by: Optional[pulumi.Input[str]] = None,
order_type: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
start_offset: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAccessGroupsResult]
func GetAccessGroups(ctx *Context, args *GetAccessGroupsArgs, opts ...InvokeOption) (*GetAccessGroupsResult, error)
func GetAccessGroupsOutput(ctx *Context, args *GetAccessGroupsOutputArgs, opts ...InvokeOption) GetAccessGroupsResultOutput
> Note: This function is named GetAccessGroups
in the Go SDK.
public static class GetAccessGroups
{
public static Task<GetAccessGroupsResult> InvokeAsync(GetAccessGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetAccessGroupsResult> Invoke(GetAccessGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccessGroupsResult> getAccessGroups(GetAccessGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:dfs/getAccessGroups:getAccessGroups
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Access Group IDs.
- Limit int
- Name
Regex string - A regex string to filter results by Access Group name.
- Order
By string - Order
Type string - Output
File string - File name where to save data source results (after running
pulumi preview
). - Start
Offset int
- Ids []string
- A list of Access Group IDs.
- Limit int
- Name
Regex string - A regex string to filter results by Access Group name.
- Order
By string - Order
Type string - Output
File string - File name where to save data source results (after running
pulumi preview
). - Start
Offset int
- ids List<String>
- A list of Access Group IDs.
- limit Integer
- name
Regex String - A regex string to filter results by Access Group name.
- order
By String - order
Type String - output
File String - File name where to save data source results (after running
pulumi preview
). - start
Offset Integer
- ids string[]
- A list of Access Group IDs.
- limit number
- name
Regex string - A regex string to filter results by Access Group name.
- order
By string - order
Type string - output
File string - File name where to save data source results (after running
pulumi preview
). - start
Offset number
- ids Sequence[str]
- A list of Access Group IDs.
- limit int
- name_
regex str - A regex string to filter results by Access Group name.
- order_
by str - order_
type str - output_
file str - File name where to save data source results (after running
pulumi preview
). - start_
offset int
- ids List<String>
- A list of Access Group IDs.
- limit Number
- name
Regex String - A regex string to filter results by Access Group name.
- order
By String - order
Type String - output
File String - File name where to save data source results (after running
pulumi preview
). - start
Offset Number
getAccessGroups Result
The following output properties are available:
- Groups
List<Pulumi.
Ali Cloud. Dfs. Outputs. Get Access Groups Group> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Limit int
- Name
Regex string - Order
By string - Order
Type string - Output
File string - Start
Offset int
- Groups
[]Get
Access Groups Group - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Limit int
- Name
Regex string - Order
By string - Order
Type string - Output
File string - Start
Offset int
- groups
List<Get
Access Groups Group> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- limit Integer
- name
Regex String - order
By String - order
Type String - output
File String - start
Offset Integer
- groups
Get
Access Groups Group[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- limit number
- name
Regex string - order
By string - order
Type string - output
File string - start
Offset number
- groups
Sequence[Get
Access Groups Group] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- limit int
- name_
regex str - order_
by str - order_
type str - output_
file str - start_
offset int
- groups List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- limit Number
- name
Regex String - order
By String - order
Type String - output
File String - start
Offset Number
Supporting Types
GetAccessGroupsGroup
- Access
Group stringId - The length of
description
does not exceed 100 bytes. - Access
Group stringName - The Name of Access Group. The length Of
access_group_name
does not exceed 100 bytes. - Create
Time string - The CreateTime of Access Group.
- Description string
- The Description of Access Group. The length Of
description
does not exceed 100 bytes. - Id string
- The ID of the Access Group.
- Mount
Point intCount - The Number of attached mountpoint.
- Network
Type string - The NetworkType of Access Group. Valid values:
VPC
. - Rule
Count int - The Number of access rule.
- Access
Group stringId - The length of
description
does not exceed 100 bytes. - Access
Group stringName - The Name of Access Group. The length Of
access_group_name
does not exceed 100 bytes. - Create
Time string - The CreateTime of Access Group.
- Description string
- The Description of Access Group. The length Of
description
does not exceed 100 bytes. - Id string
- The ID of the Access Group.
- Mount
Point intCount - The Number of attached mountpoint.
- Network
Type string - The NetworkType of Access Group. Valid values:
VPC
. - Rule
Count int - The Number of access rule.
- access
Group StringId - The length of
description
does not exceed 100 bytes. - access
Group StringName - The Name of Access Group. The length Of
access_group_name
does not exceed 100 bytes. - create
Time String - The CreateTime of Access Group.
- description String
- The Description of Access Group. The length Of
description
does not exceed 100 bytes. - id String
- The ID of the Access Group.
- mount
Point IntegerCount - The Number of attached mountpoint.
- network
Type String - The NetworkType of Access Group. Valid values:
VPC
. - rule
Count Integer - The Number of access rule.
- access
Group stringId - The length of
description
does not exceed 100 bytes. - access
Group stringName - The Name of Access Group. The length Of
access_group_name
does not exceed 100 bytes. - create
Time string - The CreateTime of Access Group.
- description string
- The Description of Access Group. The length Of
description
does not exceed 100 bytes. - id string
- The ID of the Access Group.
- mount
Point numberCount - The Number of attached mountpoint.
- network
Type string - The NetworkType of Access Group. Valid values:
VPC
. - rule
Count number - The Number of access rule.
- access_
group_ strid - The length of
description
does not exceed 100 bytes. - access_
group_ strname - The Name of Access Group. The length Of
access_group_name
does not exceed 100 bytes. - create_
time str - The CreateTime of Access Group.
- description str
- The Description of Access Group. The length Of
description
does not exceed 100 bytes. - id str
- The ID of the Access Group.
- mount_
point_ intcount - The Number of attached mountpoint.
- network_
type str - The NetworkType of Access Group. Valid values:
VPC
. - rule_
count int - The Number of access rule.
- access
Group StringId - The length of
description
does not exceed 100 bytes. - access
Group StringName - The Name of Access Group. The length Of
access_group_name
does not exceed 100 bytes. - create
Time String - The CreateTime of Access Group.
- description String
- The Description of Access Group. The length Of
description
does not exceed 100 bytes. - id String
- The ID of the Access Group.
- mount
Point NumberCount - The Number of attached mountpoint.
- network
Type String - The NetworkType of Access Group. Valid values:
VPC
. - rule
Count Number - The Number of access rule.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.