Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

AWS Classic

v4.25.0 published on Friday, Oct 15, 2021 by Pulumi

getBroker

Provides information about a MQ Broker.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var brokerId = config.Get("brokerId") ?? "";
        var brokerName = config.Get("brokerName") ?? "";
        var byId = Output.Create(Aws.Mq.GetBroker.InvokeAsync(new Aws.Mq.GetBrokerArgs
        {
            BrokerId = brokerId,
        }));
        var byName = Output.Create(Aws.Mq.GetBroker.InvokeAsync(new Aws.Mq.GetBrokerArgs
        {
            BrokerName = brokerName,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/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
		}
		opt0 := brokerId
		_, err := mq.LookupBroker(ctx, &mq.LookupBrokerArgs{
			BrokerId: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		opt1 := brokerName
		_, err = mq.LookupBroker(ctx, &mq.LookupBrokerArgs{
			BrokerName: &opt1,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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)
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,
});

Using getBroker

function getBroker(args: GetBrokerArgs, opts?: InvokeOptions): Promise<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
func LookupBroker(ctx *Context, args *LookupBrokerArgs, opts ...InvokeOption) (*LookupBrokerResult, error)

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

public static class GetBroker {
    public static Task<GetBrokerResult> InvokeAsync(GetBrokerArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

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

getBroker Result

The following output properties are available:

Supporting Types

GetBrokerConfiguration

Id string
Revision int
Id string
Revision int
id string
revision number
id str
revision int

GetBrokerEncryptionOption

kmsKeyId string
useAwsOwnedKey boolean

GetBrokerInstance

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

GetBrokerLdapServerMetadata

GetBrokerLogs

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

GetBrokerMaintenanceWindowStartTime

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

GetBrokerUser

ConsoleAccess bool
Groups List<string>
Username string
ConsoleAccess bool
Groups []string
Username string
consoleAccess boolean
groups string[]
username string
console_access bool
groups Sequence[str]
username str

Package Details

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