2016/05/24 - Amazon Relational Database Service - 2 new2 updated api methods
Changes Update rds client to latest version
Returns a list of DB cluster snapshot attribute names and values for a manual DB cluster snapshot.
When sharing snapshots with other AWS accounts, DescribeDBClusterSnapshotAttributes returns the restore attribute and a list of IDs for the AWS accounts that are authorized to copy or restore the manual DB cluster snapshot. If all is included in the list of values for the restore attribute, then the manual DB cluster snapshot is public and can be copied or restored by all AWS accounts.
To add or remove access for an AWS account to copy or restore a manual DB cluster snapshot, or to make the manual DB cluster snapshot public or private, use the ModifyDBClusterSnapshotAttribute API action.
Request Syntax
client.describe_db_cluster_snapshot_attributes( DBClusterSnapshotIdentifier='string' )
string
[REQUIRED]
The identifier for the DB cluster snapshot to describe the attributes for.
dict
Response Syntax
{ 'DBClusterSnapshotAttributesResult': { 'DBClusterSnapshotIdentifier': 'string', 'DBClusterSnapshotAttributes': [ { 'AttributeName': 'string', 'AttributeValues': [ 'string', ] }, ] } }
Response Structure
(dict) --
DBClusterSnapshotAttributesResult (dict) --
Contains the results of a successful call to the DescribeDBClusterSnapshotAttributes API action.
Manual DB cluster snapshot attributes are used to authorize other AWS accounts to copy or restore a manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
DBClusterSnapshotIdentifier (string) --
The identifier of the manual DB cluster snapshot that the attributes apply to.
DBClusterSnapshotAttributes (list) --
The list of attributes and values for the manual DB cluster snapshot.
(dict) --
Contains the name and values of a manual DB cluster snapshot attribute.
Manual DB cluster snapshot attributes are used to authorize other AWS accounts to restore a manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
AttributeName (string) --
The name of the manual DB cluster snapshot attribute.
The attribute named restore refers to the list of AWS accounts that have permission to copy or restore the manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
AttributeValues (list) --
The value(s) for the manual DB cluster snapshot attribute.
If the AttributeName field is set to restore, then this element returns a list of IDs of the AWS accounts that are authorized to copy or restore the manual DB cluster snapshot. If a value of all is in the list, then the manual DB cluster snapshot is public and available for any AWS account to copy or restore.
(string) --
Adds an attribute and values to, or removes an attribute and values from, a manual DB cluster snapshot.
To share a manual DB cluster snapshot with other AWS accounts, specify restore as the AttributeName and use the ValuesToAdd parameter to add a list of IDs of the AWS accounts that are authorized to restore the manual DB cluster snapshot. Use the value all to make the manual DB cluster snapshot public, which means that it can be copied or restored by all AWS accounts. Do not add the all value for any manual DB cluster snapshots that contain private information that you don't want available to all AWS accounts.
To view which AWS accounts have access to copy or restore a manual DB cluster snapshot, or whether a manual DB cluster snapshot public or private, use the DescribeDBClusterSnapshotAttributes API action.
If a manual DB cluster snapshot is encrypted, it cannot be shared.
Request Syntax
client.modify_db_cluster_snapshot_attribute( DBClusterSnapshotIdentifier='string', AttributeName='string', ValuesToAdd=[ 'string', ], ValuesToRemove=[ 'string', ] )
string
[REQUIRED]
The identifier for the DB cluster snapshot to modify the attributes for.
string
[REQUIRED]
The name of the DB cluster snapshot attribute to modify.
To manage authorization for other AWS accounts to copy or restore a manual DB cluster snapshot, set this value to restore.
list
A list of DB cluster snapshot attributes to add to the attribute specified by AttributeName.
To authorize other AWS accounts to copy or restore a manual DB cluster snapshot, set this list to include one or more AWS account IDs, or all to make the manual DB cluster snapshot restorable by any AWS account. Do not add the all value for any manual DB cluster snapshots that contain private information that you don't want available to all AWS accounts.
(string) --
list
A list of DB cluster snapshot attributes to remove from the attribute specified by AttributeName.
To remove authorization for other AWS accounts to copy or restore a manual DB cluster snapshot, set this list to include one or more AWS account identifiers, or all to remove authorization for any AWS account to copy or restore the DB cluster snapshot. If you specify all, an AWS account whose account ID is explicitly added to the restore attribute can still copy or restore a manual DB cluster snapshot.
(string) --
dict
Response Syntax
{ 'DBClusterSnapshotAttributesResult': { 'DBClusterSnapshotIdentifier': 'string', 'DBClusterSnapshotAttributes': [ { 'AttributeName': 'string', 'AttributeValues': [ 'string', ] }, ] } }
Response Structure
(dict) --
DBClusterSnapshotAttributesResult (dict) --
Contains the results of a successful call to the DescribeDBClusterSnapshotAttributes API action.
Manual DB cluster snapshot attributes are used to authorize other AWS accounts to copy or restore a manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
DBClusterSnapshotIdentifier (string) --
The identifier of the manual DB cluster snapshot that the attributes apply to.
DBClusterSnapshotAttributes (list) --
The list of attributes and values for the manual DB cluster snapshot.
(dict) --
Contains the name and values of a manual DB cluster snapshot attribute.
Manual DB cluster snapshot attributes are used to authorize other AWS accounts to restore a manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
AttributeName (string) --
The name of the manual DB cluster snapshot attribute.
The attribute named restore refers to the list of AWS accounts that have permission to copy or restore the manual DB cluster snapshot. For more information, see the ModifyDBClusterSnapshotAttribute API action.
AttributeValues (list) --
The value(s) for the manual DB cluster snapshot attribute.
If the AttributeName field is set to restore, then this element returns a list of IDs of the AWS accounts that are authorized to copy or restore the manual DB cluster snapshot. If a value of all is in the list, then the manual DB cluster snapshot is public and available for any AWS account to copy or restore.
(string) --
{'ReplicationSourceIdentifier': 'string'}
Creates a new Amazon Aurora DB cluster.
You can use the ReplicationSourceIdentifier parameter to create the DB cluster as a Read Replica of another DB cluster.
For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.
Request Syntax
client.create_db_cluster( AvailabilityZones=[ 'string', ], BackupRetentionPeriod=123, CharacterSetName='string', DatabaseName='string', DBClusterIdentifier='string', DBClusterParameterGroupName='string', VpcSecurityGroupIds=[ 'string', ], DBSubnetGroupName='string', Engine='string', EngineVersion='string', Port=123, MasterUsername='string', MasterUserPassword='string', OptionGroupName='string', PreferredBackupWindow='string', PreferredMaintenanceWindow='string', ReplicationSourceIdentifier='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ], StorageEncrypted=True|False, KmsKeyId='string' )
list
A list of EC2 Availability Zones that instances in the DB cluster can be created in. For information on regions and Availability Zones, see Regions and Availability Zones.
(string) --
integer
The number of days for which automated backups are retained. You must specify a minimum value of 1.
Default: 1
Constraints:
Must be a value from 1 to 35
string
A value that indicates that the DB cluster should be associated with the specified CharacterSet.
string
The name for your database of up to 8 alpha-numeric characters. If you do not provide a name, Amazon RDS will not create a database in the DB cluster you are creating.
string
[REQUIRED]
The DB cluster identifier. This parameter is stored as a lowercase string.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens.
First character must be a letter.
Cannot end with a hyphen or contain two consecutive hyphens.
Example: my-cluster1
string
The name of the DB cluster parameter group to associate with this DB cluster. If this argument is omitted, default.aurora5.6 for the specified engine will be used.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
list
A list of EC2 VPC security groups to associate with this DB cluster.
(string) --
string
A DB subnet group to associate with this DB cluster.
Constraints: Must contain no more than 255 alphanumeric characters, periods, underscores, spaces, or hyphens. Must not be default.
Example: mySubnetgroup
string
[REQUIRED]
The name of the database engine to be used for this DB cluster.
Valid Values: aurora
string
The version number of the database engine to use.
Aurora
Example: 5.6.10a
integer
The port number on which the instances in the DB cluster accept connections.
Default: 3306
string
[REQUIRED]
The name of the master user for the client DB cluster.
Constraints:
Must be 1 to 16 alphanumeric characters.
First character must be a letter.
Cannot be a reserved word for the chosen database engine.
string
[REQUIRED]
The password for the master database user. This password can contain any printable ASCII character except "/", """, or "@".
Constraints: Must contain from 8 to 41 characters.
string
A value that indicates that the DB cluster should be associated with the specified option group.
Permanent options cannot be removed from an option group. The option group cannot be removed from a DB cluster once it is associated with a DB cluster.
string
The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.
Default: A 30-minute window selected at random from an 8-hour block of time per region. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Constraints:
Must be in the format hh24:mi-hh24:mi.
Times should be in Universal Coordinated Time (UTC).
Must not conflict with the preferred maintenance window.
Must be at least 30 minutes.
string
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
Format: ddd:hh24:mi-ddd:hh24:mi
Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. To see the time blocks available, see Adjusting the Preferred Maintenance Window in the Amazon RDS User Guide.
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
Constraints: Minimum 30-minute window.
string
The Amazon Resource Name (ARN) of the source DB cluster if this DB cluster is created as a Read Replica.
list
A list of tags.
(dict) --
Metadata assigned to an Amazon RDS resource consisting of a key-value pair.
Key (string) --
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and cannot be prefixed with "aws:" or "rds:". The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$").
Value (string) --
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and cannot be prefixed with "aws:" or "rds:". The string can only contain only the set of Unicode letters, digits, white-space, '_', '.', '/', '=', '+', '-' (Java regex: "^([\p{L}\p{Z}\p{N}_.:/=+\-]*)$").
boolean
Specifies whether the DB cluster is encrypted.
string
The KMS key identifier for an encrypted DB cluster.
The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a DB cluster with the same AWS account that owns the KMS encryption key used to encrypt the new DB cluster, then you can use the KMS key alias instead of the ARN for the KM encryption key.
If the StorageEncrypted parameter is true, and you do not specify a value for the KmsKeyId parameter, then Amazon RDS will use your default encryption key. AWS KMS creates the default encryption key for your AWS account. Your AWS account has a different default encryption key for each AWS region.
dict
Response Syntax
{ 'DBCluster': { 'AllocatedStorage': 123, 'AvailabilityZones': [ 'string', ], 'BackupRetentionPeriod': 123, 'CharacterSetName': 'string', 'DatabaseName': 'string', 'DBClusterIdentifier': 'string', 'DBClusterParameterGroup': 'string', 'DBSubnetGroup': 'string', 'Status': 'string', 'PercentProgress': 'string', 'EarliestRestorableTime': datetime(2015, 1, 1), 'Endpoint': 'string', 'Engine': 'string', 'EngineVersion': 'string', 'LatestRestorableTime': datetime(2015, 1, 1), 'Port': 123, 'MasterUsername': 'string', 'DBClusterOptionGroupMemberships': [ { 'DBClusterOptionGroupName': 'string', 'Status': 'string' }, ], 'PreferredBackupWindow': 'string', 'PreferredMaintenanceWindow': 'string', 'DBClusterMembers': [ { 'DBInstanceIdentifier': 'string', 'IsClusterWriter': True|False, 'DBClusterParameterGroupStatus': 'string', 'PromotionTier': 123 }, ], 'VpcSecurityGroups': [ { 'VpcSecurityGroupId': 'string', 'Status': 'string' }, ], 'HostedZoneId': 'string', 'StorageEncrypted': True|False, 'KmsKeyId': 'string', 'DbClusterResourceId': 'string' } }
Response Structure
(dict) --
DBCluster (dict) --
Contains the result of a successful invocation of the following actions:
CreateDBCluster
DeleteDBCluster
FailoverDBCluster
ModifyDBCluster
RestoreDBClusterFromSnapshot
RestoreDBClusterToPointInTime
This data type is used as a response element in the DescribeDBClusters action.
AllocatedStorage (integer) --
Specifies the allocated storage size in gigabytes (GB).
AvailabilityZones (list) --
Provides the list of EC2 Availability Zones that instances in the DB cluster can be created in.
(string) --
BackupRetentionPeriod (integer) --
Specifies the number of days for which automatic DB snapshots are retained.
CharacterSetName (string) --
If present, specifies the name of the character set that this cluster is associated with.
DatabaseName (string) --
Contains the name of the initial database of this DB cluster that was provided at create time, if one was specified when the DB cluster was created. This same name is returned for the life of the DB cluster.
DBClusterIdentifier (string) --
Contains a user-supplied DB cluster identifier. This identifier is the unique key that identifies a DB cluster.
DBClusterParameterGroup (string) --
Specifies the name of the DB cluster parameter group for the DB cluster.
DBSubnetGroup (string) --
Specifies information on the subnet group associated with the DB cluster, including the name, description, and subnets in the subnet group.
Status (string) --
Specifies the current state of this DB cluster.
PercentProgress (string) --
Specifies the progress of the operation as a percentage.
EarliestRestorableTime (datetime) --
Specifies the earliest time to which a database can be restored with point-in-time restore.
Endpoint (string) --
Specifies the connection endpoint for the primary instance of the DB cluster.
Engine (string) --
Provides the name of the database engine to be used for this DB cluster.
EngineVersion (string) --
Indicates the database engine version.
LatestRestorableTime (datetime) --
Specifies the latest time to which a database can be restored with point-in-time restore.
Port (integer) --
Specifies the port that the database engine is listening on.
MasterUsername (string) --
Contains the master username for the DB cluster.
DBClusterOptionGroupMemberships (list) --
Provides the list of option group memberships for this DB cluster.
(dict) --
Contains status information for a DB cluster option group.
DBClusterOptionGroupName (string) --
Specifies the name of the DB cluster option group.
Status (string) --
Specifies the status of the DB cluster option group.
PreferredBackupWindow (string) --
Specifies the daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod.
PreferredMaintenanceWindow (string) --
Specifies the weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).
DBClusterMembers (list) --
Provides the list of instances that make up the DB cluster.
(dict) --
Contains information about an instance that is part of a DB cluster.
DBInstanceIdentifier (string) --
Specifies the instance identifier for this member of the DB cluster.
IsClusterWriter (boolean) --
Value that is true if the cluster member is the primary instance for the DB cluster and false otherwise.
DBClusterParameterGroupStatus (string) --
Specifies the status of the DB cluster parameter group for this member of the DB cluster.
PromotionTier (integer) --
A value that specifies the order in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance. For more information, see Fault Tolerance for an Aurora DB Cluster.
VpcSecurityGroups (list) --
Provides a list of VPC security groups that the DB cluster belongs to.
(dict) --
This data type is used as a response element for queries on VPC security group membership.
VpcSecurityGroupId (string) --
The name of the VPC security group.
Status (string) --
The status of the VPC security group.
HostedZoneId (string) --
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.
StorageEncrypted (boolean) --
Specifies whether the DB cluster is encrypted.
KmsKeyId (string) --
If StorageEncrypted is true, the KMS key identifier for the encrypted DB cluster.
DbClusterResourceId (string) --
The region-unique, immutable identifier for the DB cluster. This identifier is found in AWS CloudTrail log entries whenever the KMS key for the DB cluster is accessed.
{'IncludePublic': 'boolean', 'IncludeShared': 'boolean'}
Returns information about DB cluster snapshots. This API action supports pagination.
For more information on Amazon Aurora, see Aurora on Amazon RDS in the Amazon RDS User Guide.
Request Syntax
client.describe_db_cluster_snapshots( DBClusterIdentifier='string', DBClusterSnapshotIdentifier='string', SnapshotType='string', Filters=[ { 'Name': 'string', 'Values': [ 'string', ] }, ], MaxRecords=123, Marker='string', IncludeShared=True|False, IncludePublic=True|False )
string
The ID of the DB cluster to retrieve the list of DB cluster snapshots for. This parameter cannot be used in conjunction with the DBClusterSnapshotIdentifier parameter. This parameter is not case-sensitive.
Constraints:
Must contain from 1 to 63 alphanumeric characters or hyphens
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
string
A specific DB cluster snapshot identifier to describe. This parameter cannot be used in conjunction with the DBClusterIdentifier parameter. This value is stored as a lowercase string.
Constraints:
Must be 1 to 255 alphanumeric characters
First character must be a letter
Cannot end with a hyphen or contain two consecutive hyphens
If this identifier is for an automated snapshot, the SnapshotType parameter must also be specified.
string
The type of DB cluster snapshots to be returned. You can specify one of the following values:
automated - Return all DB cluster snapshots that have been automatically taken by Amazon RDS for my AWS account.
manual - Return all DB cluster snapshots that have been taken by my AWS account.
shared - Return all manual DB cluster snapshots that have been shared to my AWS account.
public - Return all DB cluster snapshots that have been marked as public.
If you don't specify a SnapshotType value, then both automated and manual DB cluster snapshots are returned. You can include shared DB cluster snapshots with these results by setting the IncludeShared parameter to true. You can include public DB cluster snapshots with these results by setting the IncludePublic parameter to true.
The IncludeShared and IncludePublic parameters don't apply for SnapshotType values of manual or automated. The IncludePublic parameter doesn't apply when SnapshotType is set to shared. The IncludeShared parameter doesn't apply when SnapshotType is set to public.
list
This parameter is not currently supported.
(dict) --
This type is not currently supported.
Name (string) -- [REQUIRED]
This parameter is not currently supported.
Values (list) -- [REQUIRED]
This parameter is not currently supported.
(string) --
integer
The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that the remaining results can be retrieved.
Default: 100
Constraints: Minimum 20, maximum 100.
string
An optional pagination token provided by a previous DescribeDBClusterSnapshots request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
boolean
Set this value to true to include shared manual DB cluster snapshots from other AWS accounts that this AWS account has been given permission to copy or restore, otherwise set this value to false. The default is false.
You can give an AWS account permission to restore a manual DB cluster snapshot from another AWS account by the ModifyDBClusterSnapshotAttribute API action.
boolean
Set this value to true to include manual DB cluster snapshots that are public and can be copied or restored by any AWS account, otherwise set this value to false. The default is false. The default is false.
You can share a manual DB cluster snapshot as public by using the ModifyDBClusterSnapshotAttribute API action.
dict
Response Syntax
{ 'Marker': 'string', 'DBClusterSnapshots': [ { 'AvailabilityZones': [ 'string', ], 'DBClusterSnapshotIdentifier': 'string', 'DBClusterIdentifier': 'string', 'SnapshotCreateTime': datetime(2015, 1, 1), 'Engine': 'string', 'AllocatedStorage': 123, 'Status': 'string', 'Port': 123, 'VpcId': 'string', 'ClusterCreateTime': datetime(2015, 1, 1), 'MasterUsername': 'string', 'EngineVersion': 'string', 'LicenseModel': 'string', 'SnapshotType': 'string', 'PercentProgress': 123, 'StorageEncrypted': True|False, 'KmsKeyId': 'string' }, ] }
Response Structure
(dict) --
Provides a list of DB cluster snapshots for the user as the result of a call to the DescribeDBClusterSnapshots action.
Marker (string) --
An optional pagination token provided by a previous DescribeDBClusterSnapshots request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by MaxRecords.
DBClusterSnapshots (list) --
Provides a list of DB cluster snapshots for the user.
(dict) --
Contains the result of a successful invocation of the following actions:
CreateDBClusterSnapshot
DeleteDBClusterSnapshot
This data type is used as a response element in the DescribeDBClusterSnapshots action.
AvailabilityZones (list) --
Provides the list of EC2 Availability Zones that instances in the DB cluster snapshot can be restored in.
(string) --
DBClusterSnapshotIdentifier (string) --
Specifies the identifier for the DB cluster snapshot.
DBClusterIdentifier (string) --
Specifies the DB cluster identifier of the DB cluster that this DB cluster snapshot was created from.
SnapshotCreateTime (datetime) --
Provides the time when the snapshot was taken, in Universal Coordinated Time (UTC).
Engine (string) --
Specifies the name of the database engine.
AllocatedStorage (integer) --
Specifies the allocated storage size in gigabytes (GB).
Status (string) --
Specifies the status of this DB cluster snapshot.
Port (integer) --
Specifies the port that the DB cluster was listening on at the time of the snapshot.
VpcId (string) --
Provides the VPC ID associated with the DB cluster snapshot.
ClusterCreateTime (datetime) --
Specifies the time when the DB cluster was created, in Universal Coordinated Time (UTC).
MasterUsername (string) --
Provides the master username for the DB cluster snapshot.
EngineVersion (string) --
Provides the version of the database engine for this DB cluster snapshot.
LicenseModel (string) --
Provides the license model information for this DB cluster snapshot.
SnapshotType (string) --
Provides the type of the DB cluster snapshot.
PercentProgress (integer) --
Specifies the percentage of the estimated data that has been transferred.
StorageEncrypted (boolean) --
Specifies whether the DB cluster snapshot is encrypted.
KmsKeyId (string) --
If StorageEncrypted is true, the KMS key identifier for the encrypted DB cluster snapshot.