UNPKG

@pulumi/aws

Version:

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

221 lines • 9.17 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, { ...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?.applyImmediately; resourceInputs["arn"] = state?.arn; resourceInputs["authenticationStrategy"] = state?.authenticationStrategy; resourceInputs["autoMinorVersionUpgrade"] = state?.autoMinorVersionUpgrade; resourceInputs["brokerName"] = state?.brokerName; resourceInputs["configuration"] = state?.configuration; resourceInputs["dataReplicationMode"] = state?.dataReplicationMode; resourceInputs["dataReplicationPrimaryBrokerArn"] = state?.dataReplicationPrimaryBrokerArn; resourceInputs["deploymentMode"] = state?.deploymentMode; resourceInputs["encryptionOptions"] = state?.encryptionOptions; resourceInputs["engineType"] = state?.engineType; resourceInputs["engineVersion"] = state?.engineVersion; resourceInputs["hostInstanceType"] = state?.hostInstanceType; resourceInputs["instances"] = state?.instances; resourceInputs["ldapServerMetadata"] = state?.ldapServerMetadata; resourceInputs["logs"] = state?.logs; resourceInputs["maintenanceWindowStartTime"] = state?.maintenanceWindowStartTime; resourceInputs["pendingDataReplicationMode"] = state?.pendingDataReplicationMode; resourceInputs["publiclyAccessible"] = state?.publiclyAccessible; resourceInputs["region"] = state?.region; resourceInputs["securityGroups"] = state?.securityGroups; resourceInputs["storageType"] = state?.storageType; resourceInputs["subnetIds"] = state?.subnetIds; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["users"] = state?.users; } else { const args = argsOrState; if (args?.engineType === undefined && !opts.urn) { throw new Error("Missing required property 'engineType'"); } if (args?.engineVersion === undefined && !opts.urn) { throw new Error("Missing required property 'engineVersion'"); } if (args?.hostInstanceType === undefined && !opts.urn) { throw new Error("Missing required property 'hostInstanceType'"); } if (args?.users === undefined && !opts.urn) { throw new Error("Missing required property 'users'"); } resourceInputs["applyImmediately"] = args?.applyImmediately; resourceInputs["authenticationStrategy"] = args?.authenticationStrategy; resourceInputs["autoMinorVersionUpgrade"] = args?.autoMinorVersionUpgrade; resourceInputs["brokerName"] = args?.brokerName; resourceInputs["configuration"] = args?.configuration; resourceInputs["dataReplicationMode"] = args?.dataReplicationMode; resourceInputs["dataReplicationPrimaryBrokerArn"] = args?.dataReplicationPrimaryBrokerArn; resourceInputs["deploymentMode"] = args?.deploymentMode; resourceInputs["encryptionOptions"] = args?.encryptionOptions; resourceInputs["engineType"] = args?.engineType; resourceInputs["engineVersion"] = args?.engineVersion; resourceInputs["hostInstanceType"] = args?.hostInstanceType; resourceInputs["ldapServerMetadata"] = args?.ldapServerMetadata; resourceInputs["logs"] = args?.logs; resourceInputs["maintenanceWindowStartTime"] = args?.maintenanceWindowStartTime; resourceInputs["publiclyAccessible"] = args?.publiclyAccessible; resourceInputs["region"] = args?.region; resourceInputs["securityGroups"] = args?.securityGroups; resourceInputs["storageType"] = args?.storageType; resourceInputs["subnetIds"] = args?.subnetIds; resourceInputs["tags"] = args?.tags; resourceInputs["users"] = args?.users; 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