org.mongodb.awscdk.resources.mongodbatlas.CfnMaintenanceWindow Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
* A CloudFormation MongoDB::Atlas::MaintenanceWindow
.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.940Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.CfnMaintenanceWindow")
public class CfnMaintenanceWindow extends software.amazon.awscdk.CfnResource {
protected CfnMaintenanceWindow(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CfnMaintenanceWindow(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
CFN_RESOURCE_TYPE_NAME = software.amazon.jsii.JsiiObject.jsiiStaticGet(org.mongodb.awscdk.resources.mongodbatlas.CfnMaintenanceWindow.class, "CFN_RESOURCE_TYPE_NAME", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Create a new MongoDB::Atlas::MaintenanceWindow
.
*
* @param scope
- scope in which this resource is defined.
This parameter is required.
* @param id - scoped id of the resource.
This parameter is required.
* @param props - resource properties.
This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public CfnMaintenanceWindow(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull org.mongodb.awscdk.resources.mongodbatlas.CfnMaintenanceWindowProps 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") });
}
/**
* The CloudFormation resource type name for this resource class.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static java.lang.String CFN_RESOURCE_TYPE_NAME;
/**
* Resource props.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull org.mongodb.awscdk.resources.mongodbatlas.CfnMaintenanceWindowProps getProps() {
return software.amazon.jsii.Kernel.get(this, "props", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.CfnMaintenanceWindowProps.class));
}
/**
* A fluent builder for {@link org.mongodb.awscdk.resources.mongodbatlas.CfnMaintenanceWindow}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope - scope in which this resource is defined.
This parameter is required.
* @param id - scoped id of the resource.
This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
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 org.mongodb.awscdk.resources.mongodbatlas.CfnMaintenanceWindowProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new org.mongodb.awscdk.resources.mongodbatlas.CfnMaintenanceWindowProps.Builder();
}
/**
* Zero-based integer that represents the hour of the of the day that the maintenance window starts according to a 24-hour clock.
*
* Use 0
for midnight and 12
for noon.
*
* @return {@code this}
* @param hourOfDay Zero-based integer that represents the hour of the of the day that the maintenance window starts according to a 24-hour clock. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder hourOfDay(final java.lang.Number hourOfDay) {
this.props.hourOfDay(hourOfDay);
return this;
}
/**
* Flag that indicates whether MongoDB Cloud should defer all maintenance windows for one week after you enable them.
*
* @return {@code this}
* @param autoDeferOnceEnabled Flag that indicates whether MongoDB Cloud should defer all maintenance windows for one week after you enable them. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder autoDeferOnceEnabled(final java.lang.Boolean autoDeferOnceEnabled) {
this.props.autoDeferOnceEnabled(autoDeferOnceEnabled);
return this;
}
/**
* One-based integer that represents the day of the week that the maintenance window starts.
*
* | Value | Day of Week |
* |---|---|
* | 1
| Sunday |
* | 2
| Monday |
* | 3
| Tuesday |
* | 4
| Wednesday |
* | 5
| Thursday |
* | 6
| Friday |
* | 7
| Saturday |
*
* @return {@code this}
* @param dayOfWeek One-based integer that represents the day of the week that the maintenance window starts. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder dayOfWeek(final java.lang.Number dayOfWeek) {
this.props.dayOfWeek(dayOfWeek);
return this;
}
/**
* The profile is defined in AWS Secret manager.
*
* See Secret Manager Profile setup
*
* @return {@code this}
* @param profile The profile is defined in AWS Secret manager. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder profile(final java.lang.String profile) {
this.props.profile(profile);
return this;
}
/**
* Unique 24-hexadecimal digit string that identifies your project.
*
* @return {@code this}
* @param projectId Unique 24-hexadecimal digit string that identifies your project. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder projectId(final java.lang.String projectId) {
this.props.projectId(projectId);
return this;
}
/**
* Flag that indicates whether MongoDB Cloud starts the maintenance window immediately upon receiving this request.
*
* To start the maintenance window immediately for your project, MongoDB Cloud must have maintenance scheduled and you must set a maintenance window. This flag resets to false
after MongoDB Cloud completes maintenance.
*
* @return {@code this}
* @param startAsap Flag that indicates whether MongoDB Cloud starts the maintenance window immediately upon receiving this request. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder startAsap(final java.lang.Boolean startAsap) {
this.props.startAsap(startAsap);
return this;
}
/**
* @return a newly built instance of {@link org.mongodb.awscdk.resources.mongodbatlas.CfnMaintenanceWindow}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public org.mongodb.awscdk.resources.mongodbatlas.CfnMaintenanceWindow build() {
return new org.mongodb.awscdk.resources.mongodbatlas.CfnMaintenanceWindow(
this.scope,
this.id,
this.props.build()
);
}
}
}