Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.adb.getResourceGroups
Explore with Pulumi AI
This data source provides Adb Resource Group available to the user.What is Resource Group
NOTE: Available since v1.195.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const default = alicloud.adb.getResourceGroups({
dbClusterId: "am-bp1a16357gty69185",
groupName: "TESTOPENAPI",
});
export const alicloudAdbResourceGroupExampleId = _default.then(_default => _default.groups?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.adb.get_resource_groups(db_cluster_id="am-bp1a16357gty69185",
group_name="TESTOPENAPI")
pulumi.export("alicloudAdbResourceGroupExampleId", default.groups[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/adb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := adb.GetResourceGroups(ctx, &adb.GetResourceGroupsArgs{
DbClusterId: "am-bp1a16357gty69185",
GroupName: pulumi.StringRef("TESTOPENAPI"),
}, nil)
if err != nil {
return err
}
ctx.Export("alicloudAdbResourceGroupExampleId", _default.Groups[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Adb.GetResourceGroups.Invoke(new()
{
DbClusterId = "am-bp1a16357gty69185",
GroupName = "TESTOPENAPI",
});
return new Dictionary<string, object?>
{
["alicloudAdbResourceGroupExampleId"] = @default.Apply(@default => @default.Apply(getResourceGroupsResult => getResourceGroupsResult.Groups[0]?.Id)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.adb.AdbFunctions;
import com.pulumi.alicloud.adb.inputs.GetResourceGroupsArgs;
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 default = AdbFunctions.getResourceGroups(GetResourceGroupsArgs.builder()
.dbClusterId("am-bp1a16357gty69185")
.groupName("TESTOPENAPI")
.build());
ctx.export("alicloudAdbResourceGroupExampleId", default_.groups()[0].id());
}
}
variables:
default:
fn::invoke:
Function: alicloud:adb:getResourceGroups
Arguments:
dbClusterId: am-bp1a16357gty69185
groupName: TESTOPENAPI
outputs:
alicloudAdbResourceGroupExampleId: ${default.groups[0].id}
Using getResourceGroups
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 getResourceGroups(args: GetResourceGroupsArgs, opts?: InvokeOptions): Promise<GetResourceGroupsResult>
function getResourceGroupsOutput(args: GetResourceGroupsOutputArgs, opts?: InvokeOptions): Output<GetResourceGroupsResult>
def get_resource_groups(db_cluster_id: Optional[str] = None,
group_name: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetResourceGroupsResult
def get_resource_groups_output(db_cluster_id: Optional[pulumi.Input[str]] = None,
group_name: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetResourceGroupsResult]
func GetResourceGroups(ctx *Context, args *GetResourceGroupsArgs, opts ...InvokeOption) (*GetResourceGroupsResult, error)
func GetResourceGroupsOutput(ctx *Context, args *GetResourceGroupsOutputArgs, opts ...InvokeOption) GetResourceGroupsResultOutput
> Note: This function is named GetResourceGroups
in the Go SDK.
public static class GetResourceGroups
{
public static Task<GetResourceGroupsResult> InvokeAsync(GetResourceGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetResourceGroupsResult> Invoke(GetResourceGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetResourceGroupsResult> getResourceGroups(GetResourceGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:adb/getResourceGroups:getResourceGroups
arguments:
# arguments dictionary
The following arguments are supported:
- Db
Cluster stringId - DBClusterId
- Group
Name string - The name of the resource pool, which cannot exceed 64 bytes in length.
- Ids List<string>
- A list of AnalyticDB for MySQL (ADB) Resource Group IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Db
Cluster stringId - DBClusterId
- Group
Name string - The name of the resource pool, which cannot exceed 64 bytes in length.
- Ids []string
- A list of AnalyticDB for MySQL (ADB) Resource Group IDs.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- db
Cluster StringId - DBClusterId
- group
Name String - The name of the resource pool, which cannot exceed 64 bytes in length.
- ids List<String>
- A list of AnalyticDB for MySQL (ADB) Resource Group IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- db
Cluster stringId - DBClusterId
- group
Name string - The name of the resource pool, which cannot exceed 64 bytes in length.
- ids string[]
- A list of AnalyticDB for MySQL (ADB) Resource Group IDs.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- db_
cluster_ strid - DBClusterId
- group_
name str - The name of the resource pool, which cannot exceed 64 bytes in length.
- ids Sequence[str]
- A list of AnalyticDB for MySQL (ADB) Resource Group IDs.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- db
Cluster StringId - DBClusterId
- group
Name String - The name of the resource pool, which cannot exceed 64 bytes in length.
- ids List<String>
- A list of AnalyticDB for MySQL (ADB) Resource Group IDs.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getResourceGroups Result
The following output properties are available:
- Db
Cluster stringId - DB cluster id.
- Groups
List<Pulumi.
Ali Cloud. Adb. Outputs. Get Resource Groups Group> - A list of Resource Group Entries. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Group
Name string - The name of the resource pool.
- Output
File string
- Db
Cluster stringId - DB cluster id.
- Groups
[]Get
Resource Groups Group - A list of Resource Group Entries. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Group
Name string - The name of the resource pool.
- Output
File string
- db
Cluster StringId - DB cluster id.
- groups
List<Get
Resource Groups Group> - A list of Resource Group Entries. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- group
Name String - The name of the resource pool.
- output
File String
- db
Cluster stringId - DB cluster id.
- groups
Get
Resource Groups Group[] - A list of Resource Group Entries. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- group
Name string - The name of the resource pool.
- output
File string
- db_
cluster_ strid - DB cluster id.
- groups
Sequence[Get
Resource Groups Group] - A list of Resource Group Entries. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- group_
name str - The name of the resource pool.
- output_
file str
- db
Cluster StringId - DB cluster id.
- groups List<Property Map>
- A list of Resource Group Entries. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- group
Name String - The name of the resource pool.
- output
File String
Supporting Types
GetResourceGroupsGroup
- Create
Time string - Creation time.
- Db
Cluster stringId - DBClusterId
- Group
Name string - The name of the resource pool, which cannot exceed 64 bytes in length.
- Group
Type string - Query type, value description:
- etl: Batch query mode.
- interactive: interactive Query mode
- default_type: the default query mode.
- Id string
- The
key
of the resource supplied above.The value is formulated as<db_cluster_id>:<group_name>
. - Node
Num int - The number of nodes. The default number of nodes is 0. The number of nodes must be less than or equal to the number of nodes whose resource name is USER_DEFAULT.
- User string
- Binding User.
- Create
Time string - Creation time.
- Db
Cluster stringId - DBClusterId
- Group
Name string - The name of the resource pool, which cannot exceed 64 bytes in length.
- Group
Type string - Query type, value description:
- etl: Batch query mode.
- interactive: interactive Query mode
- default_type: the default query mode.
- Id string
- The
key
of the resource supplied above.The value is formulated as<db_cluster_id>:<group_name>
. - Node
Num int - The number of nodes. The default number of nodes is 0. The number of nodes must be less than or equal to the number of nodes whose resource name is USER_DEFAULT.
- User string
- Binding User.
- create
Time String - Creation time.
- db
Cluster StringId - DBClusterId
- group
Name String - The name of the resource pool, which cannot exceed 64 bytes in length.
- group
Type String - Query type, value description:
- etl: Batch query mode.
- interactive: interactive Query mode
- default_type: the default query mode.
- id String
- The
key
of the resource supplied above.The value is formulated as<db_cluster_id>:<group_name>
. - node
Num Integer - The number of nodes. The default number of nodes is 0. The number of nodes must be less than or equal to the number of nodes whose resource name is USER_DEFAULT.
- user String
- Binding User.
- create
Time string - Creation time.
- db
Cluster stringId - DBClusterId
- group
Name string - The name of the resource pool, which cannot exceed 64 bytes in length.
- group
Type string - Query type, value description:
- etl: Batch query mode.
- interactive: interactive Query mode
- default_type: the default query mode.
- id string
- The
key
of the resource supplied above.The value is formulated as<db_cluster_id>:<group_name>
. - node
Num number - The number of nodes. The default number of nodes is 0. The number of nodes must be less than or equal to the number of nodes whose resource name is USER_DEFAULT.
- user string
- Binding User.
- create_
time str - Creation time.
- db_
cluster_ strid - DBClusterId
- group_
name str - The name of the resource pool, which cannot exceed 64 bytes in length.
- group_
type str - Query type, value description:
- etl: Batch query mode.
- interactive: interactive Query mode
- default_type: the default query mode.
- id str
- The
key
of the resource supplied above.The value is formulated as<db_cluster_id>:<group_name>
. - node_
num int - The number of nodes. The default number of nodes is 0. The number of nodes must be less than or equal to the number of nodes whose resource name is USER_DEFAULT.
- user str
- Binding User.
- create
Time String - Creation time.
- db
Cluster StringId - DBClusterId
- group
Name String - The name of the resource pool, which cannot exceed 64 bytes in length.
- group
Type String - Query type, value description:
- etl: Batch query mode.
- interactive: interactive Query mode
- default_type: the default query mode.
- id String
- The
key
of the resource supplied above.The value is formulated as<db_cluster_id>:<group_name>
. - node
Num Number - The number of nodes. The default number of nodes is 0. The number of nodes must be less than or equal to the number of nodes whose resource name is USER_DEFAULT.
- user String
- Binding User.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.