Skip to content

MemoryDBClient#

Index > MemoryDB > MemoryDBClient

Auto-generated documentation for MemoryDB type annotations stubs module mypy-boto3-memorydb.

MemoryDBClient#

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

# MemoryDBClient usage example

from boto3.session import Session
from mypy_boto3_memorydb.client import MemoryDBClient

def get_memorydb_client() -> MemoryDBClient:
    return Session().client("memorydb")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("memorydb")

try:
    do_something(client)
except (
    client.exceptions.ACLAlreadyExistsFault,
    client.exceptions.ACLNotFoundFault,
    client.exceptions.ACLQuotaExceededFault,
    client.exceptions.APICallRateForCustomerExceededFault,
    client.exceptions.ClientError,
    client.exceptions.ClusterAlreadyExistsFault,
    client.exceptions.ClusterNotFoundFault,
    client.exceptions.ClusterQuotaForCustomerExceededFault,
    client.exceptions.DefaultUserRequired,
    client.exceptions.DuplicateUserNameFault,
    client.exceptions.InsufficientClusterCapacityFault,
    client.exceptions.InvalidACLStateFault,
    client.exceptions.InvalidARNFault,
    client.exceptions.InvalidClusterStateFault,
    client.exceptions.InvalidCredentialsException,
    client.exceptions.InvalidKMSKeyFault,
    client.exceptions.InvalidNodeStateFault,
    client.exceptions.InvalidParameterCombinationException,
    client.exceptions.InvalidParameterGroupStateFault,
    client.exceptions.InvalidParameterValueException,
    client.exceptions.InvalidSnapshotStateFault,
    client.exceptions.InvalidSubnet,
    client.exceptions.InvalidUserStateFault,
    client.exceptions.InvalidVPCNetworkStateFault,
    client.exceptions.NoOperationFault,
    client.exceptions.NodeQuotaForClusterExceededFault,
    client.exceptions.NodeQuotaForCustomerExceededFault,
    client.exceptions.ParameterGroupAlreadyExistsFault,
    client.exceptions.ParameterGroupNotFoundFault,
    client.exceptions.ParameterGroupQuotaExceededFault,
    client.exceptions.ReservedNodeAlreadyExistsFault,
    client.exceptions.ReservedNodeNotFoundFault,
    client.exceptions.ReservedNodeQuotaExceededFault,
    client.exceptions.ReservedNodesOfferingNotFoundFault,
    client.exceptions.ServiceLinkedRoleNotFoundFault,
    client.exceptions.ServiceUpdateNotFoundFault,
    client.exceptions.ShardNotFoundFault,
    client.exceptions.ShardsPerClusterQuotaExceededFault,
    client.exceptions.SnapshotAlreadyExistsFault,
    client.exceptions.SnapshotNotFoundFault,
    client.exceptions.SnapshotQuotaExceededFault,
    client.exceptions.SubnetGroupAlreadyExistsFault,
    client.exceptions.SubnetGroupInUseFault,
    client.exceptions.SubnetGroupNotFoundFault,
    client.exceptions.SubnetGroupQuotaExceededFault,
    client.exceptions.SubnetInUse,
    client.exceptions.SubnetNotAllowedFault,
    client.exceptions.SubnetQuotaExceededFault,
    client.exceptions.TagNotFoundFault,
    client.exceptions.TagQuotaPerResourceExceeded,
    client.exceptions.TestFailoverNotAvailableFault,
    client.exceptions.UserAlreadyExistsFault,
    client.exceptions.UserNotFoundFault,
    client.exceptions.UserQuotaExceededFault,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_memorydb.client import Exceptions

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

Methods#

batch_update_cluster#

Apply the service update to a list of clusters supplied.

Type annotations and code completion for boto3.client("memorydb").batch_update_cluster method. boto3 documentation

# batch_update_cluster method definition

def batch_update_cluster(
    self,
    *,
    ClusterNames: Sequence[str],
    ServiceUpdate: ServiceUpdateRequestTypeDef = ...,  # (1)
) -> BatchUpdateClusterResponseTypeDef:  # (2)
    ...
  1. See ServiceUpdateRequestTypeDef
  2. See BatchUpdateClusterResponseTypeDef
# batch_update_cluster method usage example with argument unpacking

kwargs: BatchUpdateClusterRequestRequestTypeDef = {  # (1)
    "ClusterNames": ...,
}

parent.batch_update_cluster(**kwargs)
  1. See BatchUpdateClusterRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("memorydb").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("memorydb").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

copy_snapshot#

Makes a copy of an existing snapshot.

Type annotations and code completion for boto3.client("memorydb").copy_snapshot method. boto3 documentation

# copy_snapshot method definition

def copy_snapshot(
    self,
    *,
    SourceSnapshotName: str,
    TargetSnapshotName: str,
    TargetBucket: str = ...,
    KmsKeyId: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CopySnapshotResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CopySnapshotResponseTypeDef
# copy_snapshot method usage example with argument unpacking

kwargs: CopySnapshotRequestRequestTypeDef = {  # (1)
    "SourceSnapshotName": ...,
    "TargetSnapshotName": ...,
}

parent.copy_snapshot(**kwargs)
  1. See CopySnapshotRequestRequestTypeDef

create_acl#

Creates an Access Control List.

Type annotations and code completion for boto3.client("memorydb").create_acl method. boto3 documentation

# create_acl method definition

def create_acl(
    self,
    *,
    ACLName: str,
    UserNames: Sequence[str] = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateACLResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateACLResponseTypeDef
# create_acl method usage example with argument unpacking

kwargs: CreateACLRequestRequestTypeDef = {  # (1)
    "ACLName": ...,
}

parent.create_acl(**kwargs)
  1. See CreateACLRequestRequestTypeDef

create_cluster#

Creates a cluster.

Type annotations and code completion for boto3.client("memorydb").create_cluster method. boto3 documentation

# create_cluster method definition

def create_cluster(
    self,
    *,
    ClusterName: str,
    NodeType: str,
    ACLName: str,
    ParameterGroupName: str = ...,
    Description: str = ...,
    NumShards: int = ...,
    NumReplicasPerShard: int = ...,
    SubnetGroupName: str = ...,
    SecurityGroupIds: Sequence[str] = ...,
    MaintenanceWindow: str = ...,
    Port: int = ...,
    SnsTopicArn: str = ...,
    TLSEnabled: bool = ...,
    KmsKeyId: str = ...,
    SnapshotArns: Sequence[str] = ...,
    SnapshotName: str = ...,
    SnapshotRetentionLimit: int = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
    SnapshotWindow: str = ...,
    EngineVersion: str = ...,
    AutoMinorVersionUpgrade: bool = ...,
    DataTiering: bool = ...,
) -> CreateClusterResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateClusterResponseTypeDef
# create_cluster method usage example with argument unpacking

kwargs: CreateClusterRequestRequestTypeDef = {  # (1)
    "ClusterName": ...,
    "NodeType": ...,
    "ACLName": ...,
}

parent.create_cluster(**kwargs)
  1. See CreateClusterRequestRequestTypeDef

create_parameter_group#

Creates a new MemoryDB parameter group.

Type annotations and code completion for boto3.client("memorydb").create_parameter_group method. boto3 documentation

# create_parameter_group method definition

def create_parameter_group(
    self,
    *,
    ParameterGroupName: str,
    Family: str,
    Description: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateParameterGroupResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateParameterGroupResponseTypeDef
# create_parameter_group method usage example with argument unpacking

kwargs: CreateParameterGroupRequestRequestTypeDef = {  # (1)
    "ParameterGroupName": ...,
    "Family": ...,
}

parent.create_parameter_group(**kwargs)
  1. See CreateParameterGroupRequestRequestTypeDef

create_snapshot#

Creates a copy of an entire cluster at a specific moment in time.

Type annotations and code completion for boto3.client("memorydb").create_snapshot method. boto3 documentation

# create_snapshot method definition

def create_snapshot(
    self,
    *,
    ClusterName: str,
    SnapshotName: str,
    KmsKeyId: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateSnapshotResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateSnapshotResponseTypeDef
# create_snapshot method usage example with argument unpacking

kwargs: CreateSnapshotRequestRequestTypeDef = {  # (1)
    "ClusterName": ...,
    "SnapshotName": ...,
}

parent.create_snapshot(**kwargs)
  1. See CreateSnapshotRequestRequestTypeDef

create_subnet_group#

Creates a subnet group.

Type annotations and code completion for boto3.client("memorydb").create_subnet_group method. boto3 documentation

# create_subnet_group method definition

def create_subnet_group(
    self,
    *,
    SubnetGroupName: str,
    SubnetIds: Sequence[str],
    Description: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreateSubnetGroupResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateSubnetGroupResponseTypeDef
# create_subnet_group method usage example with argument unpacking

kwargs: CreateSubnetGroupRequestRequestTypeDef = {  # (1)
    "SubnetGroupName": ...,
    "SubnetIds": ...,
}

parent.create_subnet_group(**kwargs)
  1. See CreateSubnetGroupRequestRequestTypeDef

create_user#

Creates a MemoryDB user.

Type annotations and code completion for boto3.client("memorydb").create_user method. boto3 documentation

# create_user method definition

def create_user(
    self,
    *,
    UserName: str,
    AuthenticationMode: AuthenticationModeTypeDef,  # (1)
    AccessString: str,
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateUserResponseTypeDef:  # (3)
    ...
  1. See AuthenticationModeTypeDef
  2. See TagTypeDef
  3. See CreateUserResponseTypeDef
# create_user method usage example with argument unpacking

kwargs: CreateUserRequestRequestTypeDef = {  # (1)
    "UserName": ...,
    "AuthenticationMode": ...,
    "AccessString": ...,
}

parent.create_user(**kwargs)
  1. See CreateUserRequestRequestTypeDef

delete_acl#

Deletes an Access Control List.

Type annotations and code completion for boto3.client("memorydb").delete_acl method. boto3 documentation

# delete_acl method definition

def delete_acl(
    self,
    *,
    ACLName: str,
) -> DeleteACLResponseTypeDef:  # (1)
    ...
  1. See DeleteACLResponseTypeDef
# delete_acl method usage example with argument unpacking

kwargs: DeleteACLRequestRequestTypeDef = {  # (1)
    "ACLName": ...,
}

parent.delete_acl(**kwargs)
  1. See DeleteACLRequestRequestTypeDef

delete_cluster#

Deletes a cluster.

Type annotations and code completion for boto3.client("memorydb").delete_cluster method. boto3 documentation

# delete_cluster method definition

def delete_cluster(
    self,
    *,
    ClusterName: str,
    FinalSnapshotName: str = ...,
) -> DeleteClusterResponseTypeDef:  #