getCredentials

Use this data source to retrieve information about the credentials of the configured user in Rabbit MQ. Information is extracted from cloudamqp_instance.instance.url.

Argument reference

  • instance_id - (Required) The CloudAMQP instance identifier.

Attributes reference

All attributes reference are computed.

  • id - The identifier for this data source.
  • username - (Sensitive) The username for the configured user in Rabbit MQ.
  • password - (Sensitive) The password used by the username.

Dependency

This data source depends on CloudAMQP instance identifier, cloudamqp_instance.instance.id.

Example Usage

using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;

class MyStack : Stack
{
    public MyStack()
    {
        var credentials = Output.Create(CloudAmqp.GetCredentials.InvokeAsync(new CloudAmqp.GetCredentialsArgs
        {
            InstanceId = cloudamqp_instance.Instance.Id,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudamqp.GetCredentials(ctx, &GetCredentialsArgs{
			InstanceId: cloudamqp_instance.Instance.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_cloudamqp as cloudamqp

credentials = cloudamqp.get_credentials(instance_id=cloudamqp_instance["instance"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";

const credentials = cloudamqp.getCredentials({
    instanceId: cloudamqp_instance.instance.id,
});

Using getCredentials

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 getCredentials(args: GetCredentialsArgs, opts?: InvokeOptions): Promise<GetCredentialsResult>
function getCredentialsOutput(args: GetCredentialsOutputArgs, opts?: InvokeOptions): Output<GetCredentialsResult>
def get_credentials(instance_id: Optional[int] = None,
                    opts: Optional[InvokeOptions] = None) -> GetCredentialsResult
def get_credentials_output(instance_id: Optional[pulumi.Input[int]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetCredentialsResult]
func GetCredentials(ctx *Context, args *GetCredentialsArgs, opts ...InvokeOption) (*GetCredentialsResult, error)
func GetCredentialsOutput(ctx *Context, args *GetCredentialsOutputArgs, opts ...InvokeOption) GetCredentialsResultOutput

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

public static class GetCredentials 
{
    public static Task<GetCredentialsResult> InvokeAsync(GetCredentialsArgs args, InvokeOptions? opts = null)
    public static Output<GetCredentialsResult> Invoke(GetCredentialsInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

instanceId number

getCredentials Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
InstanceId int
Password string
Username string
Id string
The provider-assigned unique ID for this managed resource.
InstanceId int
Password string
Username string
id string
The provider-assigned unique ID for this managed resource.
instanceId number
password string
username string
id str
The provider-assigned unique ID for this managed resource.
instance_id int
password str
username str

Package Details

Repository
https://github.com/pulumi/pulumi-cloudamqp
License
Apache-2.0
Notes
This Pulumi package is based on the cloudamqp Terraform Provider.