Documentation ¶
Overview ¶
A flexible AWS CDK construct for scheduled RDS MySQL backups to S3.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRDSMySQLBackupLambda_Override ¶
func NewRDSMySQLBackupLambda_Override(r RDSMySQLBackupLambda, scope constructs.Construct, id *string, props *RDSMySQLBackupLambdaProps)
func RDSMySQLBackupLambda_IsConstruct ¶
func RDSMySQLBackupLambda_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
Types ¶
type RDSMySQLBackupLambda ¶
type RDSMySQLBackupLambda interface { constructs.Construct // The lambda function to backup the RDS instance. LambdaFunction() awslambda.Function // The tree node. Node() constructs.Node // The S3 bucket created to store the RDS backups. S3Bucket() awss3.Bucket // Returns a string representation of this construct. ToString() *string }
func NewRDSMySQLBackupLambda ¶
func NewRDSMySQLBackupLambda(scope constructs.Construct, id *string, props *RDSMySQLBackupLambdaProps) RDSMySQLBackupLambda
type RDSMySQLBackupLambdaProps ¶
type RDSMySQLBackupLambdaProps struct { // The AWS account ID this resource belongs to. // Default: - the resource is in the same account as the stack it belongs to. // Account *string `field:"optional" json:"account" yaml:"account"` // ARN to deduce region and account from. // // The ARN is parsed and the account and region are taken from the ARN. // This should be used for imported resources. // // Cannot be supplied together with either `account` or `region`. // Default: - take environment from `account`, `region` parameters, or use Stack environment. // EnvironmentFromArn *string `field:"optional" json:"environmentFromArn" yaml:"environmentFromArn"` // The value passed in by users to the physical name prop of the resource. // // - `undefined` implies that a physical name will be allocated by // CloudFormation during deployment. // - a concrete value implies a specific physical name // - `PhysicalName.GENERATE_IF_NEEDED` is a marker that indicates that a physical will only be generated // by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated by CloudFormation. // Default: - The physical name will be allocated by CloudFormation at deployment time. // PhysicalName *string `field:"optional" json:"physicalName" yaml:"physicalName"` // The AWS region this resource belongs to. // Default: - the resource is in the same region as the stack it belongs to. // Region *string `field:"optional" json:"region" yaml:"region"` // Name of the database to backup. DbName *string `field:"required" json:"dbName" yaml:"dbName"` // Password to connect to the RDS instance. DbPassword *string `field:"required" json:"dbPassword" yaml:"dbPassword"` // User to connect to the RDS instance. DbUser *string `field:"required" json:"dbUser" yaml:"dbUser"` // Endpoint address of the RDS instance. RdsInstanceEndpointAddress *string `field:"required" json:"rdsInstanceEndpointAddress" yaml:"rdsInstanceEndpointAddress"` // Name of RDS instance to backup. RdsInstanceName *string `field:"required" json:"rdsInstanceName" yaml:"rdsInstanceName"` // Security group ID for the RDS instance. RdsSecurityGroupId *string `field:"required" json:"rdsSecurityGroupId" yaml:"rdsSecurityGroupId"` // VPC used by the RDS instance. RdsVpc awsec2.IVpc `field:"required" json:"rdsVpc" yaml:"rdsVpc"` // VPC subnet group used by the RDS instance. RdsVpcSubnets *awsec2.SelectedSubnets `field:"required" json:"rdsVpcSubnets" yaml:"rdsVpcSubnets"` // Name of the lambda function that will be created. // Default: - [db-instance-identifier]-rds-backup-lambda. // LambdaFunctionName *string `field:"optional" json:"lambdaFunctionName" yaml:"lambdaFunctionName"` // Timeout value for the backup lambda function. // Default: - 5 minutes. // LambdaTimeout awscdk.Duration `field:"optional" json:"lambdaTimeout" yaml:"lambdaTimeout"` // Port of the RDS instance. RdsInstancePort *float64 `field:"optional" json:"rdsInstancePort" yaml:"rdsInstancePort"` // Name of the S3 bucket to store the RDS backups. // Default: - [db-instance-identifier]-rds-backup. // S3BucketName *string `field:"optional" json:"s3BucketName" yaml:"s3BucketName"` // Schedule for the lambda function to run. // Default: - Every day at 00:00 UTC. // ScheduleRule awsevents.Schedule `field:"optional" json:"scheduleRule" yaml:"scheduleRule"` }
Properties for the RDSMySQLBackupLambda construct.