# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import _utilities, _tables


class GetClusterResult:
    """
    A collection of values returned by getCluster.
    """
    def __init__(__self__, arn=None, availability_zones=None, backtrack_window=None, backup_retention_period=None, cluster_identifier=None, cluster_members=None, cluster_resource_id=None, database_name=None, db_cluster_parameter_group_name=None, db_subnet_group_name=None, enabled_cloudwatch_logs_exports=None, endpoint=None, engine=None, engine_version=None, final_snapshot_identifier=None, hosted_zone_id=None, iam_database_authentication_enabled=None, iam_roles=None, id=None, kms_key_id=None, master_username=None, port=None, preferred_backup_window=None, preferred_maintenance_window=None, reader_endpoint=None, replication_source_identifier=None, storage_encrypted=None, tags=None, vpc_security_group_ids=None):
        if arn and not isinstance(arn, str):
            raise TypeError("Expected argument 'arn' to be a str")
        __self__.arn = arn
        if availability_zones and not isinstance(availability_zones, list):
            raise TypeError("Expected argument 'availability_zones' to be a list")
        __self__.availability_zones = availability_zones
        if backtrack_window and not isinstance(backtrack_window, float):
            raise TypeError("Expected argument 'backtrack_window' to be a float")
        __self__.backtrack_window = backtrack_window
        if backup_retention_period and not isinstance(backup_retention_period, float):
            raise TypeError("Expected argument 'backup_retention_period' to be a float")
        __self__.backup_retention_period = backup_retention_period
        if cluster_identifier and not isinstance(cluster_identifier, str):
            raise TypeError("Expected argument 'cluster_identifier' to be a str")
        __self__.cluster_identifier = cluster_identifier
        if cluster_members and not isinstance(cluster_members, list):
            raise TypeError("Expected argument 'cluster_members' to be a list")
        __self__.cluster_members = cluster_members
        if cluster_resource_id and not isinstance(cluster_resource_id, str):
            raise TypeError("Expected argument 'cluster_resource_id' to be a str")
        __self__.cluster_resource_id = cluster_resource_id
        if database_name and not isinstance(database_name, str):
            raise TypeError("Expected argument 'database_name' to be a str")
        __self__.database_name = database_name
        if db_cluster_parameter_group_name and not isinstance(db_cluster_parameter_group_name, str):
            raise TypeError("Expected argument 'db_cluster_parameter_group_name' to be a str")
        __self__.db_cluster_parameter_group_name = db_cluster_parameter_group_name
        if db_subnet_group_name and not isinstance(db_subnet_group_name, str):
            raise TypeError("Expected argument 'db_subnet_group_name' to be a str")
        __self__.db_subnet_group_name = db_subnet_group_name
        if enabled_cloudwatch_logs_exports and not isinstance(enabled_cloudwatch_logs_exports, list):
            raise TypeError("Expected argument 'enabled_cloudwatch_logs_exports' to be a list")
        __self__.enabled_cloudwatch_logs_exports = enabled_cloudwatch_logs_exports
        if endpoint and not isinstance(endpoint, str):
            raise TypeError("Expected argument 'endpoint' to be a str")
        __self__.endpoint = endpoint
        if engine and not isinstance(engine, str):
            raise TypeError("Expected argument 'engine' to be a str")
        __self__.engine = engine
        if engine_version and not isinstance(engine_version, str):
            raise TypeError("Expected argument 'engine_version' to be a str")
        __self__.engine_version = engine_version
        if final_snapshot_identifier and not isinstance(final_snapshot_identifier, str):
            raise TypeError("Expected argument 'final_snapshot_identifier' to be a str")
        __self__.final_snapshot_identifier = final_snapshot_identifier
        if hosted_zone_id and not isinstance(hosted_zone_id, str):
            raise TypeError("Expected argument 'hosted_zone_id' to be a str")
        __self__.hosted_zone_id = hosted_zone_id
        if iam_database_authentication_enabled and not isinstance(iam_database_authentication_enabled, bool):
            raise TypeError("Expected argument 'iam_database_authentication_enabled' to be a bool")
        __self__.iam_database_authentication_enabled = iam_database_authentication_enabled
        if iam_roles and not isinstance(iam_roles, list):
            raise TypeError("Expected argument 'iam_roles' to be a list")
        __self__.iam_roles = iam_roles
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        The provider-assigned unique ID for this managed resource.
        """
        if kms_key_id and not isinstance(kms_key_id, str):
            raise TypeError("Expected argument 'kms_key_id' to be a str")
        __self__.kms_key_id = kms_key_id
        if master_username and not isinstance(master_username, str):
            raise TypeError("Expected argument 'master_username' to be a str")
        __self__.master_username = master_username
        if port and not isinstance(port, float):
            raise TypeError("Expected argument 'port' to be a float")
        __self__.port = port
        if preferred_backup_window and not isinstance(preferred_backup_window, str):
            raise TypeError("Expected argument 'preferred_backup_window' to be a str")
        __self__.preferred_backup_window = preferred_backup_window
        if preferred_maintenance_window and not isinstance(preferred_maintenance_window, str):
            raise TypeError("Expected argument 'preferred_maintenance_window' to be a str")
        __self__.preferred_maintenance_window = preferred_maintenance_window
        if reader_endpoint and not isinstance(reader_endpoint, str):
            raise TypeError("Expected argument 'reader_endpoint' to be a str")
        __self__.reader_endpoint = reader_endpoint
        if replication_source_identifier and not isinstance(replication_source_identifier, str):
            raise TypeError("Expected argument 'replication_source_identifier' to be a str")
        __self__.replication_source_identifier = replication_source_identifier
        if storage_encrypted and not isinstance(storage_encrypted, bool):
            raise TypeError("Expected argument 'storage_encrypted' to be a bool")
        __self__.storage_encrypted = storage_encrypted
        if tags and not isinstance(tags, dict):
            raise TypeError("Expected argument 'tags' to be a dict")
        __self__.tags = tags
        if vpc_security_group_ids and not isinstance(vpc_security_group_ids, list):
            raise TypeError("Expected argument 'vpc_security_group_ids' to be a list")
        __self__.vpc_security_group_ids = vpc_security_group_ids


class AwaitableGetClusterResult(GetClusterResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetClusterResult(
            arn=self.arn,
            availability_zones=self.availability_zones,
            backtrack_window=self.backtrack_window,
            backup_retention_period=self.backup_retention_period,
            cluster_identifier=self.cluster_identifier,
            cluster_members=self.cluster_members,
            cluster_resource_id=self.cluster_resource_id,
            database_name=self.database_name,
            db_cluster_parameter_group_name=self.db_cluster_parameter_group_name,
            db_subnet_group_name=self.db_subnet_group_name,
            enabled_cloudwatch_logs_exports=self.enabled_cloudwatch_logs_exports,
            endpoint=self.endpoint,
            engine=self.engine,
            engine_version=self.engine_version,
            final_snapshot_identifier=self.final_snapshot_identifier,
            hosted_zone_id=self.hosted_zone_id,
            iam_database_authentication_enabled=self.iam_database_authentication_enabled,
            iam_roles=self.iam_roles,
            id=self.id,
            kms_key_id=self.kms_key_id,
            master_username=self.master_username,
            port=self.port,
            preferred_backup_window=self.preferred_backup_window,
            preferred_maintenance_window=self.preferred_maintenance_window,
            reader_endpoint=self.reader_endpoint,
            replication_source_identifier=self.replication_source_identifier,
            storage_encrypted=self.storage_encrypted,
            tags=self.tags,
            vpc_security_group_ids=self.vpc_security_group_ids)


def get_cluster(cluster_identifier=None, tags=None, opts=None):
    """
    Provides information about an RDS cluster.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_aws as aws

    cluster_name = aws.rds.get_cluster(cluster_identifier="clusterName")
    ```


    :param str cluster_identifier: The cluster identifier of the RDS cluster.
    """
    __args__ = dict()
    __args__['clusterIdentifier'] = cluster_identifier
    __args__['tags'] = tags
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:rds/getCluster:getCluster', __args__, opts=opts).value

    return AwaitableGetClusterResult(
        arn=__ret__.get('arn'),
        availability_zones=__ret__.get('availabilityZones'),
        backtrack_window=__ret__.get('backtrackWindow'),
        backup_retention_period=__ret__.get('backupRetentionPeriod'),
        cluster_identifier=__ret__.get('clusterIdentifier'),
        cluster_members=__ret__.get('clusterMembers'),
        cluster_resource_id=__ret__.get('clusterResourceId'),
        database_name=__ret__.get('databaseName'),
        db_cluster_parameter_group_name=__ret__.get('dbClusterParameterGroupName'),
        db_subnet_group_name=__ret__.get('dbSubnetGroupName'),
        enabled_cloudwatch_logs_exports=__ret__.get('enabledCloudwatchLogsExports'),
        endpoint=__ret__.get('endpoint'),
        engine=__ret__.get('engine'),
        engine_version=__ret__.get('engineVersion'),
        final_snapshot_identifier=__ret__.get('finalSnapshotIdentifier'),
        hosted_zone_id=__ret__.get('hostedZoneId'),
        iam_database_authentication_enabled=__ret__.get('iamDatabaseAuthenticationEnabled'),
        iam_roles=__ret__.get('iamRoles'),
        id=__ret__.get('id'),
        kms_key_id=__ret__.get('kmsKeyId'),
        master_username=__ret__.get('masterUsername'),
        port=__ret__.get('port'),
        preferred_backup_window=__ret__.get('preferredBackupWindow'),
        preferred_maintenance_window=__ret__.get('preferredMaintenanceWindow'),
        reader_endpoint=__ret__.get('readerEndpoint'),
        replication_source_identifier=__ret__.get('replicationSourceIdentifier'),
        storage_encrypted=__ret__.get('storageEncrypted'),
        tags=__ret__.get('tags'),
        vpc_security_group_ids=__ret__.get('vpcSecurityGroupIds'))
