redshift

package
v1.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 30 Imported by: 0

README

Redshift

Parity grade: A · SDK aws-sdk-go-v2/service/redshift@v1.65.4 · last audited 2026-08-08 (0fe7aaf4d)

Coverage

Metric Value
Operations audited 9 (9 ok)
Feature families 32 (31 ok, 1 partial)
Known gaps none
Deferred items 0
Resource leaks clean

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClusterNotFound                = errors.New("ClusterNotFound")
	ErrClusterAlreadyExists           = errors.New("ClusterAlreadyExists")
	ErrInvalidParameter               = errors.New("InvalidParameterValue")
	ErrReservedNodeNotFound           = errors.New("ReservedNodeNotFound")
	ErrReservedNodeAlreadyExists      = errors.New("ReservedNodeAlreadyExists")
	ErrReservedNodeOfferingNotFound   = errors.New("ReservedNodeOfferingNotFound")
	ErrPartnerNotFound                = errors.New("PartnerNotFound")
	ErrDataShareNotFound              = errors.New("InvalidDataShareFault")
	ErrSecurityGroupNotFound          = errors.New("ClusterSecurityGroupNotFound")
	ErrSecurityGroupAlreadyExists     = errors.New("ClusterSecurityGroupAlreadyExists")
	ErrSnapshotNotFound               = errors.New(errClusterSnapshotNotFound)
	ErrSnapshotAlreadyExists          = errors.New("ClusterSnapshotAlreadyExists")
	ErrEndpointAuthNotFound           = errors.New("EndpointAuthorizationNotFound")
	ErrEndpointAuthAlreadyExists      = errors.New("EndpointAuthorizationAlreadyExists")
	ErrResizeNotFound                 = errors.New("ResizeNotFound")
	ErrResizeNotCancellable           = errors.New("InvalidClusterState")
	ErrParameterGroupNotFound         = errors.New("ClusterParameterGroupNotFound")
	ErrParameterGroupAlreadyExists    = errors.New("ClusterParameterGroupAlreadyExists")
	ErrSubnetGroupNotFound            = errors.New("ClusterSubnetGroupNotFoundFault")
	ErrSubnetGroupAlreadyExists       = errors.New("ClusterSubnetGroupAlreadyExists")
	ErrEventSubscriptionNotFound      = errors.New("SubscriptionNotFound")
	ErrEventSubscriptionAlreadyExists = errors.New("SubscriptionAlreadyExist")
	ErrSnapshotCopyGrantNotFound      = errors.New("SnapshotCopyGrantNotFoundFault")
	ErrSnapshotCopyGrantAlreadyExists = errors.New("SnapshotCopyGrantAlreadyExistsFault")
	ErrSnapshotScheduleNotFound       = errors.New("SnapshotScheduleNotFound")
	ErrSnapshotScheduleAlreadyExists  = errors.New("SnapshotScheduleAlreadyExists")
	ErrUsageLimitNotFound             = errors.New("UsageLimitNotFound")
	ErrAuthProfileNotFound            = errors.New("AuthenticationProfileNotFoundFault")
	ErrAuthProfileAlreadyExists       = errors.New("AuthenticationProfileAlreadyExistsFault")
	ErrResourcePolicyNotFound         = errors.New("ResourceNotFoundFault")
	ErrSnapshotCopyAlreadyEnabled     = errors.New("SnapshotCopyAlreadyEnabledFault")
	ErrSnapshotCopyNotEnabled         = errors.New("CopyToRegionDisabledFault")
	ErrHsmClientCertNotFound          = errors.New("HsmClientCertificateNotFoundFault")
	ErrHsmClientCertAlreadyExists     = errors.New("HsmClientCertificateAlreadyExistsFault")
	ErrHsmConfigNotFound              = errors.New("HsmConfigurationNotFoundFault")
	ErrHsmConfigAlreadyExists         = errors.New("HsmConfigurationAlreadyExistsFault")
	ErrScheduledActionNotFound        = errors.New("ScheduledActionNotFound")
	ErrScheduledActionAlreadyExists   = errors.New("ScheduledActionAlreadyExists")
	ErrCustomDomainNotFound           = errors.New("CustomDomainAssociationNotFoundFault")
	ErrCustomDomainAlreadyExists      = errors.New("CustomCnameAssociationFault")
	ErrEndpointAccessNotFound         = errors.New("EndpointNotFound")
	ErrEndpointAccessAlreadyExists    = errors.New("EndpointAlreadyExists")
	ErrIntegrationNotFound            = errors.New("IntegrationNotFoundFault")
	ErrIntegrationAlreadyExists       = errors.New("IntegrationAlreadyExistsFault")
	ErrIdcApplicationNotFound         = errors.New("RedshiftIdcApplicationNotExists")
	ErrIdcApplicationAlreadyExists    = errors.New("RedshiftIdcApplicationAlreadyExists")
	// Qev2IdcApplication fault codes verified against
	// aws-sdk-go-v2/service/redshift@v1.65.0/types/errors.go
	// Qev2IdcApplicationNotExistsFault.ErrorCode() and
	// Qev2IdcApplicationAlreadyExistsFault.ErrorCode() -- these are a distinct
	// fault family from RedshiftIdcApplication's above (no shared "Redshift"
	// prefix), matching Qev2IdcApplication being a distinct resource.
	ErrQev2IdcApplicationNotFound      = errors.New("Qev2IdcApplicationNotExists")
	ErrQev2IdcApplicationAlreadyExists = errors.New("Qev2IdcApplicationAlreadyExists")
	// ErrNamespaceRegistrationInvalidClusterState is returned by RegisterNamespace/
	// DeregisterNamespace when the target cluster exists but isn't in a
	// registerable state (ErrorCode() "InvalidClusterState", verified against
	// InvalidClusterStateFault in types/errors.go). Deliberately distinct from
	// ErrResizeNotCancellable, which carries the same wire text for an
	// unrelated resize-cancellation meaning -- see errCodeSentinels, where
	// resolveErrCode only needs the sentinel's Error() text to match, so two
	// same-text sentinels for different call sites are fine.
	ErrNamespaceRegistrationInvalidClusterState = errors.New("InvalidClusterState")
	// ErrInvalidNamespace is returned by RegisterNamespace/DeregisterNamespace
	// when NamespaceIdentifier doesn't resolve to a real cluster or Redshift
	// Serverless namespace/workgroup (ErrorCode() "InvalidNamespaceFault",
	// verified against InvalidNamespaceFault in types/errors.go).
	ErrInvalidNamespace = errors.New("InvalidNamespaceFault")
)

Error code strings below are verified verbatim against the ErrorCode() method of each corresponding fault type in aws-sdk-go-v2/service/redshift@v1.62.3/types/errors.go. Real AWS is NOT consistent about the "Fault" suffix -- some fault ErrorCode() values include it (e.g. "HsmConfigurationNotFoundFault") and some strip it (e.g. "ClusterNotFound" for ClusterNotFoundFault) -- so each entry here was checked individually rather than assumed from a pattern. Do not "clean up" a suffix without re-checking the SDK source.

View Source
var (
	// ErrNamespaceNotFound is returned when a serverless namespace does not exist.
	ErrNamespaceNotFound = errors.New("ResourceNotFoundException")
	// ErrNamespaceAlreadyExists is returned when a serverless namespace already exists.
	ErrNamespaceAlreadyExists = errors.New("ConflictException")
	// ErrWorkgroupNotFound is returned when a serverless workgroup does not exist.
	ErrWorkgroupNotFound = errors.New("ResourceNotFoundException")
	// ErrWorkgroupAlreadyExists is returned when a serverless workgroup already exists.
	ErrWorkgroupAlreadyExists = errors.New("ConflictException")
	// ErrServerlessSnapshotNotFound is returned when a serverless snapshot does not exist.
	ErrServerlessSnapshotNotFound = errors.New("ResourceNotFoundException")
	// ErrServerlessConflict is returned when a serverless resource already exists.
	ErrServerlessConflict = errors.New("ConflictException")
	// ErrUsageLimitSLNotFound is returned when a serverless usage limit does not exist.
	ErrUsageLimitSLNotFound = errors.New("ResourceNotFoundException")
	// ErrScheduledActionSLNotFound is returned when a serverless scheduled action does not exist.
	ErrScheduledActionSLNotFound = errors.New("ResourceNotFoundException")
	// ErrServerlessValidation is returned when a request is missing a required field.
	ErrServerlessValidation = errors.New("ValidationException")
	// ErrServerlessResourceNotFound is returned by TagResource/UntagResource/
	// ListTagsForResource when resourceArn matches no known taggable resource.
	ErrServerlessResourceNotFound = errors.New("ResourceNotFoundException")
	// ErrCustomDomainSLNotFound is returned when a serverless custom domain
	// association does not exist (or does not belong to the given workgroup).
	ErrCustomDomainSLNotFound = errors.New("ResourceNotFoundException")
	// ErrCustomDomainSLConflict is returned when a custom domain name is
	// already associated with a workgroup.
	ErrCustomDomainSLConflict = errors.New("ConflictException")
	// ErrResourcePolicySLNotFound is returned when no resource policy exists
	// for the given resourceArn.
	ErrResourcePolicySLNotFound = errors.New("ResourceNotFoundException")
	// ErrSnapshotCopyConfigSLNotFound is returned when a serverless snapshot
	// copy configuration does not exist.
	ErrSnapshotCopyConfigSLNotFound = errors.New("ResourceNotFoundException")
	// ErrRecoveryPointNotFound is returned when a recovery point does not exist.
	ErrRecoveryPointNotFound = errors.New("ResourceNotFoundException")
	// ErrTableRestoreSLNotFound is returned when a serverless table restore
	// request does not exist.
	ErrTableRestoreSLNotFound = errors.New("ResourceNotFoundException")
	// ErrEndpointAccessSLNotFound is returned when a serverless VPC endpoint
	// does not exist.
	ErrEndpointAccessSLNotFound = errors.New("ResourceNotFoundException")
	// ErrEndpointAccessSLAlreadyExists is returned when a serverless VPC
	// endpoint name is already in use.
	ErrEndpointAccessSLAlreadyExists = errors.New("ConflictException")
	// ErrServerlessTrackNotFound is returned when a named maintenance track
	// does not exist.
	ErrServerlessTrackNotFound = errors.New("ResourceNotFoundException")
	// ErrServerlessDryRun is returned by UpdateLakehouseConfiguration when
	// DryRun is true and the request would otherwise have succeeded (real
	// DryRunException: "the request was successful, but dry run was enabled
	// so no action was taken", confirmed in the pinned service-2.json).
	ErrServerlessDryRun = errors.New("DryRunException")
)
View Source
var ErrNilAppContext = errors.New("nil AppContext passed to Redshift Provider.Init")

ErrNilAppContext is returned by Init when a nil AppContext is passed.

View Source
var ErrNilAppContextSL = errors.New("nil AppContext passed to Redshift ServerlessProvider.Init")

ErrNilAppContextSL is returned by ServerlessProvider.Init when a nil AppContext is passed.

Functions

This section is empty.

Types

type AccountWithRestoreAccess

type AccountWithRestoreAccess struct {
	AccountID    string `json:"accountId"`
	AccountAlias string `json:"accountAlias"`
}

AccountWithRestoreAccess represents an account permitted to restore from a snapshot.

type AuthenticationProfile

type AuthenticationProfile struct {
	AuthenticationProfileName    string `json:"authenticationProfileName"`
	AuthenticationProfileContent string `json:"authenticationProfileContent"`
}

AuthenticationProfile represents an authentication profile for Redshift.

type Cluster

type Cluster struct {
	Tags                        *tags.Tags                    `json:"tags,omitempty"`
	PendingModifiedValues       *ClusterPendingModifiedValues `json:"pendingModifiedValues,omitempty"`
	MasterUsername              string                        `json:"masterUsername"`
	PreferredMaintenanceWindow  string                        `json:"preferredMaintenanceWindow,omitempty"`
	ClusterType                 string                        `json:"clusterType"`
	Endpoint                    string                        `json:"endpoint"`
	Status                      string                        `json:"status"`
	DBName                      string                        `json:"dbName"`
	ClusterIdentifier           string                        `json:"clusterIdentifier"`
	VpcID                       string                        `json:"vpcId,omitempty"`
	KmsKeyID                    string                        `json:"kmsKeyId,omitempty"`
	NodeType                    string                        `json:"nodeType"`
	SnapshotScheduleState       string                        `json:"snapshotScheduleState,omitempty"`
	SnapshotScheduleIdentifier  string                        `json:"snapshotScheduleIdentifier,omitempty"`
	CatalogArn                  string                        `json:"catalogArn,omitempty"`
	LakehouseRegistrationStatus string                        `json:"lakehouseRegistrationStatus,omitempty"`
	IamRoles                    []string                      `json:"iamRoles,omitempty"`
	Port                        int                           `json:"port"`
	NumberOfNodes               int                           `json:"numberOfNodes"`
	Encrypted                   bool                          `json:"encrypted"`
	EnhancedVpcRouting          bool                          `json:"enhancedVpcRouting"`
}

Cluster represents a Redshift cluster.

type ClusterCredentials

type ClusterCredentials struct {
	Expiration time.Time
	DBUser     string
	DBPassword string
}

ClusterCredentials holds temporary cluster credentials.

type ClusterLakehouseConfig added in v1.3.1

type ClusterLakehouseConfig struct {
	ClusterIdentifier          string `json:"clusterIdentifier"`
	CatalogName                string `json:"catalogName,omitempty"`
	LakehouseIdcApplicationArn string `json:"lakehouseIdcApplicationArn,omitempty"`
}

ClusterLakehouseConfig tracks a cluster's lakehouse/Glue Data Catalog federation association written by ModifyLakehouseConfiguration. CatalogArn/LakehouseRegistrationStatus are real Cluster members (confirmed against types.Cluster, aws-sdk-go-v2/service/redshift@v1.65.4/types/types.go lines 153/343) and live on Cluster itself (models.go) so every cluster-returning op echoes them, mirroring this backend's own Redshift Serverless precedent for Namespace.CatalogArn/LakehouseRegistrationStatus. LakehouseIdcApplicationArn has NO Cluster member at all (confirmed absent from types.Cluster) so it lives here instead, observable only through ModifyLakehouseConfiguration's own response -- same convention as ServerlessLakehouseConfig.LakehouseIdcApplicationArn (serverless.go).

type ClusterLakehouseConfigResult added in v1.3.1

type ClusterLakehouseConfigResult struct {
	ClusterIdentifier           string
	CatalogArn                  string
	LakehouseIdcApplicationArn  string
	LakehouseRegistrationStatus string
}

ClusterLakehouseConfigResult is ModifyLakehouseConfigurationOutput's real shape -- flat under ModifyLakehouseConfigurationResult, not nested any deeper (confirmed against awsAwsquery_deserializeOpDocumentModifyLakehouseConfigurationOutput).

type ClusterParameter

type ClusterParameter struct {
	ParameterName        string `json:"parameterName"`
	ParameterValue       string `json:"parameterValue"`
	Description          string `json:"description"`
	Source               string `json:"source"`
	DataType             string `json:"dataType"`
	ApplyType            string `json:"applyType"`
	MinimumEngineVersion string `json:"minimumEngineVersion"`
	IsModifiable         bool   `json:"isModifiable"`
}

ClusterParameter represents a single parameter within a cluster parameter group.

type ClusterParameterGroup

type ClusterParameterGroup struct {
	CreatedAt            time.Time          `json:"createdAt"`
	ParameterGroupName   string             `json:"parameterGroupName"`
	ParameterGroupFamily string             `json:"parameterGroupFamily"`
	Description          string             `json:"description"`
	Parameters           []ClusterParameter `json:"parameters"`
}

ClusterParameterGroup represents a Redshift cluster parameter group.

type ClusterPendingModifiedValues

type ClusterPendingModifiedValues struct {
	NodeType      string `json:"nodeType,omitempty"`
	NumberOfNodes int    `json:"numberOfNodes,omitempty"`
	Encrypted     bool   `json:"encrypted,omitempty"`
}

ClusterPendingModifiedValues holds changes queued for the next maintenance window.

type ClusterSecurityGroup

type ClusterSecurityGroup struct {
	ClusterSecurityGroupName string             `json:"clusterSecurityGroupName"`
	Description              string             `json:"description"`
	IPRanges                 []IPRange          `json:"ipRanges"`
	EC2SecurityGroups        []EC2SecurityGroup `json:"ec2SecurityGroups"`
}

ClusterSecurityGroup represents a Redshift cluster security group.

type ClusterSubnetGroup

type ClusterSubnetGroup struct {
	ClusterSubnetGroupName string   `json:"clusterSubnetGroupName"`
	Description            string   `json:"description"`
	VpcID                  string   `json:"vpcId"`
	SubnetGroupStatus      string   `json:"subnetGroupStatus"`
	Subnets                []Subnet `json:"subnets"`
}

ClusterSubnetGroup represents a Redshift cluster subnet group.

type ConfigParameter added in v1.3.1

type ConfigParameter struct {
	ParameterKey   string `json:"parameterKey,omitempty"`
	ParameterValue string `json:"parameterValue,omitempty"`
}

ConfigParameter is a workgroup advanced-control key/value pair.

type CreateNamespaceParams added in v1.3.1

type CreateNamespaceParams struct {
	Tags                        map[string]string
	NamespaceName               string
	AdminUsername               string
	AdminUserPassword           string
	DBName                      string
	KmsKeyID                    string
	DefaultIamRoleArn           string
	AdminPasswordSecretKmsKeyID string
	RedshiftIdcApplicationArn   string
	IamRoles                    []string
	LogExports                  []string
	ManageAdminPassword         bool
}

CreateNamespaceParams holds the mutable fields accepted by CreateNamespace. Grouped into a struct because the real CreateNamespaceInput carries more fields than fit a readable positional parameter list.

AdminUserPassword and RedshiftIdcApplicationArn are accepted for wire compatibility but intentionally never persisted: real CreateNamespaceInput has both (confirmed against api_op_CreateNamespace.go), but neither is ever echoed back on the Namespace shape (types.go has no such members), so no client can observe whether this backend stores them. AdminUserPassword is additionally a credential -- see CreateNamespace's doc comment.

type CreateScheduledActionParams added in v1.3.1

type CreateScheduledActionParams struct {
	StartTime                  time.Time
	EndTime                    time.Time
	Enabled                    *bool
	ScheduledActionName        string
	NamespaceName              string
	RoleArn                    string
	ScheduledActionDescription string
	Schedule                   json.RawMessage
	TargetAction               json.RawMessage
}

CreateScheduledActionParams holds the fields accepted by CreateScheduledAction. RoleArn/Schedule/ScheduledActionName/TargetAction are required by the real API (CreateScheduledActionInput); Schedule/TargetAction are raw JSON, see ServerlessScheduledAction's doc comment.

type CustomDomainAssociation

type CustomDomainAssociation struct {
	ClusterIdentifier          string `json:"clusterIdentifier"`
	CustomDomainName           string `json:"customDomainName"`
	CustomDomainCertificateArn string `json:"customDomainCertificateArn"`
	CustomDomainCertExpiryTime string `json:"customDomainCertExpiryTime"`
}

CustomDomainAssociation represents a custom domain name associated with a Redshift cluster.

type DNSRegistrar

type DNSRegistrar interface {
	Register(hostname string)
	Deregister(hostname string)
}

DNSRegistrar can register and deregister hostnames with an embedded DNS server.

type DataShare

type DataShare struct {
	DataShareArn string `json:"dataShareArn"`
	ProducerArn  string `json:"producerArn"`
	ManagedBy    string `json:"managedBy"`
	// DataShareType mirrors types.DataShareType from the real SDK. "INTERNAL" is
	// currently the only defined enum value (types.DataShareTypeInternal) --
	// namespace-to-namespace shares created via RegisterNamespace would be the
	// other case, which this backend does not yet model.
	DataShareType                    string                 `json:"dataShareType"`
	DataShareAssociations            []DataShareAssociation `json:"dataShareAssociations"`
	AllowPubliclyAccessibleConsumers bool                   `json:"allowPubliclyAccessibleConsumers"`
}

DataShare represents a Redshift data share.

type DataShareAssociation

type DataShareAssociation struct {
	ConsumerIdentifier string    `json:"consumerIdentifier"`
	ConsumerRegion     string    `json:"consumerRegion"`
	CreatedDate        time.Time `json:"createdDate"`
	StatusChangeDate   time.Time `json:"statusChangeDate"`
	Status             string    `json:"status"`
	Type               string    `json:"type"`
}

DataShareAssociation represents an association between a data share and a consumer.

type EC2SecurityGroup

type EC2SecurityGroup struct {
	EC2SecurityGroupName    string `json:"ec2SecurityGroupName"`
	EC2SecurityGroupOwnerID string `json:"ec2SecurityGroupOwnerId"`
	Status                  string `json:"status"`
}

EC2SecurityGroup represents an EC2 security group within a cluster security group.

type EndpointAccess

type EndpointAccess struct {
	ClusterIdentifier   string   `json:"clusterIdentifier"`
	EndpointName        string   `json:"endpointName"`
	EndpointStatus      string   `json:"endpointStatus"`
	EndpointCreateTime  string   `json:"endpointCreateTime"`
	VpcID               string   `json:"vpcId"`
	SubnetGroupName     string   `json:"subnetGroupName,omitempty"`
	ResourceOwner       string   `json:"resourceOwner,omitempty"`
	VpcSecurityGroupIDs []string `json:"vpcSecurityGroupIds,omitempty"`
	Port                int      `json:"port"`
}

EndpointAccess represents a Redshift managed VPC endpoint.

type EndpointAuthorization

type EndpointAuthorization struct {
	AuthorizeTime     time.Time `json:"authorizeTime"`
	Grantor           string    `json:"grantor"`
	Grantee           string    `json:"grantee"`
	ClusterIdentifier string    `json:"clusterIdentifier"`
	ClusterStatus     string    `json:"clusterStatus"`
	Status            string    `json:"status"`
	AllowedVPCs       []string  `json:"allowedVPCs"`
	EndpointCount     int       `json:"endpointCount"`
	AllowedAllVPCs    bool      `json:"allowedAllVPCs"`
}

EndpointAuthorization represents authorization for a VPC endpoint to a cluster.

type Event

type Event struct {
	Date             time.Time `json:"date"`
	SourceIdentifier string    `json:"sourceIdentifier"`
	SourceType       string    `json:"sourceType"`
	Message          string    `json:"message"`
	EventID          string    `json:"eventId"`
	Severity         string    `json:"severity"`
}

Event represents a Redshift event.

type EventSubscription

type EventSubscription struct {
	SubscriptionCreated time.Time `json:"subscriptionCreated"`
	CustomerAwsID       string    `json:"customerAwsId"`
	CustSubscriptionID  string    `json:"custSubscriptionId"`
	SnsTopicArn         string    `json:"snsTopicArn"`
	Status              string    `json:"status"`
	SourceType          string    `json:"sourceType"`
	Severity            string    `json:"severity"`
	SourceIDs           []string  `json:"sourceIds"`
	EventCategories     []string  `json:"eventCategories"`
	Enabled             bool      `json:"enabled"`
}

EventSubscription represents a Redshift event subscription.

type Handler

type Handler struct {
	Backend StorageBackend
	// contains filtered or unexported fields
}

Handler is the Echo HTTP handler for Redshift operations.

func NewHandler

func NewHandler(backend StorageBackend) *Handler

NewHandler creates a new Redshift handler.

func (*Handler) ChaosOperations

func (h *Handler) ChaosOperations() []string

ChaosOperations returns all operations that can be fault-injected.

func (*Handler) ChaosRegions

func (h *Handler) ChaosRegions() []string

ChaosRegions returns all regions this Redshift instance handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase AWS service name for fault rule matching.

func (*Handler) ExtractOperation

func (h *Handler) ExtractOperation(c *echo.Context) string

ExtractOperation extracts the Redshift action from the request.

func (*Handler) ExtractResource

func (h *Handler) ExtractResource(c *echo.Context) string

ExtractResource returns the cluster identifier from the request.

func (*Handler) GetSupportedOperations

func (h *Handler) GetSupportedOperations() []string

GetSupportedOperations returns supported Redshift operations (sorted).

func (*Handler) Handler

func (h *Handler) Handler() echo.HandlerFunc

Handler returns the Echo handler function.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all backend state and rebuilds the dispatch table.

func (*Handler) Restore

func (h *Handler) Restore(ctx context.Context, data []byte) error

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

func (h *Handler) RouteMatcher() service.Matcher

RouteMatcher returns a function that matches Redshift requests.

func (*Handler) Shutdown

func (h *Handler) Shutdown(_ context.Context)

Shutdown implements service.Shutdowner. It stops the reconciler and waits for its goroutine to exit, guaranteeing a clean, leak-free shutdown.

func (*Handler) Snapshot

func (h *Handler) Snapshot(ctx context.Context) []byte

Snapshot implements persistence.Persistable by delegating to the backend.

func (*Handler) StartWorker

func (h *Handler) StartWorker(ctx context.Context) error

StartWorker implements service.BackgroundWorker. It starts the managed cluster lifecycle reconciler using the framework-provided background context, so no context.Background() is introduced.

type HsmClientCertificate

type HsmClientCertificate struct {
	Tags                           map[string]string `json:"tags"`
	HsmClientCertificateIdentifier string            `json:"hsmClientCertificateIdentifier"`
	HsmClientCertificatePublicKey  string            `json:"hsmClientCertificatePublicKey"`
}

HsmClientCertificate represents a Redshift HSM client certificate.

type HsmConfiguration

type HsmConfiguration struct {
	Tags                       map[string]string `json:"tags"`
	HsmConfigurationIdentifier string            `json:"hsmConfigurationIdentifier"`
	Description                string            `json:"description"`
	HsmIPAddress               string            `json:"hsmIpAddress"`
	HsmPartitionName           string            `json:"hsmPartitionName"`
}

HsmConfiguration represents a Redshift HSM configuration.

type IPRange

type IPRange struct {
	CIDRIP string `json:"cidrip"`
	Status string `json:"status"`
}

IPRange represents an IP CIDR range within a cluster security group.

type IdcApplication

type IdcApplication struct {
	IdcApplicationArn  string `json:"redshiftIdcApplicationArn"`
	IdcApplicationName string `json:"redshiftIdcApplicationName"`
	IdcInstanceArn     string `json:"idcInstanceArn"`
	IdcDisplayName     string `json:"idcDisplayName"`
	IamRoleArn         string `json:"iamRoleArn"`
	// ApplicationType mirrors types.ApplicationType ("None" or "Lakehouse"); it is
	// set only on create -- real ModifyRedshiftIdcApplicationInput has no field
	// for it (confirmed against aws-sdk-go-v2/service/redshift@v1.65.4/serializers.go
	// awsAwsquery_serializeOpDocumentModifyRedshiftIdcApplicationInput).
	ApplicationType string `json:"applicationType,omitempty"`
}

IdcApplication represents a Redshift IDC application.

type InMemoryBackend

type InMemoryBackend struct {
	// contains filtered or unexported fields
}

InMemoryBackend is the in-memory store for Redshift clusters.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new InMemoryBackend.

func (*InMemoryBackend) AcceptReservedNodeExchange

func (b *InMemoryBackend) AcceptReservedNodeExchange(reservedNodeID, targetOfferingID string) (*ReservedNode, error)

AcceptReservedNodeExchange exchanges an existing reserved node for a new offering.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the AWS account ID this backend is configured for.

func (*InMemoryBackend) AddActiveResizeInternal

func (b *InMemoryBackend) AddActiveResizeInternal(clusterID string, resize *ResizeProgress)

AddActiveResizeInternal seeds an active resize directly into the backend.

func (*InMemoryBackend) AddDataShareInternal

func (b *InMemoryBackend) AddDataShareInternal(ds *DataShare)

AddDataShareInternal seeds a data share directly into the backend.

func (*InMemoryBackend) AddParameterGroupInternal

func (b *InMemoryBackend) AddParameterGroupInternal(pg *ClusterParameterGroup)

AddParameterGroupInternal seeds a parameter group directly into the backend.

func (*InMemoryBackend) AddPartner

func (b *InMemoryBackend) AddPartner(accountID, clusterID, databaseName, partnerName string) (*Partner, error)

AddPartner adds a partner integration to the specified cluster database.

func (*InMemoryBackend) AddRecoveryPointInternal added in v1.3.1

func (b *InMemoryBackend) AddRecoveryPointInternal(rp *RecoveryPoint)

AddRecoveryPointInternal seeds a recovery point directly. Test-only: real AWS never exposes a CreateRecoveryPoint operation (recovery points are created automatically), so this is not wired to any wire-reachable op -- same convention as AddSnapshotInternal/AddReservedNodeInternal etc.

func (*InMemoryBackend) AddReservedNodeInternal

func (b *InMemoryBackend) AddReservedNodeInternal(node *ReservedNode)

AddReservedNodeInternal seeds a reserved node directly into the backend.

func (*InMemoryBackend) AddSecurityGroupInternal

func (b *InMemoryBackend) AddSecurityGroupInternal(sg *ClusterSecurityGroup)

AddSecurityGroupInternal seeds a cluster security group directly into the backend.

func (*InMemoryBackend) AddSnapshotInternal

func (b *InMemoryBackend) AddSnapshotInternal(snap *Snapshot)

AddSnapshotInternal seeds a snapshot directly into the backend.

func (*InMemoryBackend) AddSubnetGroupInternal

func (b *InMemoryBackend) AddSubnetGroupInternal(sg *ClusterSubnetGroup)

AddSubnetGroupInternal seeds a subnet group directly into the backend.

func (*InMemoryBackend) AssociateDataShareConsumer

func (b *InMemoryBackend) AssociateDataShareConsumer(
	dataShareArn, consumerArn, consumerRegion string,
	_ bool,
) (*DataShare, error)

AssociateDataShareConsumer associates a consumer with a data share.

func (*InMemoryBackend) AuthorizeClusterSecurityGroupIngress

func (b *InMemoryBackend) AuthorizeClusterSecurityGroupIngress(
	groupName, cidrIP, ec2GroupName, ec2GroupOwnerID string,
) (*ClusterSecurityGroup, error)

AuthorizeClusterSecurityGroupIngress adds an ingress rule to a cluster security group.

func (*InMemoryBackend) AuthorizeDataShare

func (b *InMemoryBackend) AuthorizeDataShare(dataShareArn, consumerIdentifier string) (*DataShare, error)

AuthorizeDataShare authorizes a data share to a consumer.

func (*InMemoryBackend) AuthorizeEndpointAccess

func (b *InMemoryBackend) AuthorizeEndpointAccess(
	clusterID, grantee string,
	vpcIDs []string,
) (*EndpointAuthorization, error)

AuthorizeEndpointAccess authorizes an account to create a VPC endpoint to the cluster.

func (*InMemoryBackend) AuthorizeSnapshotAccess

func (b *InMemoryBackend) AuthorizeSnapshotAccess(snapshotID, accountWithRestoreAccess string) (*Snapshot, error)

AuthorizeSnapshotAccess grants another account restore access to a snapshot.

func (*InMemoryBackend) BatchDeleteClusterSnapshots

func (b *InMemoryBackend) BatchDeleteClusterSnapshots(identifiers []string) ([]SnapshotBatchError, []string)

BatchDeleteClusterSnapshots deletes multiple cluster snapshots. It returns the list of errors for snapshots that could not be deleted and the list of successfully deleted snapshot identifiers.

func (*InMemoryBackend) BatchModifyClusterSnapshots

func (b *InMemoryBackend) BatchModifyClusterSnapshots(
	identifiers []string,
	retentionPeriod int,
	_ bool,
) ([]SnapshotBatchError, []string)

BatchModifyClusterSnapshots modifies the retention period for a list of snapshots. The force parameter is accepted for API compatibility but has no effect in the in-memory backend. Returns errors and the list of successfully modified snapshot identifiers.

func (*InMemoryBackend) CancelResize

func (b *InMemoryBackend) CancelResize(clusterID string) (*ResizeProgress, error)

CancelResize cancels an active resize operation for a cluster and returns the final resize status.

func (*InMemoryBackend) ConvertRecoveryPointToSnapshotSL added in v1.3.1

func (b *InMemoryBackend) ConvertRecoveryPointToSnapshotSL(
	recoveryPointID, snapshotName string, retentionPeriod int, tags map[string]string,
) (*ServerlessSnapshot, error)

ConvertRecoveryPointToSnapshotSL converts a recovery point into a durable snapshot. recoveryPointId/snapshotName are both required on the real ConvertRecoveryPointToSnapshotRequest (confirmed against service-2.json).

func (*InMemoryBackend) CopyClusterSnapshot

func (b *InMemoryBackend) CopyClusterSnapshot(
	sourceSnapshotID, destinationSnapshotID string,
) (*Snapshot, error)

CopyClusterSnapshot copies a snapshot to a new identifier, optionally to a different region.

func (*InMemoryBackend) CreateAuthenticationProfile

func (b *InMemoryBackend) CreateAuthenticationProfile(name, content string) (*AuthenticationProfile, error)

CreateAuthenticationProfile creates a new authentication profile.

func (*InMemoryBackend) CreateCluster

func (b *InMemoryBackend) CreateCluster(id, nodeType, dbName, masterUser string) (*Cluster, error)

CreateCluster creates a new Redshift cluster.

func (*InMemoryBackend) CreateClusterParameterGroup

func (b *InMemoryBackend) CreateClusterParameterGroup(
	name, family, description string,
) (*ClusterParameterGroup, error)

CreateClusterParameterGroup creates a new cluster parameter group.

func (*InMemoryBackend) CreateClusterSecurityGroup

func (b *InMemoryBackend) CreateClusterSecurityGroup(name, description string) (*ClusterSecurityGroup, error)

CreateClusterSecurityGroup creates a new cluster security group.

func (*InMemoryBackend) CreateClusterSnapshot

func (b *InMemoryBackend) CreateClusterSnapshot(snapshotID, clusterID string) (*Snapshot, error)

CreateClusterSnapshot creates a manual snapshot of the specified cluster.

func (*InMemoryBackend) CreateClusterSubnetGroup

func (b *InMemoryBackend) CreateClusterSubnetGroup(
	name, description, vpcID string,
	subnetIDs []string,
) (*ClusterSubnetGroup, error)

CreateClusterSubnetGroup creates a new cluster subnet group.

func (*InMemoryBackend) CreateCustomDomainAssociation

func (b *InMemoryBackend) CreateCustomDomainAssociation(
	clusterID, customDomainName, customDomainCertificateArn string,
) (*CustomDomainAssociation, error)

CreateCustomDomainAssociation creates a custom domain name association for a cluster.

func (*InMemoryBackend) CreateCustomDomainAssociationSL added in v1.3.1

func (b *InMemoryBackend) CreateCustomDomainAssociationSL(
	customDomainName, customDomainCertificateArn, workgroupName string,
) (*ServerlessCustomDomainAssociation, error)

CreateCustomDomainAssociationSL associates a custom domain name with a serverless workgroup. customDomainName/customDomainCertificateArn/ workgroupName are all required by the real CreateCustomDomainAssociationInput (confirmed against CreateCustomDomainAssociationRequest in service-2.json). Also mirrors the association onto the workgroup's own customDomain* fields (real Workgroup carries them directly), so a subsequent GetWorkgroup/ ListWorkgroups reflects the association without a separate lookup.

func (*InMemoryBackend) CreateEndpointAccess

func (b *InMemoryBackend) CreateEndpointAccess(
	clusterID, endpointName, subnetGroupName, resourceOwner string, vpcSecurityGroupIDs []string,
) (*EndpointAccess, error)

CreateEndpointAccess creates a new Redshift-managed VPC endpoint. Real CreateEndpointAccessInput has no VpcId field -- the endpoint's VPC is derived from SubnetGroupName (confirmed against aws-sdk-go-v2/service/redshift@v1.62.3's CreateEndpointAccessInput). When subnetGroupName names a known ClusterSubnetGroup, VpcID is populated from it; otherwise it is left empty (real AWS would fall back to the cluster's own subnet group, which this backend does not track independently of ClusterSubnetGroup).

func (*InMemoryBackend) CreateEndpointAccessSL added in v1.3.1

func (b *InMemoryBackend) CreateEndpointAccessSL(
	endpointName, workgroupName, ownerAccount string, subnetIDs, vpcSecurityGroupIDs []string,
) (*ServerlessEndpointAccess, error)

CreateEndpointAccessSL creates a Redshift Serverless managed VPC endpoint. endpointName, subnetIDs and workgroupName are all required on the real CreateEndpointAccessRequest (confirmed against service-2.json).

func (*InMemoryBackend) CreateEventSubscription

func (b *InMemoryBackend) CreateEventSubscription(
	subscriptionName, snsTopicArn, sourceType, severity string,
	sourceIDs, eventCategories []string,
	enabled bool,
) (*EventSubscription, error)

CreateEventSubscription creates a new event notification subscription.

func (*InMemoryBackend) CreateHsmClientCertificate

func (b *InMemoryBackend) CreateHsmClientCertificate(
	id string,
	tagMap map[string]string,
) (*HsmClientCertificate, error)

CreateHsmClientCertificate creates a new HSM client certificate.

func (*InMemoryBackend) CreateHsmConfiguration

func (b *InMemoryBackend) CreateHsmConfiguration(
	id, description, hsmIPAddress, hsmPartitionName string,
	tagMap map[string]string,
) (*HsmConfiguration, error)

CreateHsmConfiguration creates a new HSM configuration.

func (*InMemoryBackend) CreateIdcApplication

func (b *InMemoryBackend) CreateIdcApplication(
	appName, idcInstanceArn, idcDisplayName, iamRoleArn, applicationType string,
) (*IdcApplication, error)

CreateIdcApplication creates a new Redshift IDC application.

func (*InMemoryBackend) CreateIntegration

func (b *InMemoryBackend) CreateIntegration(
	integrationName, sourceArn, targetArn, kmsKeyID, description string, tags map[string]string,
) (*Integration, error)

CreateIntegration creates a new zero-ETL integration.

func (*InMemoryBackend) CreateNamespace

func (b *InMemoryBackend) CreateNamespace(p CreateNamespaceParams) (*Namespace, error)

CreateNamespace creates a new Redshift Serverless namespace.

p.AdminUserPassword is a credential: it is read from the wire (so a client setting it doesn't get a phantom rejection) but never stored anywhere, never logged, and never echoed back -- see CreateNamespaceParams' doc comment. p.RedshiftIdcApplicationArn is likewise accepted but not persisted, since real AWS never surfaces it back either.

func (*InMemoryBackend) CreateQev2IdcApplication added in v1.2.0

func (b *InMemoryBackend) CreateQev2IdcApplication(
	appName, idcInstanceArn, idcDisplayName string, tags map[string]string,
) (*Qev2IdcApplication, error)

CreateQev2IdcApplication creates a new Amazon Redshift Query Editor (QEV2) IAM Identity Center application. Real CreateQev2IdcApplicationInput requires IdcDisplayName, IdcInstanceArn, and Qev2IdcApplicationName (confirmed against aws-sdk-go-v2/service/redshift@v1.65.0 CreateQev2IdcApplicationInput's doc comments), so all three are validated as non-empty here -- matching the non-empty-only validation style the neighboring CreateIdcApplication (RedshiftIdcApplication) uses for its own ARN/name fields; neither family in this package validates ARN *format*.

func (*InMemoryBackend) CreateScheduledAction

func (b *InMemoryBackend) CreateScheduledAction(
	name, schedule, iamRole, description string,
	target *ScheduledActionTarget,
	enable *bool,
) (*ScheduledAction, error)

CreateScheduledAction creates a new Redshift scheduled action.

func (*InMemoryBackend) CreateServerlessScheduledAction

func (b *InMemoryBackend) CreateServerlessScheduledAction(
	p CreateScheduledActionParams,
) (*ServerlessScheduledAction, error)

CreateServerlessScheduledAction creates a serverless scheduled action.

func (*InMemoryBackend) CreateServerlessSnapshot

func (b *InMemoryBackend) CreateServerlessSnapshot(
	snapshotName, namespaceName string,
	retentionPeriod int,
	tags map[string]string,
) (*ServerlessSnapshot, error)

CreateServerlessSnapshot creates a snapshot of a serverless namespace. tags holds CreateSnapshotInput's "tags" (confirmed present on CreateSnapshotRequest in service-2.json).

func (*InMemoryBackend) CreateServerlessUsageLimit

func (b *InMemoryBackend) CreateServerlessUsageLimit(
	resourceArn, usageType, period, breachAction string,
	amount int64,
) (*ServerlessUsageLimit, error)

CreateServerlessUsageLimit creates a serverless usage limit.

func (*InMemoryBackend) CreateSnapshotCopyConfigurationSL added in v1.3.1

func (b *InMemoryBackend) CreateSnapshotCopyConfigurationSL(
	namespaceName, destinationRegion, destinationKmsKeyID string, retentionPeriod int,
) (*ServerlessSnapshotCopyConfiguration, error)

CreateSnapshotCopyConfigurationSL creates a cross-region snapshot copy configuration for namespaceName. destinationRegion and namespaceName are required by the real CreateSnapshotCopyConfigurationRequest.

func (*InMemoryBackend) CreateSnapshotCopyGrant

func (b *InMemoryBackend) CreateSnapshotCopyGrant(
	name, kmsKeyID string,
	tagMap map[string]string,
) (*SnapshotCopyGrant, error)

CreateSnapshotCopyGrant creates a KMS key grant used for cross-region snapshot copy.

func (*InMemoryBackend) CreateSnapshotSchedule

func (b *InMemoryBackend) CreateSnapshotSchedule(
	scheduleID, description string,
	definitions []string,
	tagMap map[string]string,
) (*SnapshotSchedule, error)

CreateSnapshotSchedule creates a new snapshot schedule.

func (*InMemoryBackend) CreateTableRestoreStatus

func (b *InMemoryBackend) CreateTableRestoreStatus(
	clusterID, snapshotID, sourceDatabaseName, sourceTableName, targetDatabaseName, targetTableName string,
) (*TableRestoreStatus, error)

CreateTableRestoreStatus creates a table restore status entry.

func (*InMemoryBackend) CreateTags

func (b *InMemoryBackend) CreateTags(clusterID string, kv map[string]string) error

CreateTags adds or updates tags on the specified cluster.

func (*InMemoryBackend) CreateUsageLimit

func (b *InMemoryBackend) CreateUsageLimit(
	clusterID, featureType, limitType, breachAction string,
	amount int64,
	tagMap map[string]string,
) (*UsageLimit, error)

CreateUsageLimit creates a new usage limit for a cluster feature.

func (*InMemoryBackend) CreateWorkgroup

func (b *InMemoryBackend) CreateWorkgroup(
	workgroupName, namespaceName string, p WorkgroupParams, tags map[string]string,
) (*Workgroup, error)

CreateWorkgroup creates a new Redshift Serverless workgroup. tags holds CreateWorkgroupInput's "tags" (confirmed present on CreateWorkgroupRequest in service-2.json; UpdateWorkgroupRequest has no such field, so it is create-only and not part of WorkgroupParams, which UpdateWorkgroup shares).

func (*InMemoryBackend) DeauthorizeDataShare

func (b *InMemoryBackend) DeauthorizeDataShare(dataShareArn, consumerIdentifier string) (*DataShare, error)

DeauthorizeDataShare sets the association status to DEAUTHORIZED for the given consumer.

func (*InMemoryBackend) DeleteAuthenticationProfile

func (b *InMemoryBackend) DeleteAuthenticationProfile(name string) error

DeleteAuthenticationProfile deletes the named authentication profile.

func (*InMemoryBackend) DeleteCluster

func (b *InMemoryBackend) DeleteCluster(id string) (*Cluster, error)

DeleteCluster removes the cluster with the given identifier.

func (*InMemoryBackend) DeleteClusterParameterGroup

func (b *InMemoryBackend) DeleteClusterParameterGroup(name string) error

DeleteClusterParameterGroup removes a cluster parameter group.

func (*InMemoryBackend) DeleteClusterSecurityGroup

func (b *InMemoryBackend) DeleteClusterSecurityGroup(name string) error

DeleteClusterSecurityGroup removes a cluster security group.

func (*InMemoryBackend) DeleteClusterSnapshot

func (b *InMemoryBackend) DeleteClusterSnapshot(snapshotID string) (*Snapshot, error)

DeleteClusterSnapshot removes a cluster snapshot.

func (*InMemoryBackend) DeleteClusterSubnetGroup

func (b *InMemoryBackend) DeleteClusterSubnetGroup(name string) error

DeleteClusterSubnetGroup removes a cluster subnet group.

func (*InMemoryBackend) DeleteCustomDomainAssociation

func (b *InMemoryBackend) DeleteCustomDomainAssociation(clusterID, customDomainName string) error

DeleteCustomDomainAssociation removes the custom domain association for a cluster.

func (*InMemoryBackend) DeleteCustomDomainAssociationSL added in v1.3.1

func (b *InMemoryBackend) DeleteCustomDomainAssociationSL(
	customDomainName, workgroupName string,
) (*ServerlessCustomDomainAssociation, error)

DeleteCustomDomainAssociationSL removes a custom domain association and clears the mirrored fields on its workgroup.

func (*InMemoryBackend) DeleteEndpointAccess

func (b *InMemoryBackend) DeleteEndpointAccess(endpointName string) (*EndpointAccess, error)

DeleteEndpointAccess deletes the named endpoint access entry.

func (*InMemoryBackend) DeleteEndpointAccessSL added in v1.3.1

func (b *InMemoryBackend) DeleteEndpointAccessSL(endpointName string) (*ServerlessEndpointAccess, error)

DeleteEndpointAccessSL deletes a serverless VPC endpoint and returns the deleted object -- DeleteEndpointAccessResponse carries an "endpoint" member (confirmed against service-2.json), unlike DeleteResourcePolicy/ DeleteCustomDomainAssociation's zero-member responses.

func (*InMemoryBackend) DeleteEventSubscription

func (b *InMemoryBackend) DeleteEventSubscription(subscriptionName string) error

DeleteEventSubscription removes an event subscription.

func (*InMemoryBackend) DeleteHsmClientCertificate

func (b *InMemoryBackend) DeleteHsmClientCertificate(id string) error

DeleteHsmClientCertificate deletes the named HSM client certificate.

func (*InMemoryBackend) DeleteHsmConfiguration

func (b *InMemoryBackend) DeleteHsmConfiguration(id string) error

DeleteHsmConfiguration deletes the named HSM configuration.

func (*InMemoryBackend) DeleteIdcApplication

func (b *InMemoryBackend) DeleteIdcApplication(appArn string) error

DeleteIdcApplication deletes the named IDC application.

func (*InMemoryBackend) DeleteIntegration

func (b *InMemoryBackend) DeleteIntegration(integrationArn string) (*Integration, error)

DeleteIntegration deletes the named integration.

func (*InMemoryBackend) DeleteNamespace

func (b *InMemoryBackend) DeleteNamespace(
	namespaceName, finalSnapshotName string,
	finalSnapshotRetentionPeriod int,
) (*Namespace, error)

DeleteNamespace deletes a Redshift Serverless namespace. If finalSnapshotName is non-empty, a final snapshot is created first (real DeleteNamespaceInput carries FinalSnapshotName/FinalSnapshotRetentionPeriod for exactly this).

func (*InMemoryBackend) DeletePartner

func (b *InMemoryBackend) DeletePartner(_, clusterID, databaseName, partnerName string) error

DeletePartner removes a partner integration from the specified cluster database.

func (*InMemoryBackend) DeleteQev2IdcApplication added in v1.2.0

func (b *InMemoryBackend) DeleteQev2IdcApplication(appArn string) error

DeleteQev2IdcApplication deletes the Qev2 IdC application identified by ARN.

func (*InMemoryBackend) DeleteResourcePolicy

func (b *InMemoryBackend) DeleteResourcePolicy(resourceArn string) error

DeleteResourcePolicy deletes the resource policy for the given ARN.

func (*InMemoryBackend) DeleteResourcePolicySL added in v1.3.1

func (b *InMemoryBackend) DeleteResourcePolicySL(resourceArn string) (*ServerlessResourcePolicy, error)

DeleteResourcePolicySL deletes the resource policy for resourceArn.

func (*InMemoryBackend) DeleteScheduledAction

func (b *InMemoryBackend) DeleteScheduledAction(name string) error

DeleteScheduledAction deletes the named scheduled action.

func (*InMemoryBackend) DeleteServerlessScheduledAction

func (b *InMemoryBackend) DeleteServerlessScheduledAction(
	scheduledActionName string,
) (*ServerlessScheduledAction, error)

DeleteServerlessScheduledAction deletes a serverless scheduled action.

func (*InMemoryBackend) DeleteServerlessSnapshot

func (b *InMemoryBackend) DeleteServerlessSnapshot(
	snapshotName string,
) (*ServerlessSnapshot, error)

DeleteServerlessSnapshot deletes a serverless snapshot.

func (*InMemoryBackend) DeleteServerlessUsageLimit

func (b *InMemoryBackend) DeleteServerlessUsageLimit(
	usageLimitID string,
) (*ServerlessUsageLimit, error)

DeleteServerlessUsageLimit deletes a serverless usage limit.

func (*InMemoryBackend) DeleteSnapshotCopyConfigurationSL added in v1.3.1

func (b *InMemoryBackend) DeleteSnapshotCopyConfigurationSL(id string) (*ServerlessSnapshotCopyConfiguration, error)

DeleteSnapshotCopyConfigurationSL removes a snapshot copy configuration and returns the deleted object (DeleteSnapshotCopyConfigurationResponse echoes it, unlike most other serverless Delete* responses).

func (*InMemoryBackend) DeleteSnapshotCopyGrant

func (b *InMemoryBackend) DeleteSnapshotCopyGrant(name string) error

DeleteSnapshotCopyGrant deletes the named snapshot copy grant.

func (*InMemoryBackend) DeleteSnapshotSchedule

func (b *InMemoryBackend) DeleteSnapshotSchedule(scheduleID string) error

DeleteSnapshotSchedule deletes the named snapshot schedule.

func (*InMemoryBackend) DeleteTags

func (b *InMemoryBackend) DeleteTags(clusterID string, keys []string) error

DeleteTags removes tag keys from the specified cluster.

func (*InMemoryBackend) DeleteUsageLimit

func (b *InMemoryBackend) DeleteUsageLimit(usageLimitID string) error

DeleteUsageLimit deletes the usage limit with the given ID.

func (*InMemoryBackend) DeleteWorkgroup

func (b *InMemoryBackend) DeleteWorkgroup(workgroupName string) (*Workgroup, error)

DeleteWorkgroup deletes a Redshift Serverless workgroup.

func (*InMemoryBackend) DeregisterNamespace added in v1.3.1

func (b *InMemoryBackend) DeregisterNamespace(
	consumerIdentifiers []string, clusterIdentifier, serverlessNamespace, serverlessWorkgroup string,
) (*NamespaceRegistration, error)

DeregisterNamespace deregisters consumerIdentifiers from the cluster or Redshift Serverless namespace's Glue Data Catalog registration, removing exactly those consumers from the previously-registered set (real AWS scopes deregistration to the given ConsumerIdentifiers, not the whole namespace). A namespace with no prior registration deregisters against an empty consumer set rather than erroring: the declared error switch has no "registration not found" fault, only NamespaceIdentifier-shape errors.

func (*InMemoryBackend) DescribeAuthenticationProfiles

func (b *InMemoryBackend) DescribeAuthenticationProfiles(name string) ([]AuthenticationProfile, error)

DescribeAuthenticationProfiles returns authentication profiles, optionally filtered by name.

func (*InMemoryBackend) DescribeClusterParameterGroups

func (b *InMemoryBackend) DescribeClusterParameterGroups(name string) ([]ClusterParameterGroup, error)

DescribeClusterParameterGroups returns all parameter groups, or a specific one if name is non-empty.

func (*InMemoryBackend) DescribeClusterParameters

func (b *InMemoryBackend) DescribeClusterParameters(groupName string) ([]ClusterParameter, error)

DescribeClusterParameters returns the parameters for a specific parameter group.

func (*InMemoryBackend) DescribeClusterSecurityGroups

func (b *InMemoryBackend) DescribeClusterSecurityGroups(name string) ([]ClusterSecurityGroup, error)

DescribeClusterSecurityGroups returns all security groups, or a specific one if name is non-empty.

func (*InMemoryBackend) DescribeClusterSnapshots

func (b *InMemoryBackend) DescribeClusterSnapshots(snapshotID, clusterID, snapshotType string) ([]Snapshot, error)

DescribeClusterSnapshots returns snapshots, optionally filtered by snapshotID, clusterID, or snapshotType ("manual" or "automated"). An empty snapshotType matches all types.

func (*InMemoryBackend) DescribeClusterSubnetGroups

func (b *InMemoryBackend) DescribeClusterSubnetGroups(name string) ([]ClusterSubnetGroup, error)

DescribeClusterSubnetGroups returns all subnet groups, or a specific one if name is non-empty.

func (*InMemoryBackend) DescribeClusters

func (b *InMemoryBackend) DescribeClusters(id, marker string, maxRecords int) ([]Cluster, string, error)

DescribeClusters returns clusters. If id is non-empty, returns only that cluster. When marker and maxRecords are used, returns a page of results sorted by ClusterIdentifier.

func (*InMemoryBackend) DescribeCustomDomainAssociations

func (b *InMemoryBackend) DescribeCustomDomainAssociations(
	clusterID, customDomainName string,
) ([]CustomDomainAssociation, error)

DescribeCustomDomainAssociations returns custom domain associations, optionally filtered.

func (*InMemoryBackend) DescribeDataShares

func (b *InMemoryBackend) DescribeDataShares(dataShareArn string) ([]DataShare, error)

DescribeDataShares returns data shares, optionally filtered by ARN.

func (*InMemoryBackend) DescribeDataSharesForConsumer

func (b *InMemoryBackend) DescribeDataSharesForConsumer(consumerArn, status string) ([]DataShare, error)

DescribeDataSharesForConsumer returns data shares with a matching consumer association.

func (*InMemoryBackend) DescribeDataSharesForProducer

func (b *InMemoryBackend) DescribeDataSharesForProducer(producerArn, status string) ([]DataShare, error)

DescribeDataSharesForProducer returns data shares matching a producer ARN.

func (*InMemoryBackend) DescribeDefaultClusterParameters

func (b *InMemoryBackend) DescribeDefaultClusterParameters(family string) ([]ClusterParameter, error)

DescribeDefaultClusterParameters returns the default parameters for a given parameter group family.

func (*InMemoryBackend) DescribeEndpointAccess

func (b *InMemoryBackend) DescribeEndpointAccess(
	clusterID, endpointName string,
) ([]EndpointAccess, error)

DescribeEndpointAccess returns endpoint accesses, optionally filtered by cluster and endpoint name.

func (*InMemoryBackend) DescribeEndpointAuthorization

func (b *InMemoryBackend) DescribeEndpointAuthorization(
	clusterID, account string,
	grantee bool,
) ([]EndpointAuthorization, error)

DescribeEndpointAuthorization returns endpoint authorizations filtered by cluster and account.

func (*InMemoryBackend) DescribeEventSubscriptions

func (b *InMemoryBackend) DescribeEventSubscriptions(subscriptionName string) ([]EventSubscription, error)

DescribeEventSubscriptions returns event subscriptions, optionally filtered by name.

func (*InMemoryBackend) DescribeEvents

func (b *InMemoryBackend) DescribeEvents(sourceIdentifier, sourceType string) ([]Event, error)

DescribeEvents returns events for a Redshift resource. This in-memory implementation returns an empty list since events are not tracked.

func (*InMemoryBackend) DescribeHsmClientCertificates

func (b *InMemoryBackend) DescribeHsmClientCertificates(id string) ([]HsmClientCertificate, error)

DescribeHsmClientCertificates returns HSM client certificates, optionally filtered by identifier.

func (*InMemoryBackend) DescribeHsmConfigurations

func (b *InMemoryBackend) DescribeHsmConfigurations(id string) ([]HsmConfiguration, error)

DescribeHsmConfigurations returns HSM configurations, optionally filtered by identifier.

func (*InMemoryBackend) DescribeIdcApplications

func (b *InMemoryBackend) DescribeIdcApplications(appArn string) ([]IdcApplication, error)

DescribeIdcApplications returns IDC applications, optionally filtered by ARN.

func (*InMemoryBackend) DescribeIntegrations

func (b *InMemoryBackend) DescribeIntegrations(integrationArn string) ([]Integration, error)

DescribeIntegrations returns integrations, optionally filtered by ARN.

func (*InMemoryBackend) DescribePartners

func (b *InMemoryBackend) DescribePartners(_, clusterID, databaseName, partnerName string) ([]Partner, error)

DescribePartners returns partner integrations filtered by cluster, database, or partner name.

func (*InMemoryBackend) DescribeQev2IdcApplications added in v1.2.0

func (b *InMemoryBackend) DescribeQev2IdcApplications(
	appArn, marker string, maxRecords int,
) ([]Qev2IdcApplication, string, error)

DescribeQev2IdcApplications returns Qev2 IdC applications. When appArn is non-empty it looks up that single application (no pagination). Otherwise it pages through the full set via marker/maxRecords using exactly the same convention as DescribeClusters (see store.go): results are sorted ascending by key (Qev2IdcApplicationName, the table's key), marker is the last application name returned on the previous page (an exclusive cutoff), and the returned nextMarker is empty once the final page is reached.

func (*InMemoryBackend) DescribeReservedNodeExchangeStatus

func (b *InMemoryBackend) DescribeReservedNodeExchangeStatus(reservedNodeID string) (string, error)

DescribeReservedNodeExchangeStatus returns the exchange status for a reserved node. In this in-memory implementation it returns a placeholder active status.

func (*InMemoryBackend) DescribeReservedNodeOfferings

func (b *InMemoryBackend) DescribeReservedNodeOfferings(offeringID string) ([]ReservedNodeOffering, error)

DescribeReservedNodeOfferings returns available reserved node offerings, optionally filtered by offeringID.

func (*InMemoryBackend) DescribeReservedNodes

func (b *InMemoryBackend) DescribeReservedNodes(reservedNodeID string) ([]ReservedNode, error)

DescribeReservedNodes returns reserved nodes, optionally filtered by reservedNodeID.

func (*InMemoryBackend) DescribeResize

func (b *InMemoryBackend) DescribeResize(clusterID string) (*ResizeProgress, error)

DescribeResize returns the active resize progress for a cluster.

func (*InMemoryBackend) DescribeScheduledActions

func (b *InMemoryBackend) DescribeScheduledActions(name string) ([]ScheduledAction, error)

DescribeScheduledActions returns scheduled actions, optionally filtered by name.

func (*InMemoryBackend) DescribeSnapshotCopyGrants

func (b *InMemoryBackend) DescribeSnapshotCopyGrants(name string) ([]SnapshotCopyGrant, error)

DescribeSnapshotCopyGrants returns snapshot copy grants, optionally filtered by name.

func (*InMemoryBackend) DescribeSnapshotSchedules

func (b *InMemoryBackend) DescribeSnapshotSchedules(scheduleID string) ([]SnapshotSchedule, error)

DescribeSnapshotSchedules returns snapshot schedules, optionally filtered by identifier.

func (*InMemoryBackend) DescribeTableRestoreStatus

func (b *InMemoryBackend) DescribeTableRestoreStatus(clusterID string) ([]TableRestoreStatus, error)

DescribeTableRestoreStatus returns table restore status records for a cluster.

func (*InMemoryBackend) DescribeTags

func (b *InMemoryBackend) DescribeTags() map[string]map[string]string

DescribeTags returns all tags across all clusters.

func (*InMemoryBackend) DescribeUsageLimits

func (b *InMemoryBackend) DescribeUsageLimits(clusterID, featureType string) ([]UsageLimit, error)

DescribeUsageLimits returns usage limits, optionally filtered by cluster and feature type.

func (*InMemoryBackend) DisableLogging

func (b *InMemoryBackend) DisableLogging(clusterID string) (*LoggingStatus, error)

DisableLogging disables audit logging for the specified cluster.

func (*InMemoryBackend) DisableSnapshotCopy

func (b *InMemoryBackend) DisableSnapshotCopy(clusterID string) (*Cluster, error)

DisableSnapshotCopy disables cross-region snapshot copy for a cluster.

func (*InMemoryBackend) DisassociateDataShareConsumer

func (b *InMemoryBackend) DisassociateDataShareConsumer(
	dataShareArn, consumerArn, _ string,
	_ bool,
) (*DataShare, error)

DisassociateDataShareConsumer removes the consumer association from a data share.

func (*InMemoryBackend) EnableLogging

func (b *InMemoryBackend) EnableLogging(clusterID, bucketName, s3KeyPrefix string) (*LoggingStatus, error)

EnableLogging enables audit logging for the specified cluster.

func (*InMemoryBackend) EnableSnapshotCopy

func (b *InMemoryBackend) EnableSnapshotCopy(
	clusterID, destinationRegion, grantName string,
	retentionPeriod int,
) (*Cluster, error)

EnableSnapshotCopy enables cross-region snapshot copy for a cluster.

func (*InMemoryBackend) FailoverPrimaryCompute

func (b *InMemoryBackend) FailoverPrimaryCompute(clusterID string) (*Cluster, error)

FailoverPrimaryCompute simulates a primary compute failover by updating the cluster status.

func (*InMemoryBackend) GetClusterCredentials

func (b *InMemoryBackend) GetClusterCredentials(
	clusterID, dbUser string,
	_ bool,
) (*ClusterCredentials, error)

GetClusterCredentials generates temporary credentials for a cluster user.

func (*InMemoryBackend) GetClusterCredentialsWithIAM

func (b *InMemoryBackend) GetClusterCredentialsWithIAM(clusterID, _ string) (*ClusterCredentials, error)

GetClusterCredentialsWithIAM returns temporary cluster credentials including an IAM role.

func (*InMemoryBackend) GetCredentials

func (b *InMemoryBackend) GetCredentials(
	workgroupName, dbName string,
	durationSeconds int,
) (string, string, time.Time, time.Time, error)

GetCredentials returns temporary credentials for a serverless workgroup. durationSeconds is clamped to the real API's [900, 3600] range; 0 uses the backend default (slCredExpiryMinutes).

func (*InMemoryBackend) GetCustomDomainAssociationSL added in v1.3.1

func (b *InMemoryBackend) GetCustomDomainAssociationSL(
	customDomainName, workgroupName string,
) (*ServerlessCustomDomainAssociation, error)

GetCustomDomainAssociationSL returns a custom domain association, validating it belongs to workgroupName the way GetCustomDomainAssociationInput's two required fields (customDomainName, workgroupName) imply.

func (*InMemoryBackend) GetEndpointAccessSL added in v1.3.1

func (b *InMemoryBackend) GetEndpointAccessSL(endpointName string) (*ServerlessEndpointAccess, error)

GetEndpointAccessSL returns a serverless VPC endpoint by name.

func (*InMemoryBackend) GetIdentityCenterAuthTokenSL added in v1.3.1

func (b *InMemoryBackend) GetIdentityCenterAuthTokenSL(workgroupNames []string) (string, time.Time, error)

GetIdentityCenterAuthTokenSL mints an Identity Center authentication token scoped to workgroupNames. Real GetIdentityCenterAuthTokenInput requires 1-20 valid WorkgroupNames, each needing "Identity Center integration enabled" (confirmed against api_op_GetIdentityCenterAuthToken.go) -- this backend does not model IDC integration state on workgroups at all (RedshiftIdcApplicationArn is accept-and-discard on Namespace, see CreateNamespaceParams' doc comment), so the only real check available is that every named workgroup actually exists, an FK validation classic Redshift's own same-named operation (handleGetIdentityCenterAuthToken in handler_idc_applications.go) does not even perform. The token itself is a synthetic opaque value: no real Identity Center backend exists here to mint one, the same honest limitation classic Redshift's sibling operation of the identical name already accepts (see its doc comment).

func (*InMemoryBackend) GetNamespace

func (b *InMemoryBackend) GetNamespace(namespaceName string) (*Namespace, error)

GetNamespace returns a Redshift Serverless namespace by name.

func (*InMemoryBackend) GetRecoveryPointSL added in v1.3.1

func (b *InMemoryBackend) GetRecoveryPointSL(recoveryPointID string) (*RecoveryPoint, error)

GetRecoveryPointSL returns a recovery point by ID.

func (*InMemoryBackend) GetReservedNodeExchangeOfferings

func (b *InMemoryBackend) GetReservedNodeExchangeOfferings(reservedNodeID string) ([]ReservedNodeOffering, error)

GetReservedNodeExchangeOfferings returns offerings available for exchange of a reserved node.

func (*InMemoryBackend) GetResourcePolicy

func (b *InMemoryBackend) GetResourcePolicy(resourceArn string) (*ResourcePolicy, error)

GetResourcePolicy returns the resource policy for the given resource ARN.

func (*InMemoryBackend) GetResourcePolicySL added in v1.3.1

func (b *InMemoryBackend) GetResourcePolicySL(resourceArn string) (*ServerlessResourcePolicy, error)

GetResourcePolicySL returns the resource policy attached to resourceArn.

func (*InMemoryBackend) GetServerlessScheduledAction

func (b *InMemoryBackend) GetServerlessScheduledAction(
	scheduledActionName string,
) (*ServerlessScheduledAction, error)

GetServerlessScheduledAction returns a serverless scheduled action by name.

func (*InMemoryBackend) GetServerlessSnapshot

func (b *InMemoryBackend) GetServerlessSnapshot(nameOrArn, ownerAccount string) (*ServerlessSnapshot, error)

GetServerlessSnapshot returns a serverless snapshot by name or ARN (GetSnapshotInput accepts either SnapshotName or SnapshotArn).

ownerAccount is honestly single-account: this backend never simulates cross-account snapshot sharing for the serverless surface (AuthorizeSnapshotAccess is not part of this API; ServerlessSnapshot.AccountsWithRestoreAccess is declared for wire shape but never populated), so every snapshot's real owner is b.accountID. A non-empty ownerAccount that doesn't match b.accountID can therefore never resolve to a snapshot, same as real AWS would return for an inaccessible cross-account snapshot.

func (*InMemoryBackend) GetServerlessTrack added in v1.3.1

func (b *InMemoryBackend) GetServerlessTrack(trackName string) (*ServerlessTrack, error)

GetServerlessTrack returns a single named maintenance track.

func (*InMemoryBackend) GetServerlessUsageLimit

func (b *InMemoryBackend) GetServerlessUsageLimit(
	usageLimitID string,
) (*ServerlessUsageLimit, error)

GetServerlessUsageLimit returns a serverless usage limit by ID.

func (*InMemoryBackend) GetTableRestoreStatusSL added in v1.3.1

func (b *InMemoryBackend) GetTableRestoreStatusSL(tableRestoreRequestID string) (*ServerlessTableRestoreStatus, error)

GetTableRestoreStatusSL returns a table restore request's status by ID.

func (*InMemoryBackend) GetWorkgroup

func (b *InMemoryBackend) GetWorkgroup(workgroupName string) (*Workgroup, error)

GetWorkgroup returns a Redshift Serverless workgroup by name.

func (*InMemoryBackend) ListCustomDomainAssociationsSL added in v1.3.1

func (b *InMemoryBackend) ListCustomDomainAssociationsSL(
	customDomainName, customDomainCertificateArn string,
	maxResults int,
	nextToken string,
) ([]*ServerlessCustomDomainAssociation, string)

ListCustomDomainAssociationsSL returns associations, optionally filtered by customDomainName or customDomainCertificateArn (both optional filters on ListCustomDomainAssociationsRequest).

func (*InMemoryBackend) ListEndpointAccessSL added in v1.3.1

func (b *InMemoryBackend) ListEndpointAccessSL(
	workgroupName, ownerAccount string, maxResults int, nextToken string,
) ([]*ServerlessEndpointAccess, string)

ListEndpointAccessSL returns serverless VPC endpoints, optionally filtered by workgroupName/ownerAccount. ListEndpointAccessRequest's vpcId filter is deliberately not accepted -- this backend never derives a real vpcId for any endpoint (see ServerlessEndpointAccess's VpcEndpoint doc comment), so there is nothing honest to filter against.

func (*InMemoryBackend) ListManagedWorkgroupsSL added in v1.3.1

func (b *InMemoryBackend) ListManagedWorkgroupsSL(_ string, _ int, _ string) ([]ManagedWorkgroupListItem, string)

ListManagedWorkgroupsSL returns Glue Data Catalog-managed Redshift Serverless workgroups (see ManagedWorkgroupListItem's doc comment for what these are). This backend has no Glue Data Catalog / Lake Formation integration anywhere that could ever produce one, so the honest result is always an empty, correctly-shaped list -- not a fabricated entry.

func (*InMemoryBackend) ListNamespaces

func (b *InMemoryBackend) ListNamespaces(maxResults int, nextToken string) ([]*Namespace, string)

ListNamespaces returns all namespaces with pagination.

func (*InMemoryBackend) ListRecoveryPointsSL added in v1.3.1

func (b *InMemoryBackend) ListRecoveryPointsSL(p ListRecoveryPointsParams) ([]*RecoveryPoint, string)

ListRecoveryPointsSL returns recovery points, optionally filtered by namespaceName, namespaceArn, and creation time range (all accepted per ListRecoveryPointsRequest in service-2.json).

func (*InMemoryBackend) ListServerlessResourceTags added in v1.3.1

func (b *InMemoryBackend) ListServerlessResourceTags(resourceArn string) (map[string]string, error)

ListServerlessResourceTags returns a resource's current tags.

func (*InMemoryBackend) ListServerlessScheduledActions

func (b *InMemoryBackend) ListServerlessScheduledActions(
	namespaceName string,
	maxResults int,
	nextToken string,
) ([]*ServerlessScheduledAction, string)

ListServerlessScheduledActions returns all serverless scheduled actions.

func (*InMemoryBackend) ListServerlessSnapshots

func (b *InMemoryBackend) ListServerlessSnapshots(
	p ListServerlessSnapshotsParams,
) ([]*ServerlessSnapshot, string)

ListServerlessSnapshots returns snapshots, optionally filtered by namespace name/ARN, creation time range, and owner account.

p.OwnerAccount is honestly single-account -- see GetServerlessSnapshot's doc comment for why comparing against b.accountID is the correct filter here rather than a no-op.

func (*InMemoryBackend) ListServerlessTracks added in v1.3.1

func (b *InMemoryBackend) ListServerlessTracks(maxResults int, nextToken string) ([]*ServerlessTrack, string)

ListServerlessTracks returns the fixed set of tracks, paginated the same way every other serverless List op is.

func (*InMemoryBackend) ListServerlessUsageLimits

func (b *InMemoryBackend) ListServerlessUsageLimits(
	resourceArn, usageType string,
	maxResults int,
	nextToken string,
) ([]*ServerlessUsageLimit, string)

ListServerlessUsageLimits returns all serverless usage limits, optionally filtered by resource ARN and/or usage type.

func (*InMemoryBackend) ListSnapshotCopyConfigurationsSL added in v1.3.1

func (b *InMemoryBackend) ListSnapshotCopyConfigurationsSL(
	namespaceName string, maxResults int, nextToken string,
) ([]*ServerlessSnapshotCopyConfiguration, string)

ListSnapshotCopyConfigurationsSL returns configurations, optionally filtered by namespaceName.

func (*InMemoryBackend) ListTableRestoreStatusSL added in v1.3.1

func (b *InMemoryBackend) ListTableRestoreStatusSL(
	namespaceName, workgroupName string, maxResults int, nextToken string,
) ([]*ServerlessTableRestoreStatus, string)

ListTableRestoreStatusSL returns table restore requests, optionally filtered by namespaceName/workgroupName.

func (*InMemoryBackend) ListWorkgroups

func (b *InMemoryBackend) ListWorkgroups(ownerAccount string, maxResults int, nextToken string) ([]*Workgroup, string)

ListWorkgroups returns all workgroups with pagination, optionally filtered by owner account.

ownerAccount is honestly single-account: this backend has no cross-account workgroup sharing (every workgroup belongs to b.accountID), so a non-empty ownerAccount that doesn't match b.accountID matches nothing -- same rationale as GetServerlessSnapshot's ownerAccount filter.

func (*InMemoryBackend) ModifyAquaConfiguration added in v1.3.1

func (b *InMemoryBackend) ModifyAquaConfiguration(id string) (*Cluster, error)

ModifyAquaConfiguration validates that id refers to a real cluster and otherwise does nothing: the real operation is retired (api_op_ModifyAquaConfiguration.go: "Calling this operation does not change AQUA configuration. Amazon Redshift automatically determines whether to use AQUA") but still requires and existence-checks ClusterIdentifier (ClusterNotFoundFault is declared in its error switch).

func (*InMemoryBackend) ModifyAuthenticationProfile

func (b *InMemoryBackend) ModifyAuthenticationProfile(name, content string) (*AuthenticationProfile, error)

ModifyAuthenticationProfile updates the content of an authentication profile.

func (*InMemoryBackend) ModifyCluster

func (b *InMemoryBackend) ModifyCluster(
	id string,
	nodeType string,
	numberOfNodes int,
	_ string,
	encrypted *bool,
	enhancedVpcRouting *bool,
	applyImmediately bool,
) (*Cluster, error)

ModifyCluster modifies a cluster's attributes. When applyImmediately is false, changes are stored in PendingModifiedValues and returned without being applied to the live cluster.

encrypted and enhancedVpcRouting are tri-state (nil means "not specified, leave unchanged"): real ModifyClusterInput.Encrypted/EnhancedVpcRouting are *bool, and the SDK can explicitly send "false" to disable either setting (e.g. to decrypt a cluster). A plain bool cannot distinguish "not sent" from "explicitly false", which previously made it impossible to ever turn either setting off via ModifyCluster.

func (*InMemoryBackend) ModifyClusterIamRoles

func (b *InMemoryBackend) ModifyClusterIamRoles(id string, addRoles, removeRoles []string) (*Cluster, error)

ModifyClusterIamRoles adds and removes IAM roles on a cluster.

func (*InMemoryBackend) ModifyClusterMaintenance

func (b *InMemoryBackend) ModifyClusterMaintenance(
	id, maintenanceTrack string,
	_ bool,
) (*Cluster, error)

ModifyClusterMaintenance modifies the maintenance settings of a cluster.

func (*InMemoryBackend) ModifyClusterParameterGroup

func (b *InMemoryBackend) ModifyClusterParameterGroup(
	groupName string,
	params []ClusterParameter,
) (*ClusterParameterGroup, error)

ModifyClusterParameterGroup updates parameters within a parameter group.

func (*InMemoryBackend) ModifyClusterSnapshot

func (b *InMemoryBackend) ModifyClusterSnapshot(snapshotID string, retentionPeriod int, _ bool) (*Snapshot, error)

ModifyClusterSnapshot updates the manual retention period of a snapshot.

func (*InMemoryBackend) ModifyClusterSnapshotSchedule

func (b *InMemoryBackend) ModifyClusterSnapshotSchedule(clusterID, scheduleID string, disassociate bool) error

ModifyClusterSnapshotSchedule associates or disassociates a snapshot schedule with a cluster by setting/clearing Cluster.SnapshotScheduleIdentifier -- the real wire field (confirmed against aws-sdk-go-v2/service/redshift@v1.62.3/types.Cluster). SnapshotSchedule.AssociatedClusters (see snapshotScheduleAssociatedClusters) is derived by scanning for clusters whose SnapshotScheduleIdentifier matches, rather than stored redundantly on the schedule.

func (*InMemoryBackend) ModifyClusterSubnetGroup

func (b *InMemoryBackend) ModifyClusterSubnetGroup(
	name, description string,
	subnetIDs []string,
) (*ClusterSubnetGroup, error)

ModifyClusterSubnetGroup updates the description or subnets of a cluster subnet group.

func (*InMemoryBackend) ModifyCustomDomainAssociation

func (b *InMemoryBackend) ModifyCustomDomainAssociation(
	clusterID, customDomainName, customDomainCertificateArn string,
) (*CustomDomainAssociation, error)

ModifyCustomDomainAssociation updates the certificate ARN for an existing custom domain.

func (*InMemoryBackend) ModifyEndpointAccess

func (b *InMemoryBackend) ModifyEndpointAccess(
	endpointName string, vpcSecurityGroupIDs []string,
) (*EndpointAccess, error)

ModifyEndpointAccess updates the VPC security groups for an endpoint. Real ModifyEndpointAccessInput only supports changing VpcSecurityGroupIds (confirmed against aws-sdk-go-v2/service/redshift@v1.62.3) -- there is no VpcId parameter.

func (*InMemoryBackend) ModifyEventSubscription

func (b *InMemoryBackend) ModifyEventSubscription(
	subscriptionName, snsTopicArn, sourceType, severity string,
	sourceIDs, eventCategories []string,
	enabled *bool,
) (*EventSubscription, error)

ModifyEventSubscription modifies an existing event subscription.

func (*InMemoryBackend) ModifyIdcApplication

func (b *InMemoryBackend) ModifyIdcApplication(
	appArn, idcDisplayName, iamRoleArn string,
) (*IdcApplication, error)

ModifyIdcApplication updates the display name and IAM role of an IDC application.

func (*InMemoryBackend) ModifyIntegration

func (b *InMemoryBackend) ModifyIntegration(
	integrationArn, description, newIntegrationName string,
) (*Integration, error)

ModifyIntegration updates the description and/or name of an integration. Real ModifyIntegrationInput (aws-sdk-go-v2/service/redshift@v1.62.3) supports renaming via IntegrationName in addition to Description.

func (*InMemoryBackend) ModifyLakehouseConfiguration added in v1.3.1

func (b *InMemoryBackend) ModifyLakehouseConfiguration(
	p ModifyLakehouseConfigParams,
) (*ClusterLakehouseConfigResult, error)

ModifyLakehouseConfiguration applies p to id's lakehouse/Glue Data Catalog federation config. CatalogArn is derived from the client-supplied CatalogName the same way UpdateLakehouseConfigurationSL derives it for Redshift Serverless (arn.Build against b.region/b.accountID, "catalog/<name>" matching Glue's own named-catalog ARN shape).

Unlike the Serverless sibling, this op's real error switch (awsAwsquery_deserializeOpErrorModifyLakehouseConfiguration) declares no DryRunException -- ModifyLakehouseConfigurationInput.DryRun's own doc text ("validates the request without actually modifying the lakehouse configuration") is honored literally: a successful DryRun runs every validation below and returns the response that WOULD have resulted, without persisting it.

LakehouseIdcApplicationArn, when the caller is setting a new one this call, is validated against this backend's own RedshiftIdcApplication store (idc_applications.go) -- real cross-reference validation this backend can perform because it already models that resource, not a fabricated check. A miss returns RedshiftIdcApplicationNotExists (declared in this op's own error switch, reusing the existing ErrIdcApplicationNotFound sentinel).

func (*InMemoryBackend) ModifyQev2IdcApplication added in v1.2.0

func (b *InMemoryBackend) ModifyQev2IdcApplication(appArn, idcDisplayName string) (*Qev2IdcApplication, error)

ModifyQev2IdcApplication updates the display name of a Qev2 IdC application. Real ModifyQev2IdcApplicationInput exposes only Qev2IdcApplicationArn (the lookup key) and IdcDisplayName -- unlike ModifyRedshiftIdcApplication, which additionally accepts IamRoleArn, there is no IAM role on this resource to modify. IdcInstanceArn and Qev2IdcApplicationName are immutable: the real input shape has no fields for them, so there is nothing to accept or reject for those beyond ignoring any caller-supplied value (the awsquery form simply never carries one).

func (*InMemoryBackend) ModifyScheduledAction

func (b *InMemoryBackend) ModifyScheduledAction(
	name, schedule, iamRole, description string,
	target *ScheduledActionTarget,
	enable *bool,
) (*ScheduledAction, error)

ModifyScheduledAction updates a scheduled action's schedule, IAM role, description, target action, and/or enabled state.

func (*InMemoryBackend) ModifySnapshotCopyRetentionPeriod

func (b *InMemoryBackend) ModifySnapshotCopyRetentionPeriod(clusterID string, retentionPeriod int) (*Cluster, error)

ModifySnapshotCopyRetentionPeriod modifies the retention period for cross-region snapshot copy.

func (*InMemoryBackend) ModifySnapshotSchedule

func (b *InMemoryBackend) ModifySnapshotSchedule(scheduleID string, definitions []string) (*SnapshotSchedule, error)

ModifySnapshotSchedule updates the schedule definitions for an existing snapshot schedule.

func (*InMemoryBackend) ModifyUsageLimit

func (b *InMemoryBackend) ModifyUsageLimit(usageLimitID, breachAction string, amount int64) (*UsageLimit, error)

ModifyUsageLimit modifies the amount and/or breach action of a usage limit.

func (*InMemoryBackend) PauseCluster

func (b *InMemoryBackend) PauseCluster(id string) (*Cluster, error)

PauseCluster pauses the specified cluster.

func (*InMemoryBackend) PurchaseReservedNodeOffering

func (b *InMemoryBackend) PurchaseReservedNodeOffering(
	offeringID, reservedNodeID string,
	nodeCount int,
) (*ReservedNode, error)

PurchaseReservedNodeOffering creates a new reserved node from an offering.

func (*InMemoryBackend) PutResourcePolicy

func (b *InMemoryBackend) PutResourcePolicy(resourceArn, policy string) (*ResourcePolicy, error)

PutResourcePolicy creates or replaces a resource policy for the given ARN.

func (*InMemoryBackend) PutResourcePolicySL added in v1.3.1

func (b *InMemoryBackend) PutResourcePolicySL(resourceArn, policy string) (*ServerlessResourcePolicy, error)

PutResourcePolicySL creates or replaces the resource policy for resourceArn.

func (*InMemoryBackend) RebootCluster

func (b *InMemoryBackend) RebootCluster(id string) (*Cluster, error)

RebootCluster initiates a reboot of the specified cluster.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the AWS region this backend is configured for.

func (*InMemoryBackend) RegisterNamespace added in v1.3.1

func (b *InMemoryBackend) RegisterNamespace(
	consumerIdentifiers []string, clusterIdentifier, serverlessNamespace, serverlessWorkgroup string,
) (*NamespaceRegistration, error)

RegisterNamespace registers a cluster or Redshift Serverless namespace to the Glue Data Catalog for consumerIdentifiers. Real RegisterNamespaceOutput carries only a Status field (always "Registering", the in-flight transition state; see the const doc comment above) -- so what makes this operation "real" rather than a canned response is that it validates NamespaceIdentifier against actual backend state before accepting it (ClusterNotFound/InvalidClusterState/InvalidNamespaceFault, the only exceptions declared in awsAwsquery_deserializeOpErrorRegisterNamespace) and persists the registration so DeregisterNamespace has real prior state to mutate.

func (*InMemoryBackend) RejectDataShare

func (b *InMemoryBackend) RejectDataShare(dataShareArn string) (*DataShare, error)

RejectDataShare marks all associations as REJECTED and disables public access.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all backend state while preserving configuration.

func (*InMemoryBackend) ResetClusterParameterGroup

func (b *InMemoryBackend) ResetClusterParameterGroup(
	groupName string,
	resetAllParameters bool,
	params []ClusterParameter,
) (*ClusterParameterGroup, error)

ResetClusterParameterGroup resets all or specific parameters to their default values.

func (*InMemoryBackend) ResizeCluster

func (b *InMemoryBackend) ResizeCluster(
	id, nodeType, clusterType string,
	numberOfNodes int,
	classic bool,
) (*Cluster, error)

ResizeCluster initiates a resize of the specified cluster.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore loads backend state from a JSON snapshot. It implements persistence.Persistable.

func (*InMemoryBackend) RestoreFromClusterSnapshot

func (b *InMemoryBackend) RestoreFromClusterSnapshot(clusterID, snapshotID string) (*Cluster, error)

RestoreFromClusterSnapshot creates a new cluster from an existing snapshot.

func (*InMemoryBackend) RestoreFromRecoveryPointSL added in v1.3.1

func (b *InMemoryBackend) RestoreFromRecoveryPointSL(
	namespaceName, workgroupName, recoveryPointID string,
) (*Namespace, error)

RestoreFromRecoveryPointSL restores namespaceName's data from recoveryPointID using workgroupName's compute. namespaceName/recoveryPointId/workgroupName are all required on the real RestoreFromRecoveryPointRequest (confirmed against service-2.json). Real AWS restores a namespace's storage layer in place; this backend does not simulate real data content, so once the FK checks pass, the existing Namespace is returned unchanged -- consistent with how this service's other "restore" ops (e.g. CreateSnapshotCopyConfiguration's cross-region copy) do not simulate real data movement, only the request/response contract.

func (*InMemoryBackend) RestoreFromSnapshotSL added in v1.3.1

func (b *InMemoryBackend) RestoreFromSnapshotSL(p RestoreFromSnapshotParams) (*Namespace, string, error)

RestoreFromSnapshotSL restores namespaceName's data from a snapshot using workgroupName's compute. namespaceName/workgroupName are both required on the real RestoreFromSnapshotRequest and, by the same required-field shape and "name of the namespace to restore ... to/into" wording convention RestoreFromRecoveryPointRequest also uses (confirmed against both shapes in service-2.json), both are treated as pre-existing resources here too -- the same design RestoreFromRecoveryPointSL already established. Real AWS restores a namespace's storage layer in place; this backend does not simulate real data content, so once the lookup/FK checks pass the existing Namespace is returned unchanged, same as RestoreFromRecoveryPointSL.

func (*InMemoryBackend) RestoreTableFromRecoveryPointSL added in v1.3.1

func (b *InMemoryBackend) RestoreTableFromRecoveryPointSL(
	p RestoreTableFromSnapshotParams,
) (*ServerlessTableRestoreStatus, error)

RestoreTableFromRecoveryPointSL restores a single table from a recovery point. NamespaceName/NewTableName/RecoveryPointID/SourceDatabaseName/ SourceTableName/WorkgroupName are all required on the real RestoreTableFromRecoveryPointInput (confirmed against service-2.json).

func (*InMemoryBackend) RestoreTableFromSnapshotSL added in v1.3.1

func (b *InMemoryBackend) RestoreTableFromSnapshotSL(
	p RestoreTableFromSnapshotParams,
) (*ServerlessTableRestoreStatus, error)

RestoreTableFromSnapshotSL restores a single table from a serverless snapshot. NamespaceName/NewTableName/SnapshotName/SourceDatabaseName/ SourceTableName/WorkgroupName are all required on the real RestoreTableFromSnapshotInput (confirmed against service-2.json).

func (*InMemoryBackend) ResumeCluster

func (b *InMemoryBackend) ResumeCluster(id string) (*Cluster, error)

ResumeCluster resumes a paused cluster.

func (*InMemoryBackend) RevokeClusterSecurityGroupIngress

func (b *InMemoryBackend) RevokeClusterSecurityGroupIngress(
	groupName, cidrIP, ec2GroupName, ec2GroupOwnerID string,
) (*ClusterSecurityGroup, error)

RevokeClusterSecurityGroupIngress removes an ingress rule from a cluster security group.

func (*InMemoryBackend) RevokeEndpointAccess

func (b *InMemoryBackend) RevokeEndpointAccess(
	clusterID, account string,
	_ []string,
	force bool,
) (*EndpointAuthorization, error)

RevokeEndpointAccess revokes endpoint authorization for a cluster and account.

func (*InMemoryBackend) RevokeSnapshotAccess

func (b *InMemoryBackend) RevokeSnapshotAccess(snapshotID, accountWithRestoreAccess string) (*Snapshot, error)

RevokeSnapshotAccess removes restore access for the given account from a snapshot.

func (*InMemoryBackend) RotateEncryptionKey

func (b *InMemoryBackend) RotateEncryptionKey(id string) (*Cluster, error)

RotateEncryptionKey rotates the encryption key for the specified cluster.

func (*InMemoryBackend) SetDNSRegistrar

func (b *InMemoryBackend) SetDNSRegistrar(dns DNSRegistrar)

SetDNSRegistrar wires a DNS server so Redshift cluster hostnames are auto-registered.

func (*InMemoryBackend) Snapshot

func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte

Snapshot serialises the backend state to JSON. It implements persistence.Persistable.

func (*InMemoryBackend) StartReconciler

func (b *InMemoryBackend) StartReconciler(ctx context.Context)

StartReconciler starts the managed background reconciler that advances cluster lifecycle transitions (creating→available, modifying→available, deleting→gone). It replaces the previous per-cluster unmanaged goroutine with a single goroutine owning a stop channel and WaitGroup, so it can be cancelled deterministically via ctx or StopReconciler. Calling it while already running is a no-op.

ctx originates from the service framework's background-worker lifecycle, so no context.Background() is introduced here.

func (*InMemoryBackend) StopReconciler

func (b *InMemoryBackend) StopReconciler()

StopReconciler signals the reconciler to stop and blocks until the goroutine has exited, guaranteeing no leaked goroutine survives shutdown. It is idempotent.

func (*InMemoryBackend) TagServerlessResource added in v1.3.1

func (b *InMemoryBackend) TagServerlessResource(resourceArn string, newTags map[string]string) error

TagServerlessResource assigns tags to a taggable Redshift Serverless resource.

func (*InMemoryBackend) UntagServerlessResource added in v1.3.1

func (b *InMemoryBackend) UntagServerlessResource(resourceArn string, tagKeys []string) error

UntagServerlessResource removes the given tag keys from a resource.

func (*InMemoryBackend) UpdateCustomDomainAssociationSL added in v1.3.1

func (b *InMemoryBackend) UpdateCustomDomainAssociationSL(
	customDomainName, workgroupName, customDomainCertificateArn string,
) (*ServerlessCustomDomainAssociation, error)

UpdateCustomDomainAssociationSL updates an association's certificate ARN -- the only mutable field on UpdateCustomDomainAssociationInput besides the two identifying fields (confirmed against UpdateCustomDomainAssociationRequest).

func (*InMemoryBackend) UpdateEndpointAccessSL added in v1.3.1

func (b *InMemoryBackend) UpdateEndpointAccessSL(
	endpointName string, vpcSecurityGroupIDs []string,
) (*ServerlessEndpointAccess, error)

UpdateEndpointAccessSL updates a serverless VPC endpoint. Real UpdateEndpointAccessInput only supports changing vpcSecurityGroupIds (confirmed against service-2.json) -- there is no subnetIds parameter.

func (*InMemoryBackend) UpdateLakehouseConfigurationSL added in v1.3.1

func (b *InMemoryBackend) UpdateLakehouseConfigurationSL(
	p UpdateLakehouseConfigParams,
) (*LakehouseConfigResult, error)

UpdateLakehouseConfigurationSL applies p to namespaceName's lakehouse/Glue Data Catalog federation config. CatalogArn is derived from the client- supplied CatalogName the same way every other resource ARN in this backend is built (arn.Build against b.region/b.accountID) -- the "catalog/<name>" resource form matches Glue's own named-catalog ARN shape for federated catalogs. If p.DryRun is true and the namespace exists, no state is mutated and ErrServerlessDryRun is returned (real DryRunException, confirmed in service-2.json: "the request was successful, but dry run was enabled so no action was taken").

func (*InMemoryBackend) UpdateNamespace

func (b *InMemoryBackend) UpdateNamespace(namespaceName string, p UpdateNamespaceParams) (*Namespace, error)

UpdateNamespace updates a Redshift Serverless namespace.

p.AdminUserPassword is a credential: it is read from the wire but never stored, logged, or echoed back -- see UpdateNamespaceParams' doc comment.

func (*InMemoryBackend) UpdatePartnerStatus

func (b *InMemoryBackend) UpdatePartnerStatus(
	_, clusterID, databaseName, partnerName, status, statusMessage string,
) (*Partner, error)

UpdatePartnerStatus updates the status and status message of a partner integration.

func (*InMemoryBackend) UpdateServerlessScheduledAction

func (b *InMemoryBackend) UpdateServerlessScheduledAction(
	scheduledActionName string,
	p UpdateScheduledActionParams,
) (*ServerlessScheduledAction, error)

UpdateServerlessScheduledAction updates a serverless scheduled action.

func (*InMemoryBackend) UpdateServerlessSnapshot added in v1.3.1

func (b *InMemoryBackend) UpdateServerlessSnapshot(
	snapshotName string, retentionPeriod *int,
) (*ServerlessSnapshot, error)

UpdateServerlessSnapshot updates a serverless snapshot's retention period. retentionPeriod is nilable: UpdateSnapshotInput.RetentionPeriod is optional (confirmed against api_op_UpdateSnapshot.go -- unlike SnapshotName, which is required), so an absent value leaves the stored retention period unchanged.

func (*InMemoryBackend) UpdateServerlessUsageLimit

func (b *InMemoryBackend) UpdateServerlessUsageLimit(
	usageLimitID, breachAction string,
	amount int64,
) (*ServerlessUsageLimit, error)

UpdateServerlessUsageLimit updates a serverless usage limit.

func (*InMemoryBackend) UpdateSnapshotCopyConfigurationSL added in v1.3.1

func (b *InMemoryBackend) UpdateSnapshotCopyConfigurationSL(
	id string, retentionPeriod int,
) (*ServerlessSnapshotCopyConfiguration, error)

UpdateSnapshotCopyConfigurationSL updates the retention period of an existing snapshot copy configuration -- the only mutable field on UpdateSnapshotCopyConfigurationInput besides its identifying ID.

func (*InMemoryBackend) UpdateWorkgroup

func (b *InMemoryBackend) UpdateWorkgroup(workgroupName string, p WorkgroupParams) (*Workgroup, error)

UpdateWorkgroup updates a Redshift Serverless workgroup.

func (*InMemoryBackend) WorkgroupNameByCustomDomainSL added in v1.3.1

func (b *InMemoryBackend) WorkgroupNameByCustomDomainSL(customDomainName string) (string, error)

WorkgroupNameByCustomDomainSL resolves a custom domain name to its associated workgroup name. Used by GetCredentials, whose real GetCredentialsRequest accepts either customDomainName or workgroupName -- "The custom domain name or the workgroup name must be included in the request" (confirmed against GetCredentialsRequest's documentation).

type Integration

type Integration struct {
	CreateTime       time.Time         `json:"createTime"`
	Tags             map[string]string `json:"tags"`
	IntegrationArn   string            `json:"integrationArn"`
	IntegrationName  string            `json:"integrationName"`
	SourceArn        string            `json:"sourceArn"`
	TargetArn        string            `json:"targetArn"`
	Status           string            `json:"status"`
	Description      string            `json:"description"`
	AdditionalEncKey string            `json:"additionalEncryptionContext,omitempty"`
	KmsKeyID         string            `json:"kmsKeyId,omitempty"`
}

Integration represents a zero-ETL integration from Redshift.

type LakehouseConfigResult added in v1.3.1

type LakehouseConfigResult struct {
	NamespaceName               string `json:"namespaceName,omitempty"`
	CatalogArn                  string `json:"catalogArn,omitempty"`
	LakehouseIdcApplicationArn  string `json:"lakehouseIdcApplicationArn,omitempty"`
	LakehouseRegistrationStatus string `json:"lakehouseRegistrationStatus,omitempty"`
}

LakehouseConfigResult is UpdateLakehouseConfigurationOutput's real shape -- flat, not enveloped, and distinct from (a strict subset of) Namespace's own fields (confirmed against the Output struct in api_op_UpdateLakehouseConfiguration.go).

type ListRecoveryPointsParams added in v1.3.1

type ListRecoveryPointsParams struct {
	StartTime     time.Time
	EndTime       time.Time
	NamespaceName string
	NamespaceArn  string
	NextToken     string
	MaxResults    int
}

ListRecoveryPointsParams holds ListRecoveryPointsInput's filters.

type ListServerlessSnapshotsParams added in v1.3.1

type ListServerlessSnapshotsParams struct {
	StartTime     time.Time
	EndTime       time.Time
	NamespaceName string
	NamespaceArn  string
	OwnerAccount  string
	NextToken     string
	MaxResults    int
}

ListServerlessSnapshotsParams holds ListSnapshotsInput's filters.

type LoggingStatus

type LoggingStatus struct {
	LastFailureTime time.Time `json:"lastFailureTime"`
	LastSuccessTime time.Time `json:"lastSuccessTime"`
	BucketName      string    `json:"bucketName"`
	S3KeyPrefix     string    `json:"s3KeyPrefix"`
	LoggingEnabled  bool      `json:"loggingEnabled"`
}

LoggingStatus represents the logging status for a Redshift cluster.

type ManagedWorkgroupListItem added in v1.3.1

type ManagedWorkgroupListItem struct {
	CreationDate         time.Time `json:"creationDate"`
	ManagedWorkgroupID   string    `json:"managedWorkgroupId,omitempty"`
	ManagedWorkgroupName string    `json:"managedWorkgroupName,omitempty"`
	SourceArn            string    `json:"sourceArn,omitempty"`
	Status               string    `json:"status,omitempty"`
}

ManagedWorkgroupListItem represents a Glue Data Catalog-managed Redshift Serverless workgroup (the "ManagedWorkgroupListItem" shape in service-2.json) -- auto-provisioned when a query runs against data shared through Lake Formation / Glue federation, confirmed by ListManagedWorkgroupsRequest's sourceArn filter being a Glue database/catalog ARN ("^arn:aws[a-z-]*:glue:..." in the SourceArn shape's pattern). This backend has no Glue Data Catalog or Lake Formation integration anywhere, so there is never a real managed workgroup to list -- see ListManagedWorkgroupsSL.

type ModifyLakehouseConfigParams added in v1.3.1

type ModifyLakehouseConfigParams struct {
	ClusterIdentifier          string
	CatalogName                string
	LakehouseIdcApplicationArn string
	LakehouseIdcRegistration   string
	LakehouseRegistration      string
	DryRun                     bool
}

ModifyLakehouseConfigParams is ModifyLakehouseConfigurationInput's real shape (api_op_ModifyLakehouseConfiguration.go). LakehouseIdcRegistration and LakehouseRegistration carry the real "Associate"/"Disassociate" and "Register"/"Deregister" enum values (types.LakehouseIdcRegistration/ types.LakehouseRegistration).

type Namespace

type Namespace struct {
	CreationDate                time.Time `json:"creationDate"`
	NamespaceArn                string    `json:"namespaceArn"`
	NamespaceID                 string    `json:"namespaceId"`
	NamespaceName               string    `json:"namespaceName"`
	AdminUsername               string    `json:"adminUsername,omitempty"`
	DBName                      string    `json:"dbName,omitempty"`
	DefaultIamRoleArn           string    `json:"defaultIamRoleArn,omitempty"`
	KmsKeyID                    string    `json:"kmsKeyId,omitempty"`
	AdminPasswordSecretArn      string    `json:"adminPasswordSecretArn,omitempty"`
	AdminPasswordSecretKmsKeyID string    `json:"adminPasswordSecretKmsKeyId,omitempty"`
	CatalogArn                  string    `json:"catalogArn,omitempty"`
	LakehouseRegistrationStatus string    `json:"lakehouseRegistrationStatus,omitempty"`
	Status                      string    `json:"status"`
	IamRoles                    []string  `json:"iamRoles,omitempty"`
	LogExports                  []string  `json:"logExports,omitempty"`
}

Namespace represents a Redshift Serverless namespace.

CatalogArn/LakehouseRegistrationStatus are real Namespace members (confirmed against types.Namespace in types/types.go) written by UpdateLakehouseConfiguration -- see serverless_lakehouse.go.

type NamespaceRegistration added in v1.3.1

type NamespaceRegistration struct {
	NamespaceKey            string   `json:"namespaceKey"`
	ClusterIdentifier       string   `json:"clusterIdentifier,omitempty"`
	ServerlessNamespaceName string   `json:"serverlessNamespaceName,omitempty"`
	ServerlessWorkgroupName string   `json:"serverlessWorkgroupName,omitempty"`
	Status                  string   `json:"status"`
	ConsumerIdentifiers     []string `json:"consumerIdentifiers"`
}

NamespaceRegistration is the Glue Data Catalog registration state of a cluster or Redshift Serverless namespace/workgroup for a set of consumer accounts (RegisterNamespace/DeregisterNamespace; redshift@v1.65.4 api_op_RegisterNamespace.go, api_op_DeregisterNamespace.go). NamespaceIdentifier on the wire is a union (NamespaceIdentifierUnion, verified against serializers.go's awsAwsquery_serializeDocumentNamespaceIdentifierUnion): exactly one of ClusterIdentifier or the ServerlessNamespaceName/ServerlessWorkgroupName pair is populated per record, matching the ProvisionedIdentifier/ ServerlessIdentifier variants.

type Partner

type Partner struct {
	AccountID         string `json:"accountId"`
	ClusterIdentifier string `json:"clusterIdentifier"`
	DatabaseName      string `json:"databaseName"`
	PartnerName       string `json:"partnerName"`
	Status            string `json:"status"`
	StatusMessage     string `json:"statusMessage"`
}

Partner represents a partner integration for a Redshift cluster.

type PauseClusterAction added in v1.2.0

type PauseClusterAction struct {
	ClusterIdentifier string `json:"clusterIdentifier"`
}

PauseClusterAction mirrors types.PauseClusterMessage: the ResizeCluster/ PauseCluster/ResumeCluster payload a ScheduledAction can target.

type PerformanceTarget added in v1.3.1

type PerformanceTarget struct {
	Status string `json:"status,omitempty"`
	Level  int    `json:"level,omitempty"`
}

PerformanceTarget is a workgroup's price-performance target setting.

type Provider

type Provider struct{}

Provider implements service.Provider for Redshift.

func (*Provider) Init

Init initializes the Redshift service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type Qev2IdcApplication added in v1.2.0

type Qev2IdcApplication struct {
	Tags                     map[string]string `json:"tags,omitempty"`
	Qev2IdcApplicationArn    string            `json:"qev2IdcApplicationArn"`
	Qev2IdcApplicationName   string            `json:"qev2IdcApplicationName"`
	IdcInstanceArn           string            `json:"idcInstanceArn"`
	IdcDisplayName           string            `json:"idcDisplayName"`
	IdcManagedApplicationArn string            `json:"idcManagedApplicationArn"`
	IdcOnboardStatus         string            `json:"idcOnboardStatus"`
}

Qev2IdcApplication represents an Amazon Redshift Query Editor (QEV2) IAM Identity Center application. This is a DISTINCT resource from IdcApplication (RedshiftIdcApplication) above, not a sub-resource of it: RedshiftIdcApplication backs cluster-level federated authentication into IAM Identity Center and carries an IamRoleArn used to invoke the IDC Identity Center API, while Qev2IdcApplication is the separate IdC-managed application that powers the standalone Query Editor V2 web console and has no IamRoleArn or cluster reference at all (confirmed field-by-field against aws-sdk-go-v2/service/redshift@v1.65.0/types.Qev2IdcApplication, which declares no IamRoleArn field, and against CreateQev2IdcApplicationInput / ModifyQev2IdcApplicationInput, neither of which accepts one). The two families share only the IdC-instance/display-name/onboard-status shape and are otherwise independently keyed and stored.

type RecoveryPoint added in v1.3.1

type RecoveryPoint struct {
	RecoveryPointCreateTime time.Time `json:"recoveryPointCreateTime"`
	NamespaceArn            string    `json:"namespaceArn,omitempty"`
	NamespaceName           string    `json:"namespaceName,omitempty"`
	RecoveryPointID         string    `json:"recoveryPointId"`
	WorkgroupName           string    `json:"workgroupName,omitempty"`
	TotalSizeInMegaBytes    float64   `json:"totalSizeInMegaBytes,omitempty"`
}

RecoveryPoint is a namespace's automatically created recovery point (the "RecoveryPoint" shape in service-2.json: "Recovery points are created every 30 minutes and kept for 24 hours" -- there is no CreateRecoveryPoint operation anywhere in this API, confirmed absent from the operations list). This backend generates one recovery point per workgroup at CreateWorkgroup time instead of running a real 30-minute background scheduler, matching this service's existing instant-apply convention elsewhere (e.g. snapshots created instantaneously) -- see generateRecoveryPointLocked.

type ReservedNode

type ReservedNode struct {
	StartTime              time.Time `json:"startTime"`
	ReservedNodeID         string    `json:"reservedNodeId"`
	ReservedNodeOfferingID string    `json:"reservedNodeOfferingId"`
	NodeType               string    `json:"nodeType"`
	CurrencyCode           string    `json:"currencyCode"`
	State                  string    `json:"state"`
	OfferingType           string    `json:"offeringType"`
	Duration               int       `json:"duration"`
	FixedPrice             float64   `json:"fixedPrice"`
	UsagePrice             float64   `json:"usagePrice"`
	NodeCount              int       `json:"nodeCount"`
}

ReservedNode represents an in-memory Redshift reserved node.

type ReservedNodeOffering

type ReservedNodeOffering struct {
	ReservedNodeOfferingID   string  `json:"reservedNodeOfferingId"`
	ReservedNodeOfferingType string  `json:"reservedNodeOfferingType"`
	NodeType                 string  `json:"nodeType"`
	CurrencyCode             string  `json:"currencyCode"`
	OfferingType             string  `json:"offeringType"`
	Duration                 int     `json:"duration"`
	FixedPrice               float64 `json:"fixedPrice"`
	UsagePrice               float64 `json:"usagePrice"`
}

ReservedNodeOffering represents an available Redshift reserved node offering.

type ResizeClusterAction added in v1.2.0

type ResizeClusterAction struct {
	ClusterIdentifier            string `json:"clusterIdentifier"`
	ClusterType                  string `json:"clusterType,omitempty"`
	NodeType                     string `json:"nodeType,omitempty"`
	ReservedNodeID               string `json:"reservedNodeId,omitempty"`
	TargetReservedNodeOfferingID string `json:"targetReservedNodeOfferingId,omitempty"`
	NumberOfNodes                int    `json:"numberOfNodes,omitempty"`
	Classic                      bool   `json:"classic,omitempty"`
}

ResizeClusterAction mirrors types.ResizeClusterMessage.

type ResizeProgress

type ResizeProgress struct {
	TargetNodeType         string   `json:"targetNodeType"`
	TargetClusterType      string   `json:"targetClusterType"`
	Status                 string   `json:"status"`
	Message                string   `json:"message"`
	ResizeType             string   `json:"resizeType"`
	ImportTablesCompleted  []string `json:"importTablesCompleted"`
	ImportTablesInProgress []string `json:"importTablesInProgress"`
	ImportTablesNotStarted []string `json:"importTablesNotStarted"`
	TargetNumberOfNodes    int      `json:"targetNumberOfNodes"`
	AllowCancelResize      bool     `json:"allowCancelResize"`
}

ResizeProgress represents in-progress resize information for a cluster.

type ResourcePolicy

type ResourcePolicy struct {
	ResourceArn string `json:"resourceArn"`
	Policy      string `json:"policy"`
}

ResourcePolicy represents a resource-based policy attached to a Redshift resource.

type RestoreFromSnapshotParams added in v1.3.1

type RestoreFromSnapshotParams struct {
	MaintainIntegration         *bool
	NamespaceName               string
	WorkgroupName               string
	SnapshotName                string
	SnapshotArn                 string
	AdminPasswordSecretKmsKeyID string
	ManageAdminPassword         bool
}

RestoreFromSnapshotParams holds RestoreFromSnapshotInput's fields.

MaintainIntegration is accepted for wire compatibility but intentionally inert: real AWS uses it to gate whether data-sharing/zero-ETL/S3-event integrations survive the restore, but this backend does not model integration state on namespaces at all (nothing to maintain or drop), so there is nothing honest to gate.

type RestoreTableFromSnapshotParams added in v1.3.1

type RestoreTableFromSnapshotParams struct {
	ActivateCaseSensitiveIdentifier *bool
	NamespaceName                   string
	NewTableName                    string
	SnapshotName                    string
	RecoveryPointID                 string
	SourceDatabaseName              string
	SourceSchemaName                string
	SourceTableName                 string
	TargetDatabaseName              string
	TargetSchemaName                string
	WorkgroupName                   string
}

RestoreTableFromSnapshotParams holds the shared fields of RestoreTableFromSnapshotInput/RestoreTableFromRecoveryPointInput -- SnapshotName and RecoveryPointID are mutually exclusive, set by the respective caller (see RestoreTableFromSnapshotSL/RestoreTableFromRecoveryPointSL). Field order/names must stay identical to slTableRestoreReq in handler_serverless_table_restore.go: toParams() converts between them with a direct struct conversion.

ActivateCaseSensitiveIdentifier is accepted for wire compatibility but intentionally inert: this backend does not execute queries against restored tables, so there is no case-sensitive identifier matching to gate.

type ResumeClusterAction added in v1.2.0

type ResumeClusterAction struct {
	ClusterIdentifier string `json:"clusterIdentifier"`
}

ResumeClusterAction mirrors types.ResumeClusterMessage.

type ScheduledAction

type ScheduledAction struct {
	TargetAction               *ScheduledActionTarget `json:"targetAction,omitempty"`
	ScheduledActionName        string                 `json:"scheduledActionName"`
	Schedule                   string                 `json:"schedule"`
	IamRole                    string                 `json:"iamRole"`
	ScheduledActionDescription string                 `json:"scheduledActionDescription"`
	State                      string                 `json:"state"`
}

ScheduledAction represents a Redshift scheduled action.

type ScheduledActionTarget added in v1.2.0

type ScheduledActionTarget struct {
	PauseCluster  *PauseClusterAction  `json:"pauseCluster,omitempty"`
	ResumeCluster *ResumeClusterAction `json:"resumeCluster,omitempty"`
	ResizeCluster *ResizeClusterAction `json:"resizeCluster,omitempty"`
}

ScheduledActionTarget mirrors types.ScheduledActionType: exactly one of these three should be set, matching which Redshift API operation the schedule invokes.

type ServerlessCustomDomainAssociation added in v1.3.1

type ServerlessCustomDomainAssociation struct {
	CustomDomainCertificateExpiryTime *time.Time `json:"customDomainCertificateExpiryTime,omitempty"`
	CustomDomainCertificateArn        string     `json:"customDomainCertificateArn,omitempty"`
	CustomDomainName                  string     `json:"customDomainName"`
	WorkgroupName                     string     `json:"workgroupName"`
}

ServerlessCustomDomainAssociation represents a Redshift Serverless custom domain association (the "Association" shape in service-2.json), distinct from the classic-Redshift CustomDomainAssociation in custom_domains.go (cluster-keyed, query/XML protocol) -- this one is workgroup-keyed JSON. Keyed by CustomDomainName: a real custom domain name can be associated with only one workgroup at a time (Create/Get/Delete/Update all require the pair, but CustomDomainName alone is the natural unique key since it identifies a real DNS name).

type ServerlessEndpointAccess added in v1.3.1

type ServerlessEndpointAccess struct {
	EndpointCreateTime  time.Time `json:"endpointCreateTime"`
	Address             string    `json:"address,omitempty"`
	EndpointArn         string    `json:"endpointArn"`
	EndpointName        string    `json:"endpointName"`
	EndpointStatus      string    `json:"endpointStatus"`
	OwnerAccount        string    `json:"-"`
	WorkgroupName       string    `json:"workgroupName"`
	SubnetIDs           []string  `json:"subnetIds,omitempty"`
	VpcSecurityGroupIDs []string  `json:"-"`
	Port                int       `json:"port,omitempty"`
}

ServerlessEndpointAccess is a Redshift Serverless managed VPC endpoint (the "EndpointAccess" shape in service-2.json), distinct from classic Redshift's cluster-keyed EndpointAccess in models.go (endpoint_access.go) -- this one is workgroup-keyed JSON with SubnetIDs (individual subnet IDs) rather than a SubnetGroupName. VpcEndpoint (the nested vpcEndpointId/vpcId/networkInterfaces object) is deliberately unmodeled, the same judgment call families.EndpointAccess already made for classic Redshift: real types.VpcEndpoint.NetworkInterfaces needs AvailabilityZone/PrivateIpAddress/NetworkInterfaceId/SubnetId per ENI, none of which this backend tracks anywhere, and vpcId/vpcEndpointId would have to be fabricated with no real ENI allocation behind them -- left absent rather than invented. VpcSecurityGroupIDs is tagged json:"-" and expanded into the real vpcSecurityGroups>{status,vpcSecurityGroupId} list at the response boundary (see slEndpointAccessWire); OwnerAccount is a real request/List-filter field the EndpointAccess response shape itself never echoes (confirmed absent from its members).

type ServerlessHandler

type ServerlessHandler struct {
	Backend *InMemoryBackend
}

ServerlessHandler is a separate Echo handler for Redshift Serverless APIs.

func NewServerlessHandler

func NewServerlessHandler(backend *InMemoryBackend) *ServerlessHandler

NewServerlessHandler creates a new Redshift Serverless handler.

func (*ServerlessHandler) ChaosOperations

func (h *ServerlessHandler) ChaosOperations() []string

ChaosOperations returns all supported operations.

func (*ServerlessHandler) ChaosRegions

func (h *ServerlessHandler) ChaosRegions() []string

ChaosRegions returns the regions for chaos.

func (*ServerlessHandler) ChaosServiceName

func (h *ServerlessHandler) ChaosServiceName() string

ChaosServiceName returns the chaos service name.

func (*ServerlessHandler) ExtractOperation

func (h *ServerlessHandler) ExtractOperation(c *echo.Context) string

ExtractOperation extracts the operation name from the X-Amz-Target header.

func (*ServerlessHandler) ExtractResource

func (h *ServerlessHandler) ExtractResource(c *echo.Context) string

ExtractResource extracts a resource identifier from the request. Best-effort only (used for logging/chaos matching); the authoritative field varies per op.

func (*ServerlessHandler) GetSupportedOperations

func (h *ServerlessHandler) GetSupportedOperations() []string

GetSupportedOperations returns the list of supported operations.

func (*ServerlessHandler) Handler

func (h *ServerlessHandler) Handler() echo.HandlerFunc

Handler returns the Echo handler function.

func (*ServerlessHandler) MatchPriority

func (h *ServerlessHandler) MatchPriority() int

MatchPriority returns the routing priority.

func (*ServerlessHandler) Name

func (h *ServerlessHandler) Name() string

Name returns the service name.

func (*ServerlessHandler) Reset

func (h *ServerlessHandler) Reset()

Reset clears all backend state.

func (*ServerlessHandler) RouteMatcher

func (h *ServerlessHandler) RouteMatcher() service.Matcher

RouteMatcher returns a function that matches Redshift Serverless requests by their X-Amz-Target header, the real wire discriminator for this awsJson1.1 API (see package doc comment above).

type ServerlessLakehouseConfig added in v1.3.1

type ServerlessLakehouseConfig struct {
	NamespaceName              string `json:"namespaceName"`
	CatalogName                string `json:"catalogName,omitempty"`
	LakehouseIdcApplicationArn string `json:"lakehouseIdcApplicationArn,omitempty"`
}

ServerlessLakehouseConfig tracks a namespace's lakehouse/Glue Data Catalog federation association written by UpdateLakehouseConfiguration. Only CatalogName is echoed indirectly (via the derived CatalogArn stored on Namespace itself, a real Namespace member -- see serverless.go's Namespace doc comment); LakehouseIdcApplicationArn has NO Namespace member at all (confirmed absent from types.Namespace) so it lives here instead, kept out of every other namespace response the same way Namespace's own AdminUserPassword is kept out -- its only real observable surface is UpdateLakehouseConfiguration's own response.

type ServerlessProvider

type ServerlessProvider struct{}

ServerlessProvider implements service.Provider for Redshift Serverless.

func (*ServerlessProvider) Init

Init initializes the Redshift Serverless backend and handler.

func (*ServerlessProvider) Name

func (p *ServerlessProvider) Name() string

Name returns the provider name.

type ServerlessResourcePolicy added in v1.3.1

type ServerlessResourcePolicy struct {
	ResourceArn string `json:"resourceArn"`
	Policy      string `json:"policy"`
}

ServerlessResourcePolicy is the resource policy attached to a Redshift Serverless resource ARN, used to share snapshots across accounts (confirmed against the "ResourcePolicy" shape in service-2.json).

type ServerlessScheduledAction

type ServerlessScheduledAction struct {
	StartTime                  time.Time       `json:"-"`
	EndTime                    time.Time       `json:"-"`
	NamespaceName              string          `json:"namespaceName,omitempty"`
	RoleArn                    string          `json:"roleArn,omitempty"`
	ScheduledActionDescription string          `json:"scheduledActionDescription,omitempty"`
	ScheduledActionName        string          `json:"scheduledActionName"`
	ScheduledActionUUID        string          `json:"scheduledActionUuid,omitempty"`
	State                      string          `json:"state"`
	Schedule                   json.RawMessage `json:"schedule,omitempty"`
	TargetAction               json.RawMessage `json:"targetAction,omitempty"`
}

ServerlessScheduledAction represents a serverless scheduled action.

Schedule and TargetAction are stored as raw JSON (not decoded into a typed union) and echoed back verbatim: the real Schedule shape is a tagged union keyed "at" (epoch seconds) or "cron" (bare AWS cron string, no wrapping function call unlike classic Redshift's "cron(...)"), and TargetAction is keyed "createSnapshot" with a nested CreateSnapshotScheduleActionParameters object (confirmed via awsAwsjson11_serializeDocumentSchedule/TargetAction in serializers.go) -- this backend does not execute scheduled actions, so passthrough preserves wire fidelity without fabricating execution semantics.

type ServerlessSnapshot

type ServerlessSnapshot struct {
	SnapshotCreateTime        time.Time `json:"snapshotCreateTime"`
	SnapshotArn               string    `json:"snapshotArn"`
	SnapshotName              string    `json:"snapshotName"`
	NamespaceName             string    `json:"namespaceName"`
	NamespaceArn              string    `json:"namespaceArn"`
	Status                    string    `json:"status"`
	AdminUsername             string    `json:"adminUsername,omitempty"`
	AccountsWithRestoreAccess []string  `json:"accountsWithRestoreAccess,omitempty"`
	SnapshotRetentionPeriod   int       `json:"snapshotRetentionPeriod,omitempty"`
}

ServerlessSnapshot represents a Redshift Serverless namespace snapshot.

type ServerlessSnapshotCopyConfiguration added in v1.3.1

type ServerlessSnapshotCopyConfiguration struct {
	SnapshotCopyConfigurationArn string `json:"snapshotCopyConfigurationArn"`
	SnapshotCopyConfigurationID  string `json:"snapshotCopyConfigurationId"`
	NamespaceName                string `json:"namespaceName"`
	DestinationRegion            string `json:"destinationRegion"`
	DestinationKmsKeyID          string `json:"destinationKmsKeyId,omitempty"`
	SnapshotRetentionPeriod      int    `json:"snapshotRetentionPeriod,omitempty"`
}

ServerlessSnapshotCopyConfiguration configures cross-region snapshot copying for a Redshift Serverless namespace (the "SnapshotCopyConfiguration" shape in service-2.json). This backend does not perform real cross-region replication -- like the rest of this service's snapshot handling, it only tracks the configuration object itself.

type ServerlessTableRestoreStatus added in v1.3.1

type ServerlessTableRestoreStatus struct {
	RequestTime           time.Time `json:"-"`
	Message               string    `json:"message,omitempty"`
	NamespaceName         string    `json:"namespaceName,omitempty"`
	NewTableName          string    `json:"newTableName,omitempty"`
	RecoveryPointID       string    `json:"recoveryPointId,omitempty"`
	SnapshotName          string    `json:"snapshotName,omitempty"`
	SourceDatabaseName    string    `json:"sourceDatabaseName,omitempty"`
	SourceSchemaName      string    `json:"sourceSchemaName,omitempty"`
	SourceTableName       string    `json:"sourceTableName,omitempty"`
	Status                string    `json:"status,omitempty"`
	TableRestoreRequestID string    `json:"tableRestoreRequestId"`
	TargetDatabaseName    string    `json:"targetDatabaseName,omitempty"`
	TargetSchemaName      string    `json:"targetSchemaName,omitempty"`
	WorkgroupName         string    `json:"workgroupName,omitempty"`
	ProgressInMegaBytes   int64     `json:"progressInMegaBytes,omitempty"`
	TotalDataInMegaBytes  int64     `json:"totalDataInMegaBytes,omitempty"`
}

ServerlessTableRestoreStatus represents a Redshift Serverless table-level restore request (the "TableRestoreStatus" shape in service-2.json), distinct from classic Redshift's cluster-keyed TableRestoreStatus in models.go (table_restore.go). RequestTime is tagged json:"-" because it is an epoch-seconds number on the wire (confirmed via awsAwsjson11_deserializeDocumentTableRestoreStatus's smithytime.ParseEpochSeconds in aws-sdk-go-v2/service/redshiftserverless@v1.38.5/deserializers.go), unlike RecoveryPointCreateTime's ISO8601 string above -- the response wrapper (see handler_serverless_table_restore.go) does the epoch conversion at the boundary, same pattern as slScheduledActionWire.

type ServerlessTrack added in v1.3.1

type ServerlessTrack struct {
	TrackName        string         `json:"trackName,omitempty"`
	WorkgroupVersion string         `json:"workgroupVersion,omitempty"`
	UpdateTargets    []UpdateTarget `json:"updateTargets,omitempty"`
}

ServerlessTrack represents a Redshift Serverless maintenance track (the "ServerlessTrack" shape in service-2.json). Real AWS documents exactly two track names, "current" and "trailing" (TrackName itself is an untyped *string in the SDK, not a Go enum, but every AWS doc/console reference names only these two -- the same pair classic Redshift's own DescribeClusterTracks already models, see handler_cluster_info.go's modelVersion10-keyed catalog). UpdateTargets (newer versions this track could update to) is honestly left empty: this backend has a single static release (modelVersion10), so there is no second version to invent an upgrade path to.

type ServerlessUsageLimit

type ServerlessUsageLimit struct {
	UsageLimitArn string `json:"usageLimitArn"`
	UsageLimitID  string `json:"usageLimitId"`
	ResourceArn   string `json:"resourceArn"`
	UsageType     string `json:"usageType"`
	Period        string `json:"period"`
	BreachAction  string `json:"breachAction"`
	Amount        int64  `json:"amount"`
}

ServerlessUsageLimit represents a serverless usage limit.

type Snapshot

type Snapshot struct {
	SnapshotCreateTime            time.Time                  `json:"snapshotCreateTime"`
	SnapshotIdentifier            string                     `json:"snapshotIdentifier"`
	ClusterIdentifier             string                     `json:"clusterIdentifier"`
	SnapshotType                  string                     `json:"snapshotType"`
	Status                        string                     `json:"status"`
	NodeType                      string                     `json:"nodeType,omitempty"`
	DBName                        string                     `json:"dbName,omitempty"`
	MasterUsername                string                     `json:"masterUsername,omitempty"`
	AccountsWithRestoreAccess     []AccountWithRestoreAccess `json:"accountsWithRestoreAccess"`
	ManualSnapshotRetentionPeriod int                        `json:"manualSnapshotRetentionPeriod"`
	NumberOfNodes                 int                        `json:"numberOfNodes,omitempty"`
}

Snapshot represents a Redshift cluster snapshot.

type SnapshotBatchError

type SnapshotBatchError struct {
	SnapshotIdentifier        string `json:"snapshotIdentifier"`
	SnapshotClusterIdentifier string `json:"snapshotClusterIdentifier"`
	FailureCode               string `json:"failureCode"`
	FailureReason             string `json:"failureReason"`
}

SnapshotBatchError represents an error when deleting a snapshot in a batch operation.

type SnapshotCopyConfig

type SnapshotCopyConfig struct {
	DestinationRegion     string `json:"destinationRegion"`
	SnapshotCopyGrantName string `json:"snapshotCopyGrantName"`
	RetentionPeriod       int    `json:"retentionPeriod"`
}

SnapshotCopyConfig holds the cross-region snapshot copy configuration for a cluster.

type SnapshotCopyGrant

type SnapshotCopyGrant struct {
	Tags                  map[string]string `json:"tags"`
	SnapshotCopyGrantName string            `json:"snapshotCopyGrantName"`
	KMSKeyID              string            `json:"kmsKeyId"`
}

SnapshotCopyGrant represents a KMS key grant for cross-region snapshot copy.

type SnapshotSchedule

type SnapshotSchedule struct {
	Tags                map[string]string `json:"tags"`
	ScheduleIdentifier  string            `json:"scheduleIdentifier"`
	Description         string            `json:"description"`
	ScheduleDefinitions []string          `json:"scheduleDefinitions"`
	// AssociatedClusters is derived at read time (see
	// InMemoryBackend.snapshotScheduleAssociatedClusters) from the clusters whose
	// SnapshotScheduleIdentifier matches this schedule; it is never persisted
	// directly on the schedule itself.
	AssociatedClusters []string `json:"-"`
}

SnapshotSchedule represents a snapshot schedule for automated snapshots.

type StorageBackend

type StorageBackend interface {
	// Cluster operations
	CreateCluster(id, nodeType, dbName, masterUser string) (*Cluster, error)
	DeleteCluster(id string) (*Cluster, error)
	DescribeClusters(id, marker string, maxRecords int) ([]Cluster, string, error)
	ModifyCluster(
		id, nodeType string,
		numberOfNodes int,
		masterUserPassword string,
		encrypted, enhancedVpcRouting *bool,
		applyImmediately bool,
	) (*Cluster, error)
	RebootCluster(id string) (*Cluster, error)
	PauseCluster(id string) (*Cluster, error)
	ResumeCluster(id string) (*Cluster, error)
	ResizeCluster(id, nodeType, clusterType string, numberOfNodes int, classic bool) (*Cluster, error)
	RotateEncryptionKey(id string) (*Cluster, error)
	ModifyClusterIamRoles(id string, addRoles, removeRoles []string) (*Cluster, error)
	ModifyClusterMaintenance(id, maintenanceTrack string, deferMaintenance bool) (*Cluster, error)
	ModifyAquaConfiguration(id string) (*Cluster, error)
	ModifyLakehouseConfiguration(p ModifyLakehouseConfigParams) (*ClusterLakehouseConfigResult, error)

	// Tag operations
	DescribeTags() map[string]map[string]string
	CreateTags(clusterID string, kv map[string]string) error
	DeleteTags(clusterID string, keys []string) error

	// Parameter group operations
	CreateClusterParameterGroup(name, family, description string) (*ClusterParameterGroup, error)
	DeleteClusterParameterGroup(name string) error
	DescribeClusterParameterGroups(name string) ([]ClusterParameterGroup, error)
	DescribeClusterParameters(groupName string) ([]ClusterParameter, error)
	ModifyClusterParameterGroup(groupName string, params []ClusterParameter) (*ClusterParameterGroup, error)
	ResetClusterParameterGroup(
		groupName string,
		resetAllParameters bool,
		params []ClusterParameter,
	) (*ClusterParameterGroup, error)
	DescribeDefaultClusterParameters(family string) ([]ClusterParameter, error)

	// Reserved node operations
	AcceptReservedNodeExchange(reservedNodeID, targetOfferingID string) (*ReservedNode, error)
	DescribeReservedNodes(reservedNodeID string) ([]ReservedNode, error)
	DescribeReservedNodeOfferings(offeringID string) ([]ReservedNodeOffering, error)
	PurchaseReservedNodeOffering(offeringID, reservedNodeID string, nodeCount int) (*ReservedNode, error)
	DescribeReservedNodeExchangeStatus(reservedNodeID string) (string, error)
	GetReservedNodeExchangeOfferings(reservedNodeID string) ([]ReservedNodeOffering, error)

	// Security group operations
	AuthorizeClusterSecurityGroupIngress(
		groupName, cidrIP, ec2GroupName, ec2GroupOwnerID string,
	) (*ClusterSecurityGroup, error)
	CreateClusterSecurityGroup(name, description string) (*ClusterSecurityGroup, error)
	DeleteClusterSecurityGroup(name string) error
	DescribeClusterSecurityGroups(name string) ([]ClusterSecurityGroup, error)
	RevokeClusterSecurityGroupIngress(
		groupName, cidrIP, ec2GroupName, ec2GroupOwnerID string,
	) (*ClusterSecurityGroup, error)

	// Snapshot operations
	CreateClusterSnapshot(snapshotID, clusterID string) (*Snapshot, error)
	DeleteClusterSnapshot(snapshotID string) (*Snapshot, error)
	DescribeClusterSnapshots(snapshotID, clusterID, snapshotType string) ([]Snapshot, error)
	CopyClusterSnapshot(sourceSnapshotID, destinationSnapshotID string) (*Snapshot, error)
	RestoreFromClusterSnapshot(clusterID, snapshotID string) (*Cluster, error)
	AuthorizeSnapshotAccess(snapshotID, accountWithRestoreAccess string) (*Snapshot, error)
	BatchDeleteClusterSnapshots(identifiers []string) ([]SnapshotBatchError, []string)
	BatchModifyClusterSnapshots(identifiers []string, retentionPeriod int, force bool) ([]SnapshotBatchError, []string)

	// Subnet group operations
	CreateClusterSubnetGroup(name, description, vpcID string, subnetIDs []string) (*ClusterSubnetGroup, error)
	DeleteClusterSubnetGroup(name string) error
	DescribeClusterSubnetGroups(name string) ([]ClusterSubnetGroup, error)
	ModifyClusterSubnetGroup(name, description string, subnetIDs []string) (*ClusterSubnetGroup, error)

	// Endpoint operations
	AuthorizeEndpointAccess(clusterID, grantee string, vpcIDs []string) (*EndpointAuthorization, error)
	DescribeEndpointAuthorization(clusterID, account string, grantee bool) ([]EndpointAuthorization, error)
	RevokeEndpointAccess(clusterID, account string, vpcIDs []string, force bool) (*EndpointAuthorization, error)

	// Data share operations
	AddPartner(accountID, clusterID, databaseName, partnerName string) (*Partner, error)
	AssociateDataShareConsumer(
		dataShareArn, consumerArn, consumerRegion string,
		associateEntireAccount bool,
	) (*DataShare, error)
	AuthorizeDataShare(dataShareArn, consumerIdentifier string) (*DataShare, error)
	DeauthorizeDataShare(dataShareArn, consumerIdentifier string) (*DataShare, error)
	DescribeDataShares(dataShareArn string) ([]DataShare, error)
	DescribeDataSharesForConsumer(consumerArn, status string) ([]DataShare, error)
	DescribeDataSharesForProducer(producerArn, status string) ([]DataShare, error)
	DisassociateDataShareConsumer(
		dataShareArn, consumerArn, consumerRegion string,
		disassociateEntireAccount bool,
	) (*DataShare, error)
	RejectDataShare(dataShareArn string) (*DataShare, error)

	// Partner operations
	DeletePartner(accountID, clusterID, databaseName, partnerName string) error
	DescribePartners(accountID, clusterID, databaseName, partnerName string) ([]Partner, error)
	UpdatePartnerStatus(accountID, clusterID, databaseName, partnerName, status, statusMessage string) (*Partner, error)

	// Resize operations
	CancelResize(clusterID string) (*ResizeProgress, error)
	DescribeResize(clusterID string) (*ResizeProgress, error)

	// Snapshot management
	ModifyClusterSnapshot(snapshotID string, retentionPeriod int, force bool) (*Snapshot, error)
	RevokeSnapshotAccess(snapshotID, accountWithRestoreAccess string) (*Snapshot, error)

	// Credentials
	GetClusterCredentials(clusterID, dbUser string, autoCreate bool) (*ClusterCredentials, error)

	// Logging operations
	EnableLogging(clusterID, bucketName, s3KeyPrefix string) (*LoggingStatus, error)
	DisableLogging(clusterID string) (*LoggingStatus, error)

	// Event operations
	DescribeEvents(sourceIdentifier, sourceType string) ([]Event, error)
	CreateEventSubscription(
		subscriptionName, snsTopicArn, sourceType, severity string,
		sourceIDs, eventCategories []string,
		enabled bool,
	) (*EventSubscription, error)
	DeleteEventSubscription(subscriptionName string) error
	DescribeEventSubscriptions(subscriptionName string) ([]EventSubscription, error)
	ModifyEventSubscription(
		subscriptionName, snsTopicArn, sourceType, severity string,
		sourceIDs, eventCategories []string,
		enabled *bool,
	) (*EventSubscription, error)

	// Seed helpers for tests
	AddReservedNodeInternal(node *ReservedNode)
	AddDataShareInternal(ds *DataShare)
	AddSecurityGroupInternal(sg *ClusterSecurityGroup)
	AddSnapshotInternal(snap *Snapshot)
	AddActiveResizeInternal(clusterID string, resize *ResizeProgress)
	AddParameterGroupInternal(pg *ClusterParameterGroup)
	AddSubnetGroupInternal(sg *ClusterSubnetGroup)

	// Snapshot copy grant operations
	CreateSnapshotCopyGrant(name, kmsKeyID string, tags map[string]string) (*SnapshotCopyGrant, error)
	DeleteSnapshotCopyGrant(name string) error
	DescribeSnapshotCopyGrants(name string) ([]SnapshotCopyGrant, error)

	// Snapshot copy operations
	EnableSnapshotCopy(clusterID, destinationRegion, grantName string, retentionPeriod int) (*Cluster, error)
	DisableSnapshotCopy(clusterID string) (*Cluster, error)
	ModifySnapshotCopyRetentionPeriod(clusterID string, retentionPeriod int) (*Cluster, error)

	// Snapshot schedule operations
	CreateSnapshotSchedule(
		scheduleID, description string,
		definitions []string,
		tags map[string]string,
	) (*SnapshotSchedule, error)
	DeleteSnapshotSchedule(scheduleID string) error
	DescribeSnapshotSchedules(scheduleID string) ([]SnapshotSchedule, error)
	ModifySnapshotSchedule(scheduleID string, definitions []string) (*SnapshotSchedule, error)
	ModifyClusterSnapshotSchedule(clusterID, scheduleID string, disassociate bool) error

	// Usage limit operations
	CreateUsageLimit(
		clusterID, featureType, limitType, breachAction string,
		amount int64,
		tags map[string]string,
	) (*UsageLimit, error)
	DeleteUsageLimit(usageLimitID string) error
	DescribeUsageLimits(clusterID, featureType string) ([]UsageLimit, error)
	ModifyUsageLimit(usageLimitID, breachAction string, amount int64) (*UsageLimit, error)

	// Authentication profile operations
	CreateAuthenticationProfile(name, content string) (*AuthenticationProfile, error)
	DeleteAuthenticationProfile(name string) error
	DescribeAuthenticationProfiles(name string) ([]AuthenticationProfile, error)
	ModifyAuthenticationProfile(name, content string) (*AuthenticationProfile, error)

	// Resource policy operations
	GetResourcePolicy(resourceArn string) (*ResourcePolicy, error)
	PutResourcePolicy(resourceArn, policy string) (*ResourcePolicy, error)
	DeleteResourcePolicy(resourceArn string) error

	// Additional operations
	GetClusterCredentialsWithIAM(clusterID, dbName string) (*ClusterCredentials, error)
	FailoverPrimaryCompute(clusterID string) (*Cluster, error)
	DescribeTableRestoreStatus(clusterID string) ([]TableRestoreStatus, error)
	CreateTableRestoreStatus(
		clusterID, snapshotID, sourceDatabaseName, sourceTableName, targetDatabaseName, targetTableName string,
	) (*TableRestoreStatus, error)

	// HSM client certificate operations
	CreateHsmClientCertificate(id string, tags map[string]string) (*HsmClientCertificate, error)
	DeleteHsmClientCertificate(id string) error
	DescribeHsmClientCertificates(id string) ([]HsmClientCertificate, error)

	// HSM configuration operations
	CreateHsmConfiguration(
		id, description, hsmIPAddress, hsmPartitionName string, tags map[string]string,
	) (*HsmConfiguration, error)
	DeleteHsmConfiguration(id string) error
	DescribeHsmConfigurations(id string) ([]HsmConfiguration, error)

	// Scheduled action operations (regular Redshift)
	CreateScheduledAction(
		name, schedule, iamRole, description string,
		target *ScheduledActionTarget,
		enable *bool,
	) (*ScheduledAction, error)
	DeleteScheduledAction(name string) error
	DescribeScheduledActions(name string) ([]ScheduledAction, error)
	ModifyScheduledAction(
		name, schedule, iamRole, description string,
		target *ScheduledActionTarget,
		enable *bool,
	) (*ScheduledAction, error)

	// Custom domain association operations
	CreateCustomDomainAssociation(
		clusterID, customDomainName, customDomainCertificateArn string,
	) (*CustomDomainAssociation, error)
	DeleteCustomDomainAssociation(clusterID, customDomainName string) error
	DescribeCustomDomainAssociations(clusterID, customDomainName string) ([]CustomDomainAssociation, error)
	ModifyCustomDomainAssociation(
		clusterID, customDomainName, customDomainCertificateArn string,
	) (*CustomDomainAssociation, error)

	// Endpoint access operations
	CreateEndpointAccess(
		clusterID, endpointName, subnetGroupName, resourceOwner string, vpcSecurityGroupIDs []string,
	) (*EndpointAccess, error)
	DeleteEndpointAccess(endpointName string) (*EndpointAccess, error)
	DescribeEndpointAccess(clusterID, endpointName string) ([]EndpointAccess, error)
	ModifyEndpointAccess(endpointName string, vpcSecurityGroupIDs []string) (*EndpointAccess, error)

	// Integration operations
	CreateIntegration(
		integrationName, sourceArn, targetArn, kmsKeyID, description string, tags map[string]string,
	) (*Integration, error)
	DeleteIntegration(integrationArn string) (*Integration, error)
	DescribeIntegrations(integrationArn string) ([]Integration, error)
	ModifyIntegration(integrationArn, description, newIntegrationName string) (*Integration, error)

	// IDC application operations
	CreateIdcApplication(
		appName, idcInstanceArn, idcDisplayName, iamRoleArn, applicationType string,
	) (*IdcApplication, error)
	DeleteIdcApplication(appArn string) error
	DescribeIdcApplications(appArn string) ([]IdcApplication, error)
	ModifyIdcApplication(appArn, idcDisplayName, iamRoleArn string) (*IdcApplication, error)

	// Query Editor V2 (QEV2) IDC application operations. Qev2IdcApplication is
	// a distinct resource from IdcApplication above -- see the doc comment on
	// the Qev2IdcApplication type in models.go.
	CreateQev2IdcApplication(
		appName, idcInstanceArn, idcDisplayName string, tags map[string]string,
	) (*Qev2IdcApplication, error)
	DeleteQev2IdcApplication(appArn string) error
	DescribeQev2IdcApplications(appArn, marker string, maxRecords int) ([]Qev2IdcApplication, string, error)
	ModifyQev2IdcApplication(appArn, idcDisplayName string) (*Qev2IdcApplication, error)

	// Glue Data Catalog namespace registration operations. clusterIdentifier
	// is set for the ProvisionedIdentifier union variant; serverlessNamespace/
	// serverlessWorkgroup are both set for the ServerlessIdentifier variant --
	// see namespace_registration.go's doc comment.
	RegisterNamespace(
		consumerIdentifiers []string, clusterIdentifier, serverlessNamespace, serverlessWorkgroup string,
	) (*NamespaceRegistration, error)
	DeregisterNamespace(
		consumerIdentifiers []string, clusterIdentifier, serverlessNamespace, serverlessWorkgroup string,
	) (*NamespaceRegistration, error)

	// Lifecycle
	Reset()
	Region() string
	AccountID() string
	Snapshot(ctx context.Context) []byte
	Restore(ctx context.Context, data []byte) error
	SetDNSRegistrar(dns DNSRegistrar)

	// StartReconciler starts the managed background reconciler that advances
	// cluster lifecycle state (creating→available, deleting→gone).
	StartReconciler(ctx context.Context)
	// StopReconciler stops the reconciler and waits for its goroutine to exit.
	StopReconciler()
}

StorageBackend defines the interface for Redshift backend implementations. All mutating methods must be safe for concurrent use.

type Subnet

type Subnet struct {
	SubnetIdentifier string `json:"subnetIdentifier"`
	SubnetStatus     string `json:"subnetStatus"`
}

Subnet represents a single subnet within a cluster subnet group.

type TableRestoreStatus

type TableRestoreStatus struct {
	RequestTime           time.Time `json:"requestTime"`
	TableRestoreRequestID string    `json:"tableRestoreRequestId"`
	ClusterIdentifier     string    `json:"clusterIdentifier"`
	SnapshotIdentifier    string    `json:"snapshotIdentifier,omitempty"`
	Status                string    `json:"status"`
	Message               string    `json:"message"`
	SourceDatabaseName    string    `json:"sourceDatabaseName"`
	SourceTableName       string    `json:"sourceTableName"`
	TargetDatabaseName    string    `json:"targetDatabaseName"`
	TargetTableName       string    `json:"targetTableName"`
}

TableRestoreStatus represents the status of a table-level restore operation.

type UpdateLakehouseConfigParams added in v1.3.1

type UpdateLakehouseConfigParams struct {
	NamespaceName              string
	CatalogName                string
	LakehouseIdcApplicationArn string
	LakehouseIdcRegistration   string
	LakehouseRegistration      string
	DryRun                     bool
}

UpdateLakehouseConfigParams holds UpdateLakehouseConfigurationInput's mutable fields.

type UpdateNamespaceParams added in v1.3.1

type UpdateNamespaceParams struct {
	AdminUsername               string
	AdminUserPassword           string
	KmsKeyID                    string
	DefaultIamRoleArn           string
	AdminPasswordSecretKmsKeyID string
	ManageAdminPassword         *bool
	IamRoles                    []string
	LogExports                  []string
}

UpdateNamespaceParams holds the mutable fields accepted by UpdateNamespace.

AdminUserPassword is accepted for wire compatibility but intentionally never persisted -- see CreateNamespaceParams' doc comment; the same credential-handling rationale applies here. There is deliberately no DBName field: UpdateNamespaceInput has no dbName member (a namespace's database name can't be changed after creation, confirmed against api_op_UpdateNamespace.go), unlike CreateNamespaceInput which does.

type UpdateScheduledActionParams added in v1.3.1

type UpdateScheduledActionParams struct {
	StartTime                  time.Time
	EndTime                    time.Time
	ScheduledActionDescription *string
	Enabled                    *bool
	RoleArn                    string
	Schedule                   json.RawMessage
	TargetAction               json.RawMessage
}

UpdateScheduledActionParams holds the mutable fields accepted by UpdateScheduledAction.

type UpdateTarget added in v1.3.1

type UpdateTarget struct {
	TrackName        string `json:"trackName,omitempty"`
	WorkgroupVersion string `json:"workgroupVersion,omitempty"`
}

UpdateTarget is a single available upgrade target within a ServerlessTrack.

type UsageLimit

type UsageLimit struct {
	Tags              map[string]string `json:"tags"`
	UsageLimitID      string            `json:"usageLimitId"`
	ClusterIdentifier string            `json:"clusterIdentifier"`
	FeatureType       string            `json:"featureType"`
	LimitType         string            `json:"limitType"`
	BreachAction      string            `json:"breachAction"`
	Amount            int64             `json:"amount"`
}

UsageLimit represents a usage limit for a Redshift feature.

type Workgroup

type Workgroup struct {
	CreationDate time.Time `json:"creationDate"`
	// CustomDomainCertificateExpiryTime/CustomDomainCertificateArn/CustomDomainName
	// mirror the association written by CreateCustomDomainAssociation (see
	// serverless_custom_domains.go) -- real Workgroup carries these three
	// fields directly (confirmed against the "Workgroup" shape in
	// service-2.json), not just via GetCustomDomainAssociation.
	CustomDomainCertificateExpiryTime    *time.Time         `json:"customDomainCertificateExpiryTime,omitempty"`
	PricePerformanceTarget               *PerformanceTarget `json:"pricePerformanceTarget,omitempty"`
	IPAddressType                        string             `json:"ipAddressType,omitempty"`
	CustomDomainCertificateArn           string             `json:"customDomainCertificateArn,omitempty"`
	CustomDomainName                     string             `json:"customDomainName,omitempty"`
	WorkgroupArn                         string             `json:"workgroupArn"`
	WorkgroupID                          string             `json:"workgroupId"`
	WorkgroupName                        string             `json:"workgroupName"`
	NamespaceName                        string             `json:"namespaceName"`
	Status                               string             `json:"status"`
	TrackName                            string             `json:"trackName,omitempty"`
	SecurityGroupIDs                     []string           `json:"securityGroupIds,omitempty"`
	ConfigParameters                     []ConfigParameter  `json:"configParameters,omitempty"`
	SubnetIDs                            []string           `json:"subnetIds,omitempty"`
	Endpoint                             WorkgroupEndpoint  `json:"endpoint"`
	MaxCapacity                          int                `json:"maxCapacity,omitempty"`
	Port                                 int                `json:"port,omitempty"`
	BaseCapacity                         int                `json:"baseCapacity"`
	EnhancedVpcRouting                   bool               `json:"enhancedVpcRouting,omitempty"`
	ExtraComputeForAutomaticOptimization bool               `json:"extraComputeForAutomaticOptimization,omitempty"`
	PubliclyAccessible                   bool               `json:"publiclyAccessible,omitempty"`
}

Workgroup represents a Redshift Serverless workgroup.

type WorkgroupEndpoint

type WorkgroupEndpoint struct {
	Address string `json:"address"`
	Port    int    `json:"port"`
}

WorkgroupEndpoint holds the endpoint address and port.

type WorkgroupParams added in v1.3.1

type WorkgroupParams struct {
	PricePerformanceTarget               *PerformanceTarget
	IPAddressType                        string
	TrackName                            string
	ConfigParameters                     []ConfigParameter
	SubnetIDs                            []string
	SecurityGroupIDs                     []string
	BaseCapacity                         int
	MaxCapacity                          int
	Port                                 int
	EnhancedVpcRouting                   bool
	ExtraComputeForAutomaticOptimization bool
	PubliclyAccessible                   bool
}

WorkgroupParams holds the mutable fields shared by CreateWorkgroup and UpdateWorkgroup (NamespaceName is create-only and passed separately).

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL