Documentation
¶
Overview ¶
Package mq provides an in-memory stub of Amazon MQ.
Index ¶
- Constants
- Variables
- type ActionRequired
- type AvailabilityZone
- type Broker
- type BrokerEngineType
- type BrokerInstance
- type BrokerInstanceOption
- type Configuration
- type ConfigurationID
- type ConfigurationRevision
- type Configurations
- type CreateBrokerOptions
- type DataReplicationMetadata
- type EncryptionOptions
- type EngineVersion
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type InMemoryBackend
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) CreateBroker(name, deploymentMode, engineType, engineVersion, hostInstanceType string, ...) (*Broker, error)
- func (b *InMemoryBackend) CreateBrokerWithOptions(name, deploymentMode, engineType, engineVersion, hostInstanceType string, ...) (*Broker, error)
- func (b *InMemoryBackend) CreateConfiguration(name, description, engineType, engineVersion string, tags map[string]string) (*Configuration, error)
- func (b *InMemoryBackend) CreateTags(resourceARN string, tags map[string]string) error
- func (b *InMemoryBackend) CreateUser(brokerID, username, password string, groups []string, console bool) error
- func (b *InMemoryBackend) DeleteBroker(brokerID string) (*Broker, error)
- func (b *InMemoryBackend) DeleteConfiguration(configID string) error
- func (b *InMemoryBackend) DeleteTags(resourceARN string, tagKeys []string)
- func (b *InMemoryBackend) DeleteUser(brokerID, username string) error
- func (b *InMemoryBackend) DescribeBroker(brokerID string) (*Broker, error)
- func (b *InMemoryBackend) DescribeBrokerEngineTypes(engineType string) []BrokerEngineType
- func (b *InMemoryBackend) DescribeBrokerInstanceOptions(engineType, hostInstanceType, storageType string) []BrokerInstanceOption
- func (b *InMemoryBackend) DescribeConfiguration(configID string) (*Configuration, error)
- func (b *InMemoryBackend) DescribeConfigurationRevision(configID string, revision int32) (*ConfigurationRevision, string, error)
- func (b *InMemoryBackend) DescribeUser(brokerID, username string) (*User, error)
- func (b *InMemoryBackend) ListBrokers() []*Broker
- func (b *InMemoryBackend) ListConfigurationRevisions(configID string) ([]ConfigurationRevision, error)
- func (b *InMemoryBackend) ListConfigurations() []*Configuration
- func (b *InMemoryBackend) ListTags(resourceARN string) map[string]string
- func (b *InMemoryBackend) ListUsers(brokerID string) ([]UserSummary, error)
- func (b *InMemoryBackend) Promote(brokerID, mode string) (*Broker, error)
- func (b *InMemoryBackend) RebootBroker(brokerID string) error
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) UpdateBroker(brokerID, engineVersion, hostInstanceType string, ...) (*Broker, error)
- func (b *InMemoryBackend) UpdateBrokerWithOptions(brokerID, engineVersion, hostInstanceType string, ...) (*Broker, error)
- func (b *InMemoryBackend) UpdateConfiguration(configID, description, data string) (*Configuration, error)
- func (b *InMemoryBackend) UpdateUser(brokerID, username, password string, groups []string, console *bool) error
- type LdapServerMetadata
- type Logs
- type LogsSummary
- type Provider
- type StorageBackend
- type UpdateBrokerOptions
- type User
- type UserSummary
- type WeeklyStartTime
Constants ¶
const ( // BrokerStateRunning indicates an active broker. BrokerStateRunning = "RUNNING" // BrokerStateCreating indicates a broker being provisioned. BrokerStateCreating = "CREATION_IN_PROGRESS" // BrokerStateDeleting indicates a broker being removed. BrokerStateDeleting = "DELETION_IN_PROGRESS" // BrokerStateRebooting indicates a broker reboot in progress. BrokerStateRebooting = "REBOOT_IN_PROGRESS" // EngineTypeActiveMQ is the ActiveMQ engine type. EngineTypeActiveMQ = "ACTIVEMQ" // EngineTypeRabbitMQ is the RabbitMQ engine type. EngineTypeRabbitMQ = "RABBITMQ" // DeploymentModeSingleInstance is the single-instance deployment mode. DeploymentModeSingleInstance = "SINGLE_INSTANCE" // DeploymentModeActiveStandby is the active/standby multi-AZ deployment mode. DeploymentModeActiveStandby = "ACTIVE_STANDBY_MULTI_AZ" // DeploymentModeCluster is the cluster multi-AZ deployment mode (RabbitMQ). DeploymentModeCluster = "CLUSTER_MULTI_AZ" // StorageTypeEFS is the EFS storage type (ActiveMQ). AWS MQ's // BrokerStorageType enum uses the uppercase form on the wire (see // aws-sdk-go-v2/service/mq/types.BrokerStorageTypeEfs); a lowercase value // here would round-trip through JSON fine but silently fail any // client-side comparison against the SDK's typed enum constants. StorageTypeEFS = "EFS" // StorageTypeEBS is the EBS storage type (RabbitMQ). See StorageTypeEFS // for why this must match the SDK's uppercase enum value. StorageTypeEBS = "EBS" // PromoteModeFailover is the failover promote mode. PromoteModeFailover = "FAILOVER" // PromoteModeSwitchover is the switchover promote mode. PromoteModeSwitchover = "SWITCHOVER" )
Variables ¶
var ( // ErrNotFound is returned when a requested resource does not exist. ErrNotFound = awserr.New("NotFoundException", awserr.ErrNotFound) // ErrAlreadyExists is returned when a resource already exists. ErrAlreadyExists = awserr.New("ConflictException", awserr.ErrAlreadyExists) // ErrValidation is returned when a request contains an invalid parameter. ErrValidation = awserr.New("BadRequestException", awserr.ErrInvalidParameter) )
var ErrNilAppContext = errors.New("mq: nil AppContext")
ErrNilAppContext is returned when the AppContext passed to Init is nil.
Functions ¶
This section is empty.
Types ¶
type ActionRequired ¶
type ActionRequired struct {
ActionRequiredCode string `json:"actionRequiredCode,omitempty"`
ActionRequiredInfo string `json:"actionRequiredInfo,omitempty"`
}
ActionRequired describes a service-side action required on the broker.
type AvailabilityZone ¶
type AvailabilityZone struct {
Name string `json:"name"`
}
AvailabilityZone describes a single availability zone.
type Broker ¶
type Broker struct {
EncryptionOptions *EncryptionOptions `json:"encryptionOptions,omitempty"`
Users map[string]*User `json:"-"`
Configurations *Configurations `json:"configurations,omitempty"`
PendingDataReplicationMeta *DataReplicationMetadata `json:"pendingDataReplicationMetadata,omitempty"`
PendingLdapServerMetadata *LdapServerMetadata `json:"pendingLdapServerMetadata,omitempty"`
DataReplicationMetadata *DataReplicationMetadata `json:"dataReplicationMetadata,omitempty"`
Tags map[string]string `json:"-"`
LogsSummary *LogsSummary `json:"logsSummary,omitempty"`
Logs *Logs `json:"logs,omitempty"`
LdapServerMetadata *LdapServerMetadata `json:"ldapServerMetadata,omitempty"`
MaintenanceWindowStartTime *WeeklyStartTime `json:"maintenanceWindowStartTime,omitempty"`
DataReplicationMode string `json:"dataReplicationMode,omitempty"`
PendingEngineVersion string `json:"pendingEngineVersion,omitempty"`
AuthenticationStrategy string `json:"authenticationStrategy,omitempty"`
CreatorRequestID string `json:"creatorRequestId,omitempty"`
EngineVersion string `json:"engineVersion"`
PendingDataReplicationMode string `json:"pendingDataReplicationMode,omitempty"`
BrokerArn string `json:"brokerArn"`
PendingHostInstanceType string `json:"pendingHostInstanceType,omitempty"`
Created string `json:"created"`
BrokerName string `json:"brokerName"`
HostInstanceType string `json:"hostInstanceType"`
BrokerID string `json:"brokerId"`
EngineType string `json:"engineType"`
DeploymentMode string `json:"deploymentMode"`
BrokerState string `json:"brokerState"`
PendingAuthStrategy string `json:"pendingAuthenticationStrategy,omitempty"`
StorageType string `json:"storageType,omitempty"`
ActionsRequired []ActionRequired `json:"actionsRequired,omitempty"`
PendingSecurityGroups []string `json:"pendingSecurityGroups,omitempty"`
BrokerInstances []BrokerInstance `json:"brokerInstances,omitempty"`
SecurityGroups []string `json:"securityGroups,omitempty"`
SubnetIDs []string `json:"subnetIds,omitempty"`
PubliclyAccessible bool `json:"publiclyAccessible"`
AutoMinorVersionUpgrade bool `json:"autoMinorVersionUpgrade"`
}
Broker represents an Amazon MQ broker.
type BrokerEngineType ¶
type BrokerEngineType struct {
EngineType string `json:"engineType"`
EngineVersions []EngineVersion `json:"engineVersions"`
}
BrokerEngineType describes an engine type and its available versions.
type BrokerInstance ¶
type BrokerInstance struct {
ConsoleURL string `json:"consoleURL"`
Endpoints []string `json:"endpoints"`
}
BrokerInstance holds endpoint information for a broker instance.
type BrokerInstanceOption ¶
type BrokerInstanceOption struct {
EngineType string `json:"engineType"`
HostInstanceType string `json:"hostInstanceType"`
StorageType string `json:"storageType"`
AvailabilityZones []AvailabilityZone `json:"availabilityZones"`
SupportedEngineVersions []string `json:"supportedEngineVersions"`
SupportedDeploymentModes []string `json:"supportedDeploymentModes"`
}
BrokerInstanceOption describes a broker host instance type and its options.
type Configuration ¶
type Configuration struct {
Tags map[string]string `json:"-"`
Data map[int32]string `json:"-"`
LatestRevision *ConfigurationRevision `json:"latestRevision"`
Arn string `json:"arn"`
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
EngineType string `json:"engineType"`
EngineVersion string `json:"engineVersion"`
Created string `json:"created"`
Revisions []ConfigurationRevision `json:"-"`
}
Configuration represents an Amazon MQ configuration.
type ConfigurationID ¶
ConfigurationID holds a reference to a broker configuration.
type ConfigurationRevision ¶
type ConfigurationRevision struct {
Created string `json:"created"`
Description string `json:"description,omitempty"`
Revision int32 `json:"revision"`
}
ConfigurationRevision holds revision metadata for a configuration.
type Configurations ¶
type Configurations struct {
Current *ConfigurationID `json:"current,omitempty"`
Pending *ConfigurationID `json:"pending,omitempty"`
History []ConfigurationID `json:"history,omitempty"`
}
Configurations holds pending and current configuration references.
type CreateBrokerOptions ¶
type CreateBrokerOptions struct {
Configuration *ConfigurationID
EncryptionOptions *EncryptionOptions
MaintenanceWindowStartTime *WeeklyStartTime
LdapServerMetadata *LdapServerMetadata
Logs *Logs
StorageType string
AuthenticationStrategy string
CreatorRequestID string
}
CreateBrokerOptions carries optional configuration for CreateBrokerWithOptions. Zero values are ignored and treated as "not specified".
type DataReplicationMetadata ¶
type DataReplicationMetadata struct {
DataReplicationCounterpart string `json:"dataReplicationCounterpart,omitempty"`
DataReplicationRole string `json:"dataReplicationRole,omitempty"`
}
DataReplicationMetadata describes an active CRDR (cross-region disaster recovery) link.
type EncryptionOptions ¶
type EncryptionOptions struct {
KMSKeyID string `json:"kmsKeyId,omitempty"`
UseAWSOwnedKey bool `json:"useAwsOwnedKey"`
}
EncryptionOptions configures KMS encryption for an Amazon MQ broker.
type EngineVersion ¶
type EngineVersion struct {
Name string `json:"name"`
}
EngineVersion holds a single engine version entry.
type Handler ¶
type Handler struct {
Backend StorageBackend
}
Handler is the Echo HTTP handler for Amazon MQ REST operations.
func NewHandler ¶
func NewHandler(backend StorageBackend) *Handler
NewHandler creates a new Amazon MQ handler.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this handler instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation returns the operation name from the request.
func (*Handler) ExtractResource ¶
ExtractResource extracts a resource ID from the request path.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns the list of supported operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches Amazon MQ REST API requests. MQ uses /v1/brokers, and MQ-signed /v1/configurations and /v1/tags paths.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend stores Amazon MQ state in memory.
func NewInMemoryBackend ¶
func NewInMemoryBackend(accountID, region string) *InMemoryBackend
NewInMemoryBackend creates a new in-memory Amazon MQ backend.
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the account ID configured for this backend.
func (*InMemoryBackend) CreateBroker ¶
func (b *InMemoryBackend) CreateBroker( name, deploymentMode, engineType, engineVersion, hostInstanceType string, publiclyAccessible, autoMinorVersionUpgrade bool, securityGroups, subnetIDs []string, users []*User, tags map[string]string, ) (*Broker, error)
CreateBroker creates a new Amazon MQ broker (compatibility wrapper).
func (*InMemoryBackend) CreateBrokerWithOptions ¶
func (b *InMemoryBackend) CreateBrokerWithOptions( name, deploymentMode, engineType, engineVersion, hostInstanceType string, publiclyAccessible, autoMinorVersionUpgrade bool, securityGroups, subnetIDs []string, users []*User, tags map[string]string, opts *CreateBrokerOptions, ) (*Broker, error)
func (*InMemoryBackend) CreateConfiguration ¶
func (b *InMemoryBackend) CreateConfiguration( name, description, engineType, engineVersion string, tags map[string]string, ) (*Configuration, error)
CreateConfiguration creates a new Amazon MQ configuration.
func (*InMemoryBackend) CreateTags ¶
func (b *InMemoryBackend) CreateTags(resourceARN string, tags map[string]string) error
CreateTags adds or updates tags for a resource ARN. Note: b.tags[arn] and the corresponding broker/config Tags field share the same map pointer, so a single write here updates both automatically.
func (*InMemoryBackend) CreateUser ¶
func (b *InMemoryBackend) CreateUser(brokerID, username, password string, groups []string, console bool) error
CreateUser creates a user on a broker.
func (*InMemoryBackend) DeleteBroker ¶
func (b *InMemoryBackend) DeleteBroker(brokerID string) (*Broker, error)
DeleteBroker transitions a broker to DELETION_IN_PROGRESS and returns its identifiers. The broker is fully removed from the map on the next DescribeBroker / ListBrokers call via promoteDeletingToDeleted.
func (*InMemoryBackend) DeleteConfiguration ¶
func (b *InMemoryBackend) DeleteConfiguration(configID string) error
DeleteConfiguration removes a configuration by ID.
func (*InMemoryBackend) DeleteTags ¶
func (b *InMemoryBackend) DeleteTags(resourceARN string, tagKeys []string)
DeleteTags removes the specified tag keys from a resource ARN. Note: b.tags[arn] and the corresponding broker/config Tags field share the same map pointer, so a single delete here updates both automatically.
func (*InMemoryBackend) DeleteUser ¶
func (b *InMemoryBackend) DeleteUser(brokerID, username string) error
DeleteUser removes a user from a broker.
func (*InMemoryBackend) DescribeBroker ¶
func (b *InMemoryBackend) DescribeBroker(brokerID string) (*Broker, error)
DescribeBroker returns a broker by ID or name.
func (*InMemoryBackend) DescribeBrokerEngineTypes ¶
func (b *InMemoryBackend) DescribeBrokerEngineTypes(engineType string) []BrokerEngineType
DescribeBrokerEngineTypes returns supported broker engine types and versions. If engineType is non-empty, the result is filtered to that engine type.
func (*InMemoryBackend) DescribeBrokerInstanceOptions ¶
func (b *InMemoryBackend) DescribeBrokerInstanceOptions( engineType, hostInstanceType, storageType string, ) []BrokerInstanceOption
DescribeBrokerInstanceOptions returns broker instance options. Filters are optional; empty string means no filter applied.
func (*InMemoryBackend) DescribeConfiguration ¶
func (b *InMemoryBackend) DescribeConfiguration(configID string) (*Configuration, error)
DescribeConfiguration returns a configuration by ID.
func (*InMemoryBackend) DescribeConfigurationRevision ¶
func (b *InMemoryBackend) DescribeConfigurationRevision( configID string, revision int32, ) (*ConfigurationRevision, string, error)
DescribeConfigurationRevision returns a specific revision of a configuration.
func (*InMemoryBackend) DescribeUser ¶
func (b *InMemoryBackend) DescribeUser(brokerID, username string) (*User, error)
DescribeUser returns a user from a broker.
func (*InMemoryBackend) ListBrokers ¶
func (b *InMemoryBackend) ListBrokers() []*Broker
ListBrokers returns all brokers sorted by name.
func (*InMemoryBackend) ListConfigurationRevisions ¶
func (b *InMemoryBackend) ListConfigurationRevisions(configID string) ([]ConfigurationRevision, error)
ListConfigurationRevisions returns all revisions for a configuration.
func (*InMemoryBackend) ListConfigurations ¶
func (b *InMemoryBackend) ListConfigurations() []*Configuration
ListConfigurations returns all configurations sorted by name.
func (*InMemoryBackend) ListTags ¶
func (b *InMemoryBackend) ListTags(resourceARN string) map[string]string
ListTags returns tags for a resource ARN.
func (*InMemoryBackend) ListUsers ¶
func (b *InMemoryBackend) ListUsers(brokerID string) ([]UserSummary, error)
ListUsers returns all users for a broker.
func (*InMemoryBackend) Promote ¶
func (b *InMemoryBackend) Promote(brokerID, mode string) (*Broker, error)
Promote promotes a standby broker to the primary role. In the in-memory stub this is a no-op that validates the broker exists.
func (*InMemoryBackend) RebootBroker ¶
func (b *InMemoryBackend) RebootBroker(brokerID string) error
RebootBroker simulates a broker reboot. The broker transitions to REBOOT_IN_PROGRESS once, then is restored to RUNNING on the next DescribeBroker / ListBrokers call so callers can observe the transition.
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the region configured for this backend.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all backend state, preserving only the account ID and region.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON.
func (*InMemoryBackend) UpdateBroker ¶
func (b *InMemoryBackend) UpdateBroker( brokerID, engineVersion, hostInstanceType string, autoMinorVersionUpgrade *bool, securityGroups []string, ) (*Broker, error)
UpdateBroker updates mutable broker fields (compatibility wrapper).
func (*InMemoryBackend) UpdateBrokerWithOptions ¶
func (b *InMemoryBackend) UpdateBrokerWithOptions( brokerID, engineVersion, hostInstanceType string, autoMinorVersionUpgrade *bool, securityGroups []string, opts *UpdateBrokerOptions, ) (*Broker, error)
UpdateBrokerWithOptions updates mutable broker fields including optional extended fields.
func (*InMemoryBackend) UpdateConfiguration ¶
func (b *InMemoryBackend) UpdateConfiguration(configID, description, data string) (*Configuration, error)
UpdateConfiguration updates a configuration (creates a new revision).
func (*InMemoryBackend) UpdateUser ¶
func (b *InMemoryBackend) UpdateUser(brokerID, username, password string, groups []string, console *bool) error
UpdateUser updates a broker user.
type LdapServerMetadata ¶
type LdapServerMetadata struct {
RoleBase string `json:"roleBase,omitempty"`
RoleName string `json:"roleName,omitempty"`
RoleSearchMatching string `json:"roleSearchMatching,omitempty"`
UserBase string `json:"userBase,omitempty"`
UserRoleName string `json:"userRoleName,omitempty"`
UserSearchMatching string `json:"userSearchMatching,omitempty"`
ServiceAccountUsername string `json:"serviceAccountUsername,omitempty"`
ServiceAccountPassword string `json:"-"`
Hosts []string `json:"hosts,omitempty"`
RoleSearchSubtree bool `json:"roleSearchSubtree"`
UserSearchSubtree bool `json:"userSearchSubtree"`
}
LdapServerMetadata configures LDAP authentication for a broker.
type LogsSummary ¶
type LogsSummary struct {
Pending *Logs `json:"pending,omitempty"`
GeneralLogGroup string `json:"generalLogGroup,omitempty"`
AuditLogGroup string `json:"auditLogGroup,omitempty"`
General bool `json:"general"`
Audit bool `json:"audit"`
}
LogsSummary holds the configured logs plus their resolved log group ARNs.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for Amazon MQ.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the Amazon MQ backend and handler.
type StorageBackend ¶
type StorageBackend interface {
// Broker operations
CreateBroker(
name, deploymentMode, engineType, engineVersion, hostInstanceType string,
publiclyAccessible, autoMinorVersionUpgrade bool,
securityGroups, subnetIDs []string,
users []*User,
tags map[string]string,
) (*Broker, error)
CreateBrokerWithOptions(
name, deploymentMode, engineType, engineVersion, hostInstanceType string,
publiclyAccessible, autoMinorVersionUpgrade bool,
securityGroups, subnetIDs []string,
users []*User,
tags map[string]string,
opts *CreateBrokerOptions,
) (*Broker, error)
DescribeBroker(brokerID string) (*Broker, error)
ListBrokers() []*Broker
UpdateBroker(
brokerID, engineVersion, hostInstanceType string,
autoMinorVersionUpgrade *bool,
securityGroups []string,
) (*Broker, error)
UpdateBrokerWithOptions(
brokerID, engineVersion, hostInstanceType string,
autoMinorVersionUpgrade *bool,
securityGroups []string,
opts *UpdateBrokerOptions,
) (*Broker, error)
DeleteBroker(brokerID string) (*Broker, error)
RebootBroker(brokerID string) error
Promote(brokerID, mode string) (*Broker, error)
// User operations
CreateUser(brokerID, username, password string, groups []string, console bool) error
DescribeUser(brokerID, username string) (*User, error)
UpdateUser(brokerID, username, password string, groups []string, console *bool) error
DeleteUser(brokerID, username string) error
ListUsers(brokerID string) ([]UserSummary, error)
// Configuration operations
CreateConfiguration(
name, description, engineType, engineVersion string,
tags map[string]string,
) (*Configuration, error)
DescribeConfiguration(configID string) (*Configuration, error)
ListConfigurations() []*Configuration
UpdateConfiguration(configID, description, data string) (*Configuration, error)
DeleteConfiguration(configID string) error
// Configuration revision operations
DescribeConfigurationRevision(configID string, revision int32) (*ConfigurationRevision, string, error)
ListConfigurationRevisions(configID string) ([]ConfigurationRevision, error)
// Broker metadata operations
DescribeBrokerEngineTypes(engineType string) []BrokerEngineType
DescribeBrokerInstanceOptions(engineType, hostInstanceType, storageType string) []BrokerInstanceOption
// Tag operations
ListTags(resourceARN string) map[string]string
CreateTags(resourceARN string, tags map[string]string) error
DeleteTags(resourceARN string, tagKeys []string)
// Lifecycle
Reset()
Region() string
AccountID() string
Snapshot(ctx context.Context) []byte
Restore(ctx context.Context, data []byte) error
}
StorageBackend defines the interface for the Amazon MQ in-memory backend. All mutating methods must be safe for concurrent use.
type UpdateBrokerOptions ¶
type UpdateBrokerOptions struct {
Logs *Logs
LdapServerMetadata *LdapServerMetadata
MaintenanceWindowStartTime *WeeklyStartTime
Configuration *ConfigurationID
AuthenticationStrategy string
DataReplicationMode string
}
UpdateBrokerOptions carries optional fields for UpdateBrokerWithOptions. Zero values are ignored and treated as "not specified".
type User ¶
type User struct {
Username string `json:"username"`
Password string `json:"-"`
Groups []string `json:"groups,omitempty"`
Console bool `json:"consoleAccess"`
}
User represents an Amazon MQ broker user.
type UserSummary ¶
UserSummary is a summary of a broker user (returned in lists).
type WeeklyStartTime ¶
type WeeklyStartTime struct {
DayOfWeek string `json:"dayOfWeek,omitempty"`
TimeOfDay string `json:"timeOfDay,omitempty"`
TimeZone string `json:"timeZone,omitempty"`
}
WeeklyStartTime defines the broker maintenance window start time.