Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
This data source provides the Amqp Instances of the current Alibaba Cloud user.
NOTE: Available since v1.128.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = new alicloud.amqp.Instance("default", {
instanceName: name,
instanceType: "enterprise",
maxTps: "3000",
maxConnections: 2000,
queueCapacity: "200",
paymentType: "Subscription",
renewalStatus: "AutoRenewal",
renewalDuration: 1,
renewalDurationUnit: "Year",
supportEip: true,
});
const ids = alicloud.amqp.getInstancesOutput({
ids: [_default.id],
});
export const amqpInstanceId0 = ids.apply(ids => ids.instances?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.amqp.Instance("default",
instance_name=name,
instance_type="enterprise",
max_tps="3000",
max_connections=2000,
queue_capacity="200",
payment_type="Subscription",
renewal_status="AutoRenewal",
renewal_duration=1,
renewal_duration_unit="Year",
support_eip=True)
ids = alicloud.amqp.get_instances_output(ids=[default.id])
pulumi.export("amqpInstanceId0", ids.instances[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/amqp"
"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 := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := amqp.NewInstance(ctx, "default", &amqp.InstanceArgs{
InstanceName: pulumi.String(name),
InstanceType: pulumi.String("enterprise"),
MaxTps: pulumi.String("3000"),
MaxConnections: pulumi.Int(2000),
QueueCapacity: pulumi.String("200"),
PaymentType: pulumi.String("Subscription"),
RenewalStatus: pulumi.String("AutoRenewal"),
RenewalDuration: pulumi.Int(1),
RenewalDurationUnit: pulumi.String("Year"),
SupportEip: pulumi.Bool(true),
})
if err != nil {
return err
}
ids := amqp.GetInstancesOutput(ctx, amqp.GetInstancesOutputArgs{
Ids: pulumi.StringArray{
_default.ID(),
},
}, nil)
ctx.Export("amqpInstanceId0", ids.ApplyT(func(ids amqp.GetInstancesResult) (*string, error) {
return &ids.Instances[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = new AliCloud.Amqp.Instance("default", new()
{
InstanceName = name,
InstanceType = "enterprise",
MaxTps = "3000",
MaxConnections = 2000,
QueueCapacity = "200",
PaymentType = "Subscription",
RenewalStatus = "AutoRenewal",
RenewalDuration = 1,
RenewalDurationUnit = "Year",
SupportEip = true,
});
var ids = AliCloud.Amqp.GetInstances.Invoke(new()
{
Ids = new[]
{
@default.Id,
},
});
return new Dictionary<string, object?>
{
["amqpInstanceId0"] = ids.Apply(getInstancesResult => getInstancesResult.Instances[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.amqp.Instance;
import com.pulumi.alicloud.amqp.InstanceArgs;
import com.pulumi.alicloud.amqp.AmqpFunctions;
import com.pulumi.alicloud.amqp.inputs.GetInstancesArgs;
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("terraform-example");
var default_ = new Instance("default", InstanceArgs.builder()
.instanceName(name)
.instanceType("enterprise")
.maxTps("3000")
.maxConnections(2000)
.queueCapacity("200")
.paymentType("Subscription")
.renewalStatus("AutoRenewal")
.renewalDuration(1)
.renewalDurationUnit("Year")
.supportEip(true)
.build());
final var ids = AmqpFunctions.getInstances(GetInstancesArgs.builder()
.ids(default_.id())
.build());
ctx.export("amqpInstanceId0", ids.applyValue(_ids -> _ids.instances()[0].id()));
}
}
configuration:
name:
type: string
default: terraform-example
resources:
default:
type: alicloud:amqp:Instance
properties:
instanceName: ${name}
instanceType: enterprise
maxTps: 3000
maxConnections: 2000
queueCapacity: 200
paymentType: Subscription
renewalStatus: AutoRenewal
renewalDuration: 1
renewalDurationUnit: Year
supportEip: true
variables:
ids:
fn::invoke:
function: alicloud:amqp:getInstances
arguments:
ids:
- ${default.id}
outputs:
amqpInstanceId0: ${ids.instances[0].id}
Using getInstances
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 getInstances(args: GetInstancesArgs, opts?: InvokeOptions): Promise<GetInstancesResult>
function getInstancesOutput(args: GetInstancesOutputArgs, opts?: InvokeOptions): Output<GetInstancesResult>def get_instances(enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstancesResult
def get_instances_output(enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstancesResult]func GetInstances(ctx *Context, args *GetInstancesArgs, opts ...InvokeOption) (*GetInstancesResult, error)
func GetInstancesOutput(ctx *Context, args *GetInstancesOutputArgs, opts ...InvokeOption) GetInstancesResultOutput> Note: This function is named GetInstances in the Go SDK.
public static class GetInstances
{
public static Task<GetInstancesResult> InvokeAsync(GetInstancesArgs args, InvokeOptions? opts = null)
public static Output<GetInstancesResult> Invoke(GetInstancesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
public static Output<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:amqp/getInstances:getInstances
arguments:
# arguments dictionaryThe following arguments are supported:
- Enable
Details bool - Whether to query the detailed list of resource attributes. Default value:
false. - Ids List<string>
- A list of Instance IDs.
- Name
Regex string - A regex string to filter results by Instance name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- The status of the resource. Valid values:
DEPLOYING,SERVING,EXPIRED,RELEASED.
- Enable
Details bool - Whether to query the detailed list of resource attributes. Default value:
false. - Ids []string
- A list of Instance IDs.
- Name
Regex string - A regex string to filter results by Instance name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- The status of the resource. Valid values:
DEPLOYING,SERVING,EXPIRED,RELEASED.
- enable
Details Boolean - Whether to query the detailed list of resource attributes. Default value:
false. - ids List<String>
- A list of Instance IDs.
- name
Regex String - A regex string to filter results by Instance name.
- output
File String - File name where to save data source results (after running
pulumi preview). - status String
- The status of the resource. Valid values:
DEPLOYING,SERVING,EXPIRED,RELEASED.
- enable
Details boolean - Whether to query the detailed list of resource attributes. Default value:
false. - ids string[]
- A list of Instance IDs.
- name
Regex string - A regex string to filter results by Instance name.
- output
File string - File name where to save data source results (after running
pulumi preview). - status string
- The status of the resource. Valid values:
DEPLOYING,SERVING,EXPIRED,RELEASED.
- enable_
details bool - Whether to query the detailed list of resource attributes. Default value:
false. - ids Sequence[str]
- A list of Instance IDs.
- name_
regex str - A regex string to filter results by Instance name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - status str
- The status of the resource. Valid values:
DEPLOYING,SERVING,EXPIRED,RELEASED.
- enable
Details Boolean - Whether to query the detailed list of resource attributes. Default value:
false. - ids List<String>
- A list of Instance IDs.
- name
Regex String - A regex string to filter results by Instance name.
- output
File String - File name where to save data source results (after running
pulumi preview). - status String
- The status of the resource. Valid values:
DEPLOYING,SERVING,EXPIRED,RELEASED.
getInstances Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Instances
List<Pulumi.
Ali Cloud. Amqp. Outputs. Get Instances Instance> - A list of Amqp Instances. Each element contains the following attributes:
- Names List<string>
- A list of Instance names.
- Enable
Details bool - Name
Regex string - Output
File string - Status string
- The status of the instance.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Instances
[]Get
Instances Instance - A list of Amqp Instances. Each element contains the following attributes:
- Names []string
- A list of Instance names.
- Enable
Details bool - Name
Regex string - Output
File string - Status string
- The status of the instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instances
List<Get
Instances Instance> - A list of Amqp Instances. Each element contains the following attributes:
- names List<String>
- A list of Instance names.
- enable
Details Boolean - name
Regex String - output
File String - status String
- The status of the instance.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- instances
Get
Instances Instance[] - A list of Amqp Instances. Each element contains the following attributes:
- names string[]
- A list of Instance names.
- enable
Details boolean - name
Regex string - output
File string - status string
- The status of the instance.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- instances
Sequence[Get
Instances Instance] - A list of Amqp Instances. Each element contains the following attributes:
- names Sequence[str]
- A list of Instance names.
- enable_
details bool - name_
regex str - output_
file str - status str
- The status of the instance.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instances List<Property Map>
- A list of Amqp Instances. Each element contains the following attributes:
- names List<String>
- A list of Instance names.
- enable
Details Boolean - name
Regex String - output
File String - status String
- The status of the instance.
Supporting Types
GetInstancesInstance
- Create
Time string - The timestamp that indicates when the order was created.
- Expire
Time string - The timestamp that indicates when the instance expires.
- Id string
- The ID of the Instance.
- Instance
Id string - THe instance Id.
- Instance
Name string - THe instance name.
- Instance
Type string - The instance type.
- Payment
Type string - The billing method of the instance. Note:
payment_typetakes effect only ifenable_detailsis set totrue. - Private
End stringPoint - The virtual private cloud (VPC) endpoint of the instance.
- Public
Endpoint string - The public endpoint of the instance.
- Renewal
Duration int - Auto renewal period of an instance. Note:
renewal_durationtakes effect only ifenable_detailsis set totrue. - Renewal
Duration stringUnit - Automatic renewal period unit. Note:
renewal_duration_unittakes effect only ifenable_detailsis set totrue. - Renewal
Status string - Whether to renew an instance automatically or not. Note:
renewal_statustakes effect only ifenable_detailsis set totrue. - Status string
- The status of the resource. Valid values:
DEPLOYING,SERVING,EXPIRED,RELEASED. - Support
Eip bool - Indicates whether the instance supports elastic IP addresses (EIPs).
- Create
Time string - The timestamp that indicates when the order was created.
- Expire
Time string - The timestamp that indicates when the instance expires.
- Id string
- The ID of the Instance.
- Instance
Id string - THe instance Id.
- Instance
Name string - THe instance name.
- Instance
Type string - The instance type.
- Payment
Type string - The billing method of the instance. Note:
payment_typetakes effect only ifenable_detailsis set totrue. - Private
End stringPoint - The virtual private cloud (VPC) endpoint of the instance.
- Public
Endpoint string - The public endpoint of the instance.
- Renewal
Duration int - Auto renewal period of an instance. Note:
renewal_durationtakes effect only ifenable_detailsis set totrue. - Renewal
Duration stringUnit - Automatic renewal period unit. Note:
renewal_duration_unittakes effect only ifenable_detailsis set totrue. - Renewal
Status string - Whether to renew an instance automatically or not. Note:
renewal_statustakes effect only ifenable_detailsis set totrue. - Status string
- The status of the resource. Valid values:
DEPLOYING,SERVING,EXPIRED,RELEASED. - Support
Eip bool - Indicates whether the instance supports elastic IP addresses (EIPs).
- create
Time String - The timestamp that indicates when the order was created.
- expire
Time String - The timestamp that indicates when the instance expires.
- id String
- The ID of the Instance.
- instance
Id String - THe instance Id.
- instance
Name String - THe instance name.
- instance
Type String - The instance type.
- payment
Type String - The billing method of the instance. Note:
payment_typetakes effect only ifenable_detailsis set totrue. - private
End StringPoint - The virtual private cloud (VPC) endpoint of the instance.
- public
Endpoint String - The public endpoint of the instance.
- renewal
Duration Integer - Auto renewal period of an instance. Note:
renewal_durationtakes effect only ifenable_detailsis set totrue. - renewal
Duration StringUnit - Automatic renewal period unit. Note:
renewal_duration_unittakes effect only ifenable_detailsis set totrue. - renewal
Status String - Whether to renew an instance automatically or not. Note:
renewal_statustakes effect only ifenable_detailsis set totrue. - status String
- The status of the resource. Valid values:
DEPLOYING,SERVING,EXPIRED,RELEASED. - support
Eip Boolean - Indicates whether the instance supports elastic IP addresses (EIPs).
- create
Time string - The timestamp that indicates when the order was created.
- expire
Time string - The timestamp that indicates when the instance expires.
- id string
- The ID of the Instance.
- instance
Id string - THe instance Id.
- instance
Name string - THe instance name.
- instance
Type string - The instance type.
- payment
Type string - The billing method of the instance. Note:
payment_typetakes effect only ifenable_detailsis set totrue. - private
End stringPoint - The virtual private cloud (VPC) endpoint of the instance.
- public
Endpoint string - The public endpoint of the instance.
- renewal
Duration number - Auto renewal period of an instance. Note:
renewal_durationtakes effect only ifenable_detailsis set totrue. - renewal
Duration stringUnit - Automatic renewal period unit. Note:
renewal_duration_unittakes effect only ifenable_detailsis set totrue. - renewal
Status string - Whether to renew an instance automatically or not. Note:
renewal_statustakes effect only ifenable_detailsis set totrue. - status string
- The status of the resource. Valid values:
DEPLOYING,SERVING,EXPIRED,RELEASED. - support
Eip boolean - Indicates whether the instance supports elastic IP addresses (EIPs).
- create_
time str - The timestamp that indicates when the order was created.
- expire_
time str - The timestamp that indicates when the instance expires.
- id str
- The ID of the Instance.
- instance_
id str - THe instance Id.
- instance_
name str - THe instance name.
- instance_
type str - The instance type.
- payment_
type str - The billing method of the instance. Note:
payment_typetakes effect only ifenable_detailsis set totrue. - private_
end_ strpoint - The virtual private cloud (VPC) endpoint of the instance.
- public_
endpoint str - The public endpoint of the instance.
- renewal_
duration int - Auto renewal period of an instance. Note:
renewal_durationtakes effect only ifenable_detailsis set totrue. - renewal_
duration_ strunit - Automatic renewal period unit. Note:
renewal_duration_unittakes effect only ifenable_detailsis set totrue. - renewal_
status str - Whether to renew an instance automatically or not. Note:
renewal_statustakes effect only ifenable_detailsis set totrue. - status str
- The status of the resource. Valid values:
DEPLOYING,SERVING,EXPIRED,RELEASED. - support_
eip bool - Indicates whether the instance supports elastic IP addresses (EIPs).
- create
Time String - The timestamp that indicates when the order was created.
- expire
Time String - The timestamp that indicates when the instance expires.
- id String
- The ID of the Instance.
- instance
Id String - THe instance Id.
- instance
Name String - THe instance name.
- instance
Type String - The instance type.
- payment
Type String - The billing method of the instance. Note:
payment_typetakes effect only ifenable_detailsis set totrue. - private
End StringPoint - The virtual private cloud (VPC) endpoint of the instance.
- public
Endpoint String - The public endpoint of the instance.
- renewal
Duration Number - Auto renewal period of an instance. Note:
renewal_durationtakes effect only ifenable_detailsis set totrue. - renewal
Duration StringUnit - Automatic renewal period unit. Note:
renewal_duration_unittakes effect only ifenable_detailsis set totrue. - renewal
Status String - Whether to renew an instance automatically or not. Note:
renewal_statustakes effect only ifenable_detailsis set totrue. - status String
- The status of the resource. Valid values:
DEPLOYING,SERVING,EXPIRED,RELEASED. - support
Eip Boolean - Indicates whether the instance supports elastic IP addresses (EIPs).
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
