Skip to content

RedshiftClient#

Index > Redshift > RedshiftClient

Auto-generated documentation for Redshift type annotations stubs module mypy-boto3-redshift.

RedshiftClient#

Type annotations and code completion for boto3.client("redshift"). boto3 documentation

# RedshiftClient usage example

from boto3.session import Session
from mypy_boto3_redshift.client import RedshiftClient

def get_redshift_client() -> RedshiftClient:
    return Session().client("redshift")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("redshift").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("redshift")

try:
    do_something(client)
except (
    client.exceptions.AccessToClusterDeniedFault,
    client.exceptions.AccessToSnapshotDeniedFault,
    client.exceptions.AuthenticationProfileAlreadyExistsFault,
    client.exceptions.AuthenticationProfileNotFoundFault,
    client.exceptions.AuthenticationProfileQuotaExceededFault,
    client.exceptions.AuthorizationAlreadyExistsFault,
    client.exceptions.AuthorizationNotFoundFault,
    client.exceptions.AuthorizationQuotaExceededFault,
    client.exceptions.BatchDeleteRequestSizeExceededFault,
    client.exceptions.BatchModifyClusterSnapshotsLimitExceededFault,
    client.exceptions.BucketNotFoundFault,
    client.exceptions.ClientError,
    client.exceptions.ClusterAlreadyExistsFault,
    client.exceptions.ClusterNotFoundFault,
    client.exceptions.ClusterOnLatestRevisionFault,
    client.exceptions.ClusterParameterGroupAlreadyExistsFault,
    client.exceptions.ClusterParameterGroupNotFoundFault,
    client.exceptions.ClusterParameterGroupQuotaExceededFault,
    client.exceptions.ClusterQuotaExceededFault,
    client.exceptions.ClusterSecurityGroupAlreadyExistsFault,
    client.exceptions.ClusterSecurityGroupNotFoundFault,
    client.exceptions.ClusterSecurityGroupQuotaExceededFault,
    client.exceptions.ClusterSnapshotAlreadyExistsFault,
    client.exceptions.ClusterSnapshotNotFoundFault,
    client.exceptions.ClusterSnapshotQuotaExceededFault,
    client.exceptions.ClusterSubnetGroupAlreadyExistsFault,
    client.exceptions.ClusterSubnetGroupNotFoundFault,
    client.exceptions.ClusterSubnetGroupQuotaExceededFault,
    client.exceptions.ClusterSubnetQuotaExceededFault,
    client.exceptions.ConflictPolicyUpdateFault,
    client.exceptions.CopyToRegionDisabledFault,
    client.exceptions.CustomCnameAssociationFault,
    client.exceptions.CustomDomainAssociationNotFoundFault,
    client.exceptions.DependentServiceAccessDeniedFault,
    client.exceptions.DependentServiceRequestThrottlingFault,
    client.exceptions.DependentServiceUnavailableFault,
    client.exceptions.EndpointAlreadyExistsFault,
    client.exceptions.EndpointAuthorizationAlreadyExistsFault,
    client.exceptions.EndpointAuthorizationNotFoundFault,
    client.exceptions.EndpointAuthorizationsPerClusterLimitExceededFault,
    client.exceptions.EndpointNotFoundFault,
    client.exceptions.EndpointsPerAuthorizationLimitExceededFault,
    client.exceptions.EndpointsPerClusterLimitExceededFault,
    client.exceptions.EventSubscriptionQuotaExceededFault,
    client.exceptions.HsmClientCertificateAlreadyExistsFault,
    client.exceptions.HsmClientCertificateNotFoundFault,
    client.exceptions.HsmClientCertificateQuotaExceededFault,
    client.exceptions.HsmConfigurationAlreadyExistsFault,
    client.exceptions.HsmConfigurationNotFoundFault,
    client.exceptions.HsmConfigurationQuotaExceededFault,
    client.exceptions.InProgressTableRestoreQuotaExceededFault,
    client.exceptions.IncompatibleOrderableOptions,
    client.exceptions.InsufficientClusterCapacityFault,
    client.exceptions.InsufficientS3BucketPolicyFault,
    client.exceptions.IntegrationNotFoundFault,
    client.exceptions.InvalidAuthenticationProfileRequestFault,
    client.exceptions.InvalidAuthorizationStateFault,
    client.exceptions.InvalidClusterParameterGroupStateFault,
    client.exceptions.InvalidClusterSecurityGroupStateFault,
    client.exceptions.InvalidClusterSnapshotScheduleStateFault,
    client.exceptions.InvalidClusterSnapshotStateFault,
    client.exceptions.InvalidClusterStateFault,
    client.exceptions.InvalidClusterSubnetGroupStateFault,
    client.exceptions.InvalidClusterSubnetStateFault,
    client.exceptions.InvalidClusterTrackFault,
    client.exceptions.InvalidDataShareFault,
    client.exceptions.InvalidElasticIpFault,
    client.exceptions.InvalidEndpointStateFault,
    client.exceptions.InvalidHsmClientCertificateStateFault,
    client.exceptions.InvalidHsmConfigurationStateFault,
    client.exceptions.InvalidNamespaceFault,
    client.exceptions.InvalidPolicyFault,
    client.exceptions.InvalidReservedNodeStateFault,
    client.exceptions.InvalidRestoreFault,
    client.exceptions.InvalidRetentionPeriodFault,
    client.exceptions.InvalidS3BucketNameFault,
    client.exceptions.InvalidS3KeyPrefixFault,
    client.exceptions.InvalidScheduleFault,
    client.exceptions.InvalidScheduledActionFault,
    client.exceptions.InvalidSnapshotCopyGrantStateFault,
    client.exceptions.InvalidSubnet,
    client.exceptions.InvalidSubscriptionStateFault,
    client.exceptions.InvalidTableRestoreArgumentFault,
    client.exceptions.InvalidTagFault,
    client.exceptions.InvalidUsageLimitFault,
    client.exceptions.InvalidVPCNetworkStateFault,
    client.exceptions.Ipv6CidrBlockNotFoundFault,
    client.exceptions.LimitExceededFault,
    client.exceptions.NumberOfNodesPerClusterLimitExceededFault,
    client.exceptions.NumberOfNodesQuotaExceededFault,
    client.exceptions.PartnerNotFoundFault,
    client.exceptions.RedshiftIdcApplicationAlreadyExistsFault,
    client.exceptions.RedshiftIdcApplicationNotExistsFault,
    client.exceptions.RedshiftIdcApplicationQuotaExceededFault,
    client.exceptions.ReservedNodeAlreadyExistsFault,
    client.exceptions.ReservedNodeAlreadyMigratedFault,
    client.exceptions.ReservedNodeExchangeNotFoundFault,
    client.exceptions.ReservedNodeNotFoundFault,
    client.exceptions.ReservedNodeOfferingNotFoundFault,
    client.exceptions.ReservedNodeQuotaExceededFault,
    client.exceptions.ResizeNotFoundFault,
    client.exceptions.ResourceNotFoundFault,
    client.exceptions.SNSInvalidTopicFault,
    client.exceptions.SNSNoAuthorizationFault,
    client.exceptions.SNSTopicArnNotFoundFault,
    client.exceptions.ScheduleDefinitionTypeUnsupportedFault,
    client.exceptions.ScheduledActionAlreadyExistsFault,
    client.exceptions.ScheduledActionNotFoundFault,
    client.exceptions.ScheduledActionQuotaExceededFault,
    client.exceptions.ScheduledActionTypeUnsupportedFault,
    client.exceptions.SnapshotCopyAlreadyDisabledFault,
    client.exceptions.SnapshotCopyAlreadyEnabledFault,
    client.exceptions.SnapshotCopyDisabledFault,
    client.exceptions.SnapshotCopyGrantAlreadyExistsFault,
    client.exceptions.SnapshotCopyGrantNotFoundFault,
    client.exceptions.SnapshotCopyGrantQuotaExceededFault,
    client.exceptions.SnapshotScheduleAlreadyExistsFault,
    client.exceptions.SnapshotScheduleNotFoundFault,
    client.exceptions.SnapshotScheduleQuotaExceededFault,
    client.exceptions.SnapshotScheduleUpdateInProgressFault,
    client.exceptions.SourceNotFoundFault,
    client.exceptions.SubnetAlreadyInUse,
    client.exceptions.SubscriptionAlreadyExistFault,
    client.exceptions.SubscriptionCategoryNotFoundFault,
    client.exceptions.SubscriptionEventIdNotFoundFault,
    client.exceptions.SubscriptionNotFoundFault,
    client.exceptions.SubscriptionSeverityNotFoundFault,
    client.exceptions.TableLimitExceededFault,
    client.exceptions.TableRestoreNotFoundFault,
    client.exceptions.TagLimitExceededFault,
    client.exceptions.UnauthorizedOperation,
    client.exceptions.UnauthorizedPartnerIntegrationFault,
    client.exceptions.UnknownSnapshotCopyRegionFault,
    client.exceptions.UnsupportedOperationFault,
    client.exceptions.UnsupportedOptionFault,
    client.exceptions.UsageLimitAlreadyExistsFault,
    client.exceptions.UsageLimitNotFoundFault,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_redshift.client import Exceptions

def handle_error(exc: Exceptions.AccessToClusterDeniedFault) -> None:
    ...

Methods#

accept_reserved_node_exchange#

Exchanges a DC1 Reserved Node for a DC2 Reserved Node with no changes to the configuration (term, payment type, or number of nodes) and no additional costs.

Type annotations and code completion for boto3.client("redshift").accept_reserved_node_exchange method. boto3 documentation

# accept_reserved_node_exchange method definition

def accept_reserved_node_exchange(
    self,
    *,
    ReservedNodeId: str,
    TargetReservedNodeOfferingId: str,
) -> AcceptReservedNodeExchangeOutputMessageTypeDef:  # (1)
    ...
  1. See AcceptReservedNodeExchangeOutputMessageTypeDef
# accept_reserved_node_exchange method usage example with argument unpacking

kwargs: AcceptReservedNodeExchangeInputMessageRequestTypeDef = {  # (1)
    "ReservedNodeId": ...,
    "TargetReservedNodeOfferingId": ...,
}

parent.accept_reserved_node_exchange(**kwargs)
  1. See AcceptReservedNodeExchangeInputMessageRequestTypeDef

add_partner#

Adds a partner integration to a cluster.

Type annotations and code completion for boto3.client("redshift").add_partner method. boto3 documentation

# add_partner method definition

def add_partner(
    self,
    *,
    AccountId: str,
    ClusterIdentifier: str,
    DatabaseName: str,
    PartnerName: str,
) -> PartnerIntegrationOutputMessageTypeDef:  # (1)
    ...
  1. See PartnerIntegrationOutputMessageTypeDef
# add_partner method usage example with argument unpacking

kwargs: PartnerIntegrationInputMessageRequestTypeDef = {  # (1)
    "AccountId": ...,
    "ClusterIdentifier": ...,
    "DatabaseName": ...,
    "PartnerName": ...,
}

parent.add_partner(**kwargs)
  1. See PartnerIntegrationInputMessageRequestTypeDef

associate_data_share_consumer#

From a datashare consumer account, associates a datashare with the account (AssociateEntireAccount) or the specified namespace (ConsumerArn).

Type annotations and code completion for boto3.client("redshift").associate_data_share_consumer method. boto3 documentation

# associate_data_share_consumer method definition

def associate_data_share_consumer(
    self,
    *,
    DataShareArn: str,
    AssociateEntireAccount: bool = ...,
    ConsumerArn: str = ...,
    ConsumerRegion: str = ...,
    AllowWrites: bool = ...,
) -> DataShareResponseTypeDef:  # (1)
    ...
  1. See DataShareResponseTypeDef
# associate_data_share_consumer method usage example with argument unpacking

kwargs: AssociateDataShareConsumerMessageRequestTypeDef = {  # (1)
    "DataShareArn": ...,
}

parent.associate_data_share_consumer(**kwargs)
  1. See AssociateDataShareConsumerMessageRequestTypeDef

authorize_cluster_security_group_ingress#

Adds an inbound (ingress) rule to an Amazon Redshift security group.

Type annotations and code completion for boto3.client("redshift").authorize_cluster_security_group_ingress method. boto3 documentation

# authorize_cluster_security_group_ingress method definition

def authorize_cluster_security_group_ingress(
    self,
    *,
    ClusterSecurityGroupName: str,
    CIDRIP: str = ...,
    EC2SecurityGroupName: str = ...,
    EC2SecurityGroupOwnerId: str = ...,
) -> AuthorizeClusterSecurityGroupIngressResultTypeDef:  # (1)
    ...
  1. See AuthorizeClusterSecurityGroupIngressResultTypeDef
# authorize_cluster_security_group_ingress method usage example with argument unpacking

kwargs: AuthorizeClusterSecurityGroupIngressMessageRequestTypeDef = {  # (