Пример #1
0
 public MyStack()
 {
     var example = new Aws.Rds.Instance("example", new Aws.Rds.InstanceArgs
     {
         AllocatedStorage    = 50,
         MaxAllocatedStorage = 100,
     });
 }
Пример #2
0
 public MyStack()
 {
     var @default = new Aws.Rds.Instance("default", new Aws.Rds.InstanceArgs
     {
         AllocatedStorage   = 20,
         Engine             = "mysql",
         EngineVersion      = "5.7",
         InstanceClass      = "db.t2.micro",
         Name               = "mydb",
         ParameterGroupName = "default.mysql5.7",
         Password           = "******",
         StorageType        = "gp2",
         Username           = "******",
     });
 }
Пример #3
0
 public MyStack()
 {
     var bar = new Aws.Rds.Instance("bar", new Aws.Rds.InstanceArgs
     {
         AllocatedStorage      = 10,
         BackupRetentionPeriod = 0,
         Engine            = "MySQL",
         EngineVersion     = "5.6.21",
         InstanceClass     = "db.t2.micro",
         MaintenanceWindow = "Fri:09:00-Fri:09:30",
         Name = "baz",
         ParameterGroupName = "default.mysql5.6",
         Password           = "******",
         Username           = "******",
     });
     var test = new Aws.Rds.Snapshot("test", new Aws.Rds.SnapshotArgs
     {
         DbInstanceIdentifier = bar.Id,
         DbSnapshotIdentifier = "testsnapshot1234",
     });
 }
Пример #4
0
 public MyStack()
 {
     var defaultInstance = new Aws.Rds.Instance("defaultInstance", new Aws.Rds.InstanceArgs
     {
         AllocatedStorage  = 10,
         DbSubnetGroupName = "my_database_subnet_group",
         Engine            = "mysql",
         EngineVersion     = "5.6.17",
         InstanceClass     = "db.t2.micro",
         Name = "mydb",
         ParameterGroupName = "default.mysql5.6",
         Password           = "******",
         Username           = "******",
     });
     var defaultTopic = new Aws.Sns.Topic("defaultTopic", new Aws.Sns.TopicArgs
     {
     });
     var defaultEventSubscription = new Aws.Rds.EventSubscription("defaultEventSubscription", new Aws.Rds.EventSubscriptionArgs
     {
         EventCategories =
         {
             "availability",
             "deletion",
             "failover",
             "failure",
             "low storage",
             "maintenance",
             "notification",
             "read replica",
             "recovery",
             "restoration",
         },
         SnsTopic  = defaultTopic.Arn,
         SourceIds =
         {
             defaultInstance.Id,
         },
         SourceType = "db-instance",
     });
 }