neptune

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 22 Imported by: 0

README

Neptune

Parity grade: A · SDK aws-sdk-go-v2/service/neptune@v1.44.1 · last audited 2026-07-23 (087cb59186751418d9d49b88434f13cf214c7609)

Coverage

Metric Value
Feature families 13 (13 ok)
Known gaps none
Deferred items 2
Resource leaks clean
Deferred
  • The Neptune engine-parameter catalog in parameter_catalog.go (8 parameters) is a documented, representative approximation, not a byte-for-byte mirror of AWS's real DescribeEngineDefaultParameters catalog (which is server-side data, not part of the SDK, and was not independently verified against a live Neptune account this pass) -- functionally correct (real persistence, real validation, real Describe reflection) but the exact parameter set/count may not match AWS's live catalog.
  • GlobalCluster Failover/Switchover member-promotion for a target that is neither an existing member, an ARN, nor a locally-known DB cluster identifier is a silent no-op rather than an error -- real AWS would reject an unresolvable target, but this backend has no "join global cluster" operation to have modeled a genuine not-yet-attached secondary, so it cannot distinguish that case from a typo without one.

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClusterNotFound                    = errors.New("DBClusterNotFound")
	ErrClusterAlreadyExists               = errors.New("DBClusterAlreadyExists")
	ErrInstanceNotFound                   = errors.New("DBInstanceNotFound")
	ErrInstanceAlreadyExists              = errors.New("DBInstanceAlreadyExists")
	ErrSubnetGroupNotFound                = errors.New("DBSubnetGroupNotFound")
	ErrSubnetGroupAlreadyExists           = errors.New("DBSubnetGroupAlreadyExists")
	ErrClusterParameterGroupNotFound      = errors.New("DBClusterParameterGroupNotFound")
	ErrClusterParameterGroupAlreadyExists = errors.New("DBClusterParameterGroupAlreadyExists")
	ErrClusterSnapshotNotFound            = errors.New("DBClusterSnapshotNotFound")
	ErrClusterSnapshotAlreadyExists       = errors.New("DBClusterSnapshotAlreadyExists")
	ErrParameterGroupNotFound             = errors.New("DBParameterGroupNotFound")
	ErrParameterGroupAlreadyExists        = errors.New("DBParameterGroupAlreadyExists")
	ErrClusterEndpointNotFound            = errors.New("DBClusterEndpointNotFound")
	ErrClusterEndpointAlreadyExists       = errors.New("DBClusterEndpointAlreadyExists")
	ErrSubscriptionNotFound               = errors.New("SubscriptionNotFound")
	ErrSubscriptionAlreadyExists          = errors.New("SubscriptionAlreadyExists")
	ErrGlobalClusterNotFound              = errors.New("GlobalClusterNotFound")
	ErrGlobalClusterAlreadyExists         = errors.New("GlobalClusterAlreadyExists")
	ErrInvalidParameter                   = errors.New("InvalidParameterValue")
	ErrUnknownAction                      = errors.New("InvalidAction")
	ErrInvalidDBClusterStateFault         = errors.New("InvalidDBClusterStateFault")
	ErrInvalidDBInstanceStateFault        = errors.New("InvalidDBInstanceStateFault")
	ErrInvalidDBClusterSnapshotStateFault = errors.New("InvalidDBClusterSnapshotStateFault")
	ErrSnapshotRequired                   = errors.New("InvalidParameterCombination")
)
View Source
var ErrNilAppContext = errors.New("nil AppContext passed to Neptune Provider.Init")

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

Functions

This section is empty.

Types

type DBCluster

type DBCluster struct {
	ServerlessV2ScalingConfig       *ServerlessV2ScalingConfiguration `json:"ServerlessV2ScalingConfiguration,omitempty"`
	MasterUserManagedSecret         *MasterUserManagedSecret          `json:"MasterUserManagedSecret,omitempty"`
	KmsKeyID                        string                            `json:"KmsKeyID"`
	HostedZoneID                    string                            `json:"HostedZoneId"`
	Engine                          string                            `json:"Engine"`
	EngineVersion                   string                            `json:"EngineVersion"`
	DBClusterIdentifier             string                            `json:"DBClusterIdentifier"`
	Status                          string                            `json:"Status"`
	DBClusterParameterGroupName     string                            `json:"DBClusterParameterGroupName"`
	DBSubnetGroupName               string                            `json:"DBSubnetGroupName"`
	Endpoint                        string                            `json:"Endpoint"`
	ReaderEndpoint                  string                            `json:"ReaderEndpoint"`
	PreferredBackupWindow           string                            `json:"PreferredBackupWindow"`
	PreferredMaintenanceWindow      string                            `json:"PreferredMaintenanceWindow"`
	DBClusterArn                    string                            `json:"DBClusterArn"`
	DBClusterResourceID             string                            `json:"DbClusterResourceId"`
	ClusterCreateTime               string                            `json:"ClusterCreateTime"`
	StorageType                     string                            `json:"StorageType"`
	EngineMode                      string                            `json:"EngineMode"`
	MasterUsername                  string                            `json:"MasterUsername"`
	AvailabilityZones               []string                          `json:"AvailabilityZones"`
	VpcSecurityGroupIDs             []string                          `json:"VpcSecurityGroupIds"`
	AssociatedRoles                 []string                          `json:"AssociatedRoles"`
	DBClusterMembers                []DBClusterMember                 `json:"DBClusterMembers"`
	Port                            int                               `json:"Port"`
	BackupRetentionPeriod           int                               `json:"BackupRetentionPeriod"`
	AllocatedStorage                int                               `json:"AllocatedStorage"`
	EnableIAMDatabaseAuthentication bool                              `json:"EnableIAMDatabaseAuthentication"`
	StorageEncrypted                bool                              `json:"StorageEncrypted"`
	MultiAZ                         bool                              `json:"MultiAZ"`
	DeletionProtection              bool                              `json:"DeletionProtection"`
	CopyTagsToSnapshot              bool                              `json:"CopyTagsToSnapshot"`
	// contains filtered or unexported fields
}

DBCluster represents an Amazon Neptune DB cluster.

type DBClusterCreateOptions

type DBClusterCreateOptions struct {
	ServerlessV2ScalingConfig       *ServerlessV2ScalingConfiguration
	DBSubnetGroupName               string
	StorageType                     string
	EngineVersion                   string
	EngineMode                      string
	KmsKeyID                        string
	PreferredBackupWindow           string
	MasterUsername                  string
	PreferredMaintenanceWindow      string
	AvailabilityZones               []string
	VpcSecurityGroupIDs             []string
	BackupRetentionPeriod           int
	EnableIAMDatabaseAuthentication bool
	ManageMasterUserPassword        bool
	StorageEncrypted                bool
	DeletionProtection              bool
	CopyTagsToSnapshot              bool
}

DBClusterCreateOptions holds optional fields for CreateDBCluster.

type DBClusterDeleteOptions

type DBClusterDeleteOptions struct {
	FinalDBSnapshotIdentifier string
	SkipFinalSnapshot         bool
}

DBClusterDeleteOptions holds optional fields for DeleteDBCluster.

type DBClusterEndpoint

type DBClusterEndpoint struct {
	DBClusterEndpointIdentifier         string   `json:"DBClusterEndpointIdentifier"`
	DBClusterIdentifier                 string   `json:"DBClusterIdentifier"`
	DBClusterEndpointArn                string   `json:"DBClusterEndpointArn"`
	DBClusterEndpointResourceIdentifier string   `json:"DBClusterEndpointResourceIdentifier"`
	EndpointType                        string   `json:"EndpointType"`
	CustomEndpointType                  string   `json:"CustomEndpointType"`
	Status                              string   `json:"Status"`
	Endpoint                            string   `json:"Endpoint"`
	StaticMembers                       []string `json:"StaticMembers"`
	ExcludedMembers                     []string `json:"ExcludedMembers"`
	// contains filtered or unexported fields
}

DBClusterEndpoint represents a Neptune DB cluster custom endpoint.

type DBClusterFilters

type DBClusterFilters struct {
	Engine        string
	EngineVersion string
	Status        string
}

DBClusterFilters holds filter values for DescribeDBClusters.

type DBClusterMember

type DBClusterMember struct {
	DBInstanceIdentifier string `json:"DBInstanceIdentifier"`
	IsClusterWriter      bool   `json:"IsClusterWriter"`
}

DBClusterMember represents a single DB instance member of a Neptune cluster.

type DBClusterModifyOptions

type DBClusterModifyOptions struct {
	ServerlessV2ScalingConfig       *ServerlessV2ScalingConfiguration
	EngineVersion                   string
	PreferredBackupWindow           string
	PreferredMaintenanceWindow      string
	VpcSecurityGroupIDs             []string
	BackupRetentionPeriod           int
	EnableIAMDatabaseAuthentication bool
	IamAuthSet                      bool
	ManageMasterUserPassword        bool
	DeletionProtection              bool
	DeletionProtectionSet           bool
	CopyTagsToSnapshot              bool
	CopyTagsToSnapshotSet           bool
	BackupRetentionPeriodSet        bool
}

DBClusterModifyOptions holds optional fields for ModifyDBCluster.

type DBClusterParameterGroup

type DBClusterParameterGroup struct {
	DBClusterParameterGroupName string `json:"DBClusterParameterGroupName"`
	DBClusterParameterGroupArn  string `json:"DBClusterParameterGroupArn"`
	DBParameterGroupFamily      string `json:"DBParameterGroupFamily"`
	Description                 string `json:"Description"`
	// contains filtered or unexported fields
}

DBClusterParameterGroup represents a Neptune DB cluster parameter group.

type DBClusterSnapshot

type DBClusterSnapshot struct {
	DBClusterSnapshotIdentifier string `json:"DBClusterSnapshotIdentifier"`
	DBClusterSnapshotArn        string `json:"DBClusterSnapshotArn"`
	DBClusterIdentifier         string `json:"DBClusterIdentifier"`
	Engine                      string `json:"Engine"`
	EngineVersion               string `json:"EngineVersion"`
	Status                      string `json:"Status"`
	SnapshotType                string `json:"SnapshotType"`
	SnapshotCreateTime          string `json:"SnapshotCreateTime"`
	ClusterCreateTime           string `json:"ClusterCreateTime"`
	KmsKeyID                    string `json:"KmsKeyId"`
	VpcID                       string `json:"VpcId"`
	// RestoreAttributeValues holds the account IDs (or "all") authorized to
	// copy/restore this manual snapshot via the "restore" DB cluster snapshot
	// attribute -- the only attribute Neptune's API models (see
	// ModifyDBClusterSnapshotAttribute/DescribeDBClusterSnapshotAttributes).
	RestoreAttributeValues           []string `json:"RestoreAttributeValues"`
	Port                             int      `json:"Port"`
	PercentProgress                  int      `json:"PercentProgress"`
	AllocatedStorage                 int      `json:"AllocatedStorage"`
	StorageEncrypted                 bool     `json:"StorageEncrypted"`
	IAMDatabaseAuthenticationEnabled bool     `json:"IAMDatabaseAuthenticationEnabled"`
	// contains filtered or unexported fields
}

DBClusterSnapshot represents a Neptune DB cluster snapshot.

type DBInstance

type DBInstance struct {
	DBInstanceIdentifier            string `json:"DBInstanceIdentifier"`
	DBInstanceArn                   string `json:"DBInstanceArn"`
	DBClusterIdentifier             string `json:"DBClusterIdentifier"`
	DBInstanceClass                 string `json:"DBInstanceClass"`
	Engine                          string `json:"Engine"`
	EngineVersion                   string `json:"EngineVersion"`
	DBInstanceStatus                string `json:"DBInstanceStatus"`
	InstanceCreateTime              string `json:"InstanceCreateTime"`
	Endpoint                        string `json:"Endpoint"`
	DBSubnetGroupName               string `json:"DBSubnetGroupName"`
	DBParameterGroupName            string `json:"DBParameterGroupName"`
	PreferredMaintenanceWindow      string `json:"PreferredMaintenanceWindow"`
	PreferredBackupWindow           string `json:"PreferredBackupWindow"`
	AvailabilityZone                string `json:"AvailabilityZone"`
	Port                            int    `json:"Port"`
	PromotionTier                   int    `json:"PromotionTier"`
	StorageEncrypted                bool   `json:"StorageEncrypted"`
	AutoMinorVersionUpgrade         bool   `json:"AutoMinorVersionUpgrade"`
	CopyTagsToSnapshot              bool   `json:"CopyTagsToSnapshot"`
	EnableIAMDatabaseAuthentication bool   `json:"EnableIAMDatabaseAuthentication"`
	MultiAZ                         bool   `json:"MultiAZ"`
	PubliclyAccessible              bool   `json:"PubliclyAccessible"`
	// contains filtered or unexported fields
}

DBInstance represents an Amazon Neptune DB instance.

type DBInstanceCreateOptions

type DBInstanceCreateOptions struct {
	DBParameterGroupName            string
	PreferredMaintenanceWindow      string
	PreferredBackupWindow           string
	AvailabilityZone                string
	PromotionTier                   int
	AutoMinorVersionUpgrade         bool
	CopyTagsToSnapshot              bool
	EnableIAMDatabaseAuthentication bool
	StorageEncrypted                bool
}

DBInstanceCreateOptions holds optional fields for CreateDBInstance.

type DBInstanceModifyOptions

type DBInstanceModifyOptions struct {
	DBParameterGroupName            string
	PreferredMaintenanceWindow      string
	PreferredBackupWindow           string
	AvailabilityZone                string
	PromotionTier                   int
	AutoMinorVersionUpgrade         bool
	AutoMinorVersionUpgradeSet      bool
	CopyTagsToSnapshot              bool
	CopyTagsToSnapshotSet           bool
	EnableIAMDatabaseAuthentication bool
	IamAuthSet                      bool
	PromotionTierSet                bool
}

DBInstanceModifyOptions holds optional fields for ModifyDBInstance.

type DBParameterGroup

type DBParameterGroup struct {
	DBParameterGroupName   string `json:"DBParameterGroupName"`
	DBParameterGroupArn    string `json:"DBParameterGroupArn"`
	DBParameterGroupFamily string `json:"DBParameterGroupFamily"`
	Description            string `json:"Description"`
	// contains filtered or unexported fields
}

DBParameterGroup represents a Neptune DB parameter group.

type DBSubnetGroup

type DBSubnetGroup struct {
	DBSubnetGroupName        string   `json:"DBSubnetGroupName"`
	DBSubnetGroupArn         string   `json:"DBSubnetGroupArn"`
	DBSubnetGroupDescription string   `json:"DBSubnetGroupDescription"`
	VpcID                    string   `json:"VpcID"`
	Status                   string   `json:"Status"`
	SubnetIDs                []string `json:"SubnetIDs"`
	// contains filtered or unexported fields
}

DBSubnetGroup represents a Neptune DB subnet group.

type EngineParameter added in v1.2.0

type EngineParameter struct {
	ParameterName        string `json:"ParameterName"`
	ParameterValue       string `json:"ParameterValue"`
	Description          string `json:"Description"`
	Source               string `json:"Source"`
	ApplyType            string `json:"ApplyType"`
	DataType             string `json:"DataType"`
	AllowedValues        string `json:"AllowedValues"`
	MinimumEngineVersion string `json:"MinimumEngineVersion"`
	ApplyMethod          string `json:"ApplyMethod"`
	IsModifiable         bool   `json:"IsModifiable"`
}

EngineParameter is a fully-resolved parameter description as returned by DescribeDBParameters/DescribeDBClusterParameters/ DescribeEngineDefaultParameters/DescribeEngineDefaultClusterParameters -- the static catalog definition (AllowedValues/ApplyType/DataType/ Description/IsModifiable/MinimumEngineVersion) merged with any per-group override (ParameterValue/ApplyMethod/Source).

type Event added in v1.2.0

type Event struct {
	SourceIdentifier string   `json:"SourceIdentifier"`
	SourceType       string   `json:"SourceType"`
	Message          string   `json:"Message"`
	Date             string   `json:"Date"`
	EventCategories  []string `json:"EventCategories"`
}

Event is a single account activity event as returned by DescribeEvents, recorded by recordEvent at the point of the underlying state change (see events.go).

type EventSubscription

type EventSubscription struct {
	CustSubscriptionID       string   `json:"CustSubscriptionID"`
	SnsTopicARN              string   `json:"SnsTopicARN"`
	EventSubscriptionArn     string   `json:"EventSubscriptionArn"`
	Status                   string   `json:"Status"`
	SourceType               string   `json:"SourceType"`
	SubscriptionCreationTime string   `json:"SubscriptionCreationTime"`
	SourceIDs                []string `json:"SourceIDs"`
	EventCategoriesList      []string `json:"EventCategoriesList"`
	Enabled                  bool     `json:"Enabled"`
	// contains filtered or unexported fields
}

EventSubscription represents a Neptune event subscription.

type EventsFilter added in v1.2.0

type EventsFilter struct {
	SourceIdentifier string
	SourceType       string
	StartTime        string
	EndTime          string
	EventCategories  []string
	Duration         int
}

EventsFilter holds the filter values DescribeEvents accepts.

type GlobalCluster

type GlobalCluster struct {
	GlobalClusterIdentifier string                `json:"GlobalClusterIdentifier"`
	GlobalClusterArn        string                `json:"GlobalClusterArn"`
	GlobalClusterResourceID string                `json:"GlobalClusterResourceId"`
	Status                  string                `json:"Status"`
	Engine                  string                `json:"Engine"`
	EngineVersion           string                `json:"EngineVersion"`
	GlobalClusterMembers    []GlobalClusterMember `json:"GlobalClusterMembers"`
	StorageEncrypted        bool                  `json:"StorageEncrypted"`
	DeletionProtection      bool                  `json:"DeletionProtection"`
}

GlobalCluster represents a Neptune global cluster.

type GlobalClusterMember

type GlobalClusterMember struct {
	DBClusterARN string `json:"DBClusterARN"`
	IsWriter     bool   `json:"IsWriter"`
}

GlobalClusterMember represents a member cluster in a global cluster.

type GlobalClusterModifyOptions added in v1.2.0

type GlobalClusterModifyOptions struct {
	NewGlobalClusterIdentifier string
	EngineVersion              string
	DeletionProtection         bool
	DeletionProtectionSet      bool
	AllowMajorVersionUpgrade   bool
}

GlobalClusterModifyOptions holds optional fields for ModifyGlobalCluster.

type Handler

type Handler struct {
	Backend StorageBackend
}

Handler is the Echo HTTP handler for Neptune operations.

func NewHandler

func NewHandler(backend StorageBackend) *Handler

NewHandler creates a new Neptune 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 Neptune 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 Neptune action from the request.

func (*Handler) ExtractResource

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

ExtractResource returns the DB cluster identifier from the request.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns supported Neptune operations (sorted).

func (*Handler) Handler

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

Handler returns the Echo handler function.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority for Neptune (higher than RDS to intercept Neptune requests first).

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all backend state.

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 Neptune 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 a thread-safe in-memory backend for Neptune.

Eight resource collections that were previously nested by region (outer key = region, e.g. map[string]map[string]*DBCluster) are now each a single flat *store.Table keyed by the composite "region|id" string (see store_setup.go), with a companion *store.Index grouping entries by region for per-region scans -- the same region-qualified-table pattern services/secretsmanager and services/cloudwatchlogs use. GlobalClusters are global/partition-scoped (like AWS) and were already flat, so they became a plain (non-composite-key) *store.Table. clusterRoles and tags remain raw nested maps: their values (a bare []string / []Tag) carry no identity of their own to key a store.Table by (see store_setup.go's doc comment for the full rationale).

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new in-memory Neptune backend.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the backend's AWS account ID.

func (*InMemoryBackend) AddClusterInternal

func (b *InMemoryBackend) AddClusterInternal(id string) *DBCluster

AddClusterInternal creates a cluster directly, bypassing normal validation. Used for seeding tests.

func (*InMemoryBackend) AddClusterParameterGroupInternal

func (b *InMemoryBackend) AddClusterParameterGroupInternal(
	name, family string,
) *DBClusterParameterGroup

AddClusterParameterGroupInternal creates a cluster parameter group directly. Used for seeding tests.

func (*InMemoryBackend) AddEventSubscriptionInternal

func (b *InMemoryBackend) AddEventSubscriptionInternal(
	name, snsTopicARN string,
) *EventSubscription

AddEventSubscriptionInternal creates an event subscription directly. Used for seeding tests.

func (*InMemoryBackend) AddParameterGroupInternal

func (b *InMemoryBackend) AddParameterGroupInternal(name, family string) *DBParameterGroup

AddParameterGroupInternal creates a DB parameter group directly. Used for seeding tests.

func (*InMemoryBackend) AddPendingMaintenanceActionInternal added in v1.2.0

func (b *InMemoryBackend) AddPendingMaintenanceActionInternal(
	resourceARN, action, description string,
) *PendingMaintenanceAction

AddPendingMaintenanceActionInternal queues a maintenance action for a resource, bypassing normal validation. Used for seeding tests.

func (*InMemoryBackend) AddRoleToDBCluster

func (b *InMemoryBackend) AddRoleToDBCluster(ctx context.Context, clusterID, roleARN string) error

AddRoleToDBCluster associates an IAM role with a Neptune DB cluster.

func (*InMemoryBackend) AddSnapshotInternal

func (b *InMemoryBackend) AddSnapshotInternal(snapshotID, clusterID string) *DBClusterSnapshot

AddSnapshotInternal creates a snapshot directly, bypassing normal validation. Used for seeding tests.

func (*InMemoryBackend) AddSourceIdentifierToSubscription

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

AddSourceIdentifierToSubscription adds a source identifier to an event subscription.

func (*InMemoryBackend) AddTagsToResource

func (b *InMemoryBackend) AddTagsToResource(ctx context.Context, arnStr string, tags []Tag) error

AddTagsToResource adds or updates tags on a Neptune resource. The resource's region is resolved from the ARN, falling back to the ctx region.

func (*InMemoryBackend) ApplyPendingMaintenanceAction

func (b *InMemoryBackend) ApplyPendingMaintenanceAction(
	_ context.Context, resourceID, applyAction, optInType string,
) (*ResourcePendingMaintenanceActions, error)

ApplyPendingMaintenanceAction applies (or opts in/out of) a queued maintenance action for a resource, returning that resource's current full set of pending actions -- matching AWS's ApplyPendingMaintenanceActionOutput, which always echoes ResourcePendingMaintenanceActions rather than just the one action touched. Calling Apply for a resource/action combination that was never queued (nothing was ever seeded/became eligible) is not an error -- it mirrors AWS's own opt-in semantics, where opting into a maintenance action that doesn't currently apply to the resource is a harmless no-op -- so it simply returns whatever (possibly empty) pending-action set the resource already has.

func (*InMemoryBackend) CopyDBClusterParameterGroup

func (b *InMemoryBackend) CopyDBClusterParameterGroup(
	ctx context.Context,
	sourceName, targetName, targetDescription string,
) (*DBClusterParameterGroup, error)

CopyDBClusterParameterGroup copies a Neptune DB cluster parameter group.

func (*InMemoryBackend) CopyDBClusterSnapshot

func (b *InMemoryBackend) CopyDBClusterSnapshot(
	ctx context.Context, sourceSnapshotID, targetSnapshotID string,
) (*DBClusterSnapshot, error)

CopyDBClusterSnapshot copies a Neptune DB cluster snapshot.

func (*InMemoryBackend) CopyDBParameterGroup

func (b *InMemoryBackend) CopyDBParameterGroup(
	ctx context.Context,
	sourceName, targetName, targetDescription string,
) (*DBParameterGroup, error)

CopyDBParameterGroup copies a Neptune DB parameter group.

func (*InMemoryBackend) CreateDBCluster

func (b *InMemoryBackend) CreateDBCluster(
	ctx context.Context,
	id, paramGroupName string,
	port int,
	opts DBClusterCreateOptions,
) (*DBCluster, error)

CreateDBCluster creates a new Neptune DB cluster.

func (*InMemoryBackend) CreateDBClusterEndpoint

func (b *InMemoryBackend) CreateDBClusterEndpoint(
	ctx context.Context,
	endpointID, clusterID, endpointType string,
) (*DBClusterEndpoint, error)

CreateDBClusterEndpoint creates a Neptune DB cluster custom endpoint.

func (*InMemoryBackend) CreateDBClusterParameterGroup

func (b *InMemoryBackend) CreateDBClusterParameterGroup(
	ctx context.Context,
	name, family, description string,
) (*DBClusterParameterGroup, error)

CreateDBClusterParameterGroup creates a Neptune DB cluster parameter group.

func (*InMemoryBackend) CreateDBClusterSnapshot

func (b *InMemoryBackend) CreateDBClusterSnapshot(
	ctx context.Context, snapshotID, clusterID string,
) (*DBClusterSnapshot, error)

CreateDBClusterSnapshot creates a Neptune DB cluster snapshot.

func (*InMemoryBackend) CreateDBInstance

func (b *InMemoryBackend) CreateDBInstance(
	ctx context.Context,
	id, clusterID, instanceClass string,
	opts DBInstanceCreateOptions,
) (*DBInstance, error)

CreateDBInstance creates a new Neptune DB instance.

func (*InMemoryBackend) CreateDBParameterGroup

func (b *InMemoryBackend) CreateDBParameterGroup(
	ctx context.Context, name, family, description string,
) (*DBParameterGroup, error)

CreateDBParameterGroup creates a Neptune DB parameter group.

func (*InMemoryBackend) CreateDBSubnetGroup

func (b *InMemoryBackend) CreateDBSubnetGroup(
	ctx context.Context,
	name, description, vpcID string,
	subnetIDs []string,
) (*DBSubnetGroup, error)

CreateDBSubnetGroup creates a new Neptune DB subnet group.

func (*InMemoryBackend) CreateEventSubscription

func (b *InMemoryBackend) CreateEventSubscription(
	ctx context.Context,
	name, snsTopicARN, sourceType string,
	sourceIDs []string,
	enabled bool,
) (*EventSubscription, error)

CreateEventSubscription creates a Neptune event notification subscription.

func (*InMemoryBackend) CreateGlobalCluster

func (b *InMemoryBackend) CreateGlobalCluster(
	ctx context.Context, globalClusterID, sourceDBClusterID string,
) (*GlobalCluster, error)

CreateGlobalCluster creates a Neptune global cluster. Global clusters are partition-scoped (not region-isolated), but the optional source DB cluster is looked up in the ctx region where it resides.

func (*InMemoryBackend) DeleteDBCluster

func (b *InMemoryBackend) DeleteDBCluster(
	ctx context.Context,
	id string,
	opts DBClusterDeleteOptions,
) (*DBCluster, error)

DeleteDBCluster deletes a Neptune DB cluster and all associated DB instances.

func (*InMemoryBackend) DeleteDBClusterEndpoint

func (b *InMemoryBackend) DeleteDBClusterEndpoint(
	ctx context.Context, endpointID string,
) (*DBClusterEndpoint, error)

DeleteDBClusterEndpoint deletes a Neptune DB cluster custom endpoint, returning the deleted endpoint's details -- AWS's DeleteDBClusterEndpoint response echoes them back (DeleteDBClusterEndpointResult), unlike e.g. DeleteDBSubnetGroup which has a genuinely empty output.

func (*InMemoryBackend) DeleteDBClusterParameterGroup

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

DeleteDBClusterParameterGroup deletes a Neptune DB cluster parameter group.

func (*InMemoryBackend) DeleteDBClusterSnapshot

func (b *InMemoryBackend) DeleteDBClusterSnapshot(
	ctx context.Context,
	snapshotID string,
) (*DBClusterSnapshot, error)

DeleteDBClusterSnapshot deletes a Neptune DB cluster snapshot.

func (*InMemoryBackend) DeleteDBInstance

func (b *InMemoryBackend) DeleteDBInstance(ctx context.Context, id string) (*DBInstance, error)

DeleteDBInstance deletes a Neptune DB instance.

func (*InMemoryBackend) DeleteDBParameterGroup

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

DeleteDBParameterGroup deletes a Neptune DB parameter group.

func (*InMemoryBackend) DeleteDBSubnetGroup

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

DeleteDBSubnetGroup deletes a Neptune DB subnet group.

func (*InMemoryBackend) DeleteEventSubscription

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

DeleteEventSubscription deletes a Neptune event subscription.

func (*InMemoryBackend) DeleteGlobalCluster

func (b *InMemoryBackend) DeleteGlobalCluster(
	_ context.Context,
	globalClusterID string,
) (*GlobalCluster, error)

DeleteGlobalCluster deletes a Neptune global cluster (partition-scoped).

func (*InMemoryBackend) DescribeDBClusterEndpoints

func (b *InMemoryBackend) DescribeDBClusterEndpoints(
	ctx context.Context, endpointID, clusterID string,
) ([]DBClusterEndpoint, error)

DescribeDBClusterEndpoints returns all Neptune DB cluster endpoints or a specific one.

func (*InMemoryBackend) DescribeDBClusterParameterGroups

func (b *InMemoryBackend) DescribeDBClusterParameterGroups(
	ctx context.Context, name string,
) ([]DBClusterParameterGroup, error)

DescribeDBClusterParameterGroups returns all Neptune cluster parameter groups or a specific one.

func (*InMemoryBackend) DescribeDBClusterParameters added in v1.2.0

func (b *InMemoryBackend) DescribeDBClusterParameters(
	ctx context.Context, name string,
) ([]EngineParameter, error)

DescribeDBClusterParameters returns the merged engine-default/user-override parameter list for a Neptune DB cluster parameter group.

func (*InMemoryBackend) DescribeDBClusterSnapshots

func (b *InMemoryBackend) DescribeDBClusterSnapshots(
	ctx context.Context, snapshotID, clusterID, snapshotTypeFilter string,
) ([]DBClusterSnapshot, error)

DescribeDBClusterSnapshots returns all Neptune cluster snapshots or a specific one. If clusterID is set, results are filtered to that cluster.

func (*InMemoryBackend) DescribeDBClusters

func (b *InMemoryBackend) DescribeDBClusters(
	ctx context.Context,
	id string,
	filters DBClusterFilters,
) ([]DBCluster, error)

DescribeDBClusters returns all Neptune DB clusters or a specific one. Filters (when set) restrict results to matching clusters.

func (*InMemoryBackend) DescribeDBInstances

func (b *InMemoryBackend) DescribeDBInstances(
	ctx context.Context,
	id, clusterFilter string,
) ([]DBInstance, error)

DescribeDBInstances returns all Neptune DB instances or a specific one by ID. The clusterFilter (when non-empty) restricts results to instances of that cluster.

func (*InMemoryBackend) DescribeDBParameterGroups

func (b *InMemoryBackend) DescribeDBParameterGroups(
	ctx context.Context,
	name string,
) ([]DBParameterGroup, error)

DescribeDBParameterGroups returns all Neptune DB parameter groups or a specific one.

func (*InMemoryBackend) DescribeDBParameters added in v1.2.0

func (b *InMemoryBackend) DescribeDBParameters(ctx context.Context, name string) ([]EngineParameter, error)

DescribeDBParameters returns the merged engine-default/user-override parameter list for a Neptune DB parameter group.

func (*InMemoryBackend) DescribeDBSubnetGroups

func (b *InMemoryBackend) DescribeDBSubnetGroups(
	ctx context.Context,
	name string,
) ([]DBSubnetGroup, error)

DescribeDBSubnetGroups returns all Neptune DB subnet groups or a specific one.

func (*InMemoryBackend) DescribeEventSubscriptions

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

DescribeEventSubscriptions returns all event subscriptions or a specific one.

func (*InMemoryBackend) DescribeEvents added in v1.2.0

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

DescribeEvents returns the account activity events recorded for the request's region, filtered per filter. Matches AWS's default lookback window (Duration minutes, default 60) when no explicit StartTime is given.

func (*InMemoryBackend) DescribeGlobalClusters

func (b *InMemoryBackend) DescribeGlobalClusters(_ context.Context) []GlobalCluster

DescribeGlobalClusters returns all Neptune global clusters. Global clusters are partition-scoped, so all are returned regardless of region.

func (*InMemoryBackend) DescribePendingMaintenanceActions added in v1.2.0

func (b *InMemoryBackend) DescribePendingMaintenanceActions(
	_ context.Context, resourceFilter string,
) []ResourcePendingMaintenanceActions

DescribePendingMaintenanceActions returns the pending maintenance actions for every resource that has at least one queued (resourceFilter, when non-empty, restricts results to a single resource ARN) -- AWS never includes a ResourcePendingMaintenanceActions entry with an empty PendingMaintenanceActionDetails list.

func (*InMemoryBackend) FailoverDBCluster

func (b *InMemoryBackend) FailoverDBCluster(
	ctx context.Context, id, targetInstanceID string,
) (*DBCluster, error)

FailoverDBCluster triggers a failover for a Neptune DB cluster.

func (*InMemoryBackend) FailoverGlobalCluster

func (b *InMemoryBackend) FailoverGlobalCluster(
	ctx context.Context, globalClusterID, targetDBClusterID string,
) (*GlobalCluster, error)

FailoverGlobalCluster fails a Neptune global cluster over to targetDBClusterID, promoting it to the new primary/writer -- see promoteGlobalClusterWriter for the member-promotion logic shared with SwitchoverGlobalCluster (partition-scoped, but the target is looked up in the ctx region when it names an existing DB cluster rather than an ARN).

func (*InMemoryBackend) HasTaggableResource added in v1.2.0

func (b *InMemoryBackend) HasTaggableResource(ctx context.Context, arnStr string) bool

HasTaggableResource reports whether arnStr refers to a Neptune-owned resource of a kind AddTagsToResource actually recognizes (cluster, db, cluster-snapshot, subgrp, cluster-pg -- see validateResourceARN), resolving the region exactly as AddTagsToResource does. Used exclusively by cross-service tagging (resourcegroupstaggingapi, wired in cli.go's wireTaggingNeptune) to decide whether a "rds"-namespaced ARN belongs to Neptune before claiming it: DB clusters and instances use the "neptune" ARN service exclusively (db_clusters.go:70, db_instances.go:32), but parameter groups, subnet groups, and cluster snapshots share the "rds" ARN service (cluster_parameter_groups.go:47, subnet_groups.go:41, cluster_snapshots.go:44) with the separate RDS and DocumentDB backends, so ownership can't be assumed from the service segment alone.

func (*InMemoryBackend) ListTagsForResource

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

ListTagsForResource returns the tags for a Neptune resource.

func (*InMemoryBackend) ModifyDBCluster

func (b *InMemoryBackend) ModifyDBCluster(
	ctx context.Context, id, paramGroupName string, opts DBClusterModifyOptions,
) (*DBCluster, error)

ModifyDBCluster modifies a Neptune DB cluster.

func (*InMemoryBackend) ModifyDBClusterEndpoint

func (b *InMemoryBackend) ModifyDBClusterEndpoint(
	ctx context.Context, endpointID, endpointType string, staticMembers, excludedMembers []string,
) (*DBClusterEndpoint, error)

ModifyDBClusterEndpoint modifies a Neptune DB cluster custom endpoint. staticMembers/excludedMembers replace the endpoint's respective member lists when non-nil (an explicitly-empty list, e.g. from StaticMembers.member with zero entries, is indistinguishable from "not supplied" on this query-protocol wire format -- same nil-vs-empty convention CreateDBClusterEndpoint already used for these two fields).

func (*InMemoryBackend) ModifyDBClusterParameterGroup

func (b *InMemoryBackend) ModifyDBClusterParameterGroup(
	ctx context.Context, name string, params []ParameterInput,
) (*DBClusterParameterGroup, error)

ModifyDBClusterParameterGroup applies parameter value overrides to a Neptune DB cluster parameter group -- see parameter_catalog.go for the validation/storage this now performs (previously a disguised no-op).

func (*InMemoryBackend) ModifyDBClusterSnapshotAttribute

func (b *InMemoryBackend) ModifyDBClusterSnapshotAttribute(
	ctx context.Context,
	snapshotID, attributeName string,
	valuesToAdd, valuesToRemove []string,
) (*DBClusterSnapshot, error)

ModifyDBClusterSnapshotAttribute adds and/or removes values from a Neptune DB cluster snapshot's "restore" attribute (the list of accounts authorized to copy/restore the snapshot). It returns the updated snapshot so callers can render the DBClusterSnapshotAttributesResult AWS includes in both the Modify and Describe responses.

func (*InMemoryBackend) ModifyDBInstance

func (b *InMemoryBackend) ModifyDBInstance(
	ctx context.Context,
	id, instanceClass string,
	opts DBInstanceModifyOptions,
) (*DBInstance, error)

ModifyDBInstance modifies a Neptune DB instance.

func (*InMemoryBackend) ModifyDBParameterGroup

func (b *InMemoryBackend) ModifyDBParameterGroup(
	ctx context.Context,
	name string,
	params []ParameterInput,
) (*DBParameterGroup, error)

ModifyDBParameterGroup applies parameter value overrides to a Neptune DB parameter group -- see parameter_catalog.go for the validation/storage this now performs (previously a disguised no-op: params were accepted and discarded).

func (*InMemoryBackend) ModifyDBSubnetGroup

func (b *InMemoryBackend) ModifyDBSubnetGroup(
	ctx context.Context,
	name, description string,
	subnetIDs []string,
) (*DBSubnetGroup, error)

ModifyDBSubnetGroup modifies a Neptune DB subnet group.

func (*InMemoryBackend) ModifyEventSubscription

func (b *InMemoryBackend) ModifyEventSubscription(
	ctx context.Context,
	name, snsTopicARN, sourceType, enabled string,
	eventCategories []string,
) (*EventSubscription, error)

ModifyEventSubscription modifies a Neptune event subscription.

func (*InMemoryBackend) ModifyGlobalCluster

func (b *InMemoryBackend) ModifyGlobalCluster(
	_ context.Context,
	globalClusterID string,
	opts GlobalClusterModifyOptions,
) (*GlobalCluster, error)

ModifyGlobalCluster applies deletion-protection/engine-version/rename changes to a Neptune global cluster (partition-scoped) -- previously a disguised no-op: the interface didn't even accept the new values to apply.

func (*InMemoryBackend) RebootDBInstance

func (b *InMemoryBackend) RebootDBInstance(ctx context.Context, id string) (*DBInstance, error)

RebootDBInstance reboots a Neptune DB instance.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the backend's AWS region.

func (*InMemoryBackend) RemoveFromGlobalCluster

func (b *InMemoryBackend) RemoveFromGlobalCluster(
	_ context.Context, globalClusterID, dbClusterARN string,
) (*GlobalCluster, error)

RemoveFromGlobalCluster removes a DB cluster from a Neptune global cluster (partition-scoped).

func (*InMemoryBackend) RemoveRoleFromDBCluster

func (b *InMemoryBackend) RemoveRoleFromDBCluster(
	ctx context.Context,
	clusterID, roleARN string,
) error

RemoveRoleFromDBCluster removes an IAM role association from a Neptune DB cluster.

func (*InMemoryBackend) RemoveSourceIdentifierFromSubscription

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

RemoveSourceIdentifierFromSubscription removes a source identifier from a Neptune event subscription.

func (*InMemoryBackend) RemoveTagsFromResource

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

RemoveTagsFromResource removes tags from a Neptune resource.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all backend state, returning it to a clean empty state.

It calls b.registry.ResetAll() rather than re-registering tables: registerAllTables must run exactly once, at construction (store.Register panics on a duplicate name) -- see the doc comment on registerAllTables in store_setup.go.

func (*InMemoryBackend) ResetDBClusterParameterGroup

func (b *InMemoryBackend) ResetDBClusterParameterGroup(
	ctx context.Context, name string, resetAll bool, params []ParameterInput,
) (*DBClusterParameterGroup, error)

ResetDBClusterParameterGroup resets a Neptune DB cluster parameter group's parameters to their engine-default values -- either all of them (resetAll) or only the named subset.

func (*InMemoryBackend) ResetDBParameterGroup

func (b *InMemoryBackend) ResetDBParameterGroup(
	ctx context.Context,
	name string,
	resetAll bool,
	params []ParameterInput,
) (*DBParameterGroup, error)

ResetDBParameterGroup resets a Neptune DB parameter group's parameters to their engine-default values -- either all of them (resetAll) or only the named subset.

func (*InMemoryBackend) Restore

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

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

func (*InMemoryBackend) RestoreDBClusterFromSnapshot

func (b *InMemoryBackend) RestoreDBClusterFromSnapshot(
	ctx context.Context, snapshotID, clusterID string,
) (*DBCluster, error)

RestoreDBClusterFromSnapshot restores a Neptune DB cluster from a snapshot.

func (*InMemoryBackend) RestoreDBClusterToPointInTime

func (b *InMemoryBackend) RestoreDBClusterToPointInTime(
	ctx context.Context, srcClusterID, targetClusterID string,
) (*DBCluster, error)

RestoreDBClusterToPointInTime restores a Neptune DB cluster to a point in time.

func (*InMemoryBackend) Snapshot

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

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

func (*InMemoryBackend) StartDBCluster

func (b *InMemoryBackend) StartDBCluster(ctx context.Context, id string) (*DBCluster, error)

StartDBCluster starts a stopped Neptune DB cluster.

func (*InMemoryBackend) StopDBCluster

func (b *InMemoryBackend) StopDBCluster(ctx context.Context, id string) (*DBCluster, error)

StopDBCluster stops a Neptune DB cluster.

func (*InMemoryBackend) SwitchoverGlobalCluster

func (b *InMemoryBackend) SwitchoverGlobalCluster(
	ctx context.Context, globalClusterID, targetDBClusterID string,
) (*GlobalCluster, error)

SwitchoverGlobalCluster switches a Neptune global cluster over to a new primary (partition-scoped), promoting targetDBClusterID the same way FailoverGlobalCluster does -- the two AWS operations differ in data-loss guarantees (switchover is graceful, failover is not), a distinction this synchronous in-memory backend has no failure window to model, so both perform the same real member promotion.

func (*InMemoryBackend) TaggedResources added in v1.2.0

func (b *InMemoryBackend) TaggedResources() []TaggedEntry

TaggedResources returns every Neptune resource ARN, across all regions, that currently has at least one tag.

type MasterUserManagedSecret

type MasterUserManagedSecret struct {
	SecretARN    string `json:"secretArn"`
	SecretStatus string `json:"secretStatus"`
}

MasterUserManagedSecret holds the ARN of the Secrets Manager secret for the master user password.

type ParameterInput added in v1.2.0

type ParameterInput struct {
	ParameterName  string
	ParameterValue string
	ApplyMethod    string
}

ParameterInput is a single parameter name/value/apply-method triple supplied by a caller to Modify/Reset(DBCluster)ParameterGroup.

type ParameterValue added in v1.2.0

type ParameterValue struct {
	ParameterValue string `json:"ParameterValue"`
	ApplyMethod    string `json:"ApplyMethod"`
}

ParameterValue is a single persisted parameter override applied to a DB (cluster) parameter group via ModifyDBParameterGroup/ ModifyDBClusterParameterGroup, keyed by parameter name in the backend's per-group override store (see parameter_catalog.go).

type PendingMaintenanceAction added in v1.2.0

type PendingMaintenanceAction struct {
	Action               string `json:"Action"`
	Description          string `json:"Description"`
	AutoAppliedAfterDate string `json:"AutoAppliedAfterDate"`
	CurrentApplyDate     string `json:"CurrentApplyDate"`
	ForcedApplyDate      string `json:"ForcedApplyDate"`
	OptInStatus          string `json:"OptInStatus"`
}

PendingMaintenanceAction is a single queued maintenance action for a resource (see ApplyPendingMaintenanceAction/DescribePendingMaintenanceActions).

type Provider

type Provider struct{}

Provider implements service.Provider for Neptune.

func (*Provider) Init

Init initializes the Neptune service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type ResourcePendingMaintenanceActions added in v1.2.0

type ResourcePendingMaintenanceActions struct {
	ResourceIdentifier              string                     `json:"ResourceIdentifier"`
	PendingMaintenanceActionDetails []PendingMaintenanceAction `json:"PendingMaintenanceActionDetails"`
}

ResourcePendingMaintenanceActions bundles a resource's queued maintenance actions with the resource's ARN.

type ServerlessV2ScalingConfiguration

type ServerlessV2ScalingConfiguration struct {
	MinCapacity float64 `json:"minCapacity"`
	MaxCapacity float64 `json:"maxCapacity"`
}

ServerlessV2ScalingConfiguration holds Neptune Serverless v2 capacity settings.

type StorageBackend

type StorageBackend interface {
	// Cluster operations
	CreateDBCluster(
		ctx context.Context,
		id, paramGroupName string,
		port int,
		opts DBClusterCreateOptions,
	) (*DBCluster, error)
	DescribeDBClusters(
		ctx context.Context,
		id string,
		filters DBClusterFilters,
	) ([]DBCluster, error)
	DeleteDBCluster(ctx context.Context, id string, opts DBClusterDeleteOptions) (*DBCluster, error)
	ModifyDBCluster(
		ctx context.Context,
		id, paramGroupName string,
		opts DBClusterModifyOptions,
	) (*DBCluster, error)
	StopDBCluster(ctx context.Context, id string) (*DBCluster, error)
	StartDBCluster(ctx context.Context, id string) (*DBCluster, error)
	FailoverDBCluster(ctx context.Context, id, targetInstanceID string) (*DBCluster, error)

	// Instance operations
	CreateDBInstance(
		ctx context.Context,
		id, clusterID, instanceClass string,
		opts DBInstanceCreateOptions,
	) (*DBInstance, error)
	DescribeDBInstances(ctx context.Context, id, clusterFilter string) ([]DBInstance, error)
	DeleteDBInstance(ctx context.Context, id string) (*DBInstance, error)
	ModifyDBInstance(
		ctx context.Context,
		id, instanceClass string,
		opts DBInstanceModifyOptions,
	) (*DBInstance, error)
	RebootDBInstance(ctx context.Context, id string) (*DBInstance, error)

	// Subnet group operations
	CreateDBSubnetGroup(
		ctx context.Context,
		name, description, vpcID string,
		subnetIDs []string,
	) (*DBSubnetGroup, error)
	DescribeDBSubnetGroups(ctx context.Context, name string) ([]DBSubnetGroup, error)
	DeleteDBSubnetGroup(ctx context.Context, name string) error

	// Cluster parameter group operations
	CreateDBClusterParameterGroup(
		ctx context.Context,
		name, family, description string,
	) (*DBClusterParameterGroup, error)
	DescribeDBClusterParameterGroups(
		ctx context.Context,
		name string,
	) ([]DBClusterParameterGroup, error)
	DeleteDBClusterParameterGroup(ctx context.Context, name string) error
	ModifyDBClusterParameterGroup(
		ctx context.Context,
		name string,
		params []ParameterInput,
	) (*DBClusterParameterGroup, error)

	// Cluster snapshot operations
	CreateDBClusterSnapshot(
		ctx context.Context,
		snapshotID, clusterID string,
	) (*DBClusterSnapshot, error)
	DescribeDBClusterSnapshots(
		ctx context.Context,
		snapshotID, clusterID, snapshotTypeFilter string,
	) ([]DBClusterSnapshot, error)
	DeleteDBClusterSnapshot(ctx context.Context, snapshotID string) (*DBClusterSnapshot, error)
	ModifyDBClusterSnapshotAttribute(
		ctx context.Context,
		snapshotID, attributeName string,
		valuesToAdd, valuesToRemove []string,
	) (*DBClusterSnapshot, error)

	// Tag operations
	AddTagsToResource(ctx context.Context, arn string, tags []Tag) error
	RemoveTagsFromResource(ctx context.Context, arn string, keys []string) error
	ListTagsForResource(ctx context.Context, arn string) ([]Tag, error)

	// New operations (Issue #902)
	AddRoleToDBCluster(ctx context.Context, clusterID, roleARN string) error
	AddSourceIdentifierToSubscription(
		ctx context.Context,
		name, sourceID string,
	) (*EventSubscription, error)
	ApplyPendingMaintenanceAction(
		ctx context.Context,
		resourceID, applyAction, optInType string,
	) (*ResourcePendingMaintenanceActions, error)
	DescribePendingMaintenanceActions(ctx context.Context, resourceFilter string) []ResourcePendingMaintenanceActions
	DescribeEvents(ctx context.Context, filter EventsFilter) []Event
	CopyDBClusterParameterGroup(
		ctx context.Context,
		sourceName, targetName, targetDescription string,
	) (*DBClusterParameterGroup, error)
	CopyDBClusterSnapshot(
		ctx context.Context,
		sourceSnapshotID, targetSnapshotID string,
	) (*DBClusterSnapshot, error)
	CopyDBParameterGroup(
		ctx context.Context,
		sourceName, targetName, targetDescription string,
	) (*DBParameterGroup, error)
	CreateDBClusterEndpoint(
		ctx context.Context,
		endpointID, clusterID, endpointType string,
	) (*DBClusterEndpoint, error)
	CreateDBParameterGroup(
		ctx context.Context,
		name, family, description string,
	) (*DBParameterGroup, error)
	CreateEventSubscription(
		ctx context.Context,
		name, snsTopicARN, sourceType string,
		sourceIDs []string,
		enabled bool,
	) (*EventSubscription, error)
	CreateGlobalCluster(
		ctx context.Context,
		globalClusterID, sourceDBClusterID string,
	) (*GlobalCluster, error)
	DescribeGlobalClusters(ctx context.Context) []GlobalCluster

	// Cluster endpoint operations
	DeleteDBClusterEndpoint(ctx context.Context, endpointID string) (*DBClusterEndpoint, error)
	DescribeDBClusterEndpoints(
		ctx context.Context,
		endpointID, clusterID string,
	) ([]DBClusterEndpoint, error)
	ModifyDBClusterEndpoint(
		ctx context.Context,
		endpointID, endpointType string,
		staticMembers, excludedMembers []string,
	) (*DBClusterEndpoint, error)

	// DB parameter group operations
	DeleteDBParameterGroup(ctx context.Context, name string) error
	DescribeDBParameterGroups(ctx context.Context, name string) ([]DBParameterGroup, error)
	ModifyDBParameterGroup(
		ctx context.Context, name string, params []ParameterInput,
	) (*DBParameterGroup, error)
	ResetDBParameterGroup(
		ctx context.Context, name string, resetAll bool, params []ParameterInput,
	) (*DBParameterGroup, error)
	DescribeDBParameters(ctx context.Context, name string) ([]EngineParameter, error)

	// Cluster parameter group extended operations
	ResetDBClusterParameterGroup(
		ctx context.Context, name string, resetAll bool, params []ParameterInput,
	) (*DBClusterParameterGroup, error)
	DescribeDBClusterParameters(ctx context.Context, name string) ([]EngineParameter, error)

	// Event subscription extended operations
	DeleteEventSubscription(ctx context.Context, name string) (*EventSubscription, error)
	DescribeEventSubscriptions(ctx context.Context, name string) ([]EventSubscription, error)
	ModifyEventSubscription(
		ctx context.Context,
		name, snsTopicARN, sourceType, enabled string,
		eventCategories []string,
	) (*EventSubscription, error)
	RemoveSourceIdentifierFromSubscription(
		ctx context.Context,
		name, sourceID string,
	) (*EventSubscription, error)

	// Global cluster extended operations
	DeleteGlobalCluster(ctx context.Context, globalClusterID string) (*GlobalCluster, error)
	FailoverGlobalCluster(
		ctx context.Context,
		globalClusterID, targetDBClusterID string,
	) (*GlobalCluster, error)
	ModifyGlobalCluster(
		ctx context.Context, globalClusterID string, opts GlobalClusterModifyOptions,
	) (*GlobalCluster, error)
	RemoveFromGlobalCluster(
		ctx context.Context,
		globalClusterID, dbClusterID string,
	) (*GlobalCluster, error)
	SwitchoverGlobalCluster(
		ctx context.Context,
		globalClusterID, targetDBClusterID string,
	) (*GlobalCluster, error)

	// Role operations
	RemoveRoleFromDBCluster(ctx context.Context, clusterID, roleARN string) error

	// Restore operations
	RestoreDBClusterFromSnapshot(
		ctx context.Context,
		snapshotID, clusterID string,
	) (*DBCluster, error)
	RestoreDBClusterToPointInTime(
		ctx context.Context,
		srcClusterID, targetClusterID string,
	) (*DBCluster, error)

	// Subnet group extended operations
	ModifyDBSubnetGroup(ctx context.Context, name, description string, subnetIDs []string) (*DBSubnetGroup, error)

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

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

Regional operations take a context.Context from which the target AWS region is resolved (see getRegion); same-named resources are isolated per region. Global cluster operations are partition-scoped and ignore the region.

type Tag

type Tag struct {
	Key   string `json:"Key"`
	Value string `json:"Value"`
}

Tag is a key-value pair tag.

type TaggedEntry added in v1.2.0

type TaggedEntry struct {
	Tags map[string]string
	ARN  string
}

TaggedEntry pairs a resource ARN with its tag map, for cross-service tag enumeration by the Resource Groups Tagging API (see cli.go's wireTaggingNeptune). Neptune keeps tags in a region-nested, flat ARN-keyed map (b.tags[region]arn) spanning every taggable resource kind, so this is a walk of that map across every observed region rather than one per-kind loop.

Jump to

Keyboard shortcuts

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