dms

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 25 Imported by: 0

README

Database Migration Service

Parity grade: A · SDK aws-sdk-go-v2/service/databasemigrationservice@v1.66.4 · last audited 2026-08-29 (f16ac0367fc476ca2ffd1643ed5ef900b9ff0480)

Coverage

Metric Value
PARITY entries audited 97 (96 ok, 1 partial)
Feature families 4 (4 ok)
Known gaps 4
Deferred items 0
Resource leaks clean
Known gaps
  • CHECKED 2026-09-07 (gopherstack-z1sd triage), found FALSE: the claim 'migration project has no status' misdescribes the real API, not this backend. The real MigrationProject type (databasemigrationservice@v1.66.4 types/types.go:2044-2088) has no Status/MigrationProjectStatus field at all -- confirmed by full field listing (Description, InstanceProfileArn, InstanceProfileName, MigrationProjectArn, MigrationProjectCreationTime, MigrationProjectName, SchemaConversionApplicationAttributes, Source/TargetDataProviderDescriptors, TransformationRules) and by grep across the whole SDK module for MigrationProjectStatus (zero hits). CreateMigrationProject/ModifyMigrationProject/DeleteMigrationProject/DescribeMigrationProjects (ops rows above) already match this shape exactly, including the 2026-08-11 fix that removed a fabricated MigrationProjectIdentifier response field. There is no gap here.
  • 2026-09-12 (reqfielddiff, gopherstack-xhu2t): ImportCertificateInput.KmsKeyId is accepted-and-dropped -- the real types.Certificate response (databasemigrationservice@v1.66.4 types/types.go:59-84) has no KmsKeyId member at all to round-trip it onto, and this emulator has no cross-service KMS-key-existence check anywhere in the service (same documented precedent as kms's own CreateGrant GrantConstraints.SourceArn: no cross-service request-context plumbing exists). Nothing observable to fix.
  • 2026-09-12 (reqfielddiff, gopherstack-xhu2t): DescribeApplicableIndividualAssessmentsInput's ReplicationConfigArn/ReplicationInstanceArn/ReplicationTaskArn task-modeling parameters are accepted-and-ignored -- the op always returns defaultApplicableIndividualAssessments(), a static representative catalog (assessment_runs.go) with no per-engine/per-migration-type support metadata behind it. Honoring these would require fabricating which individual assessments apply to which source/target engine and migration-type combination, which is not modeled anywhere in this backend and is not something this pass will invent.
  • 2026-09-12 (reqfielddiff, gopherstack-xhu2t): DescribeDataMigrationsInput.WithoutStatistics is accepted-and-ignored -- DataMigration (models.go) carries no DataMigrationStatistics field at all; this backend never runs a real data migration and so never populates statistics for one to hide. WithoutSettings (the sibling field, real DataMigrationSettings state) was already fixed in the 2026-08-29 pass; this one has nothing to suppress.

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a requested DMS resource cannot be found.
	ErrNotFound = awserr.New("ResourceNotFoundFault", awserr.ErrNotFound)
	// ErrAlreadyExists is returned when a DMS resource already exists.
	ErrAlreadyExists = awserr.New("ResourceAlreadyExistsFault", awserr.ErrConflict)
	// ErrInvalidState is returned when a DMS resource is in an invalid state for the requested operation.
	ErrInvalidState = awserr.New("InvalidResourceStateFault", awserr.ErrInvalidParameter)
	// ErrValidation is returned when input validation fails.
	ErrValidation = awserr.New("ValidationException", awserr.ErrInvalidParameter)
	// ErrCollectorNotFound is returned by DeleteFleetAdvisorCollector, whose own
	// deserializeOpError models CollectorNotFoundFault rather than the
	// service-wide ResourceNotFoundFault (databasemigrationservice@v1.66.4
	// deserializers.go:2875-2913).
	ErrCollectorNotFound = awserr.New("CollectorNotFoundFault", awserr.ErrNotFound)
)
View Source
var ErrNilAppContext = errors.New("DMS provider: nil AppContext")

ErrNilAppContext is returned when Init is called with a nil AppContext.

Functions

This section is empty.

Types

type AssessmentRun

type AssessmentRun struct {
	CreationDate                    time.Time
	ReplicationTaskAssessmentRunArn string
	ReplicationTaskArn              string
	AssessmentRunName               string
	Status                          string
	ServiceAccessRoleArn            string
	ResultLocationBucket            string
	ResultLocationFolder            string
	ResultEncryptionMode            string
	Region                          string
	IndividualAssessments           []*IndividualAssessment
	ResultStatistic                 AssessmentRunResultStatistic
	IsLatestTaskAssessmentRun       bool
}

AssessmentRun represents a DMS pre-migration assessment run.

Region supports Phase 3.3's store.Table keying (see store_setup.go) -- AssessmentRun carries no other region-derived field, so the value needs its own copy to serve as a pure store.Table/store.Index key input.

type AssessmentRunResultStatistic added in v1.2.0

type AssessmentRunResultStatistic struct {
	Cancelled int32
	Error     int32
	Failed    int32
	Passed    int32
	Skipped   int32
	Warning   int32
}

AssessmentRunResultStatistic mirrors types.ReplicationTaskAssessmentRunResultStatistic: aggregated pass/fail counts of the individual assessments run as part of an AssessmentRun.

type Certificate

type Certificate struct {
	CertificateIdentifier string
	CertificateArn        string
	CertificatePem        string
	AccountID             string
	Region                string
}

Certificate represents a DMS certificate.

type ComputeConfig added in v1.3.1

type ComputeConfig struct {
	MaxCapacityUnits           *int32
	MinCapacityUnits           *int32
	MultiAZ                    *bool
	AvailabilityZone           string
	DNSNameServers             string
	KMSKeyID                   string
	PreferredMaintenanceWindow string
	ReplicationSubnetGroupID   string
	VPCSecurityGroupIDs        []string
}

ComputeConfig mirrors types.ComputeConfig (types.go:190) -- configuration parameters for provisioning a DMS Serverless replication. Every member is optional; only the ComputeConfig pointer itself is a required CreateReplicationConfigInput member.

type Connection

type Connection struct {
	ReplicationInstanceArn        string
	ReplicationInstanceIdentifier string
	EndpointArn                   string
	EndpointIdentifier            string
	Status                        string
	LastFailureMessage            string
	Region                        string
}

Connection represents a DMS connection between a replication instance and an endpoint.

Region supports Phase 3.3's store.Table keying (see store_setup.go) -- Connection carries no other region-derived field, so the value needs its own copy to serve as a pure store.Table/store.Index key input.

type CreateReplicationConfigParams added in v1.3.1

type CreateReplicationConfigParams struct {
	ComputeConfig     *ComputeConfig
	Identifier        string
	ReplicationType   string
	SourceEndpointArn string
	TargetEndpointArn string
	TableMappings     string
}

CreateReplicationConfigParams groups CreateReplicationConfigInput's fields beyond Tags, so the CreateReplicationConfig backend method signature stays manageable as fields are added.

type DataMigration

type DataMigration struct {
	CreationTime         time.Time  `json:"creationTime"`
	Tags                 *tags.Tags `json:"-"`
	DataMigrationName    string     `json:"dataMigrationName"`
	DataMigrationArn     string     `json:"dataMigrationArn"`
	MigrationProjectArn  string     `json:"migrationProjectArn"`
	DataMigrationType    string     `json:"dataMigrationType"`
	ServiceAccessRoleArn string     `json:"serviceAccessRoleArn"`
	DataMigrationStatus  string     `json:"dataMigrationStatus"`
	AccountID            string     `json:"accountId"`
	Region               string     `json:"region"`
	SelectionRules       string     `json:"selectionRules,omitempty"`
	NumberOfJobs         int32      `json:"numberOfJobs"`
	EnableCloudwatchLogs bool       `json:"enableCloudwatchLogs"`
}

DataMigration represents an AWS DMS data migration.

type DataProvider

type DataProvider struct {
	CreationTime     time.Time  `json:"creationTime"`
	Tags             *tags.Tags `json:"-"`
	DataProviderName string     `json:"dataProviderName"`
	DataProviderArn  string     `json:"dataProviderArn"`
	Engine           string     `json:"engine"`
	Description      string     `json:"description,omitempty"`
	AccountID        string     `json:"accountId"`
	Region           string     `json:"region"`
}

DataProvider represents an AWS DMS data provider.

type DataProviderDescriptor added in v1.3.1

type DataProviderDescriptor struct {
	DataProviderArn             string
	DataProviderName            string
	SecretsManagerAccessRoleArn string
	SecretsManagerSecretId      string //nolint:revive,staticcheck // matches the AWS wire field name.
}

DataProviderDescriptor mirrors the real AWS DataProviderDescriptor wire shape (databasemigrationservice@v1.66.4 types.go:528-544): a resolved data provider identity plus the caller's Secrets Manager pass-through fields.

type DataProviderDescriptorInput added in v1.3.1

type DataProviderDescriptorInput struct {
	DataProviderIdentifier      string
	SecretsManagerAccessRoleArn string
	SecretsManagerSecretId      string //nolint:revive,staticcheck // matches the AWS wire field name.
}

DataProviderDescriptorInput is the request-side shape of a data provider descriptor entry within CreateMigrationProject's Source/TargetDataProviderDescriptors.

type DescribeFilters

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

DescribeFilters is the parsed Filters value every dms Describe* backend method matches candidates against: filter name -> the set of values a matching resource may equal. types.Filter's doc (databasemigrationservice @v1.66.4 types/types.go) says Values "can specify one or more values used to narrow the returned results" -- so a single filter OR-matches any of its values, while multiple filters (distinct names) AND together (spelled out explicitly on api_op_DescribeTableStatistics.go:45-46: "A combination of filters creates an AND condition where each record matches all specified filters"). The zero value is unconstrained (matches everything), exactly like a request with no Filters at all.

DMS declares no InvalidParameterValueException-shaped fault anywhere in its error set (databasemigrationservice@v1.66.4 types/errors.go lists AccessDeniedFault, CollectorNotFoundFault, FailedDependencyFault, InsufficientResourceCapacityFault, InvalidCertificateFault, InvalidOperationFault, InvalidResourceStateFault, InvalidSubnet, the KMS* faults, ResourceAlreadyExistsFault, ResourceNotFoundFault, ResourceQuotaExceededFault, the S3*/SNS* faults, StorageQuotaExceededFault and UpgradeDependencyFailureFault -- nothing shaped like a bad-parameter error), and validateFilterList (validators.go) only checks the wire shape (Name/Values non-empty), never the name against a known vocabulary. So an undocumented filter name is accepted and silently ignored, matching real AWS's behavior for services with no such validation error: callers here only ever call Matches/MatchesAny with the names their own operation documents, so a name outside that set simply never narrows anything.

func NewIdentifierFilter

func NewIdentifierFilter(field, value string) DescribeFilters

NewIdentifierFilter builds a DescribeFilters constraining field to value, or the unconstrained zero value when value is "" -- for internal point-lookup call sites that previously threaded a single string straight into a Describe* backend method's old single-value "identifier" parameter.

func (DescribeFilters) Matches

func (f DescribeFilters) Matches(name, value string) bool

Matches reports whether filter name is unconstrained or satisfied by value.

func (DescribeFilters) MatchesAny

func (f DescribeFilters) MatchesAny(name string, candidates ...string) bool

MatchesAny reports whether filter name is unconstrained (absent from the request) or satisfied by any of the given candidate values -- used when a single documented filter name constrains more than one resource field (e.g. DescribeReplicationTasks' endpoint-arn matches either a task's source or target endpoint).

func (DescribeFilters) Values

func (f DescribeFilters) Values(name string) []string

Values returns the values supplied for filter name, or nil if the request carried no filter with that name.

type Endpoint

type Endpoint struct {
	CreationTime              time.Time  `json:"creationTime"`
	Tags                      *tags.Tags `json:"-"`
	EndpointIdentifier        string     `json:"endpointIdentifier"`
	EndpointArn               string     `json:"endpointArn"`
	EndpointType              string     `json:"endpointType"`
	EngineName                string     `json:"engineName"`
	ServerName                string     `json:"serverName,omitempty"`
	DatabaseName              string     `json:"databaseName,omitempty"`
	Username                  string     `json:"username,omitempty"`
	Password                  string     `json:"password,omitempty"`
	Status                    string     `json:"status"`
	AccountID                 string     `json:"accountId"`
	Region                    string     `json:"region"`
	CertificateArn            string     `json:"certificateArn,omitempty"`
	ExtraConnectionAttributes string     `json:"extraConnectionAttributes,omitempty"`
	KmsKeyID                  string     `json:"kmsKeyId,omitempty"`
	ServiceAccessRoleArn      string     `json:"serviceAccessRoleArn,omitempty"`
	SslMode                   string     `json:"sslMode,omitempty"`
	ExternalTableDefinition   string     `json:"externalTableDefinition,omitempty"`
	Port                      int32      `json:"port,omitempty"`
}

Endpoint represents an AWS DMS endpoint.

The Tags field is backend-owned. Callers must treat the returned pointer as read-only; mutate tags only via AddTagsToResource or CreateEndpoint.

Password is accepted on CreateEndpoint/ModifyEndpoint and stored here, but (matching the real Endpoint wire type, which has no Password field) it is never put on the wire by any Describe/Create/Modify response -- see endpointJSON in handler_endpoints.go. Engine-specific nested settings (MySQLSettings, PostgreSQLSettings, S3Settings, ...) are deliberately not modeled and are rejected with ValidationException if sent -- see engineSettingsFields in handler_endpoints.go and PARITY.md.

type EndpointConnectionSettings added in v1.5.0

type EndpointConnectionSettings struct {
	CertificateArn            string
	ExtraConnectionAttributes string
	KmsKeyID                  string
	ServiceAccessRoleArn      string
	SslMode                   string
	ExternalTableDefinition   string
	ResourceIdentifier        string
}

EndpointConnectionSettings carries the top-level (non-engine-specific) connection settings CreateEndpoint/ModifyEndpoint accept beyond the original identifier/engine/server/database/username/password/port set -- see api_op_CreateEndpoint.go / api_op_ModifyEndpoint.go, databasemigrationservice@v1.66.4. KmsKeyID is create-only (real ModifyEndpointInput has no KmsKeyId member -- encryption key can't change post-creation) and is ignored by ModifyEndpoint.

type Event

type Event struct {
	SourceIdentifier string
	SourceType       string
	Message          string
	Date             time.Time
	EventCategories  []string
}

Event records an operational event emitted by a DMS resource. Date deserializes from a json.Number via smithytime.ParseEpochSeconds -- confirmed against aws-sdk-go-v2/service/databasemigrationservice@v1.66.4's deserializers.go (awsAwsjson11_deserializeDocumentEvent, case "Date").

type EventSubscription

type EventSubscription struct {
	CreationTime     time.Time  `json:"creationTime"`
	Tags             *tags.Tags `json:"-"`
	SubscriptionName string     `json:"subscriptionName"`
	SnsTopicArn      string     `json:"snsTopicArn"`
	SourceType       string     `json:"sourceType,omitempty"`
	Status           string     `json:"status"`
	AccountID        string     `json:"accountId"`
	Region           string     `json:"region"`
	SourceIDsList    []string   `json:"sourceIdsList,omitempty"`
	EventCategories  []string   `json:"eventCategories,omitempty"`
	Enabled          bool       `json:"enabled"`
}

EventSubscription represents an AWS DMS event notification subscription.

type FleetAdvisorCollector

type FleetAdvisorCollector struct {
	CreatedDate           time.Time  `json:"createdDate"`
	Tags                  *tags.Tags `json:"-"`
	CollectorName         string     `json:"collectorName"`
	CollectorReferencedID string     `json:"collectorReferencedId"`
	CollectorVersion      string     `json:"collectorVersion"`
	Description           string     `json:"description,omitempty"`
	ServiceAccessRoleArn  string     `json:"serviceAccessRoleArn"`
	S3BucketName          string     `json:"s3BucketName"`
	CollectorHealthCheck  string     `json:"collectorHealthCheck"`
	LastDataReceived      string     `json:"lastDataReceived,omitempty"`
	RegisteredDate        string     `json:"registeredDate,omitempty"`
	ModifiedDate          string     `json:"modifiedDate,omitempty"`
	AccountID             string     `json:"accountId"`
	Region                string     `json:"region"`
}

FleetAdvisorCollector represents an AWS DMS Fleet Advisor collector.

type FleetAdvisorDatabase

type FleetAdvisorDatabase struct {
	DatabaseID            string
	DatabaseName          string
	IPAddress             string
	EngineName            string
	CollectorReferencedID string
	Region                string
}

FleetAdvisorDatabase is a database discovered by a Fleet Advisor collector.

Region supports Phase 3.3's store.Table keying (see store_setup.go) -- FleetAdvisorDatabase carries no other region-derived field, so the value needs its own copy to serve as a pure store.Table/store.Index key input.

type Handler

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

Handler is the Echo HTTP handler for AWS DMS operations (JSON protocol).

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler creates a new DMS 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 DMS 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 DMS operation name from the X-Amz-Target header.

func (*Handler) ExtractResource

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

ExtractResource extracts the primary resource identifier from the request body.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns the list of supported DMS operations, sorted alphabetically for deterministic output.

func (*Handler) Handler

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

Handler returns the Echo handler function for DMS requests.

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 delegates to the backend Reset, clearing all in-memory state.

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 AWS DMS requests.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable by delegating to the backend.

type InMemoryBackend

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

InMemoryBackend is the in-memory store for AWS DMS resources.

Every named resource collection is a *store.Table[T] keyed by a composite "<region>|<identifier-or-ARN>" primary key (see store_setup.go's [regionKey]), so that same-named resources stay isolated across regions exactly as the pre-Phase-3.3 per-region nested maps did. ByARN/ByID lookups and region-scoped listing go through the accompanying *store.Index[T] fields. Callers must hold b.mu while accessing any table or index.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new in-memory DMS backend.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

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

func (*InMemoryBackend) AddDataMigrationInternal

func (b *InMemoryBackend) AddDataMigrationInternal(name, migrationType string)

AddDataMigrationInternal seeds a data migration directly without HTTP.

func (*InMemoryBackend) AddDataProviderInternal

func (b *InMemoryBackend) AddDataProviderInternal(name, engine string)

AddDataProviderInternal seeds a data provider directly without HTTP.

func (*InMemoryBackend) AddEndpointInternal

func (b *InMemoryBackend) AddEndpointInternal(identifier, endpointType, engineName string)

AddEndpointInternal seeds an endpoint directly without HTTP.

func (*InMemoryBackend) AddEventSubscriptionInternal

func (b *InMemoryBackend) AddEventSubscriptionInternal(name, snsTopicArn string)

AddEventSubscriptionInternal seeds an event subscription directly without HTTP.

func (*InMemoryBackend) AddFleetAdvisorCollectorInternal

func (b *InMemoryBackend) AddFleetAdvisorCollectorInternal(name string)

AddFleetAdvisorCollectorInternal seeds a Fleet Advisor collector directly without HTTP.

func (*InMemoryBackend) AddInstanceProfileInternal

func (b *InMemoryBackend) AddInstanceProfileInternal(name string)

AddInstanceProfileInternal seeds an instance profile directly without HTTP.

func (*InMemoryBackend) AddReplicationInstanceInternal

func (b *InMemoryBackend) AddReplicationInstanceInternal(identifier, class string)

AddReplicationInstanceInternal seeds a replication instance directly without HTTP.

func (*InMemoryBackend) AddReplicationTaskInternal

func (b *InMemoryBackend) AddReplicationTaskInternal(
	identifier, srcARN, tgtARN, instARN, migrationType string,
)

AddReplicationTaskInternal seeds a replication task directly without HTTP.

func (*InMemoryBackend) AddTagsToResource

func (b *InMemoryBackend) AddTagsToResource(ctx context.Context, resourceArn string, kv map[string]string) error

AddTagsToResource adds tags to a DMS resource by ARN.

func (*InMemoryBackend) ApplyPendingMaintenanceAction

func (b *InMemoryBackend) ApplyPendingMaintenanceAction(
	ctx context.Context,
	replicationInstanceArn, applyAction, optInType string,
) (*ReplicationInstance, error)

ApplyPendingMaintenanceAction applies a pending maintenance action to a replication instance.

func (*InMemoryBackend) BatchStartRecommendations

func (b *InMemoryBackend) BatchStartRecommendations(ctx context.Context) error

BatchStartRecommendations starts the analysis to generate recommendations. In-memory: always returns an empty error list (all successful). BatchStartRecommendations seeds target-engine recommendations based on existing source endpoints.

func (*InMemoryBackend) CancelMetadataModelConversion

func (b *InMemoryBackend) CancelMetadataModelConversion(
	ctx context.Context,
	migrationProjectIdentifier, requestIdentifier string,
) (*MetadataModelRequest, error)

CancelMetadataModelConversion cancels a pending metadata model conversion task.

func (*InMemoryBackend) CancelMetadataModelCreation

func (b *InMemoryBackend) CancelMetadataModelCreation(
	ctx context.Context,
	migrationProjectIdentifier, requestIdentifier string,
) (*MetadataModelRequest, error)

CancelMetadataModelCreation cancels a pending metadata model creation task.

func (*InMemoryBackend) CancelReplicationTaskAssessmentRun

func (b *InMemoryBackend) CancelReplicationTaskAssessmentRun(
	ctx context.Context,
	replicationTaskAssessmentRunArn string,
) error

CancelReplicationTaskAssessmentRun cancels a single premigration assessment run.

func (*InMemoryBackend) CreateDataMigration

func (b *InMemoryBackend) CreateDataMigration(
	ctx context.Context,
	name, migrationProjectArn, migrationType, serviceAccessRoleArn, selectionRules string,
	numberOfJobs int32,
	enableCloudwatchLogs bool,
	kv map[string]string,
) (*DataMigration, error)

CreateDataMigration creates a new data migration.

func (*InMemoryBackend) CreateDataProvider

func (b *InMemoryBackend) CreateDataProvider(
	ctx context.Context,
	name, engine, description string,
	kv map[string]string,
) (*DataProvider, error)

CreateDataProvider creates a new data provider.

func (*InMemoryBackend) CreateEndpoint

func (b *InMemoryBackend) CreateEndpoint(
	ctx context.Context,
	identifier, endpointType, engineName, serverName, databaseName, username, password string,
	port int32,
	kv map[string]string,
	settings EndpointConnectionSettings,
) (*Endpoint, error)

CreateEndpoint creates a new DMS endpoint.

func (*InMemoryBackend) CreateEventSubscription

func (b *InMemoryBackend) CreateEventSubscription(
	ctx context.Context,
	subscriptionName, snsTopicArn, sourceType string,
	sourceIDs, eventCategories []string,
	enabled bool,
	kv map[string]string,
) (*EventSubscription, error)

CreateEventSubscription creates a new event subscription.

func (*InMemoryBackend) CreateFleetAdvisorCollector

func (b *InMemoryBackend) CreateFleetAdvisorCollector(
	ctx context.Context,
	collectorName, description, serviceAccessRoleArn, s3BucketName string,
) (*FleetAdvisorCollector, error)

CreateFleetAdvisorCollector creates a new Fleet Advisor collector.

func (*InMemoryBackend) CreateInstanceProfile

func (b *InMemoryBackend) CreateInstanceProfile(
	ctx context.Context,
	instanceProfileName, availabilityZone, kmsKeyArn, networkType, description, subnetGroupIdentifier string,
	publiclyAccessible bool,
	kv map[string]string,
) (*InstanceProfile, error)

CreateInstanceProfile creates a new instance profile.

func (*InMemoryBackend) CreateMigrationProject

func (b *InMemoryBackend) CreateMigrationProject(
	ctx context.Context,
	name, description, instanceProfileIdentifier string,
	sourceDescriptors, targetDescriptors []DataProviderDescriptorInput,
	kv map[string]string,
) (*MigrationProject, error)

CreateMigrationProject creates a migration project.

func (*InMemoryBackend) CreateReplicationConfig

func (b *InMemoryBackend) CreateReplicationConfig(
	ctx context.Context,
	params CreateReplicationConfigParams,
	kv map[string]string,
) (*ReplicationConfig, error)

CreateReplicationConfig creates a replication config.

func (*InMemoryBackend) CreateReplicationInstance

func (b *InMemoryBackend) CreateReplicationInstance(
	ctx context.Context,
	identifier, class, engineVersion, availabilityZone string,
	allocatedStorage int32,
	multiAZ, autoMinorVersionUpgrade, publiclyAccessible bool,
	kv map[string]string,
	settings ReplicationInstanceSettings,
) (*ReplicationInstance, error)

CreateReplicationInstance creates a new DMS replication instance.

func (*InMemoryBackend) CreateReplicationSubnetGroup

func (b *InMemoryBackend) CreateReplicationSubnetGroup(
	ctx context.Context,
	identifier, description, vpcID string,
	subnetIDs []string,
	kv map[string]string,
) (*ReplicationSubnetGroup, error)

CreateReplicationSubnetGroup creates a subnet group.

func (*InMemoryBackend) CreateReplicationTask

func (b *InMemoryBackend) CreateReplicationTask(
	ctx context.Context,
	identifier, sourceEndpointArn, targetEndpointArn, replicationInstanceArn,
	migrationType, tableMappings, settings string,
	kv map[string]string,
	cdcSettings ReplicationTaskCDCSettings,
) (*ReplicationTask, error)

CreateReplicationTask creates a new DMS replication task.

func (*InMemoryBackend) DeleteAssessmentRun

func (b *InMemoryBackend) DeleteAssessmentRun(ctx context.Context, runArn string) (*AssessmentRun, error)

DeleteAssessmentRun removes a stored assessment run.

func (*InMemoryBackend) DeleteCertificate

func (b *InMemoryBackend) DeleteCertificate(ctx context.Context, identifierOrArn string) (*Certificate, error)

DeleteCertificate deletes a certificate by identifier or ARN.

func (*InMemoryBackend) DeleteConnection

func (b *InMemoryBackend) DeleteConnection(
	ctx context.Context,
	replicationInstanceArn, endpointArn string,
) (*Connection, error)

DeleteConnection removes a connection record created by TestConnection.

func (*InMemoryBackend) DeleteDataMigration

func (b *InMemoryBackend) DeleteDataMigration(
	ctx context.Context,
	nameOrArn string,
) (*DataMigration, error)

DeleteDataMigration deletes a data migration by name or ARN.

func (*InMemoryBackend) DeleteDataProvider

func (b *InMemoryBackend) DeleteDataProvider(ctx context.Context, nameOrArn string) (*DataProvider, error)

DeleteDataProvider deletes a data provider by name or ARN. Real AWS: "All migration projects associated with the data provider must be deleted or modified before you can delete the data provider".

func (*InMemoryBackend) DeleteEndpoint

func (b *InMemoryBackend) DeleteEndpoint(ctx context.Context, arnOrID string) (*Endpoint, error)

DeleteEndpoint deletes an endpoint by ARN or identifier. Real AWS rejects deletion if the endpoint is still referenced by any replication task.

func (*InMemoryBackend) DeleteEventSubscription

func (b *InMemoryBackend) DeleteEventSubscription(ctx context.Context, name string) (*EventSubscription, error)

DeleteEventSubscription deletes an event subscription by name.

func (*InMemoryBackend) DeleteFleetAdvisorCollector

func (b *InMemoryBackend) DeleteFleetAdvisorCollector(ctx context.Context, nameOrID string) error

DeleteFleetAdvisorCollector deletes a fleet advisor collector by name or ID.

func (*InMemoryBackend) DeleteFleetAdvisorDatabases

func (b *InMemoryBackend) DeleteFleetAdvisorDatabases(ctx context.Context, ids []string) ([]string, error)

DeleteFleetAdvisorDatabases removes Fleet Advisor databases by ID and returns the deleted IDs.

func (*InMemoryBackend) DeleteInstanceProfile

func (b *InMemoryBackend) DeleteInstanceProfile(ctx context.Context, nameOrArn string) error

DeleteInstanceProfile deletes an instance profile by name or ARN. Real AWS: "All migration projects associated with the instance profile must be deleted or modified before you can delete the instance profile".

func (*InMemoryBackend) DeleteMigrationProject

func (b *InMemoryBackend) DeleteMigrationProject(ctx context.Context, nameOrArn string) error

DeleteMigrationProject deletes a migration project by name or ARN.

func (*InMemoryBackend) DeleteReplicationConfig

func (b *InMemoryBackend) DeleteReplicationConfig(ctx context.Context, identifierOrArn string) error

DeleteReplicationConfig deletes a replication config by identifier or ARN. Real AWS: "You can't delete the configuration for an DMS Serverless replication that is ongoing. You can delete the configuration when the replication is in a non-RUNNING and non-STARTING state".

func (*InMemoryBackend) DeleteReplicationInstance

func (b *InMemoryBackend) DeleteReplicationInstance(ctx context.Context, arnOrID string) error

DeleteReplicationInstance deletes a replication instance by ARN or identifier. AWS requires all replication tasks on the instance to be deleted first.

func (*InMemoryBackend) DeleteReplicationSubnetGroup

func (b *InMemoryBackend) DeleteReplicationSubnetGroup(ctx context.Context, identifierOrArn string) error

DeleteReplicationSubnetGroup deletes a subnet group by identifier or ARN.

func (*InMemoryBackend) DeleteReplicationTask

func (b *InMemoryBackend) DeleteReplicationTask(ctx context.Context, arnOrID string) (*ReplicationTask, error)

DeleteReplicationTask deletes a replication task by ARN or identifier. AWS does not allow deleting a task while it is running.

func (*InMemoryBackend) DescribeAllAssessmentResults added in v1.2.0

func (b *InMemoryBackend) DescribeAllAssessmentResults(ctx context.Context) ([]*AssessmentRun, error)

DescribeAllAssessmentResults returns one AssessmentRun per task that has ever had an assessment run (the latest one), for the no-ReplicationTaskArn list form of DescribeReplicationTaskAssessmentResults.

func (*InMemoryBackend) DescribeAssessmentResult added in v1.2.0

func (b *InMemoryBackend) DescribeAssessmentResult(ctx context.Context, taskArn string) (*AssessmentRun, error)

DescribeAssessmentResult returns the assessment result for a single replication task's most recent assessment run (real AWS: "When this input parameter [ReplicationTaskArn] is specified, the API returns only one result"). Returns nil if the task has never had an assessment run.

func (*InMemoryBackend) DescribeAssessmentRuns

func (b *InMemoryBackend) DescribeAssessmentRuns(ctx context.Context, taskArn string) ([]*AssessmentRun, error)

DescribeAssessmentRuns returns stored assessment runs, optionally filtered by task ARN.

func (*InMemoryBackend) DescribeAssessmentRunsFiltered added in v1.2.0

func (b *InMemoryBackend) DescribeAssessmentRunsFiltered(
	ctx context.Context, filters DescribeFilters,
) ([]*AssessmentRun, error)

DescribeAssessmentRunsFiltered returns stored assessment runs matching filters (valid filter names per api_op_DescribeReplicationTaskAssessmentRuns.go: replication-task-assessment-run-arn, replication-task-arn, replication-instance-arn, status).

func (*InMemoryBackend) DescribeCertificates

func (b *InMemoryBackend) DescribeCertificates(ctx context.Context) ([]*Certificate, error)

DescribeCertificates returns all certificates.

func (*InMemoryBackend) DescribeConnections

func (b *InMemoryBackend) DescribeConnections(
	ctx context.Context,
	filters DescribeFilters,
) ([]*Connection, error)

DescribeConnections returns stored connections matching filters (valid filter names per api_op_DescribeConnections.go: endpoint-arn | replication-instance-arn).

func (*InMemoryBackend) DescribeDataMigrations

func (b *InMemoryBackend) DescribeDataMigrations(
	ctx context.Context,
	filters DescribeFilters,
) ([]*DataMigration, error)

DescribeDataMigrations returns data migrations matching filters. Real AWS documents no specific filter-name vocabulary for this op (api_op_DescribeDataMigrations.go simply says "Filters applied to the data migrations"); data-migration-identifier is this backend's own choice, matching either the name or the ARN, mirroring the equivalent documented *-identifier filters on sibling ops (data-provider-identifier, instance-profile-identifier, migration-project-identifier).

func (*InMemoryBackend) DescribeDataProviders

func (b *InMemoryBackend) DescribeDataProviders(ctx context.Context, filters DescribeFilters) ([]*DataProvider, error)

DescribeDataProviders returns data providers matching filters (valid filter names per api_op_DescribeDataProviders.go: data-provider-identifier -- "The data provider name or ARN").

func (*InMemoryBackend) DescribeEndpoints

func (b *InMemoryBackend) DescribeEndpoints(ctx context.Context, filters DescribeFilters) ([]*Endpoint, error)

DescribeEndpoints returns endpoints matching filters (valid filter names per api_op_DescribeEndpoints.go: endpoint-arn | endpoint-type | endpoint-id | engine-name; endpoint-type/engine-name are not modeled here since callers of this list method have never needed them).

func (*InMemoryBackend) DescribeEventSubscriptions

func (b *InMemoryBackend) DescribeEventSubscriptions(
	ctx context.Context,
	filters DescribeFilters,
) ([]*EventSubscription, error)

DescribeEventSubscriptions returns event subscriptions matching filters (valid filter names per api_op_DescribeEventSubscriptions.go: event-subscription-arn | event-subscription-id). EventSubscription has no distinct ARN in this emulation (see eventSubscriptionJSON), so both names resolve against SubscriptionName, the only identifier that exists.

func (*InMemoryBackend) DescribeEvents

func (b *InMemoryBackend) DescribeEvents(ctx context.Context) ([]*Event, error)

DescribeEvents returns all recorded DMS events for the request region.

func (*InMemoryBackend) DescribeFleetAdvisorCollectors

func (b *InMemoryBackend) DescribeFleetAdvisorCollectors(ctx context.Context) ([]*FleetAdvisorCollector, error)

DescribeFleetAdvisorCollectors returns all fleet advisor collectors.

func (*InMemoryBackend) DescribeFleetAdvisorDatabases

func (b *InMemoryBackend) DescribeFleetAdvisorDatabases(ctx context.Context) ([]*FleetAdvisorDatabase, error)

DescribeFleetAdvisorDatabases returns databases discovered by Fleet Advisor collectors.

func (*InMemoryBackend) DescribeIndividualAssessments added in v1.2.0

func (b *InMemoryBackend) DescribeIndividualAssessments(
	ctx context.Context, filters DescribeFilters,
) ([]*IndividualAssessment, error)

DescribeIndividualAssessments returns individual assessments across all stored assessment runs matching filters (valid filter names per api_op_DescribeReplicationTaskIndividualAssessments.go: replication-task-assessment-run-arn, replication-task-arn, status).

func (*InMemoryBackend) DescribeInstanceProfiles

func (b *InMemoryBackend) DescribeInstanceProfiles(ctx context.Context) ([]*InstanceProfile, error)

DescribeInstanceProfiles returns all instance profiles.

func (*InMemoryBackend) DescribeMigrationProjects

func (b *InMemoryBackend) DescribeMigrationProjects(ctx context.Context) ([]*MigrationProject, error)

DescribeMigrationProjects returns all migration projects.

func (*InMemoryBackend) DescribeRecommendations

func (b *InMemoryBackend) DescribeRecommendations(ctx context.Context) ([]*Recommendation, error)

DescribeRecommendations returns Fleet Advisor target recommendations for the request region.

func (*InMemoryBackend) DescribeReplicationConfigs

func (b *InMemoryBackend) DescribeReplicationConfigs(ctx context.Context) ([]*ReplicationConfig, error)

DescribeReplicationConfigs returns all replication configs.

func (*InMemoryBackend) DescribeReplicationInstances

func (b *InMemoryBackend) DescribeReplicationInstances(
	ctx context.Context,
	filters DescribeFilters,
) ([]*ReplicationInstance, error)

DescribeReplicationInstances returns replication instances matching filters (valid filter names per api_op_DescribeReplicationInstances.go: replication-instance-arn | replication-instance-id | replication-instance-class | engine-version; class/engine-version are not modeled here since callers of this list method have never needed them).

func (*InMemoryBackend) DescribeReplicationSubnetGroups

func (b *InMemoryBackend) DescribeReplicationSubnetGroups(ctx context.Context) ([]*ReplicationSubnetGroup, error)

DescribeReplicationSubnetGroups returns all subnet groups.

func (*InMemoryBackend) DescribeReplicationTasks

func (b *InMemoryBackend) DescribeReplicationTasks(
	ctx context.Context,
	filters DescribeFilters,
) ([]*ReplicationTask, error)

DescribeReplicationTasks returns replication tasks matching filters (valid filter names per api_op_DescribeReplicationTasks.go: replication-task-arn | replication-task-id | migration-type | endpoint-arn | replication-instance-arn; endpoint-arn matches either the task's source or target endpoint).

func (*InMemoryBackend) DescribeReplications

func (b *InMemoryBackend) DescribeReplications(
	ctx context.Context,
	filters DescribeFilters,
) ([]*ReplicationConfig, error)

DescribeReplications returns DMS Serverless replication runtime state, backed by the replication configs that have had StartReplication called against them at least once. A config that has never been started still carries a valid Status ("created") from CreateReplicationConfig, matching AWS's behavior of DescribeReplications listing every config regardless of whether it has ever run. Matched against filters (valid filter names per api_op_DescribeReplications.go: replication-config-arn | replication-config-id).

func (*InMemoryBackend) DescribeSchemas

func (b *InMemoryBackend) DescribeSchemas(ctx context.Context, endpointARN string) ([]string, error)

DescribeSchemas returns the schema names available on an endpoint.

func (*InMemoryBackend) ImportCertificate

func (b *InMemoryBackend) ImportCertificate(ctx context.Context, identifier, certPem string) (*Certificate, error)

ImportCertificate creates a certificate record.

func (*InMemoryBackend) ListMetadataModelRequests

func (b *InMemoryBackend) ListMetadataModelRequests(
	ctx context.Context,
	projectIdentifier, reqType string,
) ([]*MetadataModelRequest, error)

ListMetadataModelRequests returns all requests of a given type for a migration project.

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(ctx context.Context, resourceArn string) (map[string]string, error)

ListTagsForResource returns tags for a DMS resource by ARN.

func (*InMemoryBackend) ModifyDataMigration

func (b *InMemoryBackend) ModifyDataMigration(
	ctx context.Context,
	nameOrArn, newName, migrationType, serviceAccessRoleArn string,
	numberOfJobs *int32,
) (*DataMigration, error)

ModifyDataMigration updates a data migration. Real ModifyDataMigrationInput (api_op_ModifyDataMigration.go) also accepts DataMigrationName -- dropped entirely until this fix, so a real client's rename request silently did nothing. DataMigrationName is this store's primary key (dataMigrationKeyFn, store_setup.go), so a rename re-keys the table via delete+put rather than mutating the field in place.

func (*InMemoryBackend) ModifyDataProvider

func (b *InMemoryBackend) ModifyDataProvider(
	ctx context.Context,
	nameOrArn, engine, description string,
) (*DataProvider, error)

ModifyDataProvider updates a data provider. Real AWS: "You must remove the data provider from all migration projects before you can modify it" (databasemigrationservice@v1.66.4 api_op_ModifyDataProvider.go:16-17).

func (*InMemoryBackend) ModifyEndpoint

func (b *InMemoryBackend) ModifyEndpoint(
	ctx context.Context,
	arnOrID, endpointType, engineName, serverName, databaseName, username, password string,
	port int32,
	settings EndpointConnectionSettings,
) (*Endpoint, error)

ModifyEndpoint updates endpoint settings.

func (*InMemoryBackend) ModifyEventSubscription

func (b *InMemoryBackend) ModifyEventSubscription(
	ctx context.Context,
	name string,
	enabled *bool,
) (*EventSubscription, error)

ModifyEventSubscription updates an event subscription.

func (*InMemoryBackend) ModifyInstanceProfile

func (b *InMemoryBackend) ModifyInstanceProfile(
	ctx context.Context,
	nameOrArn, availabilityZone, description, networkType string,
) (*InstanceProfile, error)

ModifyInstanceProfile updates an instance profile. Real AWS: "All migration projects associated with the instance profile must be deleted or modified before you can modify the instance profile" (databasemigrationservice@v1.66.4 api_op_ModifyInstanceProfile.go:16-17).

func (*InMemoryBackend) ModifyMigrationProject

func (b *InMemoryBackend) ModifyMigrationProject(
	ctx context.Context,
	nameOrArn, description string,
) (*MigrationProject, error)

ModifyMigrationProject updates the description of an existing migration project.

func (*InMemoryBackend) ModifyReplicationConfig

func (b *InMemoryBackend) ModifyReplicationConfig(
	ctx context.Context,
	identifierOrArn, replicationType, tableMappings, sourceEndpointArn, targetEndpointArn string,
	computeConfig *ComputeConfig,
) (*ReplicationConfig, error)

ModifyReplicationConfig updates an existing replication config. Real AWS (api_op_ModifyReplicationConfig.go) accepts ComputeConfig, TableMappings, SourceEndpointArn, and TargetEndpointArn alongside ReplicationType -- gopherstack silently dropped all four until this fix, so a real client's ModifyReplicationConfig call never actually changed anything but the replication type.

func (*InMemoryBackend) ModifyReplicationInstance

func (b *InMemoryBackend) ModifyReplicationInstance(
	ctx context.Context,
	arnOrID, class, engineVersion string,
	multiAZ, autoMinorVersionUpgrade *bool,
	allocatedStorage *int32,
	settings ReplicationInstanceSettings,
) (*ReplicationInstance, error)

ModifyReplicationInstance updates a replication instance's class and engineVersion.

func (*InMemoryBackend) ModifyReplicationSubnetGroup

func (b *InMemoryBackend) ModifyReplicationSubnetGroup(
	ctx context.Context,
	identifierOrArn, description string,
	subnetIDs []string,
) (*ReplicationSubnetGroup, error)

ModifyReplicationSubnetGroup updates a subnet group's description and subnet membership by identifier or ARN. SubnetIds is a required ModifyReplicationSubnetGroupInput member (api_op_ModifyReplicationSubnetGroup.go) that this backend previously dropped entirely -- real types.ReplicationSubnetGroup.Subnets (types.go:4135) was never populated by either Create or Modify, so a real client always saw an empty Subnets list regardless of what it requested.

func (*InMemoryBackend) ModifyReplicationTask

func (b *InMemoryBackend) ModifyReplicationTask(
	ctx context.Context,
	arnOrID, migrationType, tableMappings, replicationTaskSettings string,
	cdcSettings ReplicationTaskCDCSettings,
) (*ReplicationTask, error)

ModifyReplicationTask updates task settings. AWS does not allow modifying a running task.

func (*InMemoryBackend) MoveReplicationTask

func (b *InMemoryBackend) MoveReplicationTask(
	ctx context.Context,
	taskArnOrID, targetInstanceArn string,
) (*ReplicationTask, error)

MoveReplicationTask moves a replication task to a different instance.

func (*InMemoryBackend) PaginationSecret

func (b *InMemoryBackend) PaginationSecret() string

PaginationSecret returns the HMAC secret for pagination tokens.

func (*InMemoryBackend) RebootReplicationInstance

func (b *InMemoryBackend) RebootReplicationInstance(ctx context.Context, arnOrID string) (*ReplicationInstance, error)

RebootReplicationInstance reboots a replication instance (no-op in memory).

func (*InMemoryBackend) RefreshSchemas

func (b *InMemoryBackend) RefreshSchemas(ctx context.Context, endpointARN string) error

RefreshSchemas seeds schema discovery for an endpoint (emulates async refresh).

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the AWS region this backend is configured for.

func (*InMemoryBackend) ReloadReplicationTables added in v1.2.0

func (b *InMemoryBackend) ReloadReplicationTables(ctx context.Context, arnOrID string) (*ReplicationConfig, error)

ReloadReplicationTables reloads the target tables of a running DMS Serverless replication with source data. Real AWS only permits this while the replication is RUNNING, otherwise it throws InvalidResourceStateFault.

func (*InMemoryBackend) ReloadTables added in v1.2.0

func (b *InMemoryBackend) ReloadTables(ctx context.Context, arnOrID string) (*ReplicationTask, error)

ReloadTables reloads the target tables of a running replication task with source data. Real AWS only permits this while the task is RUNNING, otherwise it throws InvalidResourceStateFault.

func (*InMemoryBackend) RemoveTagsFromResource

func (b *InMemoryBackend) RemoveTagsFromResource(ctx context.Context, resourceArn string, tagKeys []string) error

RemoveTagsFromResource removes tags from a DMS resource by ARN.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all backend state and closes all tag registries across all regions.

func (*InMemoryBackend) Restore

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

Restore loads backend state from a JSON snapshot produced by Snapshot.

func (*InMemoryBackend) Snapshot

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

Snapshot serialises the backend state to JSON.

func (*InMemoryBackend) StartAssessmentRun

func (b *InMemoryBackend) StartAssessmentRun(
	ctx context.Context,
	taskArn, serviceAccessRoleArn, resultLocationBucket, assessmentRunName string,
) (*AssessmentRun, error)

StartAssessmentRun creates and stores a new premigration assessment run. Real AWS executes assessment runs asynchronously; this emulation synchronously completes the run (no goroutines/tickers -- matching the service's leak-free convention) with every individual assessment passing, since there is no real source/target connectivity to actually check.

func (*InMemoryBackend) StartDataMigration

func (b *InMemoryBackend) StartDataMigration(
	ctx context.Context,
	nameOrArn string,
) (*DataMigration, error)

StartDataMigration transitions a data migration to running status.

func (*InMemoryBackend) StartMetadataModelRequest

func (b *InMemoryBackend) StartMetadataModelRequest(
	ctx context.Context,
	projectIdentifier, reqType, selectionRules, propertiesDefinition string,
) (string, error)

StartMetadataModelRequest persists a metadata model operation request and returns its ID. propertiesDefinition is StartMetadataModelCreationInput's Properties.StatementProperties.Definition; callers for every other RequestType pass "".

func (*InMemoryBackend) StartRecommendation

func (b *InMemoryBackend) StartRecommendation(ctx context.Context, databaseID string) error

StartRecommendation starts the analysis for a single Fleet Advisor source database and stores a resulting target-engine recommendation, visible via DescribeRecommendations. This is the single-target counterpart of BatchStartRecommendations.

func (*InMemoryBackend) StartReplication

func (b *InMemoryBackend) StartReplication(
	ctx context.Context,
	replicationConfigArn, startReplicationType string,
) (*ReplicationConfig, error)

StartReplication starts (or resumes) the DMS Serverless replication associated with a replication config. Real AWS rejects starting a replication that is already running.

func (*InMemoryBackend) StartReplicationTask

func (b *InMemoryBackend) StartReplicationTask(ctx context.Context, arnOrID string) (*ReplicationTask, error)

StartReplicationTask transitions a replication task to running status.

func (*InMemoryBackend) StartReplicationTaskAssessment

func (b *InMemoryBackend) StartReplicationTaskAssessment(
	ctx context.Context,
	taskArn string,
) (*ReplicationTask, error)

StartReplicationTaskAssessment validates and returns the replication task for a premigration data-type assessment. Real AWS requires the task to be stopped with successful prior connection tests to both endpoints, else it throws InvalidResourceStateFault (databasemigrationservice@v1.66.4 api_op_StartReplicationTaskAssessment.go:16-23).

func (*InMemoryBackend) StopDataMigration

func (b *InMemoryBackend) StopDataMigration(
	ctx context.Context,
	nameOrArn string,
) (*DataMigration, error)

StopDataMigration transitions a data migration to stopped status.

func (*InMemoryBackend) StopReplication

func (b *InMemoryBackend) StopReplication(
	ctx context.Context,
	replicationConfigArn string,
) (*ReplicationConfig, error)

StopReplication stops the DMS Serverless replication associated with a replication config. Real AWS rejects stopping a replication that is not currently running.

func (*InMemoryBackend) StopReplicationTask

func (b *InMemoryBackend) StopReplicationTask(ctx context.Context, arnOrID string) (*ReplicationTask, error)

StopReplicationTask transitions a replication task to stopped status. Real AWS rejects stopping a task that is not currently running.

func (*InMemoryBackend) TestConnection

func (b *InMemoryBackend) TestConnection(
	ctx context.Context,
	replicationInstanceArn, endpointArn string,
) (*Connection, error)

TestConnection tests a DMS connection and records the result.

type IndividualAssessment added in v1.2.0

type IndividualAssessment struct {
	StartDate                              time.Time
	ReplicationTaskIndividualAssessmentArn string
	IndividualAssessmentName               string
	ReplicationTaskAssessmentRunArn        string
	ReplicationTaskArn                     string
	Status                                 string
}

IndividualAssessment represents one named check run as part of a premigration AssessmentRun (mirrors types.ReplicationTaskIndividualAssessment).

type InstanceProfile

type InstanceProfile struct {
	CreationTime          time.Time  `json:"creationTime"`
	Tags                  *tags.Tags `json:"-"`
	InstanceProfileName   string     `json:"instanceProfileName"`
	InstanceProfileArn    string     `json:"instanceProfileArn"`
	AvailabilityZone      string     `json:"availabilityZone,omitempty"`
	KmsKeyArn             string     `json:"kmsKeyArn,omitempty"`
	NetworkType           string     `json:"networkType,omitempty"`
	Description           string     `json:"description,omitempty"`
	SubnetGroupIdentifier string     `json:"subnetGroupIdentifier,omitempty"`
	AccountID             string     `json:"accountId"`
	Region                string     `json:"region"`
	PubliclyAccessible    bool       `json:"publiclyAccessible"`
}

InstanceProfile represents an AWS DMS instance profile.

type MetadataModelRequest

type MetadataModelRequest struct {
	RequestIdentifier          string
	MigrationProjectIdentifier string
	Status                     string
	RequestType                string
	SelectionRules             string
	Region                     string
	// PropertiesDefinition is StartMetadataModelCreationInput.Properties'
	// StatementProperties.Definition (types.go:5207) -- required only for
	// "creation" requests, always empty for other RequestTypes. Not surfaced
	// on any DescribeMetadataModel* response wire shape (types.SchemaConversionRequest
	// has no matching field, same as SelectionRules above), tracked here for
	// internal state fidelity only.
	PropertiesDefinition string
}

MetadataModelRequest tracks a metadata model operation (assessment, conversion, etc.).

Region supports Phase 3.3's store.Table keying (see store_setup.go) -- MetadataModelRequest carries no other region-derived field, so the value needs its own copy to serve as a pure store.Table/store.Index key input.

type MigrationProject

type MigrationProject struct {
	Tags                          *tags.Tags `json:"-"`
	MigrationProjectName          string
	MigrationProjectArn           string
	MigrationProjectIdentifier    string
	Description                   string
	AccountID                     string
	Region                        string
	InstanceProfileArn            string
	InstanceProfileName           string
	SourceDataProviderDescriptors []DataProviderDescriptor
	TargetDataProviderDescriptors []DataProviderDescriptor
}

MigrationProject represents a DMS migration project.

type Provider

type Provider struct{}

Provider implements service.Provider for AWS DMS.

func (*Provider) Init

Init initializes the DMS service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type Recommendation

type Recommendation struct {
	DatabaseID string
	EngineName string
	Status     string
}

Recommendation is a target-engine recommendation from Fleet Advisor.

type ReplicationConfig

type ReplicationConfig struct {
	Tags                        *tags.Tags `json:"-"`
	ComputeConfig               *ComputeConfig
	ReplicationConfigIdentifier string
	ReplicationConfigArn        string
	ReplicationType             string
	SourceEndpointArn           string
	TargetEndpointArn           string
	TableMappings               string
	AccountID                   string
	Region                      string
	// Status is the runtime status of the associated Replication resource
	// (created, running, stopped, ...). It is never surfaced on the
	// ReplicationConfig wire shape itself -- only via StartReplication /
	// StopReplication / DescribeReplications, which report on the
	// "Replication" resource, not the "ReplicationConfig" resource.
	Status string
	// StartReplicationType records the StartReplicationType passed to the
	// most recent StartReplication call (start-replication, resume-processing,
	// or reload-target), echoed back on the Replication resource.
	StartReplicationType string
}

ReplicationConfig represents a DMS replication config. ReplicationConfig also tracks the runtime state of its associated DMS Serverless "Replication" resource (Status, StartReplicationType). AWS models the replication config (returned by CreateReplicationConfig / DescribeReplicationConfigs / ModifyReplicationConfig) and the replication runtime state (returned by StartReplication / StopReplication / DescribeReplications) as two distinct API shapes, but a single config has at most one associated replication in this in-memory emulation, so the runtime fields live on the same struct rather than a separate table.

type ReplicationInstance

type ReplicationInstance struct {
	CreationTime                  time.Time  `json:"creationTime"`
	Tags                          *tags.Tags `json:"-"`
	ReplicationInstanceIdentifier string     `json:"replicationInstanceIdentifier"`
	ReplicationInstanceArn        string     `json:"replicationInstanceArn"`
	ReplicationInstanceClass      string     `json:"replicationInstanceClass"`
	EngineVersion                 string     `json:"engineVersion"`
	AvailabilityZone              string     `json:"availabilityZone"`
	ReplicationInstanceStatus     string     `json:"replicationInstanceStatus"`
	PrivateIPAddress              string     `json:"privateIpAddress"`
	AccountID                     string     `json:"accountId"`
	Region                        string     `json:"region"`
	KmsKeyID                      string     `json:"kmsKeyId,omitempty"`
	DNSNameServers                string     `json:"dnsNameServers,omitempty"`
	NetworkType                   string     `json:"networkType,omitempty"`
	PreferredMaintenanceWindow    string     `json:"preferredMaintenanceWindow,omitempty"`
	ReplicationSubnetGroupID      string     `json:"replicationSubnetGroupId,omitempty"`
	VpcSecurityGroupIDs           []string   `json:"vpcSecurityGroupIds,omitempty"`
	AllocatedStorage              int32      `json:"allocatedStorage"`
	MultiAZ                       bool       `json:"multiAZ"`
	AutoMinorVersionUpgrade       bool       `json:"autoMinorVersionUpgrade"`
	PubliclyAccessible            bool       `json:"publiclyAccessible"`
}

ReplicationInstance represents an AWS DMS replication instance.

The Tags field is backend-owned. Callers must treat the returned pointer as read-only; mutate tags only via AddTagsToResource or CreateReplicationInstance.

type ReplicationInstanceSettings added in v1.5.0

type ReplicationInstanceSettings struct {
	KmsKeyID                   string
	DNSNameServers             string
	NetworkType                string
	PreferredMaintenanceWindow string
	ReplicationSubnetGroupID   string
	ResourceIdentifier         string
	VpcSecurityGroupIDs        []string
}

ReplicationInstanceSettings carries the optional top-level ReplicationInstance settings CreateReplicationInstance/ ModifyReplicationInstance accept beyond the original identifier/class/ engineVersion/availabilityZone/allocatedStorage/multiAZ/... set -- see api_op_CreateReplicationInstance.go / api_op_ModifyReplicationInstance.go, databasemigrationservice@v1.66.4. KmsKeyID and ReplicationSubnetGroupID are create-only (neither is a ModifyReplicationInstanceInput member) and are ignored by ModifyReplicationInstance. VpcSecurityGroupIDs is accepted by both.

type ReplicationSubnetGroup

type ReplicationSubnetGroup struct {
	Tags                              *tags.Tags `json:"-"`
	ReplicationSubnetGroupIdentifier  string
	ReplicationSubnetGroupArn         string
	ReplicationSubnetGroupDescription string
	VpcID                             string
	AccountID                         string
	Region                            string
	SubnetIDs                         []string
}

ReplicationSubnetGroup represents a DMS replication subnet group.

type ReplicationTask

type ReplicationTask struct {
	CreationTime              time.Time  `json:"creationTime"`
	Tags                      *tags.Tags `json:"-"`
	ReplicationTaskIdentifier string     `json:"replicationTaskIdentifier"`
	ReplicationTaskArn        string     `json:"replicationTaskArn"`
	SourceEndpointArn         string     `json:"sourceEndpointArn"`
	TargetEndpointArn         string     `json:"targetEndpointArn"`
	ReplicationInstanceArn    string     `json:"replicationInstanceArn"`
	MigrationType             string     `json:"migrationType"`
	TableMappings             string     `json:"tableMappings,omitempty"`
	ReplicationTaskSettings   string     `json:"replicationTaskSettings,omitempty"`
	Status                    string     `json:"status"`
	AccountID                 string     `json:"accountId"`
	Region                    string     `json:"region"`
	CdcStartPosition          string     `json:"cdcStartPosition,omitempty"`
	CdcStopPosition           string     `json:"cdcStopPosition,omitempty"`
	TaskData                  string     `json:"taskData,omitempty"`
}

ReplicationTask represents an AWS DMS replication task.

The Tags field is backend-owned. Callers must treat the returned pointer as read-only; mutate tags only via AddTagsToResource or CreateReplicationTask.

type ReplicationTaskCDCSettings

type ReplicationTaskCDCSettings struct {
	CdcStartPosition   string
	CdcStopPosition    string
	TaskData           string
	ResourceIdentifier string
}

ReplicationTaskCDCSettings carries the optional CDC/task-data members CreateReplicationTask/ModifyReplicationTask accept beyond the original identifier/endpoint/instance/migrationType/tableMappings/settings set -- see api_op_CreateReplicationTask.go / api_op_ModifyReplicationTask.go, databasemigrationservice@v1.66.4. All three are also real top-level types.ReplicationTask response members (CdcStartTime is request-only, with no matching response field, and is not modeled here).

Jump to

Keyboard shortcuts

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