Class ParameterGroup
A parameter group.
Inherited Members
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ParameterGroup : Resource, IParameterGroup, IResource
Syntax (vb)
Public Class ParameterGroup
Inherits Resource
Implements IParameterGroup, IResource
Remarks
Represents both a cluster parameter group, and an instance parameter group.
Resource: AWS::RDS::DBParameterGroup
ExampleMetadata: infused
Examples
BackupPlan plan;
Vpc vpc;
var myTable = Table.FromTableName(this, "Table", "myTableName");
var myDatabaseInstance = new DatabaseInstance(this, "DatabaseInstance", new DatabaseInstanceProps {
Engine = DatabaseInstanceEngine.Mysql(new MySqlInstanceEngineProps { Version = MysqlEngineVersion.VER_8_0_26 }),
Vpc = vpc
});
var myDatabaseCluster = new DatabaseCluster(this, "DatabaseCluster", new DatabaseClusterProps {
Engine = DatabaseClusterEngine.AuroraMysql(new AuroraMysqlClusterEngineProps { Version = AuroraMysqlEngineVersion.VER_2_08_1 }),
Credentials = Credentials.FromGeneratedSecret("clusteradmin"),
InstanceProps = new InstanceProps {
Vpc = vpc
}
});
var myServerlessCluster = new ServerlessCluster(this, "ServerlessCluster", new ServerlessClusterProps {
Engine = DatabaseClusterEngine.AURORA_POSTGRESQL,
ParameterGroup = ParameterGroup.FromParameterGroupName(this, "ParameterGroup", "default.aurora-postgresql11"),
Vpc = vpc
});
var myCoolConstruct = new Construct(this, "MyCoolConstruct");
plan.AddSelection("Selection", new BackupSelectionOptions {
Resources = new [] { BackupResource.FromDynamoDbTable(myTable), BackupResource.FromRdsDatabaseInstance(myDatabaseInstance), BackupResource.FromRdsDatabaseCluster(myDatabaseCluster), BackupResource.FromRdsServerlessCluster(myServerlessCluster), BackupResource.FromTag("stage", "prod"), BackupResource.FromConstruct(myCoolConstruct) }
});
Synopsis
Constructors
ParameterGroup(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
ParameterGroup(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
ParameterGroup(Construct, String, IParameterGroupProps) |
Methods
AddParameter(String, String) | Add a parameter to this parameter group. |
BindToCluster(IParameterGroupClusterBindOptions) | Method called when this Parameter Group is used when defining a database cluster. |
BindToInstance(IParameterGroupInstanceBindOptions) | Method called when this Parameter Group is used when defining a database instance. |
FromParameterGroupName(Construct, String, String) | Imports a parameter group. |
Constructors
ParameterGroup(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected ParameterGroup(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
ParameterGroup(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected ParameterGroup(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
ParameterGroup(Construct, String, IParameterGroupProps)
public ParameterGroup(Construct scope, string id, IParameterGroupProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IParameterGroupProps
Methods
AddParameter(String, String)
Add a parameter to this parameter group.
public virtual bool AddParameter(string key, string value)
Parameters
- key System.String
The key of the parameter to be added.
- value System.String
The value of the parameter to be added.
Returns
System.Boolean
BindToCluster(IParameterGroupClusterBindOptions)
Method called when this Parameter Group is used when defining a database cluster.
public virtual IParameterGroupClusterConfig BindToCluster(IParameterGroupClusterBindOptions options)
Parameters
Returns
BindToInstance(IParameterGroupInstanceBindOptions)
Method called when this Parameter Group is used when defining a database instance.
public virtual IParameterGroupInstanceConfig BindToInstance(IParameterGroupInstanceBindOptions options)
Parameters
Returns
FromParameterGroupName(Construct, String, String)
Imports a parameter group.
public static IParameterGroup FromParameterGroupName(Construct scope, string id, string parameterGroupName)
Parameters
- scope Constructs.Construct
- id System.String
- parameterGroupName System.String
Returns