1. Packages
  2. AWS Classic
  3. API Docs
  4. mq
  5. getBroker

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

aws.mq.getBroker

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi

    Provides information about a MQ Broker.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const config = new pulumi.Config();
    const brokerId = config.get("brokerId") || "";
    const brokerName = config.get("brokerName") || "";
    const byId = aws.mq.getBroker({
        brokerId: brokerId,
    });
    const byName = aws.mq.getBroker({
        brokerName: brokerName,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    config = pulumi.Config()
    broker_id = config.get("brokerId")
    if broker_id is None:
        broker_id = ""
    broker_name = config.get("brokerName")
    if broker_name is None:
        broker_name = ""
    by_id = aws.mq.get_broker(broker_id=broker_id)
    by_name = aws.mq.get_broker(broker_name=broker_name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/mq"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		brokerId := ""
    		if param := cfg.Get("brokerId"); param != "" {
    			brokerId = param
    		}
    		brokerName := ""
    		if param := cfg.Get("brokerName"); param != "" {
    			brokerName = param
    		}
    		_, err := mq.LookupBroker(ctx, &mq.LookupBrokerArgs{
    			BrokerId: pulumi.StringRef(brokerId),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = mq.LookupBroker(ctx, &mq.LookupBrokerArgs{
    			BrokerName: pulumi.StringRef(brokerName),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var brokerId = config.Get("brokerId") ?? "";
        var brokerName = config.Get("brokerName") ?? "";
        var byId = Aws.Mq.GetBroker.Invoke(new()
        {
            BrokerId = brokerId,
        });
    
        var byName = Aws.Mq.GetBroker.Invoke(new()
        {
            BrokerName = brokerName,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.mq.MqFunctions;
    import com.pulumi.aws.mq.inputs.GetBrokerArgs;
    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 config = ctx.config();
            final var brokerId = config.get("brokerId").orElse("");
            final var brokerName = config.get("brokerName").orElse("");
            final var byId = MqFunctions.getBroker(GetBrokerArgs.builder()
                .brokerId(brokerId)
                .build());
    
            final var byName = MqFunctions.getBroker(GetBrokerArgs.builder()
                .brokerName(brokerName)
                .build());
    
        }
    }
    
    configuration:
      brokerId:
        type: string
        default:
      brokerName:
        type: string
        default:
    variables:
      byId:
        fn::invoke:
          Function: aws:mq:getBroker
          Arguments:
            brokerId: ${brokerId}
      byName:
        fn::invoke:
          Function: aws:mq:getBroker
          Arguments:
            brokerName: ${brokerName}
    

    Using getBroker

    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 getBroker(args: GetBrokerArgs, opts?: InvokeOptions): Promise<GetBrokerResult>
    function getBrokerOutput(args: GetBrokerOutputArgs, opts?: InvokeOptions): Output<GetBrokerResult>
    def get_broker(broker_id: Optional[str] = None,
                   broker_name: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   opts: Optional[InvokeOptions] = None) -> GetBrokerResult
    def get_broker_output(broker_id: Optional[pulumi.Input[str]] = None,
                   broker_name: Optional[pulumi.Input[str]] = None,
                   tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetBrokerResult]
    func LookupBroker(ctx *Context, args *LookupBrokerArgs, opts ...InvokeOption) (*LookupBrokerResult, error)
    func LookupBrokerOutput(ctx *Context, args *LookupBrokerOutputArgs, opts ...InvokeOption) LookupBrokerResultOutput

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

    public static class GetBroker 
    {
        public static Task<GetBrokerResult> InvokeAsync(GetBrokerArgs args, InvokeOptions? opts = null)
        public static Output<GetBrokerResult> Invoke(GetBrokerInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBrokerResult> getBroker(GetBrokerArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:mq/getBroker:getBroker
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BrokerId string
    Unique id of the mq broker.
    BrokerName string
    Unique name of the mq broker.
    Tags Dictionary<string, string>
    BrokerId string
    Unique id of the mq broker.
    BrokerName string
    Unique name of the mq broker.
    Tags map[string]string
    brokerId String
    Unique id of the mq broker.
    brokerName String
    Unique name of the mq broker.
    tags Map<String,String>
    brokerId string
    Unique id of the mq broker.
    brokerName string
    Unique name of the mq broker.
    tags {[key: string]: string}
    broker_id str
    Unique id of the mq broker.
    broker_name str
    Unique name of the mq broker.
    tags Mapping[str, str]
    brokerId String
    Unique id of the mq broker.
    brokerName String
    Unique name of the mq broker.
    tags Map<String>

    getBroker Result

    The following output properties are available:

    Supporting Types

    GetBrokerConfiguration

    Id string
    Revision int
    Id string
    Revision int
    id String
    revision Integer
    id string
    revision number
    id str
    revision int
    id String
    revision Number

    GetBrokerEncryptionOption

    kmsKeyId String
    useAwsOwnedKey Boolean
    kmsKeyId string
    useAwsOwnedKey boolean
    kmsKeyId String
    useAwsOwnedKey Boolean

    GetBrokerInstance

    ConsoleUrl string
    Endpoints List<string>
    IpAddress string
    ConsoleUrl string
    Endpoints []string
    IpAddress string
    consoleUrl String
    endpoints List<String>
    ipAddress String
    consoleUrl string
    endpoints string[]
    ipAddress string
    console_url str
    endpoints Sequence[str]
    ip_address str
    consoleUrl String
    endpoints List<String>
    ipAddress String

    GetBrokerLdapServerMetadata

    GetBrokerLogs

    Audit bool
    General bool
    Audit bool
    General bool
    audit Boolean
    general Boolean
    audit boolean
    general boolean
    audit bool
    general bool
    audit Boolean
    general Boolean

    GetBrokerMaintenanceWindowStartTime

    DayOfWeek string
    TimeOfDay string
    TimeZone string
    DayOfWeek string
    TimeOfDay string
    TimeZone string
    dayOfWeek String
    timeOfDay String
    timeZone String
    dayOfWeek string
    timeOfDay string
    timeZone string
    dayOfWeek String
    timeOfDay String
    timeZone String

    GetBrokerUser

    ConsoleAccess bool
    Groups List<string>
    ReplicationUser bool
    Username string
    consoleAccess Boolean
    groups List<String>
    replicationUser Boolean
    username String
    consoleAccess boolean
    groups string[]
    replicationUser boolean
    username string
    consoleAccess Boolean
    groups List<String>
    replicationUser Boolean
    username String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.28.1 published on Thursday, Mar 28, 2024 by Pulumi