get_relational_database

get_relational_database(**kwargs)

Returns information about a specific database in Amazon Lightsail.

See also: AWS API Documentation

Request Syntax

response = client.get_relational_database(
    relationalDatabaseName='string'
)
Parameters
relationalDatabaseName (string) --

[REQUIRED]

The name of the database that you are looking up.

Return type
dict
Returns
Response Syntax
{
    'relationalDatabase': {
        'name': 'string',
        'arn': 'string',
        'supportCode': 'string',
        'createdAt': datetime(2015, 1, 1),
        'location': {
            'availabilityZone': 'string',
            'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1'
        },
        'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket',
        'tags': [
            {
                'key': 'string',
                'value': 'string'
            },
        ],
        'relationalDatabaseBlueprintId': 'string',
        'relationalDatabaseBundleId': 'string',
        'masterDatabaseName': 'string',
        'hardware': {
            'cpuCount': 123,
            'diskSizeInGb': 123,
            'ramSizeInGb': ...
        },
        'state': 'string',
        'secondaryAvailabilityZone': 'string',
        'backupRetentionEnabled': True|False,
        'pendingModifiedValues': {
            'masterUserPassword': 'string',
            'engineVersion': 'string',
            'backupRetentionEnabled': True|False
        },
        'engine': 'string',
        'engineVersion': 'string',
        'latestRestorableTime': datetime(2015, 1, 1),
        'masterUsername': 'string',
        'parameterApplyStatus': 'string',
        'preferredBackupWindow': 'string',
        'preferredMaintenanceWindow': 'string',
        'publiclyAccessible': True|False,
        'masterEndpoint': {
            'port': 123,
            'address': 'string'
        },
        'pendingMaintenanceActions': [
            {
                'action': 'string',
                'description': 'string',
                'currentApplyDate': datetime(2015, 1, 1)
            },
        ],
        'caCertificateIdentifier': 'string'
    }
}

Response Structure

  • (dict) --
    • relationalDatabase (dict) --

      An object describing the specified database.

      • name (string) --

        The unique name of the database resource in Lightsail.

      • arn (string) --

        The Amazon Resource Name (ARN) of the database.

      • supportCode (string) --

        The support code for the database. Include this code in your email to support when you have questions about a database in Lightsail. This code enables our support team to look up your Lightsail information more easily.

      • createdAt (datetime) --

        The timestamp when the database was created. Formatted in Unix time.

      • location (dict) --

        The Region name and Availability Zone where the database is located.

        • availabilityZone (string) --

          The Availability Zone. Follows the format us-east-2a (case-sensitive).

        • regionName (string) --

          The Amazon Web Services Region name.

      • resourceType (string) --

        The Lightsail resource type for the database (for example, RelationalDatabase ).

      • tags (list) --

        The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.

        • (dict) --

          Describes a tag key and optional value assigned to an Amazon Lightsail resource.

          For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.

          • key (string) --

            The key of the tag.

            Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @

          • value (string) --

            The value of the tag.

            Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @

      • relationalDatabaseBlueprintId (string) --

        The blueprint ID for the database. A blueprint describes the major engine version of a database.

      • relationalDatabaseBundleId (string) --

        The bundle ID for the database. A bundle describes the performance specifications for your database.

      • masterDatabaseName (string) --

        The name of the master database created when the Lightsail database resource is created.

      • hardware (dict) --

        Describes the hardware of the database.

        • cpuCount (integer) --

          The number of vCPUs for the database.

        • diskSizeInGb (integer) --

          The size of the disk for the database.

        • ramSizeInGb (float) --

          The amount of RAM in GB for the database.

      • state (string) --

        Describes the current state of the database.

      • secondaryAvailabilityZone (string) --

        Describes the secondary Availability Zone of a high availability database.

        The secondary database is used for failover support of a high availability database.

      • backupRetentionEnabled (boolean) --

        A Boolean value indicating whether automated backup retention is enabled for the database.

      • pendingModifiedValues (dict) --

        Describes pending database value modifications.

        • masterUserPassword (string) --

          The password for the master user of the database.

        • engineVersion (string) --

          The database engine version.

        • backupRetentionEnabled (boolean) --

          A Boolean value indicating whether automated backup retention is enabled.

      • engine (string) --

        The database software (for example, MySQL ).

      • engineVersion (string) --

        The database engine version (for example, 5.7.23 ).

      • latestRestorableTime (datetime) --

        The latest point in time to which the database can be restored. Formatted in Unix time.

      • masterUsername (string) --

        The master user name of the database.

      • parameterApplyStatus (string) --

        The status of parameter updates for the database.

      • preferredBackupWindow (string) --

        The daily time range during which automated backups are created for the database (for example, 16:00-16:30 ).

      • preferredMaintenanceWindow (string) --

        The weekly time range during which system maintenance can occur on the database.

        In the format ddd:hh24:mi-ddd:hh24:mi . For example, Tue:17:00-Tue:17:30 .

      • publiclyAccessible (boolean) --

        A Boolean value indicating whether the database is publicly accessible.

      • masterEndpoint (dict) --

        The master endpoint for the database.

        • port (integer) --

          Specifies the port that the database is listening on.

        • address (string) --

          Specifies the DNS address of the database.

      • pendingMaintenanceActions (list) --

        Describes the pending maintenance actions for the database.

        • (dict) --

          Describes a pending database maintenance action.

          • action (string) --

            The type of pending database maintenance action.

          • description (string) --

            Additional detail about the pending database maintenance action.

          • currentApplyDate (datetime) --

            The effective date of the pending database maintenance action.

      • caCertificateIdentifier (string) --

        The certificate associated with the database.

Exceptions

  • Lightsail.Client.exceptions.ServiceException
  • Lightsail.Client.exceptions.InvalidInputException
  • Lightsail.Client.exceptions.NotFoundException
  • Lightsail.Client.exceptions.OperationFailureException
  • Lightsail.Client.exceptions.AccessDeniedException
  • Lightsail.Client.exceptions.AccountSetupInProgressException
  • Lightsail.Client.exceptions.UnauthenticatedException