All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.rds.CfnDBSubnetGroup Maven / Gradle / Ivy

The newest version!
package software.amazon.awscdk.services.rds;

/**
 * A CloudFormation AWS::RDS::DBSubnetGroup.
 * 

* The AWS::RDS::DBSubnetGroup resource creates a database subnet group. Subnet groups must contain at least two subnets in two different Availability Zones in the same region. *

* For more information, see Working with DB subnet groups in the Amazon RDS User Guide . *

* Example: *

*

 * // The code below shows an example of how to instantiate this type.
 * // The values are placeholders you should change.
 * import software.amazon.awscdk.services.rds.*;
 * CfnDBSubnetGroup cfnDBSubnetGroup = CfnDBSubnetGroup.Builder.create(this, "MyCfnDBSubnetGroup")
 *         .dbSubnetGroupDescription("dbSubnetGroupDescription")
 *         .subnetIds(List.of("subnetIds"))
 *         // the properties below are optional
 *         .dbSubnetGroupName("dbSubnetGroupName")
 *         .tags(List.of(CfnTag.builder()
 *                 .key("key")
 *                 .value("value")
 *                 .build()))
 *         .build();
 * 
*/ @javax.annotation.Generated(value = "jsii-pacmak/1.84.0 (build 5404dcf)", date = "2023-06-19T16:30:49.060Z") @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.rds.$Module.class, fqn = "@aws-cdk/aws-rds.CfnDBSubnetGroup") public class CfnDBSubnetGroup extends software.amazon.awscdk.core.CfnResource implements software.amazon.awscdk.core.IInspectable { protected CfnDBSubnetGroup(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); } protected CfnDBSubnetGroup(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) { super(initializationMode); } static { CFN_RESOURCE_TYPE_NAME = software.amazon.jsii.JsiiObject.jsiiStaticGet(software.amazon.awscdk.services.rds.CfnDBSubnetGroup.class, "CFN_RESOURCE_TYPE_NAME", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * Create a new AWS::RDS::DBSubnetGroup. *

* @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 CfnDBSubnetGroup(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.rds.CfnDBSubnetGroupProps 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") }); } /** * Examines the CloudFormation resource and discloses attributes. *

* @param inspector

  • tree inspector to collect and process attributes.
This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public void inspect(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.TreeInspector inspector) { software.amazon.jsii.Kernel.call(this, "inspect", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(inspector, "inspector is required") }); } /** * @param props This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override protected @org.jetbrains.annotations.NotNull java.util.Map renderProperties(final @org.jetbrains.annotations.NotNull java.util.Map props) { return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "renderProperties", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)), new Object[] { 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; /** */ @Override @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) protected @org.jetbrains.annotations.NotNull java.util.Map getCfnProperties() { return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.get(this, "cfnProperties", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class)))); } /** * An optional array of key-value pairs to apply to this DB subnet group. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.TagManager getTags() { return software.amazon.jsii.Kernel.get(this, "tags", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.core.TagManager.class)); } /** * The description for the DB subnet group. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.lang.String getDbSubnetGroupDescription() { return software.amazon.jsii.Kernel.get(this, "dbSubnetGroupDescription", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * The description for the DB subnet group. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setDbSubnetGroupDescription(final @org.jetbrains.annotations.NotNull java.lang.String value) { software.amazon.jsii.Kernel.set(this, "dbSubnetGroupDescription", java.util.Objects.requireNonNull(value, "dbSubnetGroupDescription is required")); } /** * The EC2 Subnet IDs for the DB subnet group. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.NotNull java.util.List getSubnetIds() { return java.util.Collections.unmodifiableList(software.amazon.jsii.Kernel.get(this, "subnetIds", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)))); } /** * The EC2 Subnet IDs for the DB subnet group. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setSubnetIds(final @org.jetbrains.annotations.NotNull java.util.List value) { software.amazon.jsii.Kernel.set(this, "subnetIds", java.util.Objects.requireNonNull(value, "subnetIds is required")); } /** * The name for the DB subnet group. This value is stored as a lowercase string. *

* Constraints: Must contain no more than 255 lowercase alphanumeric characters or hyphens. Must not be "Default". *

* Example: mysubnetgroup */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public @org.jetbrains.annotations.Nullable java.lang.String getDbSubnetGroupName() { return software.amazon.jsii.Kernel.get(this, "dbSubnetGroupName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * The name for the DB subnet group. This value is stored as a lowercase string. *

* Constraints: Must contain no more than 255 lowercase alphanumeric characters or hyphens. Must not be "Default". *

* Example: mysubnetgroup */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public void setDbSubnetGroupName(final @org.jetbrains.annotations.Nullable java.lang.String value) { software.amazon.jsii.Kernel.set(this, "dbSubnetGroupName", value); } /** * A fluent builder for {@link software.amazon.awscdk.services.rds.CfnDBSubnetGroup}. */ @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.amazon.awscdk.core.Construct scope, final java.lang.String id) { return new Builder(scope, id); } private final software.amazon.awscdk.core.Construct scope; private final java.lang.String id; private final software.amazon.awscdk.services.rds.CfnDBSubnetGroupProps.Builder props; private Builder(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) { this.scope = scope; this.id = id; this.props = new software.amazon.awscdk.services.rds.CfnDBSubnetGroupProps.Builder(); } /** * The description for the DB subnet group. *

* @return {@code this} * @param dbSubnetGroupDescription The description for the DB subnet group. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder dbSubnetGroupDescription(final java.lang.String dbSubnetGroupDescription) { this.props.dbSubnetGroupDescription(dbSubnetGroupDescription); return this; } /** * The EC2 Subnet IDs for the DB subnet group. *

* @return {@code this} * @param subnetIds The EC2 Subnet IDs for the DB subnet group. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder subnetIds(final java.util.List subnetIds) { this.props.subnetIds(subnetIds); return this; } /** * The name for the DB subnet group. This value is stored as a lowercase string. *

* Constraints: Must contain no more than 255 lowercase alphanumeric characters or hyphens. Must not be "Default". *

* Example: mysubnetgroup *

* @return {@code this} * @param dbSubnetGroupName The name for the DB subnet group. This value is stored as a lowercase string. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder dbSubnetGroupName(final java.lang.String dbSubnetGroupName) { this.props.dbSubnetGroupName(dbSubnetGroupName); return this; } /** * An optional array of key-value pairs to apply to this DB subnet group. *

* @return {@code this} * @param tags An optional array of key-value pairs to apply to this DB subnet group. This parameter is required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder tags(final java.util.List tags) { this.props.tags(tags); return this; } /** * @return a newly built instance of {@link software.amazon.awscdk.services.rds.CfnDBSubnetGroup}. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public software.amazon.awscdk.services.rds.CfnDBSubnetGroup build() { return new software.amazon.awscdk.services.rds.CfnDBSubnetGroup( this.scope, this.id, this.props.build() ); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy