1. Packages
  2. Cloudamqp Provider
  3. API Docs
  4. getCredentials
CloudAMQP v3.20.2 published on Tuesday, Oct 29, 2024 by Pulumi

cloudamqp.getCredentials

Explore with Pulumi AI

cloudamqp logo
CloudAMQP v3.20.2 published on Tuesday, Oct 29, 2024 by Pulumi

    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.

    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}
    

    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.

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: cloudamqp:index/getCredentials:getCredentials
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId int
    The CloudAMQP instance identifier.
    InstanceId int
    The CloudAMQP instance identifier.
    instanceId Integer
    The CloudAMQP instance identifier.
    instanceId number
    The CloudAMQP instance identifier.
    instance_id int
    The CloudAMQP instance identifier.
    instanceId Number
    The CloudAMQP instance identifier.

    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 Integer
    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
    id String
    The provider-assigned unique ID for this managed resource.
    instanceId Number
    password String
    username String

    Package Details

    Repository
    CloudAMQP pulumi/pulumi-cloudamqp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudamqp Terraform Provider.
    cloudamqp logo
    CloudAMQP v3.20.2 published on Tuesday, Oct 29, 2024 by Pulumi