io.github.cdklabs.cdk.amazonmq.RabbitMqBrokerInstance Maven / Gradle / Ivy
package io.github.cdklabs.cdk.amazonmq;
/**
* (experimental) A representation of a single-instance broker comprised of one broker in one Availability Zone behind a Network Load Balancer (NLB).
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.102.0 (build e354887)", date = "2024-08-08T22:30:31.811Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.amazonmq.$Module.class, fqn = "@cdklabs/cdk-amazonmq.RabbitMqBrokerInstance")
public class RabbitMqBrokerInstance extends io.github.cdklabs.cdk.amazonmq.RabbitMqBrokerDeploymentBase implements io.github.cdklabs.cdk.amazonmq.IRabbitMqBroker {
protected RabbitMqBrokerInstance(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected RabbitMqBrokerInstance(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public RabbitMqBrokerInstance(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.amazonmq.RabbitMqBrokerInstanceProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* (experimental) A fluent builder for {@link io.github.cdklabs.cdk.amazonmq.RabbitMqBrokerInstance}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private final io.github.cdklabs.cdk.amazonmq.RabbitMqBrokerInstanceProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new io.github.cdklabs.cdk.amazonmq.RabbitMqBrokerInstanceProps.Builder();
}
/**
* (experimental) Determines whether the broker will undergo a minor version upgrade during the maintenance window.
*
* Default: - false. No minor version upgrade happens.
*
* @return {@code this}
* @param autoMinorVersionUpgrade Determines whether the broker will undergo a minor version upgrade during the maintenance window. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder autoMinorVersionUpgrade(final java.lang.Boolean autoMinorVersionUpgrade) {
this.props.autoMinorVersionUpgrade(autoMinorVersionUpgrade);
return this;
}
/**
* (experimental) An instance type to use for the broker.
*
* Only a subset of available instance types is allowed.
*
* @return {@code this}
* @see https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/broker-instance-types.html
* @param instanceType An instance type to use for the broker. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder instanceType(final software.amazon.awscdk.services.ec2.InstanceType instanceType) {
this.props.instanceType(instanceType);
return this;
}
/**
* (experimental) Specifies whether the broker is open to public Internet or deployed with endpoints in own VPC.
*
* @return {@code this}
* @param publiclyAccessible Specifies whether the broker is open to public Internet or deployed with endpoints in own VPC. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder publiclyAccessible(final java.lang.Boolean publiclyAccessible) {
this.props.publiclyAccessible(publiclyAccessible);
return this;
}
/**
* @return {@code this}
* @param brokerName This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder brokerName(final java.lang.String brokerName) {
this.props.brokerName(brokerName);
return this;
}
/**
* (experimental) Sets the retention days for the broker's CloudWatch LogGroups.
*
* Default: - undefined; CloudWatch Log Groups retention is set to never expire
*
* @return {@code this}
* @param cloudwatchLogsRetention Sets the retention days for the broker's CloudWatch LogGroups. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder cloudwatchLogsRetention(final software.amazon.awscdk.services.logs.RetentionDays cloudwatchLogsRetention) {
this.props.cloudwatchLogsRetention(cloudwatchLogsRetention);
return this;
}
/**
* @return {@code this}
* @param cloudwatchLogsRetentionRole This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder cloudwatchLogsRetentionRole(final software.amazon.awscdk.services.iam.IRole cloudwatchLogsRetentionRole) {
this.props.cloudwatchLogsRetentionRole(cloudwatchLogsRetentionRole);
return this;
}
/**
* @return {@code this}
* @param key This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder key(final software.amazon.awscdk.services.kms.IKey key) {
this.props.key(key);
return this;
}
/**
* @return {@code this}
* @param maintenanceWindowStartTime This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder maintenanceWindowStartTime(final io.github.cdklabs.cdk.amazonmq.MaintenanceWindowStartTime maintenanceWindowStartTime) {
this.props.maintenanceWindowStartTime(maintenanceWindowStartTime);
return this;
}
/**
* (experimental) The Security Groups to apply for a non publicly accessible broker.
*
* NOTE: This needs to be set only if publiclyAccessible
is true.
*
* Default: - undefined. If no VPC is selected then a default VPC's default SG will be used.
* Otherwise - a security group will be created.
*
* @return {@code this}
* @param securityGroups The Security Groups to apply for a non publicly accessible broker. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder securityGroups(final java.util.List extends software.amazon.awscdk.services.ec2.ISecurityGroup> securityGroups) {
this.props.securityGroups(securityGroups);
return this;
}
/**
* (experimental) The VPC in which create the communication endpoints for a private broker.
*
* Default: - undefined. A default VPC will be used
*
* @return {@code this}
* @param vpc The VPC in which create the communication endpoints for a private broker. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder vpc(final software.amazon.awscdk.services.ec2.IVpc vpc) {
this.props.vpc(vpc);
return this;
}
/**
* (experimental) vpcSubnets and vpc are optional.
*
* But when present - publiclyAccessible attribute must equal false.
*
* Default: - undefined. If vpc is present - this attribute must be present.
*
* @return {@code this}
* @param vpcSubnets vpcSubnets and vpc are optional. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder vpcSubnets(final software.amazon.awscdk.services.ec2.SubnetSelection vpcSubnets) {
this.props.vpcSubnets(vpcSubnets);
return this;
}
/**
* (experimental) Sets the credentials of the broker administrative user.
*
* @return {@code this}
* @param admin Sets the credentials of the broker administrative user. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder admin(final io.github.cdklabs.cdk.amazonmq.Admin admin) {
this.props.admin(admin);
return this;
}
/**
* (experimental) Sets the version of the broker engine.
*
* @return {@code this}
* @param version Sets the version of the broker engine. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder version(final io.github.cdklabs.cdk.amazonmq.RabbitMqBrokerEngineVersion version) {
this.props.version(version);
return this;
}
/**
* (experimental) Sets the CloudWatch logs exports for the broker.
*
* @return {@code this}
* @param cloudwatchLogsExports Sets the CloudWatch logs exports for the broker. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder cloudwatchLogsExports(final io.github.cdklabs.cdk.amazonmq.RabbitMqCloudwatchLogsExports cloudwatchLogsExports) {
this.props.cloudwatchLogsExports(cloudwatchLogsExports);
return this;
}
/**
* (experimental) Sets the configuration of the broker.
*
* @return {@code this}
* @param configuration Sets the configuration of the broker. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder configuration(final io.github.cdklabs.cdk.amazonmq.IRabbitMqBrokerConfiguration configuration) {
this.props.configuration(configuration);
return this;
}
/**
* @return a newly built instance of {@link io.github.cdklabs.cdk.amazonmq.RabbitMqBrokerInstance}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public io.github.cdklabs.cdk.amazonmq.RabbitMqBrokerInstance build() {
return new io.github.cdklabs.cdk.amazonmq.RabbitMqBrokerInstance(
this.scope,
this.id,
this.props.build()
);
}
}
}