1. Packages
  2. Alicloud Provider
  3. API Docs
  4. amqp
  5. getStaticAccounts
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.amqp.getStaticAccounts

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    This data source provides Amqp Static Account available to the user.What is Static Account

    NOTE: Available in 1.195.0+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.amqp.getStaticAccounts({
        instanceId: "amqp-cn-0ju2y01zs001",
    });
    export const alicloudAmqpStaticAccountExampleId = _default.then(_default => _default.accounts?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.amqp.get_static_accounts(instance_id="amqp-cn-0ju2y01zs001")
    pulumi.export("alicloudAmqpStaticAccountExampleId", default.accounts[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/amqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := amqp.GetStaticAccounts(ctx, &amqp.GetStaticAccountsArgs{
    			InstanceId: pulumi.StringRef("amqp-cn-0ju2y01zs001"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("alicloudAmqpStaticAccountExampleId", _default.Accounts[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Amqp.GetStaticAccounts.Invoke(new()
        {
            InstanceId = "amqp-cn-0ju2y01zs001",
        });
    
        return new Dictionary<string, object?>
        {
            ["alicloudAmqpStaticAccountExampleId"] = @default.Apply(@default => @default.Apply(getStaticAccountsResult => getStaticAccountsResult.Accounts[0]?.Id)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.amqp.AmqpFunctions;
    import com.pulumi.alicloud.amqp.inputs.GetStaticAccountsArgs;
    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 default = AmqpFunctions.getStaticAccounts(GetStaticAccountsArgs.builder()
                .instanceId("amqp-cn-0ju2y01zs001")
                .build());
    
            ctx.export("alicloudAmqpStaticAccountExampleId", default_.accounts()[0].id());
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:amqp:getStaticAccounts
          Arguments:
            instanceId: amqp-cn-0ju2y01zs001
    outputs:
      alicloudAmqpStaticAccountExampleId: ${default.accounts[0].id}
    

    Using getStaticAccounts

    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 getStaticAccounts(args: GetStaticAccountsArgs, opts?: InvokeOptions): Promise<GetStaticAccountsResult>
    function getStaticAccountsOutput(args: GetStaticAccountsOutputArgs, opts?: InvokeOptions): Output<GetStaticAccountsResult>
    def get_static_accounts(ids: Optional[Sequence[str]] = None,
                            instance_id: Optional[str] = None,
                            output_file: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetStaticAccountsResult
    def get_static_accounts_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                            instance_id: Optional[pulumi.Input[str]] = None,
                            output_file: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetStaticAccountsResult]
    func GetStaticAccounts(ctx *Context, args *GetStaticAccountsArgs, opts ...InvokeOption) (*GetStaticAccountsResult, error)
    func GetStaticAccountsOutput(ctx *Context, args *GetStaticAccountsOutputArgs, opts ...InvokeOption) GetStaticAccountsResultOutput

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

    public static class GetStaticAccounts 
    {
        public static Task<GetStaticAccountsResult> InvokeAsync(GetStaticAccountsArgs args, InvokeOptions? opts = null)
        public static Output<GetStaticAccountsResult> Invoke(GetStaticAccountsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStaticAccountsResult> getStaticAccounts(GetStaticAccountsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:amqp/getStaticAccounts:getStaticAccounts
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    The key of the resource supplied above.The value is formulated as <instance_id>:<access_key>.
    InstanceId string
    InstanceId
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Ids []string
    The key of the resource supplied above.The value is formulated as <instance_id>:<access_key>.
    InstanceId string
    InstanceId
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    The key of the resource supplied above.The value is formulated as <instance_id>:<access_key>.
    instanceId String
    InstanceId
    outputFile String
    File name where to save data source results (after running pulumi preview).
    ids string[]
    The key of the resource supplied above.The value is formulated as <instance_id>:<access_key>.
    instanceId string
    InstanceId
    outputFile string
    File name where to save data source results (after running pulumi preview).
    ids Sequence[str]
    The key of the resource supplied above.The value is formulated as <instance_id>:<access_key>.
    instance_id str
    InstanceId
    output_file str
    File name where to save data source results (after running pulumi preview).
    ids List<String>
    The key of the resource supplied above.The value is formulated as <instance_id>:<access_key>.
    instanceId String
    InstanceId
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getStaticAccounts Result

    The following output properties are available:

    Accounts List<Pulumi.AliCloud.Amqp.Outputs.GetStaticAccountsAccount>
    A list of Static Account Entries. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    InstanceId string
    Amqp instance ID.
    OutputFile string
    Accounts []GetStaticAccountsAccount
    A list of Static Account Entries. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    InstanceId string
    Amqp instance ID.
    OutputFile string
    accounts List<GetStaticAccountsAccount>
    A list of Static Account Entries. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instanceId String
    Amqp instance ID.
    outputFile String
    accounts GetStaticAccountsAccount[]
    A list of Static Account Entries. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    instanceId string
    Amqp instance ID.
    outputFile string
    accounts Sequence[GetStaticAccountsAccount]
    A list of Static Account Entries. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    instance_id str
    Amqp instance ID.
    output_file str
    accounts List<Property Map>
    A list of Static Account Entries. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    instanceId String
    Amqp instance ID.
    outputFile String

    Supporting Types

    GetStaticAccountsAccount

    AccessKey string
    Access key.
    CreateTime string
    Create time stamp. Unix timestamp, to millisecond level.
    Id string
    The key of the resource supplied above.The value is formulated as <instance_id>:<access_key>.
    InstanceId string
    InstanceId
    MasterUid string
    The ID of the user's primary account.
    Password string
    Static password.
    UserName string
    Static username.
    AccessKey string
    Access key.
    CreateTime string
    Create time stamp. Unix timestamp, to millisecond level.
    Id string
    The key of the resource supplied above.The value is formulated as <instance_id>:<access_key>.
    InstanceId string
    InstanceId
    MasterUid string
    The ID of the user's primary account.
    Password string
    Static password.
    UserName string
    Static username.
    accessKey String
    Access key.
    createTime String
    Create time stamp. Unix timestamp, to millisecond level.
    id String
    The key of the resource supplied above.The value is formulated as <instance_id>:<access_key>.
    instanceId String
    InstanceId
    masterUid String
    The ID of the user's primary account.
    password String
    Static password.
    userName String
    Static username.
    accessKey string
    Access key.
    createTime string
    Create time stamp. Unix timestamp, to millisecond level.
    id string
    The key of the resource supplied above.The value is formulated as <instance_id>:<access_key>.
    instanceId string
    InstanceId
    masterUid string
    The ID of the user's primary account.
    password string
    Static password.
    userName string
    Static username.
    access_key str
    Access key.
    create_time str
    Create time stamp. Unix timestamp, to millisecond level.
    id str
    The key of the resource supplied above.The value is formulated as <instance_id>:<access_key>.
    instance_id str
    InstanceId
    master_uid str
    The ID of the user's primary account.
    password str
    Static password.
    user_name str
    Static username.
    accessKey String
    Access key.
    createTime String
    Create time stamp. Unix timestamp, to millisecond level.
    id String
    The key of the resource supplied above.The value is formulated as <instance_id>:<access_key>.
    instanceId String
    InstanceId
    masterUid String
    The ID of the user's primary account.
    password String
    Static password.
    userName String
    Static username.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi