Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.27.0 published on Monday, Aug 8, 2022 by Pulumi

getAppGroups

This data source provides the Open Search App Groups of the current Alibaba Cloud user.

NOTE: Available in v1.136.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf_testacc";
        var defaultAppGroup = new AliCloud.OpenSearch.AppGroup("defaultAppGroup", new AliCloud.OpenSearch.AppGroupArgs
        {
            AppGroupName = name,
            PaymentType = "PayAsYouGo",
            Type = "standard",
            Quota = new AliCloud.OpenSearch.Inputs.AppGroupQuotaArgs
            {
                DocSize = 1,
                ComputeResource = 20,
                Spec = "opensearch.share.common",
            },
        });
        var defaultAppGroups = AliCloud.OpenSearch.GetAppGroups.Invoke(new AliCloud.OpenSearch.GetAppGroupsInvokeArgs
        {
            Ids = 
            {
                defaultAppGroup.Id,
            },
        });
        this.AppGroups = defaultAppGroups.Apply(defaultAppGroups => defaultAppGroups.Groups);
    }

    [Output("appGroups")]
    public Output<string> AppGroups { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/opensearch"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "tf_testacc"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		defaultAppGroup, err := opensearch.NewAppGroup(ctx, "defaultAppGroup", &opensearch.AppGroupArgs{
			AppGroupName: pulumi.String(name),
			PaymentType:  pulumi.String("PayAsYouGo"),
			Type:         pulumi.String("standard"),
			Quota: &opensearch.AppGroupQuotaArgs{
				DocSize:         pulumi.Int(1),
				ComputeResource: pulumi.Int(20),
				Spec:            pulumi.String("opensearch.share.common"),
			},
		})
		if err != nil {
			return err
		}
		defaultAppGroups := opensearch.GetAppGroupsOutput(ctx, opensearch.GetAppGroupsOutputArgs{
			Ids: pulumi.StringArray{
				defaultAppGroup.ID(),
			},
		}, nil)
		ctx.Export("appGroups", defaultAppGroups.ApplyT(func(defaultAppGroups opensearch.GetAppGroupsResult) ([]opensearch.GetAppGroupsGroup, error) {
			return defaultAppGroups.Groups, nil
		}).([]opensearch.GetAppGroupsGroupOutput))
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.opensearch.AppGroup;
import com.pulumi.alicloud.opensearch.AppGroupArgs;
import com.pulumi.alicloud.opensearch.inputs.AppGroupQuotaArgs;
import com.pulumi.alicloud.opensearch.OpensearchFunctions;
import com.pulumi.alicloud.opensearch.inputs.GetAppGroupsArgs;
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 config = ctx.config();
        final var name = config.get("name").orElse("tf_testacc");
        var defaultAppGroup = new AppGroup("defaultAppGroup", AppGroupArgs.builder()        
            .appGroupName(name)
            .paymentType("PayAsYouGo")
            .type("standard")
            .quota(AppGroupQuotaArgs.builder()
                .docSize(1)
                .computeResource(20)
                .spec("opensearch.share.common")
                .build())
            .build());

        final var defaultAppGroups = OpensearchFunctions.getAppGroups(GetAppGroupsArgs.builder()
            .ids(defaultAppGroup.id())
            .build());

        ctx.export("appGroups", defaultAppGroups.applyValue(getAppGroupsResult -> getAppGroupsResult).applyValue(defaultAppGroups -> defaultAppGroups.applyValue(getAppGroupsResult -> getAppGroupsResult.groups())));
    }
}
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "tf_testacc"
default_app_group = alicloud.opensearch.AppGroup("defaultAppGroup",
    app_group_name=name,
    payment_type="PayAsYouGo",
    type="standard",
    quota=alicloud.opensearch.AppGroupQuotaArgs(
        doc_size=1,
        compute_resource=20,
        spec="opensearch.share.common",
    ))
default_app_groups = alicloud.opensearch.get_app_groups_output(ids=[default_app_group.id])
pulumi.export("appGroups", default_app_groups.groups)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "tf_testacc";
const defaultAppGroup = new alicloud.opensearch.AppGroup("defaultAppGroup", {
    appGroupName: name,
    paymentType: "PayAsYouGo",
    type: "standard",
    quota: {
        docSize: 1,
        computeResource: 20,
        spec: "opensearch.share.common",
    },
});
const defaultAppGroups = alicloud.opensearch.getAppGroupsOutput({
    ids: [defaultAppGroup.id],
});
export const appGroups = defaultAppGroups.apply(defaultAppGroups => defaultAppGroups.groups);
configuration:
  name:
    type: string
    default: tf_testacc
resources:
  defaultAppGroup:
    type: alicloud:opensearch:AppGroup
    properties:
      appGroupName: ${name}
      paymentType: PayAsYouGo
      type: standard
      quota:
        docSize: 1
        computeResource: 20
        spec: opensearch.share.common
variables:
  defaultAppGroups:
    Fn::Invoke:
      Function: alicloud:opensearch:getAppGroups
      Arguments:
        ids:
          - ${defaultAppGroup.id}
outputs:
  appGroups: ${defaultAppGroups.groups}

Using getAppGroups

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 getAppGroups(args: GetAppGroupsArgs, opts?: InvokeOptions): Promise<GetAppGroupsResult>
function getAppGroupsOutput(args: GetAppGroupsOutputArgs, opts?: InvokeOptions): Output<GetAppGroupsResult>
def get_app_groups(enable_details: Optional[bool] = None,
                   ids: Optional[Sequence[str]] = None,
                   instance_id: Optional[str] = None,
                   name: Optional[str] = None,
                   name_regex: Optional[str] = None,
                   output_file: Optional[str] = None,
                   resource_group_id: Optional[str] = None,
                   type: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetAppGroupsResult
def get_app_groups_output(enable_details: Optional[pulumi.Input[bool]] = None,
                   ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                   instance_id: Optional[pulumi.Input[str]] = None,
                   name: Optional[pulumi.Input[str]] = None,
                   name_regex: Optional[pulumi.Input[str]] = None,
                   output_file: Optional[pulumi.Input[str]] = None,
                   resource_group_id: Optional[pulumi.Input[str]] = None,
                   type: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetAppGroupsResult]
func GetAppGroups(ctx *Context, args *GetAppGroupsArgs, opts ...InvokeOption) (*GetAppGroupsResult, error)
func GetAppGroupsOutput(ctx *Context, args *GetAppGroupsOutputArgs, opts ...InvokeOption) GetAppGroupsResultOutput

> Note: This function is named GetAppGroups in the Go SDK.

public static class GetAppGroups 
{
    public static Task<GetAppGroupsResult> InvokeAsync(GetAppGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetAppGroupsResult> Invoke(GetAppGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAppGroupsResult> getAppGroups(GetAppGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: alicloud:opensearch/getAppGroups:getAppGroups
  Arguments:
    # Arguments dictionary

The following arguments are supported:

EnableDetails bool

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

Ids List<string>

A list of App Group IDs. Its element value is same as App Group Name.

InstanceId string

The Instance ID.

Name string
NameRegex string

A regex string to filter results by App Group name.

OutputFile string
ResourceGroupId string

The Resource Group ID.

Type string

Application type. Valid Values: standard, enhanced.

EnableDetails bool

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

Ids []string

A list of App Group IDs. Its element value is same as App Group Name.

InstanceId string

The Instance ID.

Name string
NameRegex string

A regex string to filter results by App Group name.

OutputFile string
ResourceGroupId string

The Resource Group ID.

Type string

Application type. Valid Values: standard, enhanced.

enableDetails Boolean

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

ids List<String>

A list of App Group IDs. Its element value is same as App Group Name.

instanceId String

The Instance ID.

name String
nameRegex String

A regex string to filter results by App Group name.

outputFile String
resourceGroupId String

The Resource Group ID.

type String

Application type. Valid Values: standard, enhanced.

enableDetails boolean

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

ids string[]

A list of App Group IDs. Its element value is same as App Group Name.

instanceId string

The Instance ID.

name string
nameRegex string

A regex string to filter results by App Group name.

outputFile string
resourceGroupId string

The Resource Group ID.

type string

Application type. Valid Values: standard, enhanced.

enable_details bool

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

ids Sequence[str]

A list of App Group IDs. Its element value is same as App Group Name.

instance_id str

The Instance ID.

name str
name_regex str

A regex string to filter results by App Group name.

output_file str
resource_group_id str

The Resource Group ID.

type str

Application type. Valid Values: standard, enhanced.

enableDetails Boolean

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

ids List<String>

A list of App Group IDs. Its element value is same as App Group Name.

instanceId String

The Instance ID.

name String
nameRegex String

A regex string to filter results by App Group name.

outputFile String
resourceGroupId String

The Resource Group ID.

type String

Application type. Valid Values: standard, enhanced.

getAppGroups Result

The following output properties are available:

Groups List<Pulumi.AliCloud.OpenSearch.Outputs.GetAppGroupsGroup>
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>
EnableDetails bool
InstanceId string
Name string
NameRegex string
OutputFile string
ResourceGroupId string
Type string
Groups []GetAppGroupsGroup
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string
EnableDetails bool
InstanceId string
Name string
NameRegex string
OutputFile string
ResourceGroupId string
Type string
groups List<GetAppGroupsGroup>
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
enableDetails Boolean
instanceId String
name String
nameRegex String
outputFile String
resourceGroupId String
type String
groups GetAppGroupsGroup[]
id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]
enableDetails boolean
instanceId string
name string
nameRegex string
outputFile string
resourceGroupId string
type string
groups Sequence[GetAppGroupsGroup]
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
names Sequence[str]
enable_details bool
instance_id str
name str
name_regex str
output_file str
resource_group_id str
type str
groups List<Property Map>
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
enableDetails Boolean
instanceId String
name String
nameRegex String
outputFile String
resourceGroupId String
type String

Supporting Types

GetAppGroupsGroup

AppGroupId string

The ID of the App Group.

AppGroupName string

Application Group Name.

ChargeWay int

Billing model. Valid values:compute_resource and qps.

CommodityCode string

The commodity code.

CreateTime int

The time of creation.

CurrentVersion string

The version of Application Group Name.

Description string

The description of the resource.

Domain string

Domain name.

ExpireOn string

Expiration Time.

FirstRankAlgoDeploymentId int

Coarse deployment ID.

HasPendingQuotaReviewTask int

Whether the quota status is under approval. Valid status:

  • 0: normal
  • 1: Approving.
Id string
InstanceId string

The Instance ID.

LockMode string

Locked state. Valid status: Unlock,LockByExpiration,ManualLock.

LockedByExpiration int

Instance is automatically locked after expiration.

PaymentType string

The billing method of the resource. Valid values: Subscription and PayAsYouGo.

PendingSecondRankAlgoDeploymentId int

Refine deployment ID in deployment.

ProcessingOrderId string

Unfinished order number.

Produced int

Whether the production is completed. Valid values:

  • 0: producing.
  • 1: completed.
ProjectId string

The Project ID.

Quotas List<Pulumi.AliCloud.OpenSearch.Inputs.GetAppGroupsGroupQuota>

Quota information.

ResourceGroupId string

The Resource Group ID.

SecondRankAlgoDeploymentId int

Refine deployment ID.

Status string

The status of the resource. Valid values: producing,review_pending,config_pending,normal,frozen.

SwitchedTime int

The Switched time.

Type string

Application type. Valid Values: standard, enhanced.

AppGroupId string

The ID of the App Group.

AppGroupName string

Application Group Name.

ChargeWay int

Billing model. Valid values:compute_resource and qps.

CommodityCode string

The commodity code.

CreateTime int

The time of creation.

CurrentVersion string

The version of Application Group Name.

Description string

The description of the resource.

Domain string

Domain name.

ExpireOn string

Expiration Time.

FirstRankAlgoDeploymentId int

Coarse deployment ID.

HasPendingQuotaReviewTask int

Whether the quota status is under approval. Valid status:

  • 0: normal
  • 1: Approving.
Id string
InstanceId string

The Instance ID.

LockMode string

Locked state. Valid status: Unlock,LockByExpiration,ManualLock.

LockedByExpiration int

Instance is automatically locked after expiration.

PaymentType string

The billing method of the resource. Valid values: Subscription and PayAsYouGo.

PendingSecondRankAlgoDeploymentId int

Refine deployment ID in deployment.

ProcessingOrderId string

Unfinished order number.

Produced int

Whether the production is completed. Valid values:

  • 0: producing.
  • 1: completed.
ProjectId string

The Project ID.

Quotas []GetAppGroupsGroupQuota

Quota information.

ResourceGroupId string

The Resource Group ID.

SecondRankAlgoDeploymentId int

Refine deployment ID.

Status string

The status of the resource. Valid values: producing,review_pending,config_pending,normal,frozen.

SwitchedTime int

The Switched time.

Type string

Application type. Valid Values: standard, enhanced.

appGroupId String

The ID of the App Group.

appGroupName String

Application Group Name.

chargeWay Integer

Billing model. Valid values:compute_resource and qps.

commodityCode String

The commodity code.

createTime Integer

The time of creation.

currentVersion String

The version of Application Group Name.

description String

The description of the resource.

domain String

Domain name.

expireOn String

Expiration Time.

firstRankAlgoDeploymentId Integer

Coarse deployment ID.

hasPendingQuotaReviewTask Integer

Whether the quota status is under approval. Valid status:

  • 0: normal
  • 1: Approving.
id String
instanceId String

The Instance ID.

lockMode String

Locked state. Valid status: Unlock,LockByExpiration,ManualLock.

lockedByExpiration Integer

Instance is automatically locked after expiration.

paymentType String

The billing method of the resource. Valid values: Subscription and PayAsYouGo.

pendingSecondRankAlgoDeploymentId Integer

Refine deployment ID in deployment.

processingOrderId String

Unfinished order number.

produced Integer

Whether the production is completed. Valid values:

  • 0: producing.
  • 1: completed.
projectId String

The Project ID.

quotas List<GetAppGroupsGroupQuota>

Quota information.

resourceGroupId String

The Resource Group ID.

secondRankAlgoDeploymentId Integer

Refine deployment ID.

status String

The status of the resource. Valid values: producing,review_pending,config_pending,normal,frozen.

switchedTime Integer

The Switched time.

type String

Application type. Valid Values: standard, enhanced.

appGroupId string

The ID of the App Group.

appGroupName string

Application Group Name.

chargeWay number

Billing model. Valid values:compute_resource and qps.

commodityCode string

The commodity code.

createTime number

The time of creation.

currentVersion string

The version of Application Group Name.

description string

The description of the resource.

domain string

Domain name.

expireOn string

Expiration Time.

firstRankAlgoDeploymentId number

Coarse deployment ID.

hasPendingQuotaReviewTask number

Whether the quota status is under approval. Valid status:

  • 0: normal
  • 1: Approving.
id string
instanceId string

The Instance ID.

lockMode string

Locked state. Valid status: Unlock,LockByExpiration,ManualLock.

lockedByExpiration number

Instance is automatically locked after expiration.

paymentType string

The billing method of the resource. Valid values: Subscription and PayAsYouGo.

pendingSecondRankAlgoDeploymentId number

Refine deployment ID in deployment.

processingOrderId string

Unfinished order number.

produced number

Whether the production is completed. Valid values:

  • 0: producing.
  • 1: completed.
projectId string

The Project ID.

quotas GetAppGroupsGroupQuota[]

Quota information.

resourceGroupId string

The Resource Group ID.

secondRankAlgoDeploymentId number

Refine deployment ID.

status string

The status of the resource. Valid values: producing,review_pending,config_pending,normal,frozen.

switchedTime number

The Switched time.

type string

Application type. Valid Values: standard, enhanced.

app_group_id str

The ID of the App Group.

app_group_name str

Application Group Name.

charge_way int

Billing model. Valid values:compute_resource and qps.

commodity_code str

The commodity code.

create_time int

The time of creation.

current_version str

The version of Application Group Name.

description str

The description of the resource.

domain str

Domain name.

expire_on str

Expiration Time.

first_rank_algo_deployment_id int

Coarse deployment ID.

has_pending_quota_review_task int

Whether the quota status is under approval. Valid status:

  • 0: normal
  • 1: Approving.
id str
instance_id str

The Instance ID.

lock_mode str

Locked state. Valid status: Unlock,LockByExpiration,ManualLock.

locked_by_expiration int

Instance is automatically locked after expiration.

payment_type str

The billing method of the resource. Valid values: Subscription and PayAsYouGo.

pending_second_rank_algo_deployment_id int

Refine deployment ID in deployment.

processing_order_id str

Unfinished order number.

produced int

Whether the production is completed. Valid values:

  • 0: producing.
  • 1: completed.
project_id str

The Project ID.

quotas Sequence[GetAppGroupsGroupQuota]

Quota information.

resource_group_id str

The Resource Group ID.

second_rank_algo_deployment_id int

Refine deployment ID.

status str

The status of the resource. Valid values: producing,review_pending,config_pending,normal,frozen.

switched_time int

The Switched time.

type str

Application type. Valid Values: standard, enhanced.

appGroupId String

The ID of the App Group.

appGroupName String

Application Group Name.

chargeWay Number

Billing model. Valid values:compute_resource and qps.

commodityCode String

The commodity code.

createTime Number

The time of creation.

currentVersion String

The version of Application Group Name.

description String

The description of the resource.

domain String

Domain name.

expireOn String

Expiration Time.

firstRankAlgoDeploymentId Number

Coarse deployment ID.

hasPendingQuotaReviewTask Number

Whether the quota status is under approval. Valid status:

  • 0: normal
  • 1: Approving.
id String
instanceId String

The Instance ID.

lockMode String

Locked state. Valid status: Unlock,LockByExpiration,ManualLock.

lockedByExpiration Number

Instance is automatically locked after expiration.

paymentType String

The billing method of the resource. Valid values: Subscription and PayAsYouGo.

pendingSecondRankAlgoDeploymentId Number

Refine deployment ID in deployment.

processingOrderId String

Unfinished order number.

produced Number

Whether the production is completed. Valid values:

  • 0: producing.
  • 1: completed.
projectId String

The Project ID.

quotas List<Property Map>

Quota information.

resourceGroupId String

The Resource Group ID.

secondRankAlgoDeploymentId Number

Refine deployment ID.

status String

The status of the resource. Valid values: producing,review_pending,config_pending,normal,frozen.

switchedTime Number

The Switched time.

type String

Application type. Valid Values: standard, enhanced.

GetAppGroupsGroupQuota

ComputeResource string

Computing resources. Unit: LCU.

DocSize string

Storage Size. Unit: GB.

Spec string

Specification. Valid values:

  • opensearch.share.junior: Entry-level.
  • opensearch.share.common: Shared universal.
  • opensearch.share.compute: Shared computing.
  • opensearch.share.storage: Shared storage type.
  • opensearch.private.common: Exclusive universal type.
  • opensearch.private.compute: Exclusive computing type.
  • opensearch.private.storage: Exclusive storage type
ComputeResource string

Computing resources. Unit: LCU.

DocSize string

Storage Size. Unit: GB.

Spec string

Specification. Valid values:

  • opensearch.share.junior: Entry-level.
  • opensearch.share.common: Shared universal.
  • opensearch.share.compute: Shared computing.
  • opensearch.share.storage: Shared storage type.
  • opensearch.private.common: Exclusive universal type.
  • opensearch.private.compute: Exclusive computing type.
  • opensearch.private.storage: Exclusive storage type
computeResource String

Computing resources. Unit: LCU.

docSize String

Storage Size. Unit: GB.

spec String

Specification. Valid values:

  • opensearch.share.junior: Entry-level.
  • opensearch.share.common: Shared universal.
  • opensearch.share.compute: Shared computing.
  • opensearch.share.storage: Shared storage type.
  • opensearch.private.common: Exclusive universal type.
  • opensearch.private.compute: Exclusive computing type.
  • opensearch.private.storage: Exclusive storage type
computeResource string

Computing resources. Unit: LCU.

docSize string

Storage Size. Unit: GB.

spec string

Specification. Valid values:

  • opensearch.share.junior: Entry-level.
  • opensearch.share.common: Shared universal.
  • opensearch.share.compute: Shared computing.
  • opensearch.share.storage: Shared storage type.
  • opensearch.private.common: Exclusive universal type.
  • opensearch.private.compute: Exclusive computing type.
  • opensearch.private.storage: Exclusive storage type
compute_resource str

Computing resources. Unit: LCU.

doc_size str

Storage Size. Unit: GB.

spec str

Specification. Valid values:

  • opensearch.share.junior: Entry-level.
  • opensearch.share.common: Shared universal.
  • opensearch.share.compute: Shared computing.
  • opensearch.share.storage: Shared storage type.
  • opensearch.private.common: Exclusive universal type.
  • opensearch.private.compute: Exclusive computing type.
  • opensearch.private.storage: Exclusive storage type
computeResource String

Computing resources. Unit: LCU.

docSize String

Storage Size. Unit: GB.

spec String

Specification. Valid values:

  • opensearch.share.junior: Entry-level.
  • opensearch.share.common: Shared universal.
  • opensearch.share.compute: Shared computing.
  • opensearch.share.storage: Shared storage type.
  • opensearch.private.common: Exclusive universal type.
  • opensearch.private.compute: Exclusive computing type.
  • opensearch.private.storage: Exclusive storage type

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.