cloudamqp logo
CloudAMQP v3.12.1, Mar 15 23

cloudamqp.getAccount

Use this data source to retrieve basic information about all instances available for an account. Uses the included apikey in provider configuration, to determine which account to read from.

Attributes reference

All attributes reference are computed

  • id - The identifier for this data source. Set to na since there is no unique identifier.
  • instances - An array of instances. Each instances block consists of the fields documented below.

The instances block consist of

  • id - The instance identifier.
  • name - The name of the instance.
  • plan - The subscription plan used for the instance.
  • region - The region were the instanece is located in.
  • tags - Optional tags set for the instance.

Dependency

This data source depends on apikey set in the provider configuration.

Example Usage

Can be used in other resources/data sources when instance identifier is unknown, while other attributes are known. E.g. find correct instance from

using System.Collections.Generic;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;

return await Deployment.RunAsync(() => 
{
    var instanceName = "<instance_name>";

    var instanceList = CloudAmqp.GetAccount.Invoke();

    return new Dictionary<string, object?>
    {
        ["instanceId"] = <nil>,
    };
});

Coming soon!

package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudamqp.CloudamqpFunctions;
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 instanceName = "<instance_name>";

        final var instanceList = CloudamqpFunctions.getAccount();

        ctx.export("instanceId", <nil>);
    }
}
import pulumi
import pulumi_cloudamqp as cloudamqp

instance_name = "<instance_name>"
instance_list = cloudamqp.get_account()
pulumi.export("instanceId", <nil>)
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";

const instanceName = "<instance_name>";
const instanceList = cloudamqp.getAccount({});
export const instanceId = <nil>;

Coming soon!

Using getAccount

function getAccount(opts?: InvokeOptions): Promise<GetAccountResult>
def get_account(opts: Optional[InvokeOptions] = None) -> GetAccountResult
func GetAccount(ctx *Context, opts ...InvokeOption) (*GetAccountResult, error)

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

public static class GetAccount 
{
    public static Task<GetAccountResult> InvokeAsync(InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccountResult> getAccount(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: cloudamqp:index/getAccount:getAccount
  arguments:
    # arguments dictionary

getAccount Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Instances List<Pulumi.CloudAmqp.Outputs.GetAccountInstance>
Id string

The provider-assigned unique ID for this managed resource.

Instances []GetAccountInstance
id String

The provider-assigned unique ID for this managed resource.

instances List<GetAccountInstance>
id string

The provider-assigned unique ID for this managed resource.

instances GetAccountInstance[]
id str

The provider-assigned unique ID for this managed resource.

instances Sequence[GetAccountInstance]
id String

The provider-assigned unique ID for this managed resource.

instances List<Property Map>

Supporting Types

GetAccountInstance

Id int
Name string
Plan string
Region string
Tags List<string>
Id int
Name string
Plan string
Region string
Tags []string
id Integer
name String
plan String
region String
tags List<String>
id number
name string
plan string
region string
tags string[]
id int
name str
plan str
region str
tags Sequence[str]
id Number
name String
plan String
region String
tags List<String>

Package Details

Repository
CloudAMQP pulumi/pulumi-cloudamqp
License
Apache-2.0
Notes

This Pulumi package is based on the cloudamqp Terraform Provider.