<filename>pacu/models/awsapi/memorydb.py
# generated by datamodel-codegen:
#   filename:  openapi.yaml
#   timestamp: 2021-12-31T02:53:00+00:00

from __future__ import annotations

from datetime import datetime
from enum import Enum
from typing import Annotated, Any, List, Optional

from pydantic import BaseModel, Field


class ServiceUpdateNotFoundFault(BaseModel):
    __root__: Any


class InvalidParameterValueException(ServiceUpdateNotFoundFault):
    pass


class SnapshotAlreadyExistsFault(ServiceUpdateNotFoundFault):
    pass


class SnapshotNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class SnapshotQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class InvalidSnapshotStateFault(ServiceUpdateNotFoundFault):
    pass


class ServiceLinkedRoleNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class InvalidParameterCombinationException(ServiceUpdateNotFoundFault):
    pass


class TagQuotaPerResourceExceeded(ServiceUpdateNotFoundFault):
    pass


class UserNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class DuplicateUserNameFault(ServiceUpdateNotFoundFault):
    pass


class ACLAlreadyExistsFault(ServiceUpdateNotFoundFault):
    pass


class DefaultUserRequired(ServiceUpdateNotFoundFault):
    pass


class ACLQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class ClusterAlreadyExistsFault(ServiceUpdateNotFoundFault):
    pass


class SubnetGroupNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class ClusterQuotaForCustomerExceededFault(ServiceUpdateNotFoundFault):
    pass


class NodeQuotaForClusterExceededFault(ServiceUpdateNotFoundFault):
    pass


class NodeQuotaForCustomerExceededFault(ServiceUpdateNotFoundFault):
    pass


class ParameterGroupNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class InsufficientClusterCapacityFault(ServiceUpdateNotFoundFault):
    pass


class InvalidVPCNetworkStateFault(ServiceUpdateNotFoundFault):
    pass


class ShardsPerClusterQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class InvalidCredentialsException(ServiceUpdateNotFoundFault):
    pass


class ACLNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class InvalidACLStateFault(ServiceUpdateNotFoundFault):
    pass


class ParameterGroupQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class ParameterGroupAlreadyExistsFault(ServiceUpdateNotFoundFault):
    pass


class InvalidParameterGroupStateFault(ServiceUpdateNotFoundFault):
    pass


class ClusterNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class InvalidClusterStateFault(ServiceUpdateNotFoundFault):
    pass


class SubnetGroupAlreadyExistsFault(ServiceUpdateNotFoundFault):
    pass


class SubnetGroupQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class SubnetQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class InvalidSubnet(ServiceUpdateNotFoundFault):
    pass


class SubnetNotAllowedFault(ServiceUpdateNotFoundFault):
    pass


class UserAlreadyExistsFault(ServiceUpdateNotFoundFault):
    pass


class UserQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class SubnetGroupInUseFault(ServiceUpdateNotFoundFault):
    pass


class InvalidUserStateFault(ServiceUpdateNotFoundFault):
    pass


class APICallRateForCustomerExceededFault(ServiceUpdateNotFoundFault):
    pass


class ShardNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class TestFailoverNotAvailableFault(ServiceUpdateNotFoundFault):
    pass


class InvalidKMSKeyFault(ServiceUpdateNotFoundFault):
    pass


class InvalidARNFault(ServiceUpdateNotFoundFault):
    pass


class TagNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class InvalidNodeStateFault(ServiceUpdateNotFoundFault):
    pass


class NoOperationFault(ServiceUpdateNotFoundFault):
    pass


class SubnetInUse(ServiceUpdateNotFoundFault):
    pass


class String(BaseModel):
    __root__: str


class ACLClusterNameList(BaseModel):
    __root__: List[String]


class ACLName(BaseModel):
    __root__: Annotated[str, Field(min_length=1, regex='[a-zA-Z][a-zA-Z0-9\\-]*')]


class ACLNameList(BaseModel):
    __root__: List[ACLName]


class ACLsUpdateStatus(BaseModel):
    """
    The status of the ACL update
    """

    ACLToApply: Optional[ACLName] = None


class AZStatus(Enum):
    singleaz = 'singleaz'
    multiaz = 'multiaz'


class AccessString(BaseModel):
    __root__: Annotated[str, Field(regex='.*\\S.*')]


class AuthenticationType(Enum):
    password = 'password'
    no_password = '<PASSWORD>'


class IntegerOptional(BaseModel):
    __root__: int


class Authentication(BaseModel):
    """
    Denotes the user's authentication properties, such as whether it requires a password to authenticate. Used in output responses.
    """

    Type: Optional[AuthenticationType] = None
    PasswordCount: Optional[IntegerOptional] = None


class InputAuthenticationType(Enum):
    password = 'password'


class PasswordListInput(BaseModel):
    __root__: Annotated[List[String], Field(min_items=1)]


class AuthenticationMode(BaseModel):
    """
    Denotes the user's authentication properties, such as whether it requires a password to authenticate. Used in output responses.
    """

    Type: Optional[InputAuthenticationType] = None
    Passwords: Optional[PasswordListInput] = None


class AvailabilityZone(BaseModel):
    """
    Indicates if the cluster has a Multi-AZ configuration (multiaz) or not (singleaz).
    """

    Name: Optional[String] = None


class ClusterNameList(BaseModel):
    __root__: Annotated[List[String], Field(max_items=20)]


class ServiceUpdateRequest(BaseModel):
    """
    A request to apply a service update
    """

    ServiceUpdateNameToApply: Optional[String] = None


class Boolean(BaseModel):
    __root__: bool


class BooleanOptional(Boolean):
    pass


class TargetBucket(BaseModel):
    __root__: Annotated[str, Field(max_length=255, regex='^[A-Za-z0-9._-]+$')]


class KmsKeyId(BaseModel):
    __root__: Annotated[str, Field(max_length=2048)]


class SecurityGroupIdsList(ACLClusterNameList):
    pass


class SnapshotArnsList(ACLClusterNameList):
    pass


class ParameterGroup(BaseModel):
    """
    Represents the output of a CreateParameterGroup operation. A parameter group represents a combination of specific values for the parameters that are passed to the engine software during startup.
    """

    Name: Optional[String] = None
    Family: Optional[String] = None
    Description: Optional[String] = None
    ARN: Optional[String] = None


class SubnetIdentifierList(ACLClusterNameList):
    pass


class UserName(ACLName):
    pass


class User(BaseModel):
    """
    You create users and assign them specific permissions by using an access string. You assign the users to Access Control Lists aligned with a specific role (administrators, human resources) that are then deployed to one or more MemoryDB clusters.
    """

    Name: Optional[String] = None
    Status: Optional[String] = None
    AccessString: Optional[String] = None
    ACLNames: Optional[ACLNameList] = None
    MinimumEngineVersion: Optional[String] = None
    Authentication: Optional[Authentication] = None
    ARN: Optional[String] = None


class SourceType(Enum):
    node = 'node'
    parameter_group = 'parameter-group'
    subnet_group = 'subnet-group'
    cluster = 'cluster'
    user = 'user'
    acl = 'acl'


class TStamp(BaseModel):
    __root__: datetime


class ParameterGroupList(BaseModel):
    __root__: List[ParameterGroup]


class UserList(BaseModel):
    __root__: List[User]


class Double(BaseModel):
    __root__: float


class Integer(IntegerOptional):
    pass


class EngineVersionInfo(BaseModel):
    """
    Provides details of the Redis engine version
    """

    EngineVersion: Optional[String] = None
    EnginePatchVersion: Optional[String] = None
    ParameterGroupFamily: Optional[String] = None


class Event(BaseModel):
    """
    Represents a single occurrence of something interesting within the system. Some examples of events are creating a cluster or adding or removing a node.
    """

    SourceName: Optional[String] = None
    SourceType: Optional[SourceType] = None
    Message: Optional[String] = None
    Date: Optional[TStamp] = None


class FilterName(AccessString):
    pass


class FilterValue(AccessString):
    pass


class KeyList(ACLClusterNameList):
    pass


class NodeTypeList(ACLClusterNameList):
    pass


class Parameter(BaseModel):
    """
    Describes an individual setting that controls some aspect of MemoryDB behavior.
    """

    Name: Optional[String] = None
    Value: Optional[String] = None
    Description: Optional[String] = None
    DataType: Optional[String] = None
    AllowedValues: Optional[String] = None
    MinimumEngineVersion: Optional[String] = None


class ParameterNameList(ACLClusterNameList):
    pass


class ParameterNameValue(BaseModel):
    """
    Describes a name-value pair that is used to update the value of a parameter.
    """

    ParameterName: Optional[String] = None
    ParameterValue: Optional[String] = None


class ParameterNameValueList(BaseModel):
    __root__: List[ParameterNameValue]


class ServiceUpdateStatus(Enum):
    available = 'available'
    in_progress = 'in-progress'
    complete = 'complete'
    scheduled = 'scheduled'


class PendingModifiedServiceUpdate(BaseModel):
    """
    Update action that has yet to be processed for the corresponding apply/stop request
    """

    ServiceUpdateName: Optional[String] = None
    Status: Optional[ServiceUpdateStatus] = None


class ReplicaConfigurationRequest(BaseModel):
    """
    A request to configure the number of replicas in a shard
    """

    ReplicaCount: Optional[Integer] = None


class SlotMigration(BaseModel):
    """
    Represents the progress of an online resharding operation.
    """

    ProgressPercentage: Optional[Double] = None


class SecurityGroupMembership(BaseModel):
    """
    Represents a single security group and its status.
    """

    SecurityGroupId: Optional[String] = None
    Status: Optional[String] = None


class ServiceUpdateType(Enum):
    security_update = 'security-update'


class ServiceUpdate(BaseModel):
    """
    An update that you can apply to your MemoryDB clusters.
    """

    ClusterName: Optional[String] = None
    ServiceUpdateName: Optional[String] = None
    ReleaseDate: Optional[TStamp] = None
    Description: Optional[String] = None
    Status: Optional[ServiceUpdateStatus] = None
    Type: Optional[ServiceUpdateType] = None
    NodesUpdated: Optional[String] = None
    AutoUpdateStartDate: Optional[TStamp] = None


class ShardConfiguration1(BaseModel):
    """
    Shard configuration options. Each shard configuration has the following: Slots and ReplicaCount.
    """

    Slots: Optional[String] = None
    ReplicaCount: Optional[IntegerOptional] = None


class ShardConfigurationRequest(BaseModel):
    """
    A request to configure the sharding properties of a cluster
    """

    ShardCount: Optional[Integer] = None


class ShardDetail(BaseModel):
    """
    Provides details of a shard in a snapshot
    """

    Name: Optional[String] = None
    Configuration: Optional[ShardConfiguration1] = None
    Size: Optional[String] = None
    SnapshotCreationTime: Optional[TStamp] = None


class Subnet(BaseModel):
    """
    Represents the subnet associated with a cluster. This parameter refers to subnets defined in Amazon Virtual Private Cloud (Amazon VPC) and used with MemoryDB.
    """

    Identifier: Optional[String] = None
    AvailabilityZone: Optional[AvailabilityZone] = None


class SubnetList(BaseModel):
    __root__: List[Subnet]


class Tag(BaseModel):
    """
    A tag that can be added to an MemoryDB resource. Tags are composed of a Key/Value pair. You can use tags to categorize and track all your MemoryDB resources. When you add or remove tags on clusters, those actions will be replicated to all nodes in the cluster. A tag with a null Value is permitted. For more information, see <a href="https://docs.aws.amazon.com/MemoryDB/latest/devguide/tagging-resources.html">Tagging your MemoryDB resources</a>
    """

    Key: Optional[String] = None
    Value: Optional[String] = None


class UnprocessedCluster(BaseModel):
    """
    A cluster whose updates have failed
    """

    ClusterName: Optional[String] = None
    ErrorType: Optional[String] = None
    ErrorMessage: Optional[String] = None


class BatchUpdateClusterRequest(BaseModel):
    ClusterNames: ClusterNameList
    ServiceUpdate: Optional[ServiceUpdateRequest] = None


class CreateParameterGroupResponse(BaseModel):
    ParameterGroup: Optional[ParameterGroup] = None


class CreateUserResponse(BaseModel):
    User: Optional[User] = None


class DeleteACLRequest(BaseModel):
    ACLName: String


class DeleteClusterRequest(BaseModel):
    ClusterName: String
    FinalSnapshotName: Optional[String] = None


class DeleteParameterGroupResponse(CreateParameterGroupResponse):
    pass


class DeleteParameterGroupRequest(BaseModel):
    ParameterGroupName: String


class DeleteSnapshotRequest(BaseModel):
    SnapshotName: String


class DeleteSubnetGroupRequest(BaseModel):
    SubnetGroupName: String


class DeleteUserResponse(CreateUserResponse):
    pass


class DeleteUserRequest(BaseModel):
    UserName: UserName


class DescribeACLsRequest(BaseModel):
    ACLName: Optional[String] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class DescribeClustersRequest(BaseModel):
    ClusterName: Optional[String] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None
    ShowShardDetails: Optional[BooleanOptional] = None


class DescribeEngineVersionsRequest(BaseModel):
    EngineVersion: Optional[String] = None
    ParameterGroupFamily: Optional[String] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None
    DefaultOnly: Optional[Boolean] = None


class DescribeEventsRequest(BaseModel):
    SourceName: Optional[String] = None
    SourceType: Optional[SourceType] = None
    StartTime: Optional[TStamp] = None
    EndTime: Optional[TStamp] = None
    Duration: Optional[IntegerOptional] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class DescribeParameterGroupsResponse(BaseModel):
    NextToken: Optional[String] = None
    ParameterGroups: Optional[ParameterGroupList] = None


class DescribeParameterGroupsRequest(BaseModel):
    ParameterGroupName: Optional[String] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class DescribeParametersRequest(BaseModel):
    ParameterGroupName: String
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class DescribeSnapshotsRequest(BaseModel):
    ClusterName: Optional[String] = None
    SnapshotName: Optional[String] = None
    Source: Optional[String] = None
    NextToken: Optional[String] = None
    MaxResults: Optional[IntegerOptional] = None
    ShowDetail: Optional[BooleanOptional] = None


class DescribeSubnetGroupsRequest(BaseModel):
    SubnetGroupName: Optional[String] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class DescribeUsersResponse(BaseModel):
    Users: Optional[UserList] = None
    NextToken: Optional[String] = None


class FailoverShardRequest(BaseModel):
    ClusterName: String
    ShardName: String


class ListAllowedNodeTypeUpdatesResponse(BaseModel):
    ScaleUpNodeTypes: Optional[NodeTypeList] = None
    ScaleDownNodeTypes: Optional[NodeTypeList] = None


class ListAllowedNodeTypeUpdatesRequest(BaseModel):
    ClusterName: String


class ListTagsRequest(BaseModel):
    ResourceArn: String


class ResetParameterGroupResponse(CreateParameterGroupResponse):
    pass


class ResetParameterGroupRequest(BaseModel):
    ParameterGroupName: String
    AllParameters: Optional[Boolean] = None
    ParameterNames: Optional[ParameterNameList] = None


class UntagResourceRequest(BaseModel):
    ResourceArn: String
    TagKeys: KeyList


class UpdateClusterRequest(BaseModel):
    ClusterName: String
    Description: Optional[String] = None
    SecurityGroupIds: Optional[SecurityGroupIdsList] = None
    MaintenanceWindow: Optional[String] = None
    SnsTopicArn: Optional[String] = None
    SnsTopicStatus: Optional[String] = None
    ParameterGroupName: Optional[String] = None
    SnapshotWindow: Optional[String] = None
    SnapshotRetentionLimit: Optional[IntegerOptional] = None
    NodeType: Optional[String] = None
    EngineVersion: Optional[String] = None
    ReplicaConfiguration: Optional[ReplicaConfigurationRequest] = None
    ShardConfiguration: Optional[ShardConfigurationRequest] = None
    ACLName: Optional[ACLName] = None


class UpdateParameterGroupResponse(CreateParameterGroupResponse):
    pass


class UpdateParameterGroupRequest(BaseModel):
    ParameterGroupName: String
    ParameterNameValues: ParameterNameValueList


class UpdateSubnetGroupRequest(BaseModel):
    SubnetGroupName: String
    Description: Optional[String] = None
    SubnetIds: Optional[SubnetIdentifierList] = None


class UpdateUserResponse(CreateUserResponse):
    pass


class UpdateUserRequest(BaseModel):
    UserName: UserName
    AuthenticationMode: Optional[AuthenticationMode] = None
    AccessString: Optional[AccessString] = None


class UserNameList(BaseModel):
    __root__: List[UserName]


class ACLPendingChanges(BaseModel):
    """
    Returns the updates being applied to the ACL.
    """

    UserNamesToRemove: Optional[UserNameList] = None
    UserNamesToAdd: Optional[UserNameList] = None


class ACL(BaseModel):
    """
    An Access Control List. You can authenticate users with Access Contol Lists. ACLs enable you to control cluster access by grouping users. These Access control lists are designed as a way to organize access to clusters.
    """

    Name: Optional[String] = None
    Status: Optional[String] = None
    UserNames: Optional[UserNameList] = None
    MinimumEngineVersion: Optional[String] = None
    PendingChanges: Optional[ACLPendingChanges] = None
    Clusters: Optional[ACLClusterNameList] = None
    ARN: Optional[String] = None


class ACLList(BaseModel):
    __root__: List[ACL]


class UnprocessedClusterList(BaseModel):
    __root__: List[UnprocessedCluster]


class Endpoint(BaseModel):
    """
    Represents the information required for client programs to connect to the cluster and its nodes.
    """

    Address: Optional[String] = None
    Port: Optional[Integer] = None


class SecurityGroupMembershipList(BaseModel):
    __root__: List[SecurityGroupMembership]


class ShardDetails(BaseModel):
    __root__: List[ShardDetail]


class ClusterConfiguration(BaseModel):
    """
    A list of cluster configuration options.
    """

    Name: Optional[String] = None
    Description: Optional[String] = None
    NodeType: Optional[String] = None
    EngineVersion: Optional[String] = None
    MaintenanceWindow: Optional[String] = None
    TopicArn: Optional[String] = None
    Port: Optional[IntegerOptional] = None
    ParameterGroupName: Optional[String] = None
    SubnetGroupName: Optional[String] = None
    VpcId: Optional[String] = None
    SnapshotRetentionLimit: Optional[IntegerOptional] = None
    SnapshotWindow: Optional[String] = None
    NumShards: Optional[IntegerOptional] = None
    Shards: Optional[ShardDetails] = None


class ReshardingStatus(BaseModel):
    """
    The status of the online resharding
    """

    SlotMigration: Optional[SlotMigration] = None


class PendingModifiedServiceUpdateList(BaseModel):
    __root__: List[PendingModifiedServiceUpdate]


class TagList(BaseModel):
    __root__: Annotated[List[Tag], Field(max_items=200)]


class Snapshot(BaseModel):
    """
    Represents a copy of an entire cluster as of the time when the snapshot was taken.
    """

    Name: Optional[String] = None
    Status: Optional[String] = None
    Source: Optional[String] = None
    KmsKeyId: Optional[String] = None
    ARN: Optional[String] = None
    ClusterConfiguration: Optional[ClusterConfiguration] = None


class UserNameListInput(BaseModel):
    __root__: Annotated[List[UserName], Field(min_items=1)]


class SubnetGroup(BaseModel):
    """
    <p>Represents the output of one of the following operations:</p> <ul> <li> <p>CreateSubnetGroup</p> </li> <li> <p>UpdateSubnetGroup</p> </li> </ul> <p>A subnet group is a collection of subnets (typically private) that you can designate for your clusters running in an Amazon Virtual Private Cloud (VPC) environment.</p>
    """

    Name: Optional[String] = None
    Description: Optional[String] = None
    VpcId: Optional[String] = None
    Subnets: Optional[SubnetList] = None
    ARN: Optional[String] = None


class EngineVersionInfoList(BaseModel):
    __root__: List[EngineVersionInfo]


class EventList(BaseModel):
    __root__: List[Event]


class ParametersList(BaseModel):
    __root__: List[Parameter]


class ServiceUpdateStatusList(BaseModel):
    __root__: Annotated[List[ServiceUpdateStatus], Field(max_items=4)]


class ServiceUpdateList(BaseModel):
    __root__: List[ServiceUpdate]


class SnapshotList(BaseModel):
    __root__: List[Snapshot]


class SubnetGroupList(BaseModel):
    __root__: List[SubnetGroup]


class FilterValueList(BaseModel):
    __root__: Annotated[List[FilterValue], Field(min_items=1)]


class Filter(BaseModel):
    """
    Used to streamline results of a search based on the property being filtered.
    """

    Name: FilterName
    Values: FilterValueList


class Node(BaseModel):
    """
    Represents an individual node within a cluster. Each node runs its own instance of the cluster's protocol-compliant caching software.
    """

    Name: Optional[String] = None
    Status: Optional[String] = None
    AvailabilityZone: Optional[String] = None
    CreateTime: Optional[TStamp] = None
    Endpoint: Optional[Endpoint] = None


class NodeList(BaseModel):
    __root__: List[Node]


class Shard(BaseModel):
    """
    Represents a collection of nodes in a cluster. One node in the node group is the read/write primary node. All the other nodes are read-only Replica nodes.
    """

    Name: Optional[String] = None
    Status: Optional[String] = None
    Slots: Optional[String] = None
    Nodes: Optional[NodeList] = None
    NumberOfNodes: Optional[IntegerOptional] = None


class CopySnapshotResponse(BaseModel):
    Snapshot: Optional[Snapshot] = None


class CopySnapshotRequest(BaseModel):
    SourceSnapshotName: String
    TargetSnapshotName: String
    TargetBucket: Optional[TargetBucket] = None
    KmsKeyId: Optional[KmsKeyId] = None
    Tags: Optional[TagList] = None


class CreateACLResponse(BaseModel):
    ACL: Optional[ACL] = None


class CreateACLRequest(BaseModel):
    ACLName: String
    UserNames: Optional[UserNameListInput] = None
    Tags: Optional[TagList] = None


class CreateClusterRequest(BaseModel):
    ClusterName: String
    NodeType: String
    ParameterGroupName: Optional[String] = None
    Description: Optional[String] = None
    NumShards: Optional[IntegerOptional] = None
    NumReplicasPerShard: Optional[IntegerOptional] = None
    SubnetGroupName: Optional[String] = None
    SecurityGroupIds: Optional[SecurityGroupIdsList] = None
    MaintenanceWindow: Optional[String] = None
    Port: Optional[IntegerOptional] = None
    SnsTopicArn: Optional[String] = None
    TLSEnabled: Optional[BooleanOptional] = None
    KmsKeyId: Optional[String] = None
    SnapshotArns: Optional[SnapshotArnsList] = None
    SnapshotName: Optional[String] = None
    SnapshotRetentionLimit: Optional[IntegerOptional] = None
    Tags: Optional[TagList] = None
    SnapshotWindow: Optional[String] = None
    ACLName: ACLName
    EngineVersion: Optional[String] = None
    AutoMinorVersionUpgrade: Optional[BooleanOptional] = None


class CreateParameterGroupRequest(BaseModel):
    ParameterGroupName: String
    Family: String
    Description: Optional[String] = None
    Tags: Optional[TagList] = None


class CreateSnapshotResponse(CopySnapshotResponse):
    pass


class CreateSnapshotRequest(BaseModel):
    ClusterName: String
    SnapshotName: String
    KmsKeyId: Optional[String] = None
    Tags: Optional[TagList] = None


class CreateSubnetGroupResponse(BaseModel):
    SubnetGroup: Optional[SubnetGroup] = None


class CreateSubnetGroupRequest(BaseModel):
    SubnetGroupName: String
    Description: Optional[String] = None
    SubnetIds: SubnetIdentifierList
    Tags: Optional[TagList] = None


class CreateUserRequest(BaseModel):
    UserName: UserName
    AuthenticationMode: AuthenticationMode
    AccessString: AccessString
    Tags: Optional[TagList] = None


class DeleteACLResponse(CreateACLResponse):
    pass


class DeleteSnapshotResponse(CopySnapshotResponse):
    pass


class DeleteSubnetGroupResponse(CreateSubnetGroupResponse):
    pass


class DescribeACLsResponse(BaseModel):
    ACLs: Optional[ACLList] = None
    NextToken: Optional[String] = None


class DescribeEngineVersionsResponse(BaseModel):
    NextToken: Optional[String] = None
    EngineVersions: Optional[EngineVersionInfoList] = None


class DescribeEventsResponse(BaseModel):
    NextToken: Optional[String] = None
    Events: Optional[EventList] = None


class DescribeParametersResponse(BaseModel):
    NextToken: Optional[String] = None
    Parameters: Optional[ParametersList] = None


class DescribeServiceUpdatesResponse(BaseModel):
    NextToken: Optional[String] = None
    ServiceUpdates: Optional[ServiceUpdateList] = None


class DescribeServiceUpdatesRequest(BaseModel):
    ServiceUpdateName: Optional[String] = None
    ClusterNames: Optional[ClusterNameList] = None
    Status: Optional[ServiceUpdateStatusList] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class DescribeSnapshotsResponse(BaseModel):
    NextToken: Optional[String] = None
    Snapshots: Optional[SnapshotList] = None


class DescribeSubnetGroupsResponse(BaseModel):
    NextToken: Optional[String] = None
    SubnetGroups: Optional[SubnetGroupList] = None


class ListTagsResponse(BaseModel):
    TagList: Optional[TagList] = None


class TagResourceResponse(ListTagsResponse):
    pass


class TagResourceRequest(BaseModel):
    ResourceArn: String
    Tags: TagList


class UntagResourceResponse(ListTagsResponse):
    pass


class UpdateACLResponse(CreateACLResponse):
    pass


class UpdateACLRequest(BaseModel):
    ACLName: String
    UserNamesToAdd: Optional[UserNameListInput] = None
    UserNamesToRemove: Optional[UserNameListInput] = None


class UpdateSubnetGroupResponse(CreateSubnetGroupResponse):
    pass


class ClusterPendingUpdates(BaseModel):
    """
    A list of updates being applied to the cluster
    """

    Resharding: Optional[ReshardingStatus] = None
    ACLs: Optional[ACLsUpdateStatus] = None
    ServiceUpdates: Optional[PendingModifiedServiceUpdateList] = None


class ShardList(BaseModel):
    __root__: List[Shard]


class Cluster(BaseModel):
    """
    Contains all of the attributes of a specific cluster.
    """

    Name: Optional[String] = None
    Description: Optional[String] = None
    Status: Optional[String] = None
    PendingUpdates: Optional[ClusterPendingUpdates] = None
    NumberOfShards: Optional[IntegerOptional] = None
    Shards: Optional[ShardList] = None
    AvailabilityMode: Optional[AZStatus] = None
    ClusterEndpoint: Optional[Endpoint] = None
    NodeType: Optional[String] = None
    EngineVersion: Optional[String] = None
    EnginePatchVersion: Optional[String] = None
    ParameterGroupName: Optional[String] = None
    ParameterGroupStatus: Optional[String] = None
    SecurityGroups: Optional[SecurityGroupMembershipList] = None
    SubnetGroupName: Optional[String] = None
    TLSEnabled: Optional[BooleanOptional] = None
    KmsKeyId: Optional[String] = None
    ARN: Optional[String] = None
    SnsTopicArn: Optional[String] = None
    SnsTopicStatus: Optional[String] = None
    SnapshotRetentionLimit: Optional[IntegerOptional] = None
    MaintenanceWindow: Optional[String] = None
    SnapshotWindow: Optional[String] = None
    ACLName: Optional[ACLName] = None
    AutoMinorVersionUpgrade: Optional[BooleanOptional] = None


class FilterList(BaseModel):
    __root__: List[Filter]


class CreateClusterResponse(BaseModel):
    Cluster: Optional[Cluster] = None


class DeleteClusterResponse(CreateClusterResponse):
    pass


class DescribeUsersRequest(BaseModel):
    UserName: Optional[UserName] = None
    Filters: Optional[FilterList] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class FailoverShardResponse(CreateClusterResponse):
    pass


class UpdateClusterResponse(CreateClusterResponse):
    pass


class ClusterList(BaseModel):
    __root__: List[Cluster]


class BatchUpdateClusterResponse(BaseModel):
    ProcessedClusters: Optional[ClusterList] = None
    UnprocessedClusters: Optional[UnprocessedClusterList] = None


class DescribeClustersResponse(BaseModel):
    NextToken: Optional[String] = None
    Clusters: Optional[ClusterList] = None

<filename>pacu/models/awsapi/memorydb.py
# generated by datamodel-codegen:
#   filename:  openapi.yaml
#   timestamp: 2021-12-31T02:53:00+00:00

from __future__ import annotations

from datetime import datetime
from enum import Enum
from typing import Annotated, Any, List, Optional

from pydantic import BaseModel, Field


class ServiceUpdateNotFoundFault(BaseModel):
    __root__: Any


class InvalidParameterValueException(ServiceUpdateNotFoundFault):
    pass


class SnapshotAlreadyExistsFault(ServiceUpdateNotFoundFault):
    pass


class SnapshotNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class SnapshotQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class InvalidSnapshotStateFault(ServiceUpdateNotFoundFault):
    pass


class ServiceLinkedRoleNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class InvalidParameterCombinationException(ServiceUpdateNotFoundFault):
    pass


class TagQuotaPerResourceExceeded(ServiceUpdateNotFoundFault):
    pass


class UserNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class DuplicateUserNameFault(ServiceUpdateNotFoundFault):
    pass


class ACLAlreadyExistsFault(ServiceUpdateNotFoundFault):
    pass


class DefaultUserRequired(ServiceUpdateNotFoundFault):
    pass


class ACLQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class ClusterAlreadyExistsFault(ServiceUpdateNotFoundFault):
    pass


class SubnetGroupNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class ClusterQuotaForCustomerExceededFault(ServiceUpdateNotFoundFault):
    pass


class NodeQuotaForClusterExceededFault(ServiceUpdateNotFoundFault):
    pass


class NodeQuotaForCustomerExceededFault(ServiceUpdateNotFoundFault):
    pass


class ParameterGroupNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class InsufficientClusterCapacityFault(ServiceUpdateNotFoundFault):
    pass


class InvalidVPCNetworkStateFault(ServiceUpdateNotFoundFault):
    pass


class ShardsPerClusterQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class InvalidCredentialsException(ServiceUpdateNotFoundFault):
    pass


class ACLNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class InvalidACLStateFault(ServiceUpdateNotFoundFault):
    pass


class ParameterGroupQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class ParameterGroupAlreadyExistsFault(ServiceUpdateNotFoundFault):
    pass


class InvalidParameterGroupStateFault(ServiceUpdateNotFoundFault):
    pass


class ClusterNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class InvalidClusterStateFault(ServiceUpdateNotFoundFault):
    pass


class SubnetGroupAlreadyExistsFault(ServiceUpdateNotFoundFault):
    pass


class SubnetGroupQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class SubnetQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class InvalidSubnet(ServiceUpdateNotFoundFault):
    pass


class SubnetNotAllowedFault(ServiceUpdateNotFoundFault):
    pass


class UserAlreadyExistsFault(ServiceUpdateNotFoundFault):
    pass


class UserQuotaExceededFault(ServiceUpdateNotFoundFault):
    pass


class SubnetGroupInUseFault(ServiceUpdateNotFoundFault):
    pass


class InvalidUserStateFault(ServiceUpdateNotFoundFault):
    pass


class APICallRateForCustomerExceededFault(ServiceUpdateNotFoundFault):
    pass


class ShardNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class TestFailoverNotAvailableFault(ServiceUpdateNotFoundFault):
    pass


class InvalidKMSKeyFault(ServiceUpdateNotFoundFault):
    pass


class InvalidARNFault(ServiceUpdateNotFoundFault):
    pass


class TagNotFoundFault(ServiceUpdateNotFoundFault):
    pass


class InvalidNodeStateFault(ServiceUpdateNotFoundFault):
    pass


class NoOperationFault(ServiceUpdateNotFoundFault):
    pass


class SubnetInUse(ServiceUpdateNotFoundFault):
    pass


class String(BaseModel):
    __root__: str


class ACLClusterNameList(BaseModel):
    __root__: List[String]


class ACLName(BaseModel):
    __root__: Annotated[str, Field(min_length=1, regex='[a-zA-Z][a-zA-Z0-9\\-]*')]


class ACLNameList(BaseModel):
    __root__: List[ACLName]


class ACLsUpdateStatus(BaseModel):
    """
    The status of the ACL update
    """

    ACLToApply: Optional[ACLName] = None


class AZStatus(Enum):
    singleaz = 'singleaz'
    multiaz = 'multiaz'


class AccessString(BaseModel):
    __root__: Annotated[str, Field(regex='.*\\S.*')]


class AuthenticationType(Enum):
    password = 'password'
    no_password = '<PASSWORD>'


class IntegerOptional(BaseModel):
    __root__: int


class Authentication(BaseModel):
    """
    Denotes the user's authentication properties, such as whether it requires a password to authenticate. Used in output responses.
    """

    Type: Optional[AuthenticationType] = None
    PasswordCount: Optional[IntegerOptional] = None


class InputAuthenticationType(Enum):
    password = 'password'


class PasswordListInput(BaseModel):
    __root__: Annotated[List[String], Field(min_items=1)]


class AuthenticationMode(BaseModel):
    """
    Denotes the user's authentication properties, such as whether it requires a password to authenticate. Used in output responses.
    """

    Type: Optional[InputAuthenticationType] = None
    Passwords: Optional[PasswordListInput] = None


class AvailabilityZone(BaseModel):
    """
    Indicates if the cluster has a Multi-AZ configuration (multiaz) or not (singleaz).
    """

    Name: Optional[String] = None


class ClusterNameList(BaseModel):
    __root__: Annotated[List[String], Field(max_items=20)]


class ServiceUpdateRequest(BaseModel):
    """
    A request to apply a service update
    """

    ServiceUpdateNameToApply: Optional[String] = None


class Boolean(BaseModel):
    __root__: bool


class BooleanOptional(Boolean):
    pass


class TargetBucket(BaseModel):
    __root__: Annotated[str, Field(max_length=255, regex='^[A-Za-z0-9._-]+$')]


class KmsKeyId(BaseModel):
    __root__: Annotated[str, Field(max_length=2048)]


class SecurityGroupIdsList(ACLClusterNameList):
    pass


class SnapshotArnsList(ACLClusterNameList):
    pass


class ParameterGroup(BaseModel):
    """
    Represents the output of a CreateParameterGroup operation. A parameter group represents a combination of specific values for the parameters that are passed to the engine software during startup.
    """

    Name: Optional[String] = None
    Family: Optional[String] = None
    Description: Optional[String] = None
    ARN: Optional[String] = None


class SubnetIdentifierList(ACLClusterNameList):
    pass


class UserName(ACLName):
    pass


class User(BaseModel):
    """
    You create users and assign them specific permissions by using an access string. You assign the users to Access Control Lists aligned with a specific role (administrators, human resources) that are then deployed to one or more MemoryDB clusters.
    """

    Name: Optional[String] = None
    Status: Optional[String] = None
    AccessString: Optional[String] = None
    ACLNames: Optional[ACLNameList] = None
    MinimumEngineVersion: Optional[String] = None
    Authentication: Optional[Authentication] = None
    ARN: Optional[String] = None


class SourceType(Enum):
    node = 'node'
    parameter_group = 'parameter-group'
    subnet_group = 'subnet-group'
    cluster = 'cluster'
    user = 'user'
    acl = 'acl'


class TStamp(BaseModel):
    __root__: datetime


class ParameterGroupList(BaseModel):
    __root__: List[ParameterGroup]


class UserList(BaseModel):
    __root__: List[User]


class Double(BaseModel):
    __root__: float


class Integer(IntegerOptional):
    pass


class EngineVersionInfo(BaseModel):
    """
    Provides details of the Redis engine version
    """

    EngineVersion: Optional[String] = None
    EnginePatchVersion: Optional[String] = None
    ParameterGroupFamily: Optional[String] = None


class Event(BaseModel):
    """
    Represents a single occurrence of something interesting within the system. Some examples of events are creating a cluster or adding or removing a node.
    """

    SourceName: Optional[String] = None
    SourceType: Optional[SourceType] = None
    Message: Optional[String] = None
    Date: Optional[TStamp] = None


class FilterName(AccessString):
    pass


class FilterValue(AccessString):
    pass


class KeyList(ACLClusterNameList):
    pass


class NodeTypeList(ACLClusterNameList):
    pass


class Parameter(BaseModel):
    """
    Describes an individual setting that controls some aspect of MemoryDB behavior.
    """

    Name: Optional[String] = None
    Value: Optional[String] = None
    Description: Optional[String] = None
    DataType: Optional[String] = None
    AllowedValues: Optional[String] = None
    MinimumEngineVersion: Optional[String] = None


class ParameterNameList(ACLClusterNameList):
    pass


class ParameterNameValue(BaseModel):
    """
    Describes a name-value pair that is used to update the value of a parameter.
    """

    ParameterName: Optional[String] = None
    ParameterValue: Optional[String] = None


class ParameterNameValueList(BaseModel):
    __root__: List[ParameterNameValue]


class ServiceUpdateStatus(Enum):
    available = 'available'
    in_progress = 'in-progress'
    complete = 'complete'
    scheduled = 'scheduled'


class PendingModifiedServiceUpdate(BaseModel):
    """
    Update action that has yet to be processed for the corresponding apply/stop request
    """

    ServiceUpdateName: Optional[String] = None
    Status: Optional[ServiceUpdateStatus] = None


class ReplicaConfigurationRequest(BaseModel):
    """
    A request to configure the number of replicas in a shard
    """

    ReplicaCount: Optional[Integer] = None


class SlotMigration(BaseModel):
    """
    Represents the progress of an online resharding operation.
    """

    ProgressPercentage: Optional[Double] = None


class SecurityGroupMembership(BaseModel):
    """
    Represents a single security group and its status.
    """

    SecurityGroupId: Optional[String] = None
    Status: Optional[String] = None


class ServiceUpdateType(Enum):
    security_update = 'security-update'


class ServiceUpdate(BaseModel):
    """
    An update that you can apply to your MemoryDB clusters.
    """

    ClusterName: Optional[String] = None
    ServiceUpdateName: Optional[String] = None
    ReleaseDate: Optional[TStamp] = None
    Description: Optional[String] = None
    Status: Optional[ServiceUpdateStatus] = None
    Type: Optional[ServiceUpdateType] = None
    NodesUpdated: Optional[String] = None
    AutoUpdateStartDate: Optional[TStamp] = None


class ShardConfiguration1(BaseModel):
    """
    Shard configuration options. Each shard configuration has the following: Slots and ReplicaCount.
    """

    Slots: Optional[String] = None
    ReplicaCount: Optional[IntegerOptional] = None


class ShardConfigurationRequest(BaseModel):
    """
    A request to configure the sharding properties of a cluster
    """

    ShardCount: Optional[Integer] = None


class ShardDetail(BaseModel):
    """
    Provides details of a shard in a snapshot
    """

    Name: Optional[String] = None
    Configuration: Optional[ShardConfiguration1] = None
    Size: Optional[String] = None
    SnapshotCreationTime: Optional[TStamp] = None


class Subnet(BaseModel):
    """
    Represents the subnet associated with a cluster. This parameter refers to subnets defined in Amazon Virtual Private Cloud (Amazon VPC) and used with MemoryDB.
    """

    Identifier: Optional[String] = None
    AvailabilityZone: Optional[AvailabilityZone] = None


class SubnetList(BaseModel):
    __root__: List[Subnet]


class Tag(BaseModel):
    """
    A tag that can be added to an MemoryDB resource. Tags are composed of a Key/Value pair. You can use tags to categorize and track all your MemoryDB resources. When you add or remove tags on clusters, those actions will be replicated to all nodes in the cluster. A tag with a null Value is permitted. For more information, see <a href="https://docs.aws.amazon.com/MemoryDB/latest/devguide/tagging-resources.html">Tagging your MemoryDB resources</a>
    """

    Key: Optional[String] = None
    Value: Optional[String] = None


class UnprocessedCluster(BaseModel):
    """
    A cluster whose updates have failed
    """

    ClusterName: Optional[String] = None
    ErrorType: Optional[String] = None
    ErrorMessage: Optional[String] = None


class BatchUpdateClusterRequest(BaseModel):
    ClusterNames: ClusterNameList
    ServiceUpdate: Optional[ServiceUpdateRequest] = None


class CreateParameterGroupResponse(BaseModel):
    ParameterGroup: Optional[ParameterGroup] = None


class CreateUserResponse(BaseModel):
    User: Optional[User] = None


class DeleteACLRequest(BaseModel):
    ACLName: String


class DeleteClusterRequest(BaseModel):
    ClusterName: String
    FinalSnapshotName: Optional[String] = None


class DeleteParameterGroupResponse(CreateParameterGroupResponse):
    pass


class DeleteParameterGroupRequest(BaseModel):
    ParameterGroupName: String


class DeleteSnapshotRequest(BaseModel):
    SnapshotName: String


class DeleteSubnetGroupRequest(BaseModel):
    SubnetGroupName: String


class DeleteUserResponse(CreateUserResponse):
    pass


class DeleteUserRequest(BaseModel):
    UserName: UserName


class DescribeACLsRequest(BaseModel):
    ACLName: Optional[String] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class DescribeClustersRequest(BaseModel):
    ClusterName: Optional[String] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None
    ShowShardDetails: Optional[BooleanOptional] = None


class DescribeEngineVersionsRequest(BaseModel):
    EngineVersion: Optional[String] = None
    ParameterGroupFamily: Optional[String] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None
    DefaultOnly: Optional[Boolean] = None


class DescribeEventsRequest(BaseModel):
    SourceName: Optional[String] = None
    SourceType: Optional[SourceType] = None
    StartTime: Optional[TStamp] = None
    EndTime: Optional[TStamp] = None
    Duration: Optional[IntegerOptional] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class DescribeParameterGroupsResponse(BaseModel):
    NextToken: Optional[String] = None
    ParameterGroups: Optional[ParameterGroupList] = None


class DescribeParameterGroupsRequest(BaseModel):
    ParameterGroupName: Optional[String] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class DescribeParametersRequest(BaseModel):
    ParameterGroupName: String
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class DescribeSnapshotsRequest(BaseModel):
    ClusterName: Optional[String] = None
    SnapshotName: Optional[String] = None
    Source: Optional[String] = None
    NextToken: Optional[String] = None
    MaxResults: Optional[IntegerOptional] = None
    ShowDetail: Optional[BooleanOptional] = None


class DescribeSubnetGroupsRequest(BaseModel):
    SubnetGroupName: Optional[String] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class DescribeUsersResponse(BaseModel):
    Users: Optional[UserList] = None
    NextToken: Optional[String] = None


class FailoverShardRequest(BaseModel):
    ClusterName: String
    ShardName: String


class ListAllowedNodeTypeUpdatesResponse(BaseModel):
    ScaleUpNodeTypes: Optional[NodeTypeList] = None
    ScaleDownNodeTypes: Optional[NodeTypeList] = None


class ListAllowedNodeTypeUpdatesRequest(BaseModel):
    ClusterName: String


class ListTagsRequest(BaseModel):
    ResourceArn: String


class ResetParameterGroupResponse(CreateParameterGroupResponse):
    pass


class ResetParameterGroupRequest(BaseModel):
    ParameterGroupName: String
    AllParameters: Optional[Boolean] = None
    ParameterNames: Optional[ParameterNameList] = None


class UntagResourceRequest(BaseModel):
    ResourceArn: String
    TagKeys: KeyList


class UpdateClusterRequest(BaseModel):
    ClusterName: String
    Description: Optional[String] = None
    SecurityGroupIds: Optional[SecurityGroupIdsList] = None
    MaintenanceWindow: Optional[String] = None
    SnsTopicArn: Optional[String] = None
    SnsTopicStatus: Optional[String] = None
    ParameterGroupName: Optional[String] = None
    SnapshotWindow: Optional[String] = None
    SnapshotRetentionLimit: Optional[IntegerOptional] = None
    NodeType: Optional[String] = None
    EngineVersion: Optional[String] = None
    ReplicaConfiguration: Optional[ReplicaConfigurationRequest] = None
    ShardConfiguration: Optional[ShardConfigurationRequest] = None
    ACLName: Optional[ACLName] = None


class UpdateParameterGroupResponse(CreateParameterGroupResponse):
    pass


class UpdateParameterGroupRequest(BaseModel):
    ParameterGroupName: String
    ParameterNameValues: ParameterNameValueList


class UpdateSubnetGroupRequest(BaseModel):
    SubnetGroupName: String
    Description: Optional[String] = None
    SubnetIds: Optional[SubnetIdentifierList] = None


class UpdateUserResponse(CreateUserResponse):
    pass


class UpdateUserRequest(BaseModel):
    UserName: UserName
    AuthenticationMode: Optional[AuthenticationMode] = None
    AccessString: Optional[AccessString] = None


class UserNameList(BaseModel):
    __root__: List[UserName]


class ACLPendingChanges(BaseModel):
    """
    Returns the updates being applied to the ACL.
    """

    UserNamesToRemove: Optional[UserNameList] = None
    UserNamesToAdd: Optional[UserNameList] = None


class ACL(BaseModel):
    """
    An Access Control List. You can authenticate users with Access Contol Lists. ACLs enable you to control cluster access by grouping users. These Access control lists are designed as a way to organize access to clusters.
    """

    Name: Optional[String] = None
    Status: Optional[String] = None
    UserNames: Optional[UserNameList] = None
    MinimumEngineVersion: Optional[String] = None
    PendingChanges: Optional[ACLPendingChanges] = None
    Clusters: Optional[ACLClusterNameList] = None
    ARN: Optional[String] = None


class ACLList(BaseModel):
    __root__: List[ACL]


class UnprocessedClusterList(BaseModel):
    __root__: List[UnprocessedCluster]


class Endpoint(BaseModel):
    """
    Represents the information required for client programs to connect to the cluster and its nodes.
    """

    Address: Optional[String] = None
    Port: Optional[Integer] = None


class SecurityGroupMembershipList(BaseModel):
    __root__: List[SecurityGroupMembership]


class ShardDetails(BaseModel):
    __root__: List[ShardDetail]


class ClusterConfiguration(BaseModel):
    """
    A list of cluster configuration options.
    """

    Name: Optional[String] = None
    Description: Optional[String] = None
    NodeType: Optional[String] = None
    EngineVersion: Optional[String] = None
    MaintenanceWindow: Optional[String] = None
    TopicArn: Optional[String] = None
    Port: Optional[IntegerOptional] = None
    ParameterGroupName: Optional[String] = None
    SubnetGroupName: Optional[String] = None
    VpcId: Optional[String] = None
    SnapshotRetentionLimit: Optional[IntegerOptional] = None
    SnapshotWindow: Optional[String] = None
    NumShards: Optional[IntegerOptional] = None
    Shards: Optional[ShardDetails] = None


class ReshardingStatus(BaseModel):
    """
    The status of the online resharding
    """

    SlotMigration: Optional[SlotMigration] = None


class PendingModifiedServiceUpdateList(BaseModel):
    __root__: List[PendingModifiedServiceUpdate]


class TagList(BaseModel):
    __root__: Annotated[List[Tag], Field(max_items=200)]


class Snapshot(BaseModel):
    """
    Represents a copy of an entire cluster as of the time when the snapshot was taken.
    """

    Name: Optional[String] = None
    Status: Optional[String] = None
    Source: Optional[String] = None
    KmsKeyId: Optional[String] = None
    ARN: Optional[String] = None
    ClusterConfiguration: Optional[ClusterConfiguration] = None


class UserNameListInput(BaseModel):
    __root__: Annotated[List[UserName], Field(min_items=1)]


class SubnetGroup(BaseModel):
    """
    <p>Represents the output of one of the following operations:</p> <ul> <li> <p>CreateSubnetGroup</p> </li> <li> <p>UpdateSubnetGroup</p> </li> </ul> <p>A subnet group is a collection of subnets (typically private) that you can designate for your clusters running in an Amazon Virtual Private Cloud (VPC) environment.</p>
    """

    Name: Optional[String] = None
    Description: Optional[String] = None
    VpcId: Optional[String] = None
    Subnets: Optional[SubnetList] = None
    ARN: Optional[String] = None


class EngineVersionInfoList(BaseModel):
    __root__: List[EngineVersionInfo]


class EventList(BaseModel):
    __root__: List[Event]


class ParametersList(BaseModel):
    __root__: List[Parameter]


class ServiceUpdateStatusList(BaseModel):
    __root__: Annotated[List[ServiceUpdateStatus], Field(max_items=4)]


class ServiceUpdateList(BaseModel):
    __root__: List[ServiceUpdate]


class SnapshotList(BaseModel):
    __root__: List[Snapshot]


class SubnetGroupList(BaseModel):
    __root__: List[SubnetGroup]


class FilterValueList(BaseModel):
    __root__: Annotated[List[FilterValue], Field(min_items=1)]


class Filter(BaseModel):
    """
    Used to streamline results of a search based on the property being filtered.
    """

    Name: FilterName
    Values: FilterValueList


class Node(BaseModel):
    """
    Represents an individual node within a cluster. Each node runs its own instance of the cluster's protocol-compliant caching software.
    """

    Name: Optional[String] = None
    Status: Optional[String] = None
    AvailabilityZone: Optional[String] = None
    CreateTime: Optional[TStamp] = None
    Endpoint: Optional[Endpoint] = None


class NodeList(BaseModel):
    __root__: List[Node]


class Shard(BaseModel):
    """
    Represents a collection of nodes in a cluster. One node in the node group is the read/write primary node. All the other nodes are read-only Replica nodes.
    """

    Name: Optional[String] = None
    Status: Optional[String] = None
    Slots: Optional[String] = None
    Nodes: Optional[NodeList] = None
    NumberOfNodes: Optional[IntegerOptional] = None


class CopySnapshotResponse(BaseModel):
    Snapshot: Optional[Snapshot] = None


class CopySnapshotRequest(BaseModel):
    SourceSnapshotName: String
    TargetSnapshotName: String
    TargetBucket: Optional[TargetBucket] = None
    KmsKeyId: Optional[KmsKeyId] = None
    Tags: Optional[TagList] = None


class CreateACLResponse(BaseModel):
    ACL: Optional[ACL] = None


class CreateACLRequest(BaseModel):
    ACLName: String
    UserNames: Optional[UserNameListInput] = None
    Tags: Optional[TagList] = None


class CreateClusterRequest(BaseModel):
    ClusterName: String
    NodeType: String
    ParameterGroupName: Optional[String] = None
    Description: Optional[String] = None
    NumShards: Optional[IntegerOptional] = None
    NumReplicasPerShard: Optional[IntegerOptional] = None
    SubnetGroupName: Optional[String] = None
    SecurityGroupIds: Optional[SecurityGroupIdsList] = None
    MaintenanceWindow: Optional[String] = None
    Port: Optional[IntegerOptional] = None
    SnsTopicArn: Optional[String] = None
    TLSEnabled: Optional[BooleanOptional] = None
    KmsKeyId: Optional[String] = None
    SnapshotArns: Optional[SnapshotArnsList] = None
    SnapshotName: Optional[String] = None
    SnapshotRetentionLimit: Optional[IntegerOptional] = None
    Tags: Optional[TagList] = None
    SnapshotWindow: Optional[String] = None
    ACLName: ACLName
    EngineVersion: Optional[String] = None
    AutoMinorVersionUpgrade: Optional[BooleanOptional] = None


class CreateParameterGroupRequest(BaseModel):
    ParameterGroupName: String
    Family: String
    Description: Optional[String] = None
    Tags: Optional[TagList] = None


class CreateSnapshotResponse(CopySnapshotResponse):
    pass


class CreateSnapshotRequest(BaseModel):
    ClusterName: String
    SnapshotName: String
    KmsKeyId: Optional[String] = None
    Tags: Optional[TagList] = None


class CreateSubnetGroupResponse(BaseModel):
    SubnetGroup: Optional[SubnetGroup] = None


class CreateSubnetGroupRequest(BaseModel):
    SubnetGroupName: String
    Description: Optional[String] = None
    SubnetIds: SubnetIdentifierList
    Tags: Optional[TagList] = None


class CreateUserRequest(BaseModel):
    UserName: UserName
    AuthenticationMode: AuthenticationMode
    AccessString: AccessString
    Tags: Optional[TagList] = None


class DeleteACLResponse(CreateACLResponse):
    pass


class DeleteSnapshotResponse(CopySnapshotResponse):
    pass


class DeleteSubnetGroupResponse(CreateSubnetGroupResponse):
    pass


class DescribeACLsResponse(BaseModel):
    ACLs: Optional[ACLList] = None
    NextToken: Optional[String] = None


class DescribeEngineVersionsResponse(BaseModel):
    NextToken: Optional[String] = None
    EngineVersions: Optional[EngineVersionInfoList] = None


class DescribeEventsResponse(BaseModel):
    NextToken: Optional[String] = None
    Events: Optional[EventList] = None


class DescribeParametersResponse(BaseModel):
    NextToken: Optional[String] = None
    Parameters: Optional[ParametersList] = None


class DescribeServiceUpdatesResponse(BaseModel):
    NextToken: Optional[String] = None
    ServiceUpdates: Optional[ServiceUpdateList] = None


class DescribeServiceUpdatesRequest(BaseModel):
    ServiceUpdateName: Optional[String] = None
    ClusterNames: Optional[ClusterNameList] = None
    Status: Optional[ServiceUpdateStatusList] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class DescribeSnapshotsResponse(BaseModel):
    NextToken: Optional[String] = None
    Snapshots: Optional[SnapshotList] = None


class DescribeSubnetGroupsResponse(BaseModel):
    NextToken: Optional[String] = None
    SubnetGroups: Optional[SubnetGroupList] = None


class ListTagsResponse(BaseModel):
    TagList: Optional[TagList] = None


class TagResourceResponse(ListTagsResponse):
    pass


class TagResourceRequest(BaseModel):
    ResourceArn: String
    Tags: TagList


class UntagResourceResponse(ListTagsResponse):
    pass


class UpdateACLResponse(CreateACLResponse):
    pass


class UpdateACLRequest(BaseModel):
    ACLName: String
    UserNamesToAdd: Optional[UserNameListInput] = None
    UserNamesToRemove: Optional[UserNameListInput] = None


class UpdateSubnetGroupResponse(CreateSubnetGroupResponse):
    pass


class ClusterPendingUpdates(BaseModel):
    """
    A list of updates being applied to the cluster
    """

    Resharding: Optional[ReshardingStatus] = None
    ACLs: Optional[ACLsUpdateStatus] = None
    ServiceUpdates: Optional[PendingModifiedServiceUpdateList] = None


class ShardList(BaseModel):
    __root__: List[Shard]


class Cluster(BaseModel):
    """
    Contains all of the attributes of a specific cluster.
    """

    Name: Optional[String] = None
    Description: Optional[String] = None
    Status: Optional[String] = None
    PendingUpdates: Optional[ClusterPendingUpdates] = None
    NumberOfShards: Optional[IntegerOptional] = None
    Shards: Optional[ShardList] = None
    AvailabilityMode: Optional[AZStatus] = None
    ClusterEndpoint: Optional[Endpoint] = None
    NodeType: Optional[String] = None
    EngineVersion: Optional[String] = None
    EnginePatchVersion: Optional[String] = None
    ParameterGroupName: Optional[String] = None
    ParameterGroupStatus: Optional[String] = None
    SecurityGroups: Optional[SecurityGroupMembershipList] = None
    SubnetGroupName: Optional[String] = None
    TLSEnabled: Optional[BooleanOptional] = None
    KmsKeyId: Optional[String] = None
    ARN: Optional[String] = None
    SnsTopicArn: Optional[String] = None
    SnsTopicStatus: Optional[String] = None
    SnapshotRetentionLimit: Optional[IntegerOptional] = None
    MaintenanceWindow: Optional[String] = None
    SnapshotWindow: Optional[String] = None
    ACLName: Optional[ACLName] = None
    AutoMinorVersionUpgrade: Optional[BooleanOptional] = None


class FilterList(BaseModel):
    __root__: List[Filter]


class CreateClusterResponse(BaseModel):
    Cluster: Optional[Cluster] = None


class DeleteClusterResponse(CreateClusterResponse):
    pass


class DescribeUsersRequest(BaseModel):
    UserName: Optional[UserName] = None
    Filters: Optional[FilterList] = None
    MaxResults: Optional[IntegerOptional] = None
    NextToken: Optional[String] = None


class FailoverShardResponse(CreateClusterResponse):
    pass


class UpdateClusterResponse(CreateClusterResponse):
    pass


class ClusterList(BaseModel):
    __root__: List[Cluster]


class BatchUpdateClusterResponse(BaseModel):
    ProcessedClusters: Optional[ClusterList] = None
    UnprocessedClusters: Optional[UnprocessedClusterList] = None


class DescribeClustersResponse(BaseModel):
    NextToken: Optional[String] = None
    Clusters: Optional[ClusterList] = None

# generated by datamodel-codegen: #   filename:  openapi.yaml #   timestamp: 2021-12-31T02:53:00+00:00 The status of the ACL update Denotes the user's authentication properties, such as whether it requires a password to authenticate. Used in output responses. Denotes the user's authentication properties, such as whether it requires a password to authenticate. Used in output responses. Indicates if the cluster has a Multi-AZ configuration (multiaz) or not (singleaz). A request to apply a service update Represents the output of a CreateParameterGroup operation. A parameter group represents a combination of specific values for the parameters that are passed to the engine software during startup. You create users and assign them specific permissions by using an access string. You assign the users to Access Control Lists aligned with a specific role (administrators, human resources) that are then deployed to one or more MemoryDB clusters. Provides details of the Redis engine version Represents a single occurrence of something interesting within the system. Some examples of events are creating a cluster or adding or removing a node. Describes an individual setting that controls some aspect of MemoryDB behavior. Describes a name-value pair that is used to update the value of a parameter. Update action that has yet to be processed for the corresponding apply/stop request A request to configure the number of replicas in a shard Represents the progress of an online resharding operation. Represents a single security group and its status. An update that you can apply to your MemoryDB clusters. Shard configuration options. Each shard configuration has the following: Slots and ReplicaCount. A request to configure the sharding properties of a cluster Provides details of a shard in a snapshot Represents the subnet associated with a cluster. This parameter refers to subnets defined in Amazon Virtual Private Cloud (Amazon VPC) and used with MemoryDB. A tag that can be added to an MemoryDB resource. Tags are composed of a Key/Value pair. You can use tags to categorize and track all your MemoryDB resources. When you add or remove tags on clusters, those actions will be replicated to all nodes in the cluster. A tag with a null Value is permitted. For more information, see <a href="https://docs.aws.amazon.com/MemoryDB/latest/devguide/tagging-resources.html">Tagging your MemoryDB resources</a> A cluster whose updates have failed Returns the updates being applied to the ACL. An Access Control List. You can authenticate users with Access Contol Lists. ACLs enable you to control cluster access by grouping users. These Access control lists are designed as a way to organize access to clusters. Represents the information required for client programs to connect to the cluster and its nodes. A list of cluster configuration options. The status of the online resharding Represents a copy of an entire cluster as of the time when the snapshot was taken. <p>Represents the output of one of the following operations:</p> <ul> <li> <p>CreateSubnetGroup</p> </li> <li> <p>UpdateSubnetGroup</p> </li> </ul> <p>A subnet group is a collection of subnets (typically private) that you can designate for your clusters running in an Amazon Virtual Private Cloud (VPC) environment.</p> Used to streamline results of a search based on the property being filtered. Represents an individual node within a cluster. Each node runs its own instance of the cluster's protocol-compliant caching software. Represents a collection of nodes in a cluster. One node in the node group is the read/write primary node. All the other nodes are read-only Replica nodes. A list of updates being applied to the cluster Contains all of the attributes of a specific cluster.