Documentation
¶
Index ¶
- Variables
- type AssessmentRun
- type AssessmentRunResultStatistic
- type Certificate
- type ComputeConfig
- type Connection
- type CreateReplicationConfigParams
- type DataMigration
- type DataProvider
- type DataProviderDescriptor
- type DataProviderDescriptorInput
- type DescribeFilters
- type Endpoint
- type EndpointConnectionSettings
- type Event
- type EventSubscription
- type FleetAdvisorCollector
- type FleetAdvisorDatabase
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type InMemoryBackend
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) AddDataMigrationInternal(name, migrationType string)
- func (b *InMemoryBackend) AddDataProviderInternal(name, engine string)
- func (b *InMemoryBackend) AddEndpointInternal(identifier, endpointType, engineName string)
- func (b *InMemoryBackend) AddEventSubscriptionInternal(name, snsTopicArn string)
- func (b *InMemoryBackend) AddFleetAdvisorCollectorInternal(name string)
- func (b *InMemoryBackend) AddInstanceProfileInternal(name string)
- func (b *InMemoryBackend) AddReplicationInstanceInternal(identifier, class string)
- func (b *InMemoryBackend) AddReplicationTaskInternal(identifier, srcARN, tgtARN, instARN, migrationType string)
- func (b *InMemoryBackend) AddTagsToResource(ctx context.Context, resourceArn string, kv map[string]string) error
- func (b *InMemoryBackend) ApplyPendingMaintenanceAction(ctx context.Context, replicationInstanceArn, applyAction, optInType string) (*ReplicationInstance, error)
- func (b *InMemoryBackend) BatchStartRecommendations(ctx context.Context) error
- func (b *InMemoryBackend) CancelMetadataModelConversion(ctx context.Context, migrationProjectIdentifier, requestIdentifier string) (*MetadataModelRequest, error)
- func (b *InMemoryBackend) CancelMetadataModelCreation(ctx context.Context, migrationProjectIdentifier, requestIdentifier string) (*MetadataModelRequest, error)
- func (b *InMemoryBackend) CancelReplicationTaskAssessmentRun(ctx context.Context, replicationTaskAssessmentRunArn string) error
- func (b *InMemoryBackend) CreateDataMigration(ctx context.Context, ...) (*DataMigration, error)
- func (b *InMemoryBackend) CreateDataProvider(ctx context.Context, name, engine, description string, kv map[string]string) (*DataProvider, error)
- func (b *InMemoryBackend) CreateEndpoint(ctx context.Context, ...) (*Endpoint, error)
- func (b *InMemoryBackend) CreateEventSubscription(ctx context.Context, subscriptionName, snsTopicArn, sourceType string, ...) (*EventSubscription, error)
- func (b *InMemoryBackend) CreateFleetAdvisorCollector(ctx context.Context, ...) (*FleetAdvisorCollector, error)
- func (b *InMemoryBackend) CreateInstanceProfile(ctx context.Context, ...) (*InstanceProfile, error)
- func (b *InMemoryBackend) CreateMigrationProject(ctx context.Context, name, description, instanceProfileIdentifier string, ...) (*MigrationProject, error)
- func (b *InMemoryBackend) CreateReplicationConfig(ctx context.Context, params CreateReplicationConfigParams, ...) (*ReplicationConfig, error)
- func (b *InMemoryBackend) CreateReplicationInstance(ctx context.Context, identifier, class, engineVersion, availabilityZone string, ...) (*ReplicationInstance, error)
- func (b *InMemoryBackend) CreateReplicationSubnetGroup(ctx context.Context, identifier, description, vpcID string, subnetIDs []string, ...) (*ReplicationSubnetGroup, error)
- func (b *InMemoryBackend) CreateReplicationTask(ctx context.Context, ...) (*ReplicationTask, error)
- func (b *InMemoryBackend) DeleteAssessmentRun(ctx context.Context, runArn string) (*AssessmentRun, error)
- func (b *InMemoryBackend) DeleteCertificate(ctx context.Context, identifierOrArn string) (*Certificate, error)
- func (b *InMemoryBackend) DeleteConnection(ctx context.Context, replicationInstanceArn, endpointArn string) (*Connection, error)
- func (b *InMemoryBackend) DeleteDataMigration(ctx context.Context, nameOrArn string) (*DataMigration, error)
- func (b *InMemoryBackend) DeleteDataProvider(ctx context.Context, nameOrArn string) (*DataProvider, error)
- func (b *InMemoryBackend) DeleteEndpoint(ctx context.Context, arnOrID string) (*Endpoint, error)
- func (b *InMemoryBackend) DeleteEventSubscription(ctx context.Context, name string) (*EventSubscription, error)
- func (b *InMemoryBackend) DeleteFleetAdvisorCollector(ctx context.Context, nameOrID string) error
- func (b *InMemoryBackend) DeleteFleetAdvisorDatabases(ctx context.Context, ids []string) ([]string, error)
- func (b *InMemoryBackend) DeleteInstanceProfile(ctx context.Context, nameOrArn string) error
- func (b *InMemoryBackend) DeleteMigrationProject(ctx context.Context, nameOrArn string) error
- func (b *InMemoryBackend) DeleteReplicationConfig(ctx context.Context, identifierOrArn string) error
- func (b *InMemoryBackend) DeleteReplicationInstance(ctx context.Context, arnOrID string) error
- func (b *InMemoryBackend) DeleteReplicationSubnetGroup(ctx context.Context, identifierOrArn string) error
- func (b *InMemoryBackend) DeleteReplicationTask(ctx context.Context, arnOrID string) (*ReplicationTask, error)
- func (b *InMemoryBackend) DescribeAllAssessmentResults(ctx context.Context) ([]*AssessmentRun, error)
- func (b *InMemoryBackend) DescribeAssessmentResult(ctx context.Context, taskArn string) (*AssessmentRun, error)
- func (b *InMemoryBackend) DescribeAssessmentRuns(ctx context.Context, taskArn string) ([]*AssessmentRun, error)
- func (b *InMemoryBackend) DescribeAssessmentRunsFiltered(ctx context.Context, filters DescribeFilters) ([]*AssessmentRun, error)
- func (b *InMemoryBackend) DescribeCertificates(ctx context.Context) ([]*Certificate, error)
- func (b *InMemoryBackend) DescribeConnections(ctx context.Context, filters DescribeFilters) ([]*Connection, error)
- func (b *InMemoryBackend) DescribeDataMigrations(ctx context.Context, filters DescribeFilters) ([]*DataMigration, error)
- func (b *InMemoryBackend) DescribeDataProviders(ctx context.Context, filters DescribeFilters) ([]*DataProvider, error)
- func (b *InMemoryBackend) DescribeEndpoints(ctx context.Context, filters DescribeFilters) ([]*Endpoint, error)
- func (b *InMemoryBackend) DescribeEventSubscriptions(ctx context.Context, filters DescribeFilters) ([]*EventSubscription, error)
- func (b *InMemoryBackend) DescribeEvents(ctx context.Context) ([]*Event, error)
- func (b *InMemoryBackend) DescribeFleetAdvisorCollectors(ctx context.Context) ([]*FleetAdvisorCollector, error)
- func (b *InMemoryBackend) DescribeFleetAdvisorDatabases(ctx context.Context) ([]*FleetAdvisorDatabase, error)
- func (b *InMemoryBackend) DescribeIndividualAssessments(ctx context.Context, filters DescribeFilters) ([]*IndividualAssessment, error)
- func (b *InMemoryBackend) DescribeInstanceProfiles(ctx context.Context) ([]*InstanceProfile, error)
- func (b *InMemoryBackend) DescribeMigrationProjects(ctx context.Context) ([]*MigrationProject, error)
- func (b *InMemoryBackend) DescribeRecommendations(ctx context.Context) ([]*Recommendation, error)
- func (b *InMemoryBackend) DescribeReplicationConfigs(ctx context.Context) ([]*ReplicationConfig, error)
- func (b *InMemoryBackend) DescribeReplicationInstances(ctx context.Context, filters DescribeFilters) ([]*ReplicationInstance, error)
- func (b *InMemoryBackend) DescribeReplicationSubnetGroups(ctx context.Context) ([]*ReplicationSubnetGroup, error)
- func (b *InMemoryBackend) DescribeReplicationTasks(ctx context.Context, filters DescribeFilters) ([]*ReplicationTask, error)
- func (b *InMemoryBackend) DescribeReplications(ctx context.Context, filters DescribeFilters) ([]*ReplicationConfig, error)
- func (b *InMemoryBackend) DescribeSchemas(ctx context.Context, endpointARN string) ([]string, error)
- func (b *InMemoryBackend) ImportCertificate(ctx context.Context, identifier, certPem string) (*Certificate, error)
- func (b *InMemoryBackend) ListMetadataModelRequests(ctx context.Context, projectIdentifier, reqType string) ([]*MetadataModelRequest, error)
- func (b *InMemoryBackend) ListTagsForResource(ctx context.Context, resourceArn string) (map[string]string, error)
- func (b *InMemoryBackend) ModifyDataMigration(ctx context.Context, ...) (*DataMigration, error)
- func (b *InMemoryBackend) ModifyDataProvider(ctx context.Context, nameOrArn, engine, description string) (*DataProvider, error)
- func (b *InMemoryBackend) ModifyEndpoint(ctx context.Context, ...) (*Endpoint, error)
- func (b *InMemoryBackend) ModifyEventSubscription(ctx context.Context, name string, enabled *bool) (*EventSubscription, error)
- func (b *InMemoryBackend) ModifyInstanceProfile(ctx context.Context, ...) (*InstanceProfile, error)
- func (b *InMemoryBackend) ModifyMigrationProject(ctx context.Context, nameOrArn, description string) (*MigrationProject, error)
- func (b *InMemoryBackend) ModifyReplicationConfig(ctx context.Context, ...) (*ReplicationConfig, error)
- func (b *InMemoryBackend) ModifyReplicationInstance(ctx context.Context, arnOrID, class, engineVersion string, ...) (*ReplicationInstance, error)
- func (b *InMemoryBackend) ModifyReplicationSubnetGroup(ctx context.Context, identifierOrArn, description string, subnetIDs []string) (*ReplicationSubnetGroup, error)
- func (b *InMemoryBackend) ModifyReplicationTask(ctx context.Context, ...) (*ReplicationTask, error)
- func (b *InMemoryBackend) MoveReplicationTask(ctx context.Context, taskArnOrID, targetInstanceArn string) (*ReplicationTask, error)
- func (b *InMemoryBackend) PaginationSecret() string
- func (b *InMemoryBackend) RebootReplicationInstance(ctx context.Context, arnOrID string) (*ReplicationInstance, error)
- func (b *InMemoryBackend) RefreshSchemas(ctx context.Context, endpointARN string) error
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) ReloadReplicationTables(ctx context.Context, arnOrID string) (*ReplicationConfig, error)
- func (b *InMemoryBackend) ReloadTables(ctx context.Context, arnOrID string) (*ReplicationTask, error)
- func (b *InMemoryBackend) RemoveTagsFromResource(ctx context.Context, resourceArn string, tagKeys []string) error
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartAssessmentRun(ctx context.Context, ...) (*AssessmentRun, error)
- func (b *InMemoryBackend) StartDataMigration(ctx context.Context, nameOrArn string) (*DataMigration, error)
- func (b *InMemoryBackend) StartMetadataModelRequest(ctx context.Context, ...) (string, error)
- func (b *InMemoryBackend) StartRecommendation(ctx context.Context, databaseID string) error
- func (b *InMemoryBackend) StartReplication(ctx context.Context, replicationConfigArn, startReplicationType string) (*ReplicationConfig, error)
- func (b *InMemoryBackend) StartReplicationTask(ctx context.Context, arnOrID string) (*ReplicationTask, error)
- func (b *InMemoryBackend) StartReplicationTaskAssessment(ctx context.Context, taskArn string) (*ReplicationTask, error)
- func (b *InMemoryBackend) StopDataMigration(ctx context.Context, nameOrArn string) (*DataMigration, error)
- func (b *InMemoryBackend) StopReplication(ctx context.Context, replicationConfigArn string) (*ReplicationConfig, error)
- func (b *InMemoryBackend) StopReplicationTask(ctx context.Context, arnOrID string) (*ReplicationTask, error)
- func (b *InMemoryBackend) TestConnection(ctx context.Context, replicationInstanceArn, endpointArn string) (*Connection, error)
- type IndividualAssessment
- type InstanceProfile
- type MetadataModelRequest
- type MigrationProject
- type Provider
- type Recommendation
- type ReplicationConfig
- type ReplicationInstance
- type ReplicationInstanceSettings
- type ReplicationSubnetGroup
- type ReplicationTask
- type ReplicationTaskCDCSettings
Constants ¶
This section is empty.
Variables ¶
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) )
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 ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this DMS instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the DMS operation name from the X-Amz-Target header.
func (*Handler) ExtractResource ¶
ExtractResource extracts the primary resource identifier from the request body.
func (*Handler) GetSupportedOperations ¶
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 ¶
MatchPriority returns the routing priority.
func (*Handler) Reset ¶
func (h *Handler) Reset()
Reset delegates to the backend Reset, clearing all in-memory state.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches AWS DMS requests.
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 ¶
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 ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the DMS service backend and handler.
type Recommendation ¶
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).
Source Files
¶
- assessment_runs.go
- certificates.go
- connections.go
- data_migrations.go
- data_providers.go
- endpoints.go
- errors.go
- event_subscriptions.go
- fleet_advisor.go
- handler.go
- handler_account.go
- handler_assessment_runs.go
- handler_certificates.go
- handler_connections.go
- handler_data_migrations.go
- handler_data_providers.go
- handler_endpoints.go
- handler_event_subscriptions.go
- handler_fleet_advisor.go
- handler_instance_profiles.go
- handler_maintenance.go
- handler_metadata_model.go
- handler_migration_projects.go
- handler_recommendations.go
- handler_replication_configs.go
- handler_replication_instances.go
- handler_replication_subnet_groups.go
- handler_replication_tasks.go
- handler_tags.go
- instance_profiles.go
- maintenance.go
- metadata_model.go
- migration_projects.go
- models.go
- persistence.go
- provider.go
- recommendations.go
- replication_configs.go
- replication_instances.go
- replication_subnet_groups.go
- replication_tasks.go
- store.go
- store_setup.go
- tags.go