salt.modules.boto_rds

Connection module for Amazon RDS

New in version 2015.8.0.

configuration:

This module accepts explicit rds credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More Information available at:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html

If IAM roles are not used you need to specify them either in a pillar or in the minion's config file:

rds.keyid: GKTADJGHEIQSXMKKRBJ08H
rds.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs

A region may also be specified in the configuration:

rds.region: us-east-1

If a region is not specified, the default is us-east-1.

It's also possible to specify key, keyid and region via a profile, either as a passed in dict, or as a string to pull from pillars or minion config:

myprofile:
    keyid: GKTADJGHEIQSXMKKRBJ08H
    key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
    region: us-east-1
depends:

boto3

salt.modules.boto_rds.create(name, allocated_storage, db_instance_class, engine, master_username, master_user_password, db_name=None, db_security_groups=None, vpc_security_group_ids=None, vpc_security_groups=None, availability_zone=None, db_subnet_group_name=None, preferred_maintenance_window=None, db_parameter_group_name=None, backup_retention_period=None, preferred_backup_window=None, port=None, multi_az=None, engine_version=None, auto_minor_version_upgrade=None, license_model=None, iops=None, option_group_name=None, character_set_name=None, publicly_accessible=None, wait_status=None, tags=None, db_cluster_identifier=None, storage_type=None, tde_credential_arn=None, tde_credential_password=None, storage_encrypted=None, kms_key_id=None, domain=None, copy_tags_to_snapshot=None, monitoring_interval=None, monitoring_role_arn=None, domain_iam_role_name=None, region=None, promotion_tier=None, key=None, keyid=None, profile=None)

Create an RDS Instance

CLI example to create an RDS Instance:

salt myminion boto_rds.create myrds 10 db.t2.micro MySQL sqlusr sqlpassw
salt.modules.boto_rds.create_option_group(name, engine_name, major_engine_version, option_group_description, tags=None, region=None, key=None, keyid=None, profile=None)

Create an RDS option group

CLI example to create an RDS option group:

salt myminion boto_rds.create_option_group my-opt-group mysql 5.6                 "group description"
salt.modules.boto_rds.create_parameter_group(name, db_parameter_group_family, description, tags=None, region=None, key=None, keyid=None, profile=None)

Create an RDS parameter group

CLI example to create an RDS parameter group:

salt myminion boto_rds.create_parameter_group my-param-group mysql5.6                 "group description"
salt.modules.boto_rds.create_read_replica(name, source_name, db_instance_class=None, availability_zone=None, port=None, auto_minor_version_upgrade=None, iops=None, option_group_name=None, publicly_accessible=None, tags=None, db_subnet_group_name=None, storage_type=None, copy_tags_to_snapshot=None, monitoring_interval=None, monitoring_role_arn=None, region=None, key=None, keyid=None, profile=None)

Create an RDS read replica

CLI example to create an RDS read replica:

salt myminion boto_rds.create_read_replica replicaname source_name
salt.modules.boto_rds.create_subnet_group(name, description, subnet_ids, tags=None, region=None, key=None, keyid=None, profile=None)

Create an RDS subnet group

CLI example to create an RDS subnet group:

salt myminion boto_rds.create_subnet_group my-subnet-group             "group description" '[subnet-12345678, subnet-87654321]'             region=us-east-1
salt.modules.boto_rds.delete(name, skip_final_snapshot=None, final_db_snapshot_identifier=None, region=None, key=None, keyid=None, profile=None, tags=None, wait_for_deletion=True, timeout=180)

Delete an RDS instance.

CLI example:

salt myminion boto_rds.delete myrds skip_final_snapshot=True                 region=us-east-1
salt.modules.boto_rds.delete_option_group(name, region=None, key=None, keyid=None, profile=None)

Delete an RDS option group.

CLI example:

salt myminion boto_rds.delete_option_group my-opt-group                 region=us-east-1
salt.modules.boto_rds.delete_parameter_group(name, region=None, key=None, keyid=None, profile=None)

Delete an RDS parameter group.

CLI example:

salt myminion boto_rds.delete_parameter_group my-param-group                 region=us-east-1
salt.modules.boto_rds.delete_subnet_group(name, region=None, key=None, keyid=None, profile=None)

Delete an RDS subnet group.

CLI example:

salt myminion boto_rds.delete_subnet_group my-subnet-group                 region=us-east-1
salt.modules.boto_rds.describe(name, tags=None, region=None, key=None, keyid=None, profile=None)

Return RDS instance details.

CLI example:

salt myminion boto_rds.describe myrds
salt.modules.boto_rds.describe_db_instances(name=None, filters=None, jmespath='DBInstances', region=None, key=None, keyid=None, profile=None)

Return a detailed listing of some, or all, DB Instances visible in the current scope. Arbitrary subelements or subsections of the returned dataset can be selected by passing in a valid JMSEPath filter as well.

CLI example:

salt myminion boto_rds.describe_db_instances jmespath='DBInstances[*].DBInstanceIdentifier'
salt.modules.boto_rds.describe_db_subnet_groups(name=None, filters=None, jmespath='DBSubnetGroups', region=None, key=None, keyid=None, profile=None)

Return a detailed listing of some, or all, DB Subnet Groups visible in the current scope. Arbitrary subelements or subsections of the returned dataset can be selected by passing in a valid JMSEPath filter as well.

CLI example:

salt myminion boto_rds.describe_db_subnet_groups
salt.modules.boto_rds.describe_parameter_group(name, Filters=None, MaxRecords=None, Marker=None, region=None, key=None, keyid=None, profile=None)

Returns a list of DBParameterGroup descriptions. CLI example to description of parameter group:

salt myminion boto_rds.describe_parameter_group parametergroupname            region=us-east-1
salt.modules.boto_rds.describe_parameters(name, Source=None, MaxRecords=None, Marker=None, region=None, key=None, keyid=None, profile=None)

Returns a list of DBParameterGroup parameters. CLI example to description of parameters

salt myminion boto_rds.describe_parameters parametergroupname            region=us-east-1
salt.modules.boto_rds.exists(name, tags=None, region=None, key=None, keyid=None, profile=None)

Check to see if an RDS exists.

CLI example:

salt myminion boto_rds.exists myrds region=us-east-1
salt.modules.boto_rds.get_endpoint(name, tags=None, region=None, key=None, keyid=None, profile=None)

Return the endpoint of an RDS instance.

CLI example:

salt myminion boto_rds.get_endpoint myrds
salt.modules.boto_rds.modify_db_instance(name, allocated_storage=None, allow_major_version_upgrade=None, apply_immediately=None, auto_minor_version_upgrade=None, backup_retention_period=None, ca_certificate_identifier=None, character_set_name=None, copy_tags_to_snapshot=None, db_cluster_identifier=None, db_instance_class=None, db_name=None, db_parameter_group_name=None, db_port_number=None, db_security_groups=None, db_subnet_group_name=None, domain=None, domain_iam_role_name=None, engine_version=None, iops=None, kms_key_id=None, license_model=None, master_user_password=None, monitoring_interval=None, monitoring_role_arn=None, multi_az=None, new_db_instance_identifier=None, option_group_name=None, preferred_backup_window=None, preferred_maintenance_window=None, promotion_tier=None, publicly_accessible=None, storage_encrypted=None, storage_type=None, tde_credential_arn=None, tde_credential_password=None, vpc_security_group_ids=None, region=None, key=None, keyid=None, profile=None)

Modify settings for a DB instance. CLI example to description of parameters

salt myminion boto_rds.modify_db_instance db_instance_identifier region=us-east-1
salt.modules.boto_rds.option_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None)

Check to see if an RDS option group exists.

CLI example:

salt myminion boto_rds.option_group_exists myoptiongr region=us-east-1
salt.modules.boto_rds.parameter_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None)

Check to see if an RDS parameter group exists.

CLI example:

salt myminion boto_rds.parameter_group_exists myparametergroup                 region=us-east-1
salt.modules.boto_rds.subnet_group_exists(name, tags=None, region=None, key=None, keyid=None, profile=None)

Check to see if an RDS subnet group exists.

CLI example:

salt myminion boto_rds.subnet_group_exists my-param-group                 region=us-east-1
salt.modules.boto_rds.update_parameter_group(name, parameters, apply_method='pending-reboot', tags=None, region=None, key=None, keyid=None, profile=None)

Update an RDS parameter group.

CLI example:

salt myminion boto_rds.update_parameter_group my-param-group                 parameters='{"back_log":1, "binlog_cache_size":4096}'                 region=us-east-1