fsx

package
v1.2.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

FSx

Parity grade: A · SDK aws-sdk-go-v2/service/fsx@v1.66.2 · last audited 2026-07-24 (3f66c846bf7d76db6a4cc4dccd4d56face616885)

Coverage

Metric Value
Feature families 13 (13 ok)
Known gaps 5
Deferred items 0
Resource leaks clean
Known gaps
  • Delete*Output shapes (DeleteFileSystem, DeleteVolume) do not include the optional WindowsResponse/LustreResponse/OpenZFSConfiguration finalizer sub-objects (e.g. FinalBackupTags) that real AWS returns when a final backup is requested at delete time. Low traffic; not fixed this pass.
  • CreateFileSystem does not require SubnetIds (real AWS requires at least one, and exactly two for Windows/ONTAP MULTI_AZ_1 deployments). Not fixed this pass: nearly every existing test fixture across the whole package creates file systems without SubnetIds, and this emulator does not model Availability Zones, so a real per-subnet-AZ MULTI_AZ_1 validation would be more theater than substance. Flagging for a future pass that also wants to model AZs.
  • No idempotency-token (ClientRequestToken) dedup on CreateFileSystem: two calls with the same token and matching parameters should return the existing file system's description instead of creating a second one, and mismatched parameters should return IncompatibleParameterError. Not modeled -- createFileSystemInput has no ClientRequestToken field at all. Needs a bd issue for a follow-up pass (moderate scope: token->result cache with a TTL-free 'seen tokens' map).
  • InvalidRegion/InvalidNetworkSettings (malformed/cross-region subnet or security-group IDs) are not validated: this emulator does not model VPC/subnet/AZ topology at all, so there is nothing to validate a SubnetId against. Consistent with the rest of gopherstack's networking-light emulation approach; not fixed this pass.
  • ActiveDirectoryError (AD-join failures for WINDOWS/ONTAP file systems joining a directory) is not modeled: ActiveDirectoryId is accepted and echoed back but never validated against a real Directory Service resource (gopherstack's ds package). Not fixed this pass -- cross-service validation, out of scope for a single-service parity pass.

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrFileSystemNotFound is returned when a file system does not exist.
	ErrFileSystemNotFound = awserr.New(errFileSystemNotFound, awserr.ErrNotFound)
	// ErrBackupNotFound is returned when a backup does not exist.
	ErrBackupNotFound = awserr.New(errBackupNotFound, awserr.ErrConflict)
	// ErrValidation is returned on invalid input (wire code: BadRequest).
	ErrValidation = awserr.New(errValidation, awserr.ErrInvalidParameter)
	// ErrMissingFileSystemConfiguration is returned when CreateFileSystem is
	// called for WINDOWS/ONTAP/OPENZFS without the required per-type
	// configuration block (WindowsConfiguration/OntapConfiguration/
	// OpenZFSConfiguration).
	ErrMissingFileSystemConfiguration = awserr.New("MissingFileSystemConfiguration", awserr.ErrInvalidParameter)
	// ErrTagInvalid is returned when a tag key or value fails validation.
	ErrTagInvalid = awserr.New("BadRequest", awserr.ErrInvalidParameter)
	// ErrTagLimitExceeded is returned when the 50-tag-per-resource limit is exceeded.
	ErrTagLimitExceeded = awserr.New("ServiceLimitExceeded", awserr.ErrInvalidParameter)

	// ErrSnapshotNotFound is returned when a snapshot does not exist.
	ErrSnapshotNotFound = awserr.New("SnapshotNotFound", awserr.ErrNotFound)
	// ErrStorageVirtualMachineNotFound is returned when an SVM does not exist.
	ErrStorageVirtualMachineNotFound = awserr.New("StorageVirtualMachineNotFound", awserr.ErrNotFound)
	// ErrVolumeNotFound is returned when a volume does not exist.
	ErrVolumeNotFound = awserr.New("VolumeNotFound", awserr.ErrNotFound)
	// ErrFileCacheNotFound is returned when a file cache does not exist.
	ErrFileCacheNotFound = awserr.New("FileCacheNotFound", awserr.ErrNotFound)
	// ErrDataRepositoryAssociationNotFound is returned when a DRA does not exist.
	ErrDataRepositoryAssociationNotFound = awserr.New("DataRepositoryAssociationNotFound", awserr.ErrNotFound)
	// ErrDataRepositoryTaskNotFound is returned when a DRT does not exist.
	ErrDataRepositoryTaskNotFound = awserr.New("DataRepositoryTaskNotFound", awserr.ErrNotFound)
	// ErrS3AccessPointNotFound is returned when an S3 access point does not exist.
	ErrS3AccessPointNotFound = awserr.New("InvalidRequest", awserr.ErrNotFound)
	// ErrResourceNotFound is returned by the generic Tag/Untag/ListTagsForResource
	// operations when the given ResourceARN does not match any known FSx resource.
	// Real FSx uses the generic ResourceNotFound exception here, distinct from the
	// resource-type-specific *NotFound exceptions used by Describe/Delete ops.
	ErrResourceNotFound = awserr.New("ResourceNotFound", awserr.ErrNotFound)
	// ErrIncompatibleParameter is returned by CreateFileSystem when a second
	// request is received with a previously-used ClientRequestToken but
	// different parameter settings.
	ErrIncompatibleParameter = awserr.New("IncompatibleParameterError", awserr.ErrInvalidParameter)
	// ErrInvalidNetworkSettings is returned when a SubnetId/SecurityGroupId
	// supplied to CreateFileSystem doesn't match the real ID format.
	ErrInvalidNetworkSettings = awserr.New("InvalidNetworkSettings", awserr.ErrInvalidParameter)
)
View Source
var ErrNilAppContext = errors.New("fsx: nil app context")

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

Functions

This section is empty.

Types

type Backup

type Backup struct {
	CreationTime epochTime   `json:"CreationTime"`
	FileSystem   *FileSystem `json:"FileSystem,omitempty"`
	BackupID     string      `json:"BackupId"`
	BackupType   string      `json:"Type"`
	Lifecycle    string      `json:"Lifecycle"`
	ResourceARN  string      `json:"ResourceARN"`
	Tags         []Tag       `json:"Tags,omitempty"`
}

Backup represents an Amazon FSx backup. CreationTime is first so its non-pointer prefix reduces GC pointer bytes.

type DataRepositoryAssociation

type DataRepositoryAssociation struct {
	CreationTime       epochTime `json:"CreationTime"`
	AssociationID      string    `json:"AssociationId"`
	FileSystemID       string    `json:"FileSystemId"`
	FileSystemPath     string    `json:"FileSystemPath"`
	DataRepositoryPath string    `json:"DataRepositoryPath"`
	Lifecycle          string    `json:"Lifecycle"`
	ResourceARN        string    `json:"ResourceARN"`
	Tags               []Tag     `json:"Tags,omitempty"`
}

DataRepositoryAssociation links a file system path to an S3 data repository. CreationTime is first so its non-pointer prefix reduces GC pointer bytes. CreationTime uses epochTime: the real FSx deserializer requires a JSON number of epoch seconds here, not an RFC3339 string.

type DataRepositoryConfiguration

type DataRepositoryConfiguration struct {
	Lifecycle        string `json:"Lifecycle,omitempty"`
	AutoImportPolicy string `json:"AutoImportPolicy,omitempty"`
	ImportPath       string `json:"ImportPath,omitempty"`
	ExportPath       string `json:"ExportPath,omitempty"`
}

DataRepositoryConfiguration describes the data repository linkage for a Lustre file system. AWS returns this block (with a Lifecycle) on every Lustre file system, even when no S3 repository is linked.

type DataRepositoryTask

type DataRepositoryTask struct {
	CreationTime epochTime `json:"CreationTime"`
	TaskID       string    `json:"TaskId"`
	FileSystemID string    `json:"FileSystemId"`
	Type         string    `json:"Type"`
	Lifecycle    string    `json:"Lifecycle"`
	ResourceARN  string    `json:"ResourceARN"`
	Paths        []string  `json:"Paths,omitempty"`
	Tags         []Tag     `json:"Tags,omitempty"`
}

DataRepositoryTask represents a task that moves data between FSx and a data repository. CreationTime is first so its non-pointer prefix reduces GC pointer bytes. CreationTime uses epochTime: the real FSx deserializer requires a JSON number of epoch seconds here, not an RFC3339 string.

type FileCache

type FileCache struct {
	CreationTime       epochTime `json:"CreationTime"`
	FileCacheID        string    `json:"FileCacheId"`
	FileCacheType      string    `json:"FileCacheType"`
	Lifecycle          string    `json:"Lifecycle"`
	ResourceARN        string    `json:"ResourceARN"`
	Tags               []Tag     `json:"Tags,omitempty"`
	StorageCapacityGiB int32     `json:"StorageCapacityGiB,omitempty"`
}

FileCache represents an Amazon FSx file cache. CreationTime is first so its non-pointer prefix reduces GC pointer bytes. CreationTime uses epochTime: the real FSx deserializer requires a JSON number of epoch seconds here, not an RFC3339 string.

type FileSystem

type FileSystem struct {
	CreationTime         epochTime             `json:"CreationTime"`
	LustreConfiguration  *LustreConfiguration  `json:"LustreConfiguration,omitempty"`
	WindowsConfiguration *WindowsConfiguration `json:"WindowsConfiguration,omitempty"`
	OntapConfiguration   *OntapConfiguration   `json:"OntapConfiguration,omitempty"`
	OpenZFSConfiguration *OpenZFSConfiguration `json:"OpenZFSConfiguration,omitempty"`
	FileSystemID         string                `json:"FileSystemId"`
	FileSystemType       string                `json:"FileSystemType"`
	Lifecycle            string                `json:"Lifecycle"`
	ResourceARN          string                `json:"ResourceARN"`
	DNSName              string                `json:"DNSName,omitempty"`
	StorageType          string                `json:"StorageType,omitempty"`
	VpcID                string                `json:"VpcId,omitempty"`
	OwnersID             string                `json:"OwnerId,omitempty"`
	SubnetIDs            []string              `json:"SubnetIds,omitempty"`
	NetworkInterfaceIDs  []string              `json:"NetworkInterfaceIds,omitempty"`
	Tags                 []Tag                 `json:"Tags,omitempty"`
	StorageCapacityGiB   int32                 `json:"StorageCapacity,omitempty"`
}

FileSystem represents an Amazon FSx file system. CreationTime is first so its non-pointer prefix reduces GC pointer bytes.

type FileSystemAlias

type FileSystemAlias struct {
	Name      string `json:"Name"`
	Lifecycle string `json:"Lifecycle"`
}

FileSystemAlias represents an FSx file-system DNS alias.

type FileSystemEndpoint added in v1.2.0

type FileSystemEndpoint struct {
	DNSName string `json:"DNSName,omitempty"`
}

FileSystemEndpoint is a single DNS endpoint on an ONTAP file system.

type FileSystemEndpoints added in v1.2.0

type FileSystemEndpoints struct {
	Intercluster *FileSystemEndpoint `json:"Intercluster,omitempty"`
	Management   *FileSystemEndpoint `json:"Management,omitempty"`
}

FileSystemEndpoints holds the ONTAP management/intercluster endpoints used to access data or manage the file system.

type Handler

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

Handler handles FSx HTTP requests.

func NewHandler

func NewHandler(b StorageBackend) *Handler

NewHandler constructs a new Handler.

func (*Handler) ExtractOperation

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

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

func (*Handler) ExtractResource

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

ExtractResource extracts a resource identifier from the request body.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns the list of supported operations.

func (*Handler) Handler

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

Handler returns the echo handler func.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Reset

func (h *Handler) Reset()

Reset resets the backend.

func (*Handler) Restore

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

Restore restores the backend state from a snapshot. It implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

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

RouteMatcher returns a matcher that accepts FSx requests by X-Amz-Target.

func (*Handler) Snapshot

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

Snapshot returns a serialized snapshot of the backend state. It implements persistence.Persistable by delegating to the backend.

type InMemoryBackend

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

InMemoryBackend implements StorageBackend using in-memory maps.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend constructs a new InMemoryBackend.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the configured AWS account ID.

func (*InMemoryBackend) AssociateFileSystemAliases

func (b *InMemoryBackend) AssociateFileSystemAliases(fileSystemID string, aliases []string) ([]FileSystemAlias, error)

AssociateFileSystemAliases adds DNS aliases to a file system.

func (*InMemoryBackend) CancelDataRepositoryTask

func (b *InMemoryBackend) CancelDataRepositoryTask(taskID string) error

CancelDataRepositoryTask marks a task as cancelled.

func (*InMemoryBackend) CopyBackup

func (b *InMemoryBackend) CopyBackup(input *copyBackupInput) (*Backup, error)

CopyBackup creates a copy of an existing backup.

func (*InMemoryBackend) CopySnapshotAndUpdateVolume

func (b *InMemoryBackend) CopySnapshotAndUpdateVolume(input *copySnapshotAndUpdateVolumeInput) (*Volume, error)

CopySnapshotAndUpdateVolume restores a volume to the state of a snapshot.

func (*InMemoryBackend) CreateAndAttachS3AccessPoint

func (b *InMemoryBackend) CreateAndAttachS3AccessPoint(
	input *createAndAttachS3AccessPointInput,
) (*S3AccessPoint, error)

CreateAndAttachS3AccessPoint creates and attaches an S3 access point.

func (*InMemoryBackend) CreateBackup

func (b *InMemoryBackend) CreateBackup(input *createBackupInput) (*Backup, error)

CreateBackup creates a backup of the specified file system.

func (*InMemoryBackend) CreateDataRepositoryAssociation

func (b *InMemoryBackend) CreateDataRepositoryAssociation(
	input *createDataRepositoryAssociationInput,
) (*DataRepositoryAssociation, error)

CreateDataRepositoryAssociation creates a data repository association.

func (*InMemoryBackend) CreateDataRepositoryTask

func (b *InMemoryBackend) CreateDataRepositoryTask(input *createDataRepositoryTaskInput) (*DataRepositoryTask, error)

CreateDataRepositoryTask creates a data repository task.

func (*InMemoryBackend) CreateFileCache

func (b *InMemoryBackend) CreateFileCache(input *createFileCacheInput) (*FileCache, error)

CreateFileCache creates a file cache.

func (*InMemoryBackend) CreateFileSystem

func (b *InMemoryBackend) CreateFileSystem(input *createFileSystemInput) (*FileSystem, error)

CreateFileSystem creates a new file system. A non-empty ClientRequestToken makes the call idempotent: a repeat call with the same token and the same parameters returns the original file system instead of creating a second one; a repeat call with the same token but different parameters returns IncompatibleParameterError (see dedupCreateFileSystemLocked).

func (*InMemoryBackend) CreateFileSystemFromBackup

func (b *InMemoryBackend) CreateFileSystemFromBackup(input *createFileSystemFromBackupInput) (*FileSystem, error)

CreateFileSystemFromBackup creates a new file system from an existing backup.

func (*InMemoryBackend) CreateSnapshot

func (b *InMemoryBackend) CreateSnapshot(input *createSnapshotInput) (*Snapshot, error)

CreateSnapshot creates a snapshot of a volume.

func (*InMemoryBackend) CreateStorageVirtualMachine

func (b *InMemoryBackend) CreateStorageVirtualMachine(
	input *createStorageVirtualMachineInput,
) (*StorageVirtualMachine, error)

CreateStorageVirtualMachine creates an SVM on an ONTAP file system.

func (*InMemoryBackend) CreateVolume

func (b *InMemoryBackend) CreateVolume(input *createVolumeInput) (*Volume, error)

CreateVolume creates a volume.

func (*InMemoryBackend) CreateVolumeFromBackup

func (b *InMemoryBackend) CreateVolumeFromBackup(input *createVolumeFromBackupInput) (*Volume, error)

CreateVolumeFromBackup creates a volume from a backup.

func (*InMemoryBackend) DeleteBackup

func (b *InMemoryBackend) DeleteBackup(backupID string) error

DeleteBackup removes a backup.

func (*InMemoryBackend) DeleteDataRepositoryAssociation

func (b *InMemoryBackend) DeleteDataRepositoryAssociation(associationID string) error

DeleteDataRepositoryAssociation removes a data repository association.

func (*InMemoryBackend) DeleteFileCache

func (b *InMemoryBackend) DeleteFileCache(fileCacheID string) error

DeleteFileCache removes a file cache.

func (*InMemoryBackend) DeleteFileSystem

func (b *InMemoryBackend) DeleteFileSystem(fileSystemID string) error

DeleteFileSystem removes a file system, cascading to every child resource real AWS also tears down as part of file-system deletion: storage virtual machines (and, transitively, their volumes and those volumes' snapshots), directly-attached volumes (e.g. an OpenZFS root/child volume), data repository associations, and DNS aliases. Backups and data repository tasks are intentionally left alone: real AWS backups persist independently of the file system they were taken from, and data repository tasks are historical execution records.

func (*InMemoryBackend) DeleteSnapshot

func (b *InMemoryBackend) DeleteSnapshot(snapshotID string) error

DeleteSnapshot removes a snapshot.

func (*InMemoryBackend) DeleteStorageVirtualMachine

func (b *InMemoryBackend) DeleteStorageVirtualMachine(svmID string) error

DeleteStorageVirtualMachine removes an SVM.

func (*InMemoryBackend) DeleteVolume

func (b *InMemoryBackend) DeleteVolume(volumeID string) error

DeleteVolume removes a volume.

func (*InMemoryBackend) DescribeBackups

func (b *InMemoryBackend) DescribeBackups(
	backupIDs []string,
	maxResults int32,
	nextToken string,
) ([]*Backup, string, error)

DescribeBackups returns backups, optionally filtered by IDs.

func (*InMemoryBackend) DescribeDataRepositoryAssociations

func (b *InMemoryBackend) DescribeDataRepositoryAssociations(
	ids []string,
	maxResults int32,
	nextToken string,
) ([]*DataRepositoryAssociation, string, error)

DescribeDataRepositoryAssociations returns DRAs, optionally filtered by ID.

func (*InMemoryBackend) DescribeDataRepositoryTasks

func (b *InMemoryBackend) DescribeDataRepositoryTasks(
	ids []string,
	maxResults int32,
	nextToken string,
) ([]*DataRepositoryTask, string, error)

DescribeDataRepositoryTasks returns tasks, optionally filtered by ID.

func (*InMemoryBackend) DescribeFileCaches

func (b *InMemoryBackend) DescribeFileCaches(
	ids []string,
	maxResults int32,
	nextToken string,
) ([]*FileCache, string, error)

DescribeFileCaches returns file caches, optionally filtered by ID.

func (*InMemoryBackend) DescribeFileSystemAliases

func (b *InMemoryBackend) DescribeFileSystemAliases(
	fileSystemID string,
	maxResults int32,
	nextToken string,
) ([]FileSystemAlias, string, error)

DescribeFileSystemAliases returns aliases for a file system.

func (*InMemoryBackend) DescribeFileSystems

func (b *InMemoryBackend) DescribeFileSystems(
	ids []string,
	maxResults int32,
	nextToken string,
) ([]*FileSystem, string, error)

DescribeFileSystems returns file systems, optionally filtered by IDs.

func (*InMemoryBackend) DescribeS3AccessPointAttachments

func (b *InMemoryBackend) DescribeS3AccessPointAttachments(
	names []string,
	maxResults int32,
	nextToken string,
) ([]*S3AccessPoint, string, error)

DescribeS3AccessPointAttachments returns S3 access points.

func (*InMemoryBackend) DescribeSharedVpcConfiguration

func (b *InMemoryBackend) DescribeSharedVpcConfiguration() (*SharedVpcConfiguration, error)

DescribeSharedVpcConfiguration returns the shared VPC configuration.

func (*InMemoryBackend) DescribeSnapshots

func (b *InMemoryBackend) DescribeSnapshots(
	ids []string,
	maxResults int32,
	nextToken string,
) ([]*Snapshot, string, error)

DescribeSnapshots returns snapshots, optionally filtered by ID.

func (*InMemoryBackend) DescribeStorageVirtualMachines

func (b *InMemoryBackend) DescribeStorageVirtualMachines(
	ids []string,
	maxResults int32,
	nextToken string,
) ([]*StorageVirtualMachine, string, error)

DescribeStorageVirtualMachines returns SVMs, optionally filtered by ID.

func (*InMemoryBackend) DescribeVolumes

func (b *InMemoryBackend) DescribeVolumes(
	ids []string,
	maxResults int32,
	nextToken string,
) ([]*Volume, string, error)

DescribeVolumes returns volumes, optionally filtered by ID.

func (*InMemoryBackend) DetachAndDeleteS3AccessPoint

func (b *InMemoryBackend) DetachAndDeleteS3AccessPoint(name, fileSystemID string) error

DetachAndDeleteS3AccessPoint removes an S3 access point.

func (*InMemoryBackend) DisassociateFileSystemAliases

func (b *InMemoryBackend) DisassociateFileSystemAliases(
	fileSystemID string,
	aliases []string,
) ([]FileSystemAlias, error)

DisassociateFileSystemAliases removes DNS aliases from a file system.

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(resourceARN string) ([]Tag, error)

ListTagsForResource returns the tags on a resource.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the configured AWS region.

func (*InMemoryBackend) ReleaseFileSystemNfsV3Locks

func (b *InMemoryBackend) ReleaseFileSystemNfsV3Locks(fileSystemID string) error

ReleaseFileSystemNfsV3Locks releases NFS v3 locks on a file system.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all stored state.

func (*InMemoryBackend) Restore

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

Restore deserializes backend state from JSON. It implements persistence.Persistable.

func (*InMemoryBackend) RestoreVolumeFromSnapshot

func (b *InMemoryBackend) RestoreVolumeFromSnapshot(input *restoreVolumeFromSnapshotInput) (*Volume, error)

RestoreVolumeFromSnapshot restores a volume to a snapshot state.

func (*InMemoryBackend) Snapshot

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

Snapshot serializes backend state to JSON. It implements persistence.Persistable.

func (*InMemoryBackend) StartMisconfiguredStateRecovery

func (b *InMemoryBackend) StartMisconfiguredStateRecovery(fileSystemID string) error

StartMisconfiguredStateRecovery initiates recovery for a misconfigured file system.

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(resourceARN string, tags []Tag) error

TagResource adds or updates tags on a resource.

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(resourceARN string, tagKeys []string) error

UntagResource removes tags from a resource.

func (*InMemoryBackend) UpdateDataRepositoryAssociation

func (b *InMemoryBackend) UpdateDataRepositoryAssociation(
	input *updateDataRepositoryAssociationInput,
) (*DataRepositoryAssociation, error)

UpdateDataRepositoryAssociation updates a DRA's paths.

func (*InMemoryBackend) UpdateFileCache

func (b *InMemoryBackend) UpdateFileCache(input *updateFileCacheInput) (*FileCache, error)

UpdateFileCache updates a file cache.

func (*InMemoryBackend) UpdateFileSystem

func (b *InMemoryBackend) UpdateFileSystem(input *updateFileSystemInput) (*FileSystem, error)

UpdateFileSystem updates a file system's configuration.

func (*InMemoryBackend) UpdateSharedVpcConfiguration

func (b *InMemoryBackend) UpdateSharedVpcConfiguration(
	input *updateSharedVpcConfigurationInput,
) (*SharedVpcConfiguration, error)

UpdateSharedVpcConfiguration updates the shared VPC configuration.

func (*InMemoryBackend) UpdateSnapshot

func (b *InMemoryBackend) UpdateSnapshot(input *updateSnapshotInput) (*Snapshot, error)

UpdateSnapshot updates snapshot metadata.

func (*InMemoryBackend) UpdateStorageVirtualMachine

func (b *InMemoryBackend) UpdateStorageVirtualMachine(
	input *updateStorageVirtualMachineInput,
) (*StorageVirtualMachine, error)

UpdateStorageVirtualMachine updates an SVM.

func (*InMemoryBackend) UpdateVolume

func (b *InMemoryBackend) UpdateVolume(input *updateVolumeInput) (*Volume, error)

UpdateVolume updates volume metadata.

type LustreConfiguration

type LustreConfiguration struct {
	DataRepositoryConfiguration *DataRepositoryConfiguration `json:"DataRepositoryConfiguration,omitempty"`
	DeploymentType              string                       `json:"DeploymentType,omitempty"`
	DataCompressionType         string                       `json:"DataCompressionType,omitempty"`
	DriveCacheType              string                       `json:"DriveCacheType,omitempty"`
	MountName                   string                       `json:"MountName,omitempty"`
	WeeklyMaintenanceStartTime  string                       `json:"WeeklyMaintenanceStartTime,omitempty"`
	PerUnitStorageThroughput    int32                        `json:"PerUnitStorageThroughput,omitempty"`
}

LustreConfiguration describes the Lustre-specific configuration of an FSx file system. AWS always returns this block (with at least DeploymentType, MountName, and DataRepositoryConfiguration) for Lustre file systems.

type OntapConfiguration added in v1.2.0

type OntapConfiguration struct {
	Endpoints                     *FileSystemEndpoints `json:"Endpoints,omitempty"`
	DailyAutomaticBackupStartTime string               `json:"DailyAutomaticBackupStartTime,omitempty"`
	DeploymentType                string               `json:"DeploymentType,omitempty"`
	EndpointIPAddressRange        string               `json:"EndpointIpAddressRange,omitempty"`
	PreferredSubnetID             string               `json:"PreferredSubnetId,omitempty"`
	AutomaticBackupRetentionDays  int32                `json:"AutomaticBackupRetentionDays,omitempty"`
	HAPairs                       int32                `json:"HAPairs,omitempty"`
	ThroughputCapacity            int32                `json:"ThroughputCapacity,omitempty"`
	ThroughputCapacityPerHAPair   int32                `json:"ThroughputCapacityPerHAPair,omitempty"`
}

OntapConfiguration describes the FSx for NetApp ONTAP-specific configuration of an FSx file system. Real AWS always returns this block for ONTAP file systems, with at least DeploymentType populated.

type OpenZFSConfiguration added in v1.2.0

type OpenZFSConfiguration struct {
	DailyAutomaticBackupStartTime string `json:"DailyAutomaticBackupStartTime,omitempty"`
	DeploymentType                string `json:"DeploymentType,omitempty"`
	PreferredSubnetID             string `json:"PreferredSubnetId,omitempty"`
	RootVolumeID                  string `json:"RootVolumeId,omitempty"`
	WeeklyMaintenanceStartTime    string `json:"WeeklyMaintenanceStartTime,omitempty"`
	AutomaticBackupRetentionDays  int32  `json:"AutomaticBackupRetentionDays,omitempty"`
	ThroughputCapacity            int32  `json:"ThroughputCapacity,omitempty"`
	CopyTagsToBackups             bool   `json:"CopyTagsToBackups,omitempty"`
	CopyTagsToVolumes             bool   `json:"CopyTagsToVolumes,omitempty"`
}

OpenZFSConfiguration describes the FSx for OpenZFS-specific configuration of an FSx file system. Real AWS always returns this block for OPENZFS file systems, with at least DeploymentType and RootVolumeId populated.

type Provider

type Provider struct{}

Provider implements service.Provider for Amazon FSx.

func (*Provider) Init

Init initializes the FSx service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type S3AccessPoint

type S3AccessPoint struct {
	CreationTime epochTime `json:"CreationTime"`
	Name         string    `json:"Name"`
	FileSystemID string    `json:"FileSystemId"`
	VolumeID     string    `json:"VolumeId,omitempty"`
	Lifecycle    string    `json:"Lifecycle"`
	ResourceARN  string    `json:"ResourceARN"`
	Tags         []Tag     `json:"Tags,omitempty"`
}

S3AccessPoint represents an S3 access point attached to an FSx resource. CreationTime is first so its non-pointer prefix reduces GC pointer bytes. CreationTime uses epochTime: the real FSx deserializer requires a JSON number of epoch seconds here, not an RFC3339 string.

type SharedVpcConfiguration

type SharedVpcConfiguration struct {
	EnableSharedVpcOnFileSystemCreation string `json:"EnableSharedVpcOnFileSystemCreation"`
}

SharedVpcConfiguration holds the shared VPC on-file-system-creation setting.

type Snapshot

type Snapshot struct {
	CreationTime epochTime `json:"CreationTime"`
	SnapshotID   string    `json:"SnapshotId"`
	VolumeID     string    `json:"VolumeId"`
	Name         string    `json:"Name"`
	Lifecycle    string    `json:"Lifecycle"`
	ResourceARN  string    `json:"ResourceARN"`
	Tags         []Tag     `json:"Tags,omitempty"`
}

Snapshot represents an FSx ONTAP or OpenZFS snapshot. CreationTime is first so its non-pointer prefix reduces GC pointer bytes. CreationTime uses epochTime: the real FSx deserializer requires a JSON number of epoch seconds here, not an RFC3339 string.

type StorageBackend

type StorageBackend interface {
	CreateFileSystem(input *createFileSystemInput) (*FileSystem, error)
	DescribeFileSystems(ids []string, maxResults int32, nextToken string) ([]*FileSystem, string, error)
	DeleteFileSystem(fileSystemID string) error
	UpdateFileSystem(input *updateFileSystemInput) (*FileSystem, error)

	CreateBackup(input *createBackupInput) (*Backup, error)
	DescribeBackups(backupIDs []string, maxResults int32, nextToken string) ([]*Backup, string, error)
	DeleteBackup(backupID string) error
	CopyBackup(input *copyBackupInput) (*Backup, error)

	CreateFileSystemFromBackup(input *createFileSystemFromBackupInput) (*FileSystem, error)

	AssociateFileSystemAliases(fileSystemID string, aliases []string) ([]FileSystemAlias, error)
	DisassociateFileSystemAliases(fileSystemID string, aliases []string) ([]FileSystemAlias, error)
	DescribeFileSystemAliases(
		fileSystemID string,
		maxResults int32,
		nextToken string,
	) ([]FileSystemAlias, string, error)

	CreateDataRepositoryAssociation(input *createDataRepositoryAssociationInput) (*DataRepositoryAssociation, error)
	DeleteDataRepositoryAssociation(associationID string) error
	DescribeDataRepositoryAssociations(
		ids []string,
		maxResults int32,
		nextToken string,
	) ([]*DataRepositoryAssociation, string, error)
	UpdateDataRepositoryAssociation(input *updateDataRepositoryAssociationInput) (*DataRepositoryAssociation, error)

	CancelDataRepositoryTask(taskID string) error
	CreateDataRepositoryTask(input *createDataRepositoryTaskInput) (*DataRepositoryTask, error)
	DescribeDataRepositoryTasks(ids []string, maxResults int32, nextToken string) ([]*DataRepositoryTask, string, error)

	CreateFileCache(input *createFileCacheInput) (*FileCache, error)
	DeleteFileCache(fileCacheID string) error
	DescribeFileCaches(ids []string, maxResults int32, nextToken string) ([]*FileCache, string, error)
	UpdateFileCache(input *updateFileCacheInput) (*FileCache, error)

	CreateSnapshot(input *createSnapshotInput) (*Snapshot, error)
	DeleteSnapshot(snapshotID string) error
	DescribeSnapshots(ids []string, maxResults int32, nextToken string) ([]*Snapshot, string, error)
	UpdateSnapshot(input *updateSnapshotInput) (*Snapshot, error)
	CopySnapshotAndUpdateVolume(input *copySnapshotAndUpdateVolumeInput) (*Volume, error)

	CreateStorageVirtualMachine(input *createStorageVirtualMachineInput) (*StorageVirtualMachine, error)
	DeleteStorageVirtualMachine(svmID string) error
	DescribeStorageVirtualMachines(
		ids []string,
		maxResults int32,
		nextToken string,
	) ([]*StorageVirtualMachine, string, error)
	UpdateStorageVirtualMachine(input *updateStorageVirtualMachineInput) (*StorageVirtualMachine, error)

	CreateVolume(input *createVolumeInput) (*Volume, error)
	CreateVolumeFromBackup(input *createVolumeFromBackupInput) (*Volume, error)
	DeleteVolume(volumeID string) error
	DescribeVolumes(ids []string, maxResults int32, nextToken string) ([]*Volume, string, error)
	RestoreVolumeFromSnapshot(input *restoreVolumeFromSnapshotInput) (*Volume, error)
	UpdateVolume(input *updateVolumeInput) (*Volume, error)

	CreateAndAttachS3AccessPoint(input *createAndAttachS3AccessPointInput) (*S3AccessPoint, error)
	DetachAndDeleteS3AccessPoint(name, fileSystemID string) error
	DescribeS3AccessPointAttachments(
		names []string,
		maxResults int32,
		nextToken string,
	) ([]*S3AccessPoint, string, error)

	DescribeSharedVpcConfiguration() (*SharedVpcConfiguration, error)
	UpdateSharedVpcConfiguration(input *updateSharedVpcConfigurationInput) (*SharedVpcConfiguration, error)

	ReleaseFileSystemNfsV3Locks(fileSystemID string) error
	StartMisconfiguredStateRecovery(fileSystemID string) error

	TagResource(resourceARN string, tags []Tag) error
	UntagResource(resourceARN string, tagKeys []string) error
	ListTagsForResource(resourceARN string) ([]Tag, error)

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

StorageBackend is the interface for FSx storage operations.

type StorageVirtualMachine

type StorageVirtualMachine struct {
	CreationTime            epochTime `json:"CreationTime"`
	StorageVirtualMachineID string    `json:"StorageVirtualMachineId"`
	FileSystemID            string    `json:"FileSystemId"`
	Name                    string    `json:"Name"`
	Lifecycle               string    `json:"Lifecycle"`
	ResourceARN             string    `json:"ResourceARN"`
	Subtype                 string    `json:"Subtype,omitempty"`
	RootVolumeSecurityStyle string    `json:"RootVolumeSecurityStyle,omitempty"`
	Tags                    []Tag     `json:"Tags,omitempty"`
}

StorageVirtualMachine represents an FSx ONTAP Storage Virtual Machine. CreationTime is first so its non-pointer prefix reduces GC pointer bytes. CreationTime uses epochTime: the real FSx deserializer requires a JSON number of epoch seconds here, not an RFC3339 string.

type Tag

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

Tag is a key-value pair attached to an FSx resource.

type Volume

type Volume struct {
	CreationTime            epochTime `json:"CreationTime"`
	VolumeID                string    `json:"VolumeId"`
	VolumeType              string    `json:"VolumeType"`
	FileSystemID            string    `json:"FileSystemId"`
	StorageVirtualMachineID string    `json:"StorageVirtualMachineId,omitempty"`
	Name                    string    `json:"Name"`
	Lifecycle               string    `json:"Lifecycle"`
	ResourceARN             string    `json:"ResourceARN"`
	Tags                    []Tag     `json:"Tags,omitempty"`
}

Volume represents an FSx ONTAP or OpenZFS volume. CreationTime is first so its non-pointer prefix reduces GC pointer bytes. CreationTime uses epochTime: the real FSx deserializer requires a JSON number of epoch seconds here, not an RFC3339 string.

type WindowsConfiguration added in v1.2.0

type WindowsConfiguration struct {
	ActiveDirectoryID             string            `json:"ActiveDirectoryId,omitempty"`
	DailyAutomaticBackupStartTime string            `json:"DailyAutomaticBackupStartTime,omitempty"`
	DeploymentType                string            `json:"DeploymentType,omitempty"`
	PreferredSubnetID             string            `json:"PreferredSubnetId,omitempty"`
	RemoteAdministrationEndpoint  string            `json:"RemoteAdministrationEndpoint,omitempty"`
	WeeklyMaintenanceStartTime    string            `json:"WeeklyMaintenanceStartTime,omitempty"`
	Aliases                       []FileSystemAlias `json:"Aliases,omitempty"`
	AutomaticBackupRetentionDays  int32             `json:"AutomaticBackupRetentionDays,omitempty"`
	ThroughputCapacity            int32             `json:"ThroughputCapacity,omitempty"`
	CopyTagsToBackups             bool              `json:"CopyTagsToBackups,omitempty"`
}

WindowsConfiguration describes the Windows-specific configuration of an FSx file system. Real AWS always returns this block for WINDOWS file systems, with at least ThroughputCapacity and DeploymentType populated. Aliases is not populated here: the source of truth for associated DNS aliases is DescribeFileSystemAliases (see AssociateFileSystemAliases / DisassociateFileSystemAliases in file_systems.go), which every client this emulator targets already calls directly rather than reading this convenience mirror.

Jump to

Keyboard shortcuts

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