Show / Hide Table of Contents

Class LicenseModel

The license model.

Inheritance
System.Object
LicenseModel
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.AWS.RDS.dll
Syntax (csharp)
public sealed class LicenseModel : Enum
Syntax (vb)
Public NotInheritable Class LicenseModel
    Inherits

     Enum
Remarks

ExampleMetadata: lit=test/integ.instance.lit.ts infused

Examples
// Set open cursors with parameter group
var parameterGroup = new ParameterGroup(this, "ParameterGroup", new ParameterGroupProps {
    Engine = DatabaseInstanceEngine.OracleSe2(new OracleSe2InstanceEngineProps { Version = OracleEngineVersion.VER_19_0_0_0_2020_04_R1 }),
    Parameters = new Dictionary<string, string> {
        { "open_cursors", "2500" }
    }
});

var optionGroup = new OptionGroup(this, "OptionGroup", new OptionGroupProps {
    Engine = DatabaseInstanceEngine.OracleSe2(new OracleSe2InstanceEngineProps { Version = OracleEngineVersion.VER_19_0_0_0_2020_04_R1 }),
    Configurations = new [] { new OptionConfiguration {
        Name = "LOCATOR"
    }, new OptionConfiguration {
        Name = "OEM",
        Port = 1158,
        Vpc = vpc
    } }
});

// Allow connections to OEM
optionGroup.OptionConnections.OEM.Connections.AllowDefaultPortFromAnyIpv4();

// Database instance with production values
var instance = new DatabaseInstance(this, "Instance", new DatabaseInstanceProps {
    Engine = DatabaseInstanceEngine.OracleSe2(new OracleSe2InstanceEngineProps { Version = OracleEngineVersion.VER_19_0_0_0_2020_04_R1 }),
    LicenseModel = LicenseModel.BRING_YOUR_OWN_LICENSE,
    InstanceType = InstanceType.Of(InstanceClass.BURSTABLE3, InstanceSize.MEDIUM),
    MultiAz = true,
    StorageType = StorageType.IO1,
    Credentials = Credentials.FromUsername("syscdk"),
    Vpc = vpc,
    DatabaseName = "ORCL",
    StorageEncrypted = true,
    BackupRetention = Duration.Days(7),
    MonitoringInterval = Duration.Seconds(60),
    EnablePerformanceInsights = true,
    CloudwatchLogsExports = new [] { "trace", "audit", "alert", "listener" },
    CloudwatchLogsRetention = RetentionDays.ONE_MONTH,
    AutoMinorVersionUpgrade = true,  // required to be true if LOCATOR is used in the option group
    OptionGroup = optionGroup,
    ParameterGroup = parameterGroup,
    RemovalPolicy = RemovalPolicy.DESTROY
});

// Allow connections on default port from any IPV4
instance.Connections.AllowDefaultPortFromAnyIpv4();

// Rotate the master user password every 30 days
instance.AddRotationSingleUser();

// Add alarm for high CPU
// Add alarm for high CPU
new Alarm(this, "HighCPU", new AlarmProps {
    Metric = instance.MetricCPUUtilization(),
    Threshold = 90,
    EvaluationPeriods = 1
});

// Trigger Lambda function on instance availability events
var fn = new Function(this, "Function", new FunctionProps {
    Code = Code.FromInline("exports.handler = (event) => console.log(event);"),
    Handler = "index.handler",
    Runtime = Runtime.NODEJS_14_X
});

var availabilityRule = instance.OnEvent("Availability", new OnEventOptions { Target = new LambdaFunction(fn) });
availabilityRule.AddEventPattern(new EventPattern {
    Detail = new Dictionary<string, object> {
        { "EventCategories", new [] { "availability" } }
    }
});

Synopsis

Fields

BRING_YOUR_OWN_LICENSE

Bring your own licencse.

GENERAL_PUBLIC_LICENSE

General public license.

LICENSE_INCLUDED

License included.

value__

Fields

BRING_YOUR_OWN_LICENSE

Bring your own licencse.

public const LicenseModel BRING_YOUR_OWN_LICENSE
Field Value
Type Description
LicenseModel

GENERAL_PUBLIC_LICENSE

General public license.

public const LicenseModel GENERAL_PUBLIC_LICENSE
Field Value
Type Description
LicenseModel

LICENSE_INCLUDED

License included.

public const LicenseModel LICENSE_INCLUDED
Field Value
Type Description
LicenseModel

value__

public int value__
Field Value
Type Description
System.Int32
Back to top Generated by DocFX