Show / Hide Table of Contents

Class SubnetGroupProps

Properties for creating a SubnetGroup.

Inheritance
object
SubnetGroupProps
Implements
ISubnetGroupProps
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SubnetGroupProps : ISubnetGroupProps
Syntax (vb)
Public Class SubnetGroupProps Implements ISubnetGroupProps
Remarks

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK;
            using Amazon.CDK.AWS.EC2;
            using Amazon.CDK.AWS.RDS;

            Subnet subnet;
            SubnetFilter subnetFilter;
            Vpc vpc;

            var subnetGroupProps = new SubnetGroupProps {
                Description = "description",
                Vpc = vpc,

                // the properties below are optional
                RemovalPolicy = RemovalPolicy.DESTROY,
                SubnetGroupName = "subnetGroupName",
                VpcSubnets = new SubnetSelection {
                    AvailabilityZones = new [] { "availabilityZones" },
                    OnePerAz = false,
                    SubnetFilters = new [] { subnetFilter },
                    SubnetGroupName = "subnetGroupName",
                    Subnets = new [] { subnet },
                    SubnetType = SubnetType.PRIVATE_ISOLATED
                }
            };

Synopsis

Constructors

SubnetGroupProps()

Properties for creating a SubnetGroup.

Properties

Description

Description of the subnet group.

RemovalPolicy

The removal policy to apply when the subnet group are removed from the stack or replaced during an update.

SubnetGroupName

The name of the subnet group.

Vpc

The VPC to place the subnet group in.

VpcSubnets

Which subnets within the VPC to associate with this group.

Constructors

SubnetGroupProps()

Properties for creating a SubnetGroup.

public SubnetGroupProps()
Remarks

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK;
            using Amazon.CDK.AWS.EC2;
            using Amazon.CDK.AWS.RDS;

            Subnet subnet;
            SubnetFilter subnetFilter;
            Vpc vpc;

            var subnetGroupProps = new SubnetGroupProps {
                Description = "description",
                Vpc = vpc,

                // the properties below are optional
                RemovalPolicy = RemovalPolicy.DESTROY,
                SubnetGroupName = "subnetGroupName",
                VpcSubnets = new SubnetSelection {
                    AvailabilityZones = new [] { "availabilityZones" },
                    OnePerAz = false,
                    SubnetFilters = new [] { subnetFilter },
                    SubnetGroupName = "subnetGroupName",
                    Subnets = new [] { subnet },
                    SubnetType = SubnetType.PRIVATE_ISOLATED
                }
            };

Properties

Description

Description of the subnet group.

public string Description { get; set; }
Property Value

string

Remarks

ExampleMetadata: fixture=_generated

RemovalPolicy

The removal policy to apply when the subnet group are removed from the stack or replaced during an update.

public RemovalPolicy? RemovalPolicy { get; set; }
Property Value

RemovalPolicy?

Remarks

Default: RemovalPolicy.DESTROY

SubnetGroupName

The name of the subnet group.

public string? SubnetGroupName { get; set; }
Property Value

string

Remarks

Default: - a name is generated

Vpc

The VPC to place the subnet group in.

public IVpc Vpc { get; set; }
Property Value

IVpc

Remarks

ExampleMetadata: fixture=_generated

VpcSubnets

Which subnets within the VPC to associate with this group.

public ISubnetSelection? VpcSubnets { get; set; }
Property Value

ISubnetSelection

Remarks

Default: - private subnets

Implements

ISubnetGroupProps
Back to top Generated by DocFX