UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

221 lines • 10.1 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Broker = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ### Basic Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.mq.Broker("example", { * brokerName: "example", * configuration: { * id: test.id, * revision: test.latestRevision, * }, * engineType: "ActiveMQ", * engineVersion: "5.17.6", * hostInstanceType: "mq.t2.micro", * securityGroups: [testAwsSecurityGroup.id], * users: [{ * username: "example_user", * password: "<password>", * }], * }); * ``` * * ### High-throughput Optimized Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.mq.Broker("example", { * brokerName: "example", * configuration: { * id: test.id, * revision: test.latestRevision, * }, * engineType: "ActiveMQ", * engineVersion: "5.17.6", * storageType: "ebs", * hostInstanceType: "mq.m5.large", * securityGroups: [testAwsSecurityGroup.id], * users: [{ * username: "example_user", * password: "<password>", * }], * }); * ``` * * ### Cross-Region Data Replication * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const examplePrimary = new aws.mq.Broker("example_primary", { * applyImmediately: true, * brokerName: "example_primary", * engineType: "ActiveMQ", * engineVersion: "5.17.6", * hostInstanceType: "mq.m5.large", * securityGroups: [examplePrimaryAwsSecurityGroup.id], * deploymentMode: "ACTIVE_STANDBY_MULTI_AZ", * users: [ * { * username: "example_user", * password: "<password>", * }, * { * username: "example_replication_user", * password: "<password>", * replicationUser: true, * }, * ], * }); * const example = new aws.mq.Broker("example", { * applyImmediately: true, * brokerName: "example", * engineType: "ActiveMQ", * engineVersion: "5.17.6", * hostInstanceType: "mq.m5.large", * securityGroups: [exampleAwsSecurityGroup.id], * deploymentMode: "ACTIVE_STANDBY_MULTI_AZ", * dataReplicationMode: "CRDR", * dataReplicationPrimaryBrokerArn: primary.arn, * users: [ * { * username: "example_user", * password: "<password>", * }, * { * username: "example_replication_user", * password: "<password>", * replicationUser: true, * }, * ], * }); * ``` * * See the [AWS MQ documentation](https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/crdr-for-active-mq.html) on cross-region data replication for additional details. * * ## Import * * Using `pulumi import`, import MQ Brokers using their broker id. For example: * * ```sh * $ pulumi import aws:mq/broker:Broker example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc * ``` */ class Broker extends pulumi.CustomResource { /** * Get an existing Broker resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new Broker(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Broker. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Broker.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["applyImmediately"] = state ? state.applyImmediately : undefined; resourceInputs["arn"] = state ? state.arn : undefined; resourceInputs["authenticationStrategy"] = state ? state.authenticationStrategy : undefined; resourceInputs["autoMinorVersionUpgrade"] = state ? state.autoMinorVersionUpgrade : undefined; resourceInputs["brokerName"] = state ? state.brokerName : undefined; resourceInputs["configuration"] = state ? state.configuration : undefined; resourceInputs["dataReplicationMode"] = state ? state.dataReplicationMode : undefined; resourceInputs["dataReplicationPrimaryBrokerArn"] = state ? state.dataReplicationPrimaryBrokerArn : undefined; resourceInputs["deploymentMode"] = state ? state.deploymentMode : undefined; resourceInputs["encryptionOptions"] = state ? state.encryptionOptions : undefined; resourceInputs["engineType"] = state ? state.engineType : undefined; resourceInputs["engineVersion"] = state ? state.engineVersion : undefined; resourceInputs["hostInstanceType"] = state ? state.hostInstanceType : undefined; resourceInputs["instances"] = state ? state.instances : undefined; resourceInputs["ldapServerMetadata"] = state ? state.ldapServerMetadata : undefined; resourceInputs["logs"] = state ? state.logs : undefined; resourceInputs["maintenanceWindowStartTime"] = state ? state.maintenanceWindowStartTime : undefined; resourceInputs["pendingDataReplicationMode"] = state ? state.pendingDataReplicationMode : undefined; resourceInputs["publiclyAccessible"] = state ? state.publiclyAccessible : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["securityGroups"] = state ? state.securityGroups : undefined; resourceInputs["storageType"] = state ? state.storageType : undefined; resourceInputs["subnetIds"] = state ? state.subnetIds : undefined; resourceInputs["tags"] = state ? state.tags : undefined; resourceInputs["tagsAll"] = state ? state.tagsAll : undefined; resourceInputs["users"] = state ? state.users : undefined; } else { const args = argsOrState; if ((!args || args.engineType === undefined) && !opts.urn) { throw new Error("Missing required property 'engineType'"); } if ((!args || args.engineVersion === undefined) && !opts.urn) { throw new Error("Missing required property 'engineVersion'"); } if ((!args || args.hostInstanceType === undefined) && !opts.urn) { throw new Error("Missing required property 'hostInstanceType'"); } if ((!args || args.users === undefined) && !opts.urn) { throw new Error("Missing required property 'users'"); } resourceInputs["applyImmediately"] = args ? args.applyImmediately : undefined; resourceInputs["authenticationStrategy"] = args ? args.authenticationStrategy : undefined; resourceInputs["autoMinorVersionUpgrade"] = args ? args.autoMinorVersionUpgrade : undefined; resourceInputs["brokerName"] = args ? args.brokerName : undefined; resourceInputs["configuration"] = args ? args.configuration : undefined; resourceInputs["dataReplicationMode"] = args ? args.dataReplicationMode : undefined; resourceInputs["dataReplicationPrimaryBrokerArn"] = args ? args.dataReplicationPrimaryBrokerArn : undefined; resourceInputs["deploymentMode"] = args ? args.deploymentMode : undefined; resourceInputs["encryptionOptions"] = args ? args.encryptionOptions : undefined; resourceInputs["engineType"] = args ? args.engineType : undefined; resourceInputs["engineVersion"] = args ? args.engineVersion : undefined; resourceInputs["hostInstanceType"] = args ? args.hostInstanceType : undefined; resourceInputs["ldapServerMetadata"] = args ? args.ldapServerMetadata : undefined; resourceInputs["logs"] = args ? args.logs : undefined; resourceInputs["maintenanceWindowStartTime"] = args ? args.maintenanceWindowStartTime : undefined; resourceInputs["publiclyAccessible"] = args ? args.publiclyAccessible : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["securityGroups"] = args ? args.securityGroups : undefined; resourceInputs["storageType"] = args ? args.storageType : undefined; resourceInputs["subnetIds"] = args ? args.subnetIds : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["users"] = args ? args.users : undefined; resourceInputs["arn"] = undefined /*out*/; resourceInputs["instances"] = undefined /*out*/; resourceInputs["pendingDataReplicationMode"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Broker.__pulumiType, name, resourceInputs, opts); } } exports.Broker = Broker; /** @internal */ Broker.__pulumiType = 'aws:mq/broker:Broker'; //# sourceMappingURL=broker.js.map