CloudAMQP v3.24.0 published on Saturday, Aug 30, 2025 by Pulumi
cloudamqp.getCredentials
Start a Neo task
Explain and create a cloudamqp.getCredentials resource
Use this data source to retrieve information about the credentials of the configured user in
RabbitMQ. Information is extracted from cloudamqp_instance.instance.url.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudamqp from "@pulumi/cloudamqp";
const credentials = cloudamqp.getCredentials({
instanceId: instance.id,
});
import pulumi
import pulumi_cloudamqp as cloudamqp
credentials = cloudamqp.get_credentials(instance_id=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, &cloudamqp.GetCredentialsArgs{
InstanceId: instance.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using CloudAmqp = Pulumi.CloudAmqp;
return await Deployment.RunAsync(() =>
{
var credentials = CloudAmqp.GetCredentials.Invoke(new()
{
InstanceId = instance.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudamqp.CloudamqpFunctions;
import com.pulumi.cloudamqp.inputs.GetCredentialsArgs;
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 credentials = CloudamqpFunctions.getCredentials(GetCredentialsArgs.builder()
.instanceId(instance.id())
.build());
}
}
variables:
credentials:
fn::invoke:
function: cloudamqp:getCredentials
arguments:
instanceId: ${instance.id}
Dependency
This data source depends on CloudAMQP instance identifier, 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)
}public static CompletableFuture<GetCredentialsResult> getCredentials(GetCredentialsArgs args, InvokeOptions options)
public static Output<GetCredentialsResult> getCredentials(GetCredentialsArgs args, InvokeOptions options)
fn::invoke:
function: cloudamqp:index/getCredentials:getCredentials
arguments:
# arguments dictionaryThe following arguments are supported:
- Instance
Id int - The CloudAMQP instance identifier.
- Instance
Id int - The CloudAMQP instance identifier.
- instance
Id Integer - The CloudAMQP instance identifier.
- instance
Id number - The CloudAMQP instance identifier.
- instance_
id int - The CloudAMQP instance identifier.
- instance
Id Number - The CloudAMQP instance identifier.
getCredentials Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id int - Password string
- (Sensitive) The password used by the
username. - Username string
- (Sensitive) The username for the configured user in Rabbit MQ.
- Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Id int - Password string
- (Sensitive) The password used by the
username. - Username string
- (Sensitive) The username for the configured user in Rabbit MQ.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id Integer - password String
- (Sensitive) The password used by the
username. - username String
- (Sensitive) The username for the configured user in Rabbit MQ.
- id string
- The provider-assigned unique ID for this managed resource.
- instance
Id number - password string
- (Sensitive) The password used by the
username. - username string
- (Sensitive) The username for the configured user in Rabbit MQ.
- id str
- The provider-assigned unique ID for this managed resource.
- instance_
id int - password str
- (Sensitive) The password used by the
username. - username str
- (Sensitive) The username for the configured user in Rabbit MQ.
- id String
- The provider-assigned unique ID for this managed resource.
- instance
Id Number - password String
- (Sensitive) The password used by the
username. - username String
- (Sensitive) The username for the configured user in Rabbit MQ.
Package Details
- Repository
- CloudAMQP pulumi/pulumi-cloudamqp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudamqpTerraform Provider.
