Show / Hide Table of Contents

Class SubnetGroup

Class for creating a RDS DB subnet group.

Inheritance
object
Resource
SubnetGroup
Implements
ISubnetGroup
IResource
IDBSubnetGroupRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SubnetGroup : Resource, ISubnetGroup, IResource, IDBSubnetGroupRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class SubnetGroup Inherits Resource Implements ISubnetGroup, IResource, IDBSubnetGroupRef, IConstruct, IDependable, IEnvironmentAware
Remarks

Resource: AWS::RDS::DBSubnetGroup

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 subnetGroup = new SubnetGroup(this, "MySubnetGroup", 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

SubnetGroup(Construct, string, ISubnetGroupProps)

Class for creating a RDS DB subnet group.

Properties

DbSubnetGroupRef

A reference to this subnet group.

PROPERTY_INJECTION_ID

Uniquely identifies this class.

SubnetGroupName

The name of the subnet group.

Methods

FromSubnetGroupName(Construct, string, string)

Imports an existing subnet group by name.

Constructors

SubnetGroup(Construct, string, ISubnetGroupProps)

Class for creating a RDS DB subnet group.

public SubnetGroup(Construct scope, string id, ISubnetGroupProps props)
Parameters
scope Construct
id string
props ISubnetGroupProps
Remarks

Resource: AWS::RDS::DBSubnetGroup

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 subnetGroup = new SubnetGroup(this, "MySubnetGroup", 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

DbSubnetGroupRef

A reference to this subnet group.

public virtual IDBSubnetGroupReference DbSubnetGroupRef { get; }
Property Value

IDBSubnetGroupReference

Remarks

Resource: AWS::RDS::DBSubnetGroup

ExampleMetadata: fixture=_generated

PROPERTY_INJECTION_ID

Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

Resource: AWS::RDS::DBSubnetGroup

ExampleMetadata: fixture=_generated

SubnetGroupName

The name of the subnet group.

public virtual string SubnetGroupName { get; }
Property Value

string

Remarks

Resource: AWS::RDS::DBSubnetGroup

ExampleMetadata: fixture=_generated

Methods

FromSubnetGroupName(Construct, string, string)

Imports an existing subnet group by name.

public static ISubnetGroup FromSubnetGroupName(Construct scope, string id, string subnetGroupName)
Parameters
scope Construct
id string
subnetGroupName string
Returns

ISubnetGroup

Remarks

Resource: AWS::RDS::DBSubnetGroup

ExampleMetadata: fixture=_generated

Implements

ISubnetGroup
IResource
IDBSubnetGroupRef
Constructs.IConstruct
Constructs.IDependable
IEnvironmentAware
Back to top Generated by DocFX