Documentation
¶
Overview ¶
Package kinesisanalyticsv2 provides an in-memory stub of AWS Kinesis Data Analytics v2.
Index ¶
- Constants
- Variables
- type Application
- type ApplicationCodeConfigDesc
- type ApplicationCodeConfigUpdate
- type ApplicationConfigurationUpdate
- type ApplicationEncryptionConfigDesc
- type ApplicationOperation
- type ApplicationRestoreConfig
- type ApplicationSnapshotConfigDesc
- type ApplicationSystemRollbackConfigDesc
- type ApplicationVersionSummary
- type CSVMappingParametersDesc
- type CatalogConfigDesc
- type CatalogConfigDescription
- type CatalogConfigUpdate
- type CheckpointConfigDesc
- type CheckpointConfigUpdate
- type CloudWatchLoggingOptionDesc
- type CloudWatchLoggingOptionUpdate
- type CodeContentDescription
- type CodeContentUpdate
- type CustomArtifactConfigDescription
- type DeployAsApplicationConfigDesc
- type DeployAsApplicationConfigDescription
- type DeployAsApplicationConfigUpdate
- type DestinationSchemaDesc
- type DiscoveredSchema
- type FlinkApplicationConfigDesc
- type FlinkApplicationConfigUpdate
- type FlinkRunConfig
- type GlueDataCatalogConfigDesc
- 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) AddApplicationCloudWatchLoggingOption(ctx context.Context, name string, currentVersionID int64, ...) (string, error)
- func (b *InMemoryBackend) AddApplicationInput(ctx context.Context, name string, currentVersionID int64, ...) error
- func (b *InMemoryBackend) AddApplicationInputProcessingConfiguration(ctx context.Context, name string, currentVersionID int64, inputID string, ...) error
- func (b *InMemoryBackend) AddApplicationInternal(ctx context.Context, app *Application)
- func (b *InMemoryBackend) AddApplicationOutput(ctx context.Context, name string, currentVersionID int64, ...) error
- func (b *InMemoryBackend) AddApplicationReferenceDataSource(ctx context.Context, name string, currentVersionID int64, ...) error
- func (b *InMemoryBackend) AddApplicationVpcConfiguration(ctx context.Context, name string, currentVersionID int64, ...) (string, error)
- func (b *InMemoryBackend) CreateApplication(ctx context.Context, name, runtimeEnv, serviceRole, description, mode string, ...) (*Application, error)
- func (b *InMemoryBackend) CreateApplicationSnapshot(ctx context.Context, appName, snapshotName string) (*Snapshot, error)
- func (b *InMemoryBackend) DeleteApplication(ctx context.Context, name string, createTimestampSeconds *float64) error
- func (b *InMemoryBackend) DeleteApplicationCloudWatchLoggingOption(ctx context.Context, name string, currentVersionID int64, ...) (string, error)
- func (b *InMemoryBackend) DeleteApplicationInputProcessingConfiguration(ctx context.Context, name string, currentVersionID int64, inputID string) error
- func (b *InMemoryBackend) DeleteApplicationOutput(ctx context.Context, name string, currentVersionID int64, outputID string) error
- func (b *InMemoryBackend) DeleteApplicationReferenceDataSource(ctx context.Context, name string, currentVersionID int64, referenceID string) error
- func (b *InMemoryBackend) DeleteApplicationSnapshot(ctx context.Context, appName, snapshotName string) error
- func (b *InMemoryBackend) DeleteApplicationVpcConfiguration(ctx context.Context, name string, currentVersionID int64, ...) (string, error)
- func (b *InMemoryBackend) DescribeApplication(ctx context.Context, name string) (*Application, error)
- func (b *InMemoryBackend) DescribeApplicationOperation(ctx context.Context, name, operationID string) (*ApplicationOperation, error)
- func (b *InMemoryBackend) DescribeApplicationSnapshot(ctx context.Context, appName, snapshotName string) (*Snapshot, error)
- func (b *InMemoryBackend) DescribeApplicationVersion(ctx context.Context, name string, versionID int64) (*Application, error)
- func (b *InMemoryBackend) DiscoverInputSchema(_ context.Context, resourceARN, serviceExecutionRole, _ string) (*DiscoveredSchema, error)
- func (b *InMemoryBackend) GenerateApplicationARN(name string) string
- func (b *InMemoryBackend) ListApplicationOperations(ctx context.Context, name, nextToken string) ([]*ApplicationOperation, string, error)
- func (b *InMemoryBackend) ListApplicationSnapshots(ctx context.Context, appName, nextToken string) ([]*Snapshot, string, error)
- func (b *InMemoryBackend) ListApplicationVersions(ctx context.Context, name, nextToken string) ([]*ApplicationVersionSummary, string, error)
- func (b *InMemoryBackend) ListApplications(ctx context.Context, nextToken string) ([]*Application, string)
- func (b *InMemoryBackend) ListTagsForResource(_ context.Context, resourceARN string) ([]Tag, error)
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) RollbackApplication(ctx context.Context, name string, currentVersionID int64) (*Application, string, error)
- func (b *InMemoryBackend) SeedApplicationConfiguration(ctx context.Context, name string, cfg SeedConfig) error
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartApplication(ctx context.Context, name string, runConfig *RunConfigInput, ...) (string, error)
- func (b *InMemoryBackend) StopApplication(ctx context.Context, name string, force bool) (string, error)
- func (b *InMemoryBackend) TagResource(_ context.Context, resourceARN string, tags []Tag) error
- func (b *InMemoryBackend) TaggedResources() []TaggedEntry
- func (b *InMemoryBackend) UntagResource(_ context.Context, resourceARN string, tagKeys []string) error
- func (b *InMemoryBackend) UpdateApplication(ctx context.Context, params UpdateApplicationParams) (*Application, string, error)
- func (b *InMemoryBackend) UpdateApplicationMaintenanceConfiguration(ctx context.Context, name string, maintenanceWindowStartTime string) (*Application, error)
- type InputDescription
- type InputParallelismDesc
- type InputParallelismUpdateDesc
- type InputProcessingConfigurationDesc
- type InputSchemaUpdateDesc
- type InputStartingPositionConfig
- type InputUpdate
- type JSONMappingParametersDesc
- type KinesisFirehoseInputDesc
- type KinesisFirehoseOutputDesc
- type KinesisStreamsInputDesc
- type KinesisStreamsOutputDesc
- type LambdaOutputDesc
- type LambdaProcessorDesc
- type MappingParametersDesc
- type MavenReferenceDesc
- type MonitoringConfigDesc
- type MonitoringConfigUpdate
- type OutputDescription
- type OutputUpdate
- type ParallelismConfigDesc
- type ParallelismConfigUpdate
- type PropertyGroup
- type Provider
- type RecordColumnDesc
- type RecordFormatDesc
- type ReferenceDataSourceDescription
- type ReferenceDataSourceUpdate
- type RunConfigDesc
- type RunConfigInput
- type S3CodeLocationDesc
- type S3ContentBaseLocationDesc
- type S3ReferenceDataSourceDesc
- type SQLApplicationConfigUpdate
- type SQLRunConfigInput
- type SeedConfig
- type Snapshot
- type SourceSchemaDesc
- type StorageBackend
- type Tag
- type TaggedEntry
- type UpdateApplicationParams
- type VpcConfigUpdate
- type VpcConfigurationDescription
- type ZeppelinApplicationConfigDescription
- type ZeppelinApplicationConfigUpdate
- type ZeppelinMonitoringConfigDesc
- type ZeppelinMonitoringConfigUpdate
Constants ¶
const ( // ApplicationStatusReady indicates a running application that is ready. ApplicationStatusReady = "READY" // ApplicationStatusRunning indicates a running application. ApplicationStatusRunning = "RUNNING" // ApplicationStatusDeleting indicates an application being deleted. ApplicationStatusDeleting = "DELETING" )
const OperationStatusSuccessful = "SUCCESSFUL"
OperationStatusSuccessful is the real Kinesis Analytics v2 OperationStatus enum value ("SUCCESSFUL", not "SUCCESS") for a completed operation. gopherstack applies application-lifecycle operations (Start/Stop/UpdateApplication/RollbackApplication) synchronously, so every recorded operation goes straight to SUCCESSFUL -- there is no IN_PROGRESS window to observe via DescribeApplicationOperation/ListApplicationOperations.
Variables ¶
var ( // ErrNotFound is returned when a requested resource does not exist. ErrNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) // ErrAlreadyExists is returned when a resource already exists. ErrAlreadyExists = awserr.New("ResourceInUseException", awserr.ErrAlreadyExists) // ErrConcurrentModification is returned when the application version does not match. ErrConcurrentModification = awserr.New( "ConcurrentModificationException", awserr.ErrInvalidParameter, ) // ErrValidation is returned for invalid input parameters. ErrValidation = awserr.New("InvalidArgumentException", awserr.ErrInvalidParameter) )
var ErrNilAppContext = errors.New("kinesisanalyticsv2: AppContext must not be nil")
ErrNilAppContext is returned by Provider.Init when a nil AppContext is supplied.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
LastUpdateTimestamp time.Time `json:"-"`
CreatedAt time.Time `json:"-"`
ApplicationVersionCreateTimestamp time.Time `json:"-"`
RunConfig *RunConfigDesc
EncryptionConfig *ApplicationEncryptionConfigDesc
ZeppelinConfig *ZeppelinApplicationConfigDescription
RollbackEnabled *bool
SnapshotsEnabled *bool
FlinkConfig *FlinkApplicationConfigDesc
CodeConfig *ApplicationCodeConfigDesc
ApplicationVersionRolledBackTo *int64
ApplicationVersionRolledBackFrom *int64
ApplicationVersionUpdatedFrom *int64
ApplicationMode string `json:"ApplicationMode,omitempty"`
ApplicationStatus string `json:"ApplicationStatus"`
ApplicationARN string `json:"ApplicationARN"`
ApplicationName string `json:"ApplicationName"`
RuntimeEnvironment string `json:"RuntimeEnvironment"`
ServiceExecutionRole string `json:"ServiceExecutionRole,omitempty"`
ApplicationDescription string `json:"ApplicationDescription,omitempty"`
Region string `json:"-"`
MaintenanceWindowStartTime string `json:"MaintenanceWindowStartTime,omitempty"`
Tags []Tag `json:"-"`
CloudWatchLoggingOptionDescs []CloudWatchLoggingOptionDesc `json:"-"`
EnvironmentPropertyGroups []PropertyGroup
InputDescriptions []InputDescription `json:"-"`
OutputDescriptions []OutputDescription `json:"-"`
VpcConfigurationDescriptions []VpcConfigurationDescription `json:"-"`
ReferenceDataSourceDescriptions []ReferenceDataSourceDescription `json:"-"`
ApplicationVersionID int64 `json:"ApplicationVersionId"`
}
Application represents a Kinesis Data Analytics v2 application.
type ApplicationCodeConfigDesc ¶ added in v1.2.0
type ApplicationCodeConfigDesc struct {
CodeContentDescription *CodeContentDescription `json:"CodeContentDescription,omitempty"`
CodeContentType string `json:"CodeContentType"`
}
ApplicationCodeConfigDesc describes an application's code configuration.
type ApplicationCodeConfigUpdate ¶ added in v1.2.0
type ApplicationCodeConfigUpdate struct {
CodeContentUpdate *CodeContentUpdate
CodeContentTypeUpdate string
}
ApplicationCodeConfigUpdate describes updates to an application's code configuration.
type ApplicationConfigurationUpdate ¶ added in v1.2.0
type ApplicationConfigurationUpdate struct {
ApplicationCodeConfigurationUpdate *ApplicationCodeConfigUpdate
FlinkApplicationConfigurationUpdate *FlinkApplicationConfigUpdate
ZeppelinApplicationConfigurationUpdate *ZeppelinApplicationConfigUpdate
ApplicationSnapshotConfigurationUpdate *bool
ApplicationSystemRollbackConfigurationUpdate *bool
ApplicationEncryptionConfigurationUpdate *ApplicationEncryptionConfigDesc
SQLApplicationConfigurationUpdate *SQLApplicationConfigUpdate
EnvironmentPropertyUpdates []PropertyGroup
VpcConfigurationUpdates []VpcConfigUpdate
// hasEnvironmentPropertyUpdates distinguishes "no EnvironmentPropertyUpdates
// object in the request" from "EnvironmentPropertyUpdates with zero
// PropertyGroups" (which real AWS treats as clearing every group).
HasEnvironmentPropertyUpdates bool
}
ApplicationConfigurationUpdate bundles every optional delta accepted by UpdateApplication's ApplicationConfigurationUpdate request field.
type ApplicationEncryptionConfigDesc ¶ added in v1.2.0
type ApplicationEncryptionConfigDesc struct {
KeyType string `json:"KeyType"`
KeyID string `json:"KeyId,omitempty"`
}
ApplicationEncryptionConfigDesc describes the encryption-at-rest configuration.
type ApplicationOperation ¶
type ApplicationOperation struct {
StartTimestamp time.Time `json:"-"`
EndTimestamp time.Time `json:"-"`
OperationID string `json:"OperationId"`
ApplicationName string `json:"ApplicationName"`
Operation string `json:"Operation"`
OperationStatus string `json:"OperationStatus"`
}
ApplicationOperation represents a single KDA v2 application operation record.
type ApplicationRestoreConfig ¶ added in v1.2.0
type ApplicationRestoreConfig struct {
ApplicationRestoreType string `json:"ApplicationRestoreType"`
SnapshotName string `json:"SnapshotName,omitempty"`
}
ApplicationRestoreConfig describes how a restarting application restores state (shared shape for RunConfiguration's request field and RunConfigurationDescription's response field -- real AWS uses the identical ApplicationRestoreConfiguration type on both sides).
type ApplicationSnapshotConfigDesc ¶ added in v1.2.0
type ApplicationSnapshotConfigDesc struct {
SnapshotsEnabled bool `json:"SnapshotsEnabled"`
}
ApplicationSnapshotConfigDesc describes whether snapshots are enabled.
type ApplicationSystemRollbackConfigDesc ¶ added in v1.2.0
type ApplicationSystemRollbackConfigDesc struct {
RollbackEnabled bool `json:"RollbackEnabled"`
}
ApplicationSystemRollbackConfigDesc describes whether system rollback is enabled.
type ApplicationVersionSummary ¶
type ApplicationVersionSummary struct {
ApplicationStatus string `json:"ApplicationStatus"`
ApplicationVersionID int64 `json:"ApplicationVersionId"`
}
ApplicationVersionSummary is a compact view of an application version.
type CSVMappingParametersDesc ¶ added in v1.5.0
type CSVMappingParametersDesc struct {
RecordRowDelimiter string `json:"RecordRowDelimiter"`
RecordColumnDelimiter string `json:"RecordColumnDelimiter"`
}
CSVMappingParametersDesc describes delimiter mapping for CSV-formatted records.
type CatalogConfigDesc ¶ added in v1.3.1
type CatalogConfigDesc struct {
GlueDataCatalogConfiguration *GlueDataCatalogConfigDesc `json:"GlueDataCatalogConfiguration,omitempty"`
}
CatalogConfigDesc wraps GlueDataCatalogConfigDesc for CreateApplication's inline ApplicationConfiguration.ZeppelinApplicationConfiguration.CatalogConfiguration.
type CatalogConfigDescription ¶ added in v1.3.1
type CatalogConfigDescription struct {
GlueDataCatalogConfigurationDescription *GlueDataCatalogConfigDesc `json:"GlueDataCatalogConfigurationDescription,omitempty"` //nolint:lll // AWS API name
}
CatalogConfigDescription wraps GlueDataCatalogConfigDesc for DescribeApplication's ...ZeppelinApplicationConfigurationDescription.CatalogConfigurationDescription.
type CatalogConfigUpdate ¶ added in v1.3.1
type CatalogConfigUpdate struct {
DatabaseARNUpdate string
}
CatalogConfigUpdate describes an update to a Studio notebook's Glue Data Catalog database.
type CheckpointConfigDesc ¶ added in v1.2.0
type CheckpointConfigDesc struct {
CheckpointingEnabled *bool `json:"CheckpointingEnabled,omitempty"`
CheckpointInterval *int64 `json:"CheckpointInterval,omitempty"`
MinPauseBetweenCheckpoints *int64 `json:"MinPauseBetweenCheckpoints,omitempty"`
ConfigurationType string `json:"ConfigurationType"`
}
CheckpointConfigDesc describes a Flink application's checkpointing configuration.
type CheckpointConfigUpdate ¶ added in v1.2.0
type CheckpointConfigUpdate struct {
CheckpointingEnabledUpdate *bool
CheckpointIntervalUpdate *int64
MinPauseBetweenCheckpointsUpdate *int64
ConfigurationTypeUpdate string
}
CheckpointConfigUpdate describes updates to a Flink application's checkpointing configuration.
type CloudWatchLoggingOptionDesc ¶
type CloudWatchLoggingOptionDesc struct {
CloudWatchLoggingOptionID string `json:"CloudWatchLoggingOptionId"`
LogStreamARN string `json:"LogStreamARN"`
RoleARN string `json:"RoleARN,omitempty"`
}
CloudWatchLoggingOptionDesc describes a CloudWatch logging option.
type CloudWatchLoggingOptionUpdate ¶ added in v1.2.0
type CloudWatchLoggingOptionUpdate struct {
CloudWatchLoggingOptionID string
LogStreamARNUpdate string
}
CloudWatchLoggingOptionUpdate describes an update to an existing CloudWatch logging option's LogStreamARN, identified by CloudWatchLoggingOptionID. Real AWS's AddApplicationCloudWatchLoggingOption/ DeleteApplicationCloudWatchLoggingOption are the only ways to add/remove entries -- UpdateApplication can only update an existing one's ARN.
type CodeContentDescription ¶ added in v1.2.0
type CodeContentDescription struct {
S3ApplicationCodeLocationDescription *S3CodeLocationDesc `json:"S3ApplicationCodeLocationDescription,omitempty"` //nolint:lll // AWS API name
TextContent string `json:"TextContent,omitempty"`
CodeMD5 string `json:"CodeMD5,omitempty"`
CodeSize int64 `json:"CodeSize,omitempty"`
}
CodeContentDescription describes the location and content of application code.
type CodeContentUpdate ¶ added in v1.2.0
type CodeContentUpdate struct {
TextContentUpdate *string
S3BucketARNUpdate *string
S3FileKeyUpdate *string
S3ObjectVersionUpdate *string
ZipFileContentUpdate []byte
}
CodeContentUpdate describes an update to application code content. Only one of TextContentUpdate/ZipFileContentUpdate/S3*Update is expected to be set per real AWS's CodeContentUpdate.
type CustomArtifactConfigDescription ¶ added in v1.3.1
type CustomArtifactConfigDescription struct {
S3ContentLocationDescription *S3CodeLocationDesc `json:"S3ContentLocationDescription,omitempty"` //nolint:lll // AWS API name
MavenReferenceDescription *MavenReferenceDesc `json:"MavenReferenceDescription,omitempty"` //nolint:lll // AWS API name
ArtifactType string `json:"ArtifactType"`
}
CustomArtifactConfigDescription describes one dependency JAR or UDF JAR (S3-hosted or Maven-hosted, per ArtifactType) attached to a Studio notebook. Real AWS reuses this same item shape (renamed CustomArtifactConfiguration on create) wholesale for UpdateApplication's CustomArtifactsConfigurationUpdate -- there is no separate per-item update shape (verified: botocore's "CustomArtifactConfigurationUpdate" shape does not exist).
type DeployAsApplicationConfigDesc ¶ added in v1.3.1
type DeployAsApplicationConfigDesc struct {
S3ContentLocation *S3ContentBaseLocationDesc `json:"S3ContentLocation,omitempty"`
}
DeployAsApplicationConfigDesc wraps the S3 location a Studio notebook deploys as a durable-state application, for CreateApplication's inline ZeppelinApplicationConfiguration.DeployAsApplicationConfiguration.
type DeployAsApplicationConfigDescription ¶ added in v1.3.1
type DeployAsApplicationConfigDescription struct {
S3ContentLocationDescription *S3ContentBaseLocationDesc `json:"S3ContentLocationDescription,omitempty"` //nolint:lll // AWS API name
}
DeployAsApplicationConfigDescription is the DescribeApplication-side counterpart to DeployAsApplicationConfigDesc.
type DeployAsApplicationConfigUpdate ¶ added in v1.3.1
DeployAsApplicationConfigUpdate describes an update to a Studio notebook's deploy-as-application S3 base location.
type DestinationSchemaDesc ¶
type DestinationSchemaDesc struct {
RecordFormatType string `json:"RecordFormatType"`
}
DestinationSchemaDesc describes the destination record format.
type DiscoveredSchema ¶
type DiscoveredSchema struct {
RecordFormat string `json:"RecordFormat"`
RecordEncoding string `json:"RecordEncoding,omitempty"`
RecordColumns []RecordColumnDesc `json:"RecordColumns"`
ParsedInputRecords [][]string `json:"ParsedInputRecords,omitempty"`
}
DiscoveredSchema holds the inferred schema from DiscoverInputSchema.
type FlinkApplicationConfigDesc ¶ added in v1.2.0
type FlinkApplicationConfigDesc struct {
CheckpointConfigurationDescription *CheckpointConfigDesc `json:"CheckpointConfigurationDescription,omitempty"` //nolint:lll // AWS API name
MonitoringConfigurationDescription *MonitoringConfigDesc `json:"MonitoringConfigurationDescription,omitempty"` //nolint:lll // AWS API name
ParallelismConfigurationDescription *ParallelismConfigDesc `json:"ParallelismConfigurationDescription,omitempty"` //nolint:lll // AWS API name
}
FlinkApplicationConfigDesc describes a Flink application's runtime configuration.
type FlinkApplicationConfigUpdate ¶ added in v1.2.0
type FlinkApplicationConfigUpdate struct {
CheckpointConfigurationUpdate *CheckpointConfigUpdate
MonitoringConfigurationUpdate *MonitoringConfigUpdate
ParallelismConfigurationUpdate *ParallelismConfigUpdate
}
FlinkApplicationConfigUpdate bundles the three FlinkApplicationConfigurationUpdate sub-updates.
type FlinkRunConfig ¶ added in v1.2.0
type FlinkRunConfig struct {
AllowNonRestoredState *bool `json:"AllowNonRestoredState,omitempty"`
}
FlinkRunConfig describes Flink-specific starting parameters (shared shape, same rationale as ApplicationRestoreConfig).
type GlueDataCatalogConfigDesc ¶ added in v1.3.1
type GlueDataCatalogConfigDesc struct {
DatabaseARN string `json:"DatabaseARN"`
}
GlueDataCatalogConfigDesc identifies the Glue Data Catalog database used by a Studio notebook (shared shape, same rationale as ZeppelinMonitoringConfigDesc).
type Handler ¶
type Handler struct {
Backend StorageBackend
// contains filtered or unexported fields
}
Handler is the HTTP handler for the Kinesis Data Analytics v2 JSON API.
func NewHandler ¶
func NewHandler(backend StorageBackend) *Handler
NewHandler creates a new Kinesis Data Analytics v2 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 extracts the operation name from the X-Amz-Target header.
func (*Handler) ExtractResource ¶
ExtractResource extracts the application name from the request body.
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 for Kinesis Data Analytics v2 requests.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority.
func (*Handler) Reset ¶
func (h *Handler) Reset()
Reset clears handler state by delegating to the backend if it supports it.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches Kinesis Data Analytics v2 requests. The SDK uses X-Amz-Target: KinesisAnalytics_20180523.{Operation} with POST to /.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend stores Kinesis Data Analytics v2 state in memory.
applications and snapshots are store.Table-backed (Phase 3.3); see store_setup.go for the composite keys and secondary indexes that replace the pre-Phase-3.3 nested map[region]map[name]* layout. operations and versions are left as plain nested maps of slices: both are order-sensitive append histories (versions is read by positional index in RollbackApplication; operations is returned in insertion order with no explicit sort), and store.Index does not preserve insertion order, so neither fits a store.Table+Index conversion -- see pkgs/store's package doc and .claude/memories/pkgs-catalog.md. Neither was persisted before this conversion and neither is persisted after it (see persistence.go).
func NewInMemoryBackend ¶
func NewInMemoryBackend(accountID, region string) *InMemoryBackend
NewInMemoryBackend creates a new in-memory Kinesis Data Analytics v2 backend.
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the backend account ID.
func (*InMemoryBackend) AddApplicationCloudWatchLoggingOption ¶
func (b *InMemoryBackend) AddApplicationCloudWatchLoggingOption( ctx context.Context, name string, currentVersionID int64, logStreamARN, roleARN string, ) (string, error)
AddApplicationCloudWatchLoggingOption adds a CloudWatch logging option to an application, returning the OperationID of the recorded AddApplicationCloudWatchLoggingOption operation (see recordOperation) -- real AWS's AddApplicationCloudWatchLoggingOptionOutput carries an OperationId field, unlike most other Add*/Delete* config ops.
func (*InMemoryBackend) AddApplicationInput ¶
func (b *InMemoryBackend) AddApplicationInput( ctx context.Context, name string, currentVersionID int64, input InputDescription, ) error
AddApplicationInput adds an input configuration to an application.
func (*InMemoryBackend) AddApplicationInputProcessingConfiguration ¶
func (b *InMemoryBackend) AddApplicationInputProcessingConfiguration( ctx context.Context, name string, currentVersionID int64, inputID string, config *InputProcessingConfigurationDesc, ) error
AddApplicationInputProcessingConfiguration sets a processing config on an existing input.
func (*InMemoryBackend) AddApplicationInternal ¶
func (b *InMemoryBackend) AddApplicationInternal(ctx context.Context, app *Application)
AddApplicationInternal is a test-only seed helper that stores an application directly.
func (*InMemoryBackend) AddApplicationOutput ¶
func (b *InMemoryBackend) AddApplicationOutput( ctx context.Context, name string, currentVersionID int64, output OutputDescription, ) error
AddApplicationOutput adds an output configuration to an application.
func (*InMemoryBackend) AddApplicationReferenceDataSource ¶
func (b *InMemoryBackend) AddApplicationReferenceDataSource( ctx context.Context, name string, currentVersionID int64, ref ReferenceDataSourceDescription, ) error
AddApplicationReferenceDataSource adds a reference data source to an application.
func (*InMemoryBackend) AddApplicationVpcConfiguration ¶
func (b *InMemoryBackend) AddApplicationVpcConfiguration( ctx context.Context, name string, currentVersionID int64, vpc VpcConfigurationDescription, ) (string, error)
AddApplicationVpcConfiguration adds a VPC configuration to an application, returning the OperationID of the recorded AddApplicationVpcConfiguration operation (see recordOperation) -- real AWS's AddApplicationVpcConfigurationOutput carries an OperationId field, unlike most other Add*/Delete* config ops.
func (*InMemoryBackend) CreateApplication ¶
func (b *InMemoryBackend) CreateApplication( ctx context.Context, name, runtimeEnv, serviceRole, description, mode string, tags []Tag, ) (*Application, error)
CreateApplication creates a new Kinesis Data Analytics v2 application.
func (*InMemoryBackend) CreateApplicationSnapshot ¶
func (b *InMemoryBackend) CreateApplicationSnapshot( ctx context.Context, appName, snapshotName string, ) (*Snapshot, error)
CreateApplicationSnapshot creates a snapshot for an application.
func (*InMemoryBackend) DeleteApplication ¶
func (b *InMemoryBackend) DeleteApplication(ctx context.Context, name string, createTimestampSeconds *float64) error
DeleteApplication deletes an application by name. createTimestampSeconds, when non-nil, is validated against the application's actual CreateTimestamp (real AWS's DeleteApplicationInput.CreateTimestamp is a required safety check retrieved from a prior DescribeApplication) -- a mismatch returns ErrValidation instead of deleting.
func (*InMemoryBackend) DeleteApplicationCloudWatchLoggingOption ¶
func (b *InMemoryBackend) DeleteApplicationCloudWatchLoggingOption( ctx context.Context, name string, currentVersionID int64, loggingOptionID string, ) (string, error)
DeleteApplicationCloudWatchLoggingOption removes a CloudWatch logging option from an application, returning the OperationID of the recorded DeleteApplicationCloudWatchLoggingOption operation (see recordOperation) -- real AWS's DeleteApplicationCloudWatchLoggingOptionOutput carries an OperationId field, unlike most other Add*/Delete* config ops.
func (*InMemoryBackend) DeleteApplicationInputProcessingConfiguration ¶
func (b *InMemoryBackend) DeleteApplicationInputProcessingConfiguration( ctx context.Context, name string, currentVersionID int64, inputID string, ) error
DeleteApplicationInputProcessingConfiguration removes the processing config from an input.
func (*InMemoryBackend) DeleteApplicationOutput ¶
func (b *InMemoryBackend) DeleteApplicationOutput( ctx context.Context, name string, currentVersionID int64, outputID string, ) error
DeleteApplicationOutput removes an output configuration from an application.
func (*InMemoryBackend) DeleteApplicationReferenceDataSource ¶
func (b *InMemoryBackend) DeleteApplicationReferenceDataSource( ctx context.Context, name string, currentVersionID int64, referenceID string, ) error
DeleteApplicationReferenceDataSource removes a reference data source from an application.
func (*InMemoryBackend) DeleteApplicationSnapshot ¶
func (b *InMemoryBackend) DeleteApplicationSnapshot(ctx context.Context, appName, snapshotName string) error
DeleteApplicationSnapshot deletes a snapshot.
func (*InMemoryBackend) DeleteApplicationVpcConfiguration ¶
func (b *InMemoryBackend) DeleteApplicationVpcConfiguration( ctx context.Context, name string, currentVersionID int64, vpcConfigurationID string, ) (string, error)
DeleteApplicationVpcConfiguration removes a VPC configuration from an application, returning the OperationID of the recorded DeleteApplicationVpcConfiguration operation (see recordOperation) -- real AWS's DeleteApplicationVpcConfigurationOutput carries an OperationId field, unlike most other Add*/Delete* config ops.
func (*InMemoryBackend) DescribeApplication ¶
func (b *InMemoryBackend) DescribeApplication(ctx context.Context, name string) (*Application, error)
DescribeApplication retrieves an application by name. Returns a deep copy so callers cannot mutate internal state.
func (*InMemoryBackend) DescribeApplicationOperation ¶
func (b *InMemoryBackend) DescribeApplicationOperation( ctx context.Context, name, operationID string, ) (*ApplicationOperation, error)
DescribeApplicationOperation returns a single operation by ID.
func (*InMemoryBackend) DescribeApplicationSnapshot ¶
func (b *InMemoryBackend) DescribeApplicationSnapshot( ctx context.Context, appName, snapshotName string, ) (*Snapshot, error)
DescribeApplicationSnapshot retrieves a snapshot by application name and snapshot name.
func (*InMemoryBackend) DescribeApplicationVersion ¶
func (b *InMemoryBackend) DescribeApplicationVersion( ctx context.Context, name string, versionID int64, ) (*Application, error)
DescribeApplicationVersion returns the application state at a specific version ID.
func (*InMemoryBackend) DiscoverInputSchema ¶
func (b *InMemoryBackend) DiscoverInputSchema( _ context.Context, resourceARN, serviceExecutionRole, _ string, ) (*DiscoveredSchema, error)
DiscoverInputSchema returns a synthetic discovered schema for a resource ARN: this backend has no live stream to sample, so RecordColumns/ ParsedInputRecords are a fixed placeholder (unchanged from before this pass -- see PARITY.md). serviceExecutionRole is required on the real DiscoverInputSchemaRequest (botocore kinesisanalyticsv2/2018-05-23/ service-2.json.gz shape "DiscoverInputSchemaRequest") but was previously accepted under the wrong wire key and never validated (see discoverInputSchemaInput's ServiceExecutionRole fix in handler_applications.go).
func (*InMemoryBackend) GenerateApplicationARN ¶
func (b *InMemoryBackend) GenerateApplicationARN(name string) string
GenerateApplicationARN exposes the ARN builder for testing.
func (*InMemoryBackend) ListApplicationOperations ¶
func (b *InMemoryBackend) ListApplicationOperations( ctx context.Context, name, nextToken string, ) ([]*ApplicationOperation, string, error)
ListApplicationOperations returns operations for an application with optional pagination.
func (*InMemoryBackend) ListApplicationSnapshots ¶
func (b *InMemoryBackend) ListApplicationSnapshots( ctx context.Context, appName, nextToken string, ) ([]*Snapshot, string, error)
ListApplicationSnapshots returns snapshots for an application with optional pagination, sorted by creation time.
func (*InMemoryBackend) ListApplicationVersions ¶
func (b *InMemoryBackend) ListApplicationVersions( ctx context.Context, name, nextToken string, ) ([]*ApplicationVersionSummary, string, error)
ListApplicationVersions returns version summaries for an application.
func (*InMemoryBackend) ListApplications ¶
func (b *InMemoryBackend) ListApplications(ctx context.Context, nextToken string) ([]*Application, string)
ListApplications returns applications with optional pagination.
func (*InMemoryBackend) ListTagsForResource ¶
ListTagsForResource returns tags for an application, sorted by key.
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the backend default region.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all state and resets the ID counter.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot.
func (*InMemoryBackend) RollbackApplication ¶
func (b *InMemoryBackend) RollbackApplication( ctx context.Context, name string, currentVersionID int64, ) (*Application, string, error)
RollbackApplication rolls back an application to its previous version, returning the OperationID of the recorded RollbackApplication operation (see recordOperation).
func (*InMemoryBackend) SeedApplicationConfiguration ¶
func (b *InMemoryBackend) SeedApplicationConfiguration(ctx context.Context, name string, cfg SeedConfig) error
SeedApplicationConfiguration sets a newly created application's initial configuration (SQL inputs/outputs/reference-data-sources, VPC configurations, CloudWatch logging options, and the Flink/Code/ Environment/Snapshot/Rollback/Encryption portions of ApplicationConfiguration) in one step, without bumping ApplicationVersionId or appending a second version-history entry -- this mirrors real AWS, where CreateApplication's inline ApplicationConfiguration is part of the application's first version (ApplicationVersionId stays 1), unlike the separately-versioned Add* operations. Callers (handleCreateApplication) must invoke this immediately after CreateApplication succeeds, before the new application is exposed to any other caller. Returns ErrNotFound if name doesn't exist.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON.
func (*InMemoryBackend) StartApplication ¶
func (b *InMemoryBackend) StartApplication( ctx context.Context, name string, runConfig *RunConfigInput, sqlRunConfigs []SQLRunConfigInput, ) (string, error)
StartApplication sets the application status to RUNNING and returns the OperationID of the recorded StartApplication operation (see recordOperation). Returns ResourceInUseException if the application is not in READY state, matching real AWS Kinesis Analytics v2 behavior. runConfig, when non-nil, is stored as the application's RunConfigurationDescription -- real AWS clients (Terraform, CloudFormation) commonly start a Flink application with ApplicationRestoreConfiguration set to restore from a snapshot, and expect DescribeApplication to echo it back afterward.
func (*InMemoryBackend) StopApplication ¶
func (b *InMemoryBackend) StopApplication(ctx context.Context, name string, force bool) (string, error)
StopApplication sets the application status to READY and returns the OperationID of the recorded StopApplication operation (see recordOperation). Returns ResourceInUseException if the application is not in RUNNING state, matching real AWS Kinesis Analytics v2 behavior. force mirrors the real StopApplicationInput.Force field: real AWS forbids force-stopping a SQL-based application ("You can only force stop a Managed Service for Apache Flink application" -- api_op_StopApplication.go doc comment, aws-sdk-go-v2/service/kinesisanalyticsv2@v1.41.4), so that combination returns InvalidArgumentException. Force's other documented effects -- permitting stop from STARTING/UPDATING/STOPPING/AUTOSCALING, and skipping the pre-stop snapshot -- have no observable effect here: this backend's ApplicationStatus is only ever READY/RUNNING (synchronous lifecycle, same structural gap as DeleteApplication's unused ApplicationStatusDeleting), and it never auto-snapshots on stop regardless of Force (see PARITY.md).
func (*InMemoryBackend) TagResource ¶
TagResource adds tags to an application.
func (*InMemoryBackend) TaggedResources ¶ added in v1.3.1
func (b *InMemoryBackend) TaggedResources() []TaggedEntry
TaggedResources returns every application ARN that currently has at least one tag applied via TagResource.
func (*InMemoryBackend) UntagResource ¶
func (b *InMemoryBackend) UntagResource(_ context.Context, resourceARN string, tagKeys []string) error
UntagResource removes tags from an application.
func (*InMemoryBackend) UpdateApplication ¶
func (b *InMemoryBackend) UpdateApplication( ctx context.Context, params UpdateApplicationParams, ) (*Application, string, error)
UpdateApplication updates an application, returning the OperationID of the recorded UpdateApplication operation (see recordOperation). params.CurrentApplicationVersionID/params.ConditionalToken implement the two alternative optimistic-concurrency checks real AWS performs (see checkAndBumpVersionOrToken). References inside params.CloudWatchLoggingOptionUpdates/ApplicationConfigurationUpdate to sub-resource IDs that don't exist are validated *before* the version is bumped, so a rejected request never leaves a phantom version-history entry (matching the Add*/Delete* config ops' "find before bumping" convention elsewhere in this package).
func (*InMemoryBackend) UpdateApplicationMaintenanceConfiguration ¶
func (b *InMemoryBackend) UpdateApplicationMaintenanceConfiguration( ctx context.Context, name string, maintenanceWindowStartTime string, ) (*Application, error)
UpdateApplicationMaintenanceConfiguration sets the maintenance window start time.
type InputDescription ¶
type InputDescription struct {
InputProcessingConfigurationDescription *InputProcessingConfigurationDesc `json:"InputProcessingConfigurationDescription,omitempty"` //nolint:lll // AWS API name
KinesisStreamsInputDescription *KinesisStreamsInputDesc `json:"KinesisStreamsInputDescription,omitempty"` //nolint:lll // AWS API name
KinesisFirehoseInputDescription *KinesisFirehoseInputDesc `json:"KinesisFirehoseInputDescription,omitempty"` //nolint:lll // AWS API name
InputStartingPositionConfiguration *InputStartingPositionConfig `json:"InputStartingPositionConfiguration,omitempty"` //nolint:lll // AWS API name
InputSchema *SourceSchemaDesc `json:"InputSchema,omitempty"`
InputParallelism *InputParallelismDesc `json:"InputParallelism,omitempty"`
InputID string `json:"InputId"`
NamePrefix string `json:"NamePrefix,omitempty"`
InAppStreamNames []string `json:"InAppStreamNames,omitempty"`
}
InputDescription describes an application input configuration.
type InputParallelismDesc ¶ added in v1.5.0
type InputParallelismDesc struct {
Count int32 `json:"Count,omitempty"`
}
InputParallelismDesc describes the number of in-application streams created for an input's streaming source.
type InputParallelismUpdateDesc ¶ added in v1.5.0
type InputParallelismUpdateDesc struct {
CountUpdate int32 `json:"CountUpdate,omitempty"`
}
InputParallelismUpdateDesc mirrors real AWS's InputParallelismUpdate.
type InputProcessingConfigurationDesc ¶
type InputProcessingConfigurationDesc struct {
InputLambdaProcessor *LambdaProcessorDesc `json:"InputLambdaProcessor,omitempty"`
}
InputProcessingConfigurationDesc describes an input processing configuration.
type InputSchemaUpdateDesc ¶ added in v1.5.0
type InputSchemaUpdateDesc struct {
RecordFormatUpdate *RecordFormatDesc `json:"RecordFormatUpdate,omitempty"`
RecordEncodingUpdate string `json:"RecordEncodingUpdate,omitempty"`
RecordColumnUpdates []RecordColumnDesc `json:"RecordColumnUpdates,omitempty"`
}
InputSchemaUpdateDesc mirrors real AWS's InputSchemaUpdate -- unlike ReferenceDataSourceUpdate.ReferenceSchemaUpdate (which reuses SourceSchema verbatim), InputUpdate.InputSchemaUpdate is its own shape with Update-suffixed field names (verified against botocore's "InputSchemaUpdate" shape).
type InputStartingPositionConfig ¶ added in v1.3.1
type InputStartingPositionConfig struct {
InputStartingPosition string `json:"InputStartingPosition,omitempty"`
}
InputStartingPositionConfig describes the point at which a SQL-based application starts reading from an input's streaming source (StartApplication's RunConfiguration.SqlRunConfigurations and the response-side InputDescription.InputStartingPositionConfiguration use the identical shape -- botocore kinesisanalyticsv2/2018-05-23/service-2.json.gz shape "InputStartingPositionConfiguration").
type InputUpdate ¶ added in v1.2.0
type InputUpdate struct {
KinesisStreamsInputUpdate *KinesisStreamsInputDesc
KinesisFirehoseInputUpdate *KinesisFirehoseInputDesc
InputProcessingConfigurationUpdate *InputProcessingConfigurationDesc
InputSchemaUpdate *InputSchemaUpdateDesc
InputParallelismUpdate *InputParallelismUpdateDesc
InputID string
NamePrefixUpdate string
}
InputUpdate describes updates to an existing application input, identified by InputID.
type JSONMappingParametersDesc ¶ added in v1.5.0
type JSONMappingParametersDesc struct {
RecordRowPath string `json:"RecordRowPath"`
}
JSONMappingParametersDesc describes the root path for JSON-formatted records.
type KinesisFirehoseInputDesc ¶
type KinesisFirehoseInputDesc struct {
ResourceARN string `json:"ResourceARN"`
RoleARN string `json:"RoleARN,omitempty"`
}
KinesisFirehoseInputDesc describes a Kinesis Firehose input.
type KinesisFirehoseOutputDesc ¶
type KinesisFirehoseOutputDesc struct {
ResourceARN string `json:"ResourceARN"`
}
KinesisFirehoseOutputDesc describes a Kinesis Firehose output.
type KinesisStreamsInputDesc ¶
type KinesisStreamsInputDesc struct {
ResourceARN string `json:"ResourceARN"`
RoleARN string `json:"RoleARN,omitempty"`
}
KinesisStreamsInputDesc describes a Kinesis Streams input.
type KinesisStreamsOutputDesc ¶
type KinesisStreamsOutputDesc struct {
ResourceARN string `json:"ResourceARN"`
}
KinesisStreamsOutputDesc describes a Kinesis Streams output.
type LambdaOutputDesc ¶
type LambdaOutputDesc struct {
ResourceARN string `json:"ResourceARN"`
}
LambdaOutputDesc describes a Lambda output.
type LambdaProcessorDesc ¶
type LambdaProcessorDesc struct {
ResourceARN string `json:"ResourceARN"`
}
LambdaProcessorDesc describes a Lambda input processor.
type MappingParametersDesc ¶ added in v1.5.0
type MappingParametersDesc struct {
CSVMappingParameters *CSVMappingParametersDesc `json:"CSVMappingParameters,omitempty"`
JSONMappingParameters *JSONMappingParametersDesc `json:"JSONMappingParameters,omitempty"`
}
MappingParametersDesc carries the format-specific mapping info for a RecordFormatDesc.
type MavenReferenceDesc ¶ added in v1.3.1
type MavenReferenceDesc struct {
GroupID string `json:"GroupId"`
ArtifactID string `json:"ArtifactId"`
Version string `json:"Version"`
}
MavenReferenceDesc identifies a Maven dependency JAR (shared shape for request and response -- real AWS's MavenReference uses GroupId/ArtifactId/ Version on both CustomArtifactConfiguration and CustomArtifactConfigurationDescription).
type MonitoringConfigDesc ¶ added in v1.2.0
type MonitoringConfigDesc struct {
ConfigurationType string `json:"ConfigurationType"`
LogLevel string `json:"LogLevel,omitempty"`
MetricsLevel string `json:"MetricsLevel,omitempty"`
}
MonitoringConfigDesc describes a Flink application's CloudWatch logging configuration.
type MonitoringConfigUpdate ¶ added in v1.2.0
type MonitoringConfigUpdate struct {
ConfigurationTypeUpdate string
LogLevelUpdate string
MetricsLevelUpdate string
}
MonitoringConfigUpdate describes updates to a Flink application's CloudWatch logging configuration.
type OutputDescription ¶
type OutputDescription struct {
KinesisStreamsOutputDescription *KinesisStreamsOutputDesc `json:"KinesisStreamsOutputDescription,omitempty"`
KinesisFirehoseOutputDescription *KinesisFirehoseOutputDesc `json:"KinesisFirehoseOutputDescription,omitempty"`
LambdaOutputDescription *LambdaOutputDesc `json:"LambdaOutputDescription,omitempty"`
DestinationSchema *DestinationSchemaDesc `json:"DestinationSchema,omitempty"`
OutputID string `json:"OutputId"`
Name string `json:"Name,omitempty"`
}
OutputDescription describes an application output configuration.
type OutputUpdate ¶ added in v1.2.0
type OutputUpdate struct {
KinesisStreamsOutputUpdate *KinesisStreamsOutputDesc
KinesisFirehoseOutputUpdate *KinesisFirehoseOutputDesc
LambdaOutputUpdate *LambdaOutputDesc
DestinationSchemaUpdate *DestinationSchemaDesc
OutputID string
NameUpdate string
}
OutputUpdate describes updates to an existing application output, identified by OutputID.
type ParallelismConfigDesc ¶ added in v1.2.0
type ParallelismConfigDesc struct {
AutoScalingEnabled *bool `json:"AutoScalingEnabled,omitempty"`
Parallelism *int32 `json:"Parallelism,omitempty"`
ParallelismPerKPU *int32 `json:"ParallelismPerKPU,omitempty"`
CurrentParallelism *int32 `json:"CurrentParallelism,omitempty"`
ConfigurationType string `json:"ConfigurationType"`
}
ParallelismConfigDesc describes a Flink application's parallelism configuration.
type ParallelismConfigUpdate ¶ added in v1.2.0
type ParallelismConfigUpdate struct {
AutoScalingEnabledUpdate *bool
ParallelismUpdate *int32
ParallelismPerKPUUpdate *int32
ConfigurationTypeUpdate string
}
ParallelismConfigUpdate describes updates to a Flink application's parallelism configuration.
type PropertyGroup ¶ added in v1.2.0
type PropertyGroup struct {
PropertyMap map[string]string `json:"PropertyMap"`
PropertyGroupID string `json:"PropertyGroupId"`
}
PropertyGroup is a key-value execution property group (shared shape for both the request PropertyGroups and the response PropertyGroupDescriptions -- real AWS uses the identical PropertyGroup type on both sides).
type Provider ¶
type Provider struct{}
Provider implements service.Provider for Kinesis Data Analytics v2.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the Kinesis Data Analytics v2 backend and handler.
type RecordColumnDesc ¶ added in v1.3.1
type RecordColumnDesc struct {
Name string `json:"Name"`
Mapping string `json:"Mapping,omitempty"`
SQLType string `json:"SqlType"`
}
RecordColumnDesc describes one column mapped from a streaming source's sampled records (SourceSchema.RecordColumns is a required member of the real DiscoverInputSchemaResponse.InputSchema -- botocore kinesisanalyticsv2/2018-05-23/service-2.json.gz shape "RecordColumn").
type RecordFormatDesc ¶ added in v1.5.0
type RecordFormatDesc struct {
MappingParameters *MappingParametersDesc `json:"MappingParameters,omitempty"`
RecordFormatType string `json:"RecordFormatType"`
}
RecordFormatDesc describes the format of records on a streaming or reference source (shared shape for SourceSchemaDesc.RecordFormat and InputSchemaUpdateDesc.RecordFormatUpdate -- real AWS's RecordFormat is used unrenamed in both places).
type ReferenceDataSourceDescription ¶
type ReferenceDataSourceDescription struct {
S3ReferenceDataSourceDescription *S3ReferenceDataSourceDesc `json:"S3ReferenceDataSourceDescription,omitempty"`
ReferenceSchema *SourceSchemaDesc `json:"ReferenceSchema,omitempty"`
ReferenceID string `json:"ReferenceId"`
TableName string `json:"TableName,omitempty"`
}
ReferenceDataSourceDescription describes a reference data source.
type ReferenceDataSourceUpdate ¶ added in v1.2.0
type ReferenceDataSourceUpdate struct {
S3ReferenceDataSourceUpdate *S3ReferenceDataSourceDesc
ReferenceSchemaUpdate *SourceSchemaDesc
ReferenceID string
TableNameUpdate string
}
ReferenceDataSourceUpdate describes updates to an existing reference data source, identified by ReferenceID. ReferenceSchemaUpdate reuses SourceSchemaDesc unrenamed -- unlike InputUpdate.InputSchemaUpdate, real AWS's ReferenceDataSourceUpdate.ReferenceSchemaUpdate is typed plain "SourceSchema" (verified against botocore's "ReferenceDataSourceUpdate" shape), not a dedicated Update-suffixed shape.
type RunConfigDesc ¶ added in v1.2.0
type RunConfigDesc struct {
ApplicationRestoreConfigurationDescription *ApplicationRestoreConfig `json:"ApplicationRestoreConfigurationDescription,omitempty"` //nolint:lll // AWS API name
FlinkRunConfigurationDescription *FlinkRunConfig `json:"FlinkRunConfigurationDescription,omitempty"` //nolint:lll // AWS API name
}
RunConfigDesc describes an application's starting parameters.
type RunConfigInput ¶ added in v1.2.0
type RunConfigInput struct {
ApplicationRestoreConfiguration *ApplicationRestoreConfig
FlinkRunConfiguration *FlinkRunConfig
}
RunConfigInput carries StartApplication's RunConfiguration and UpdateApplication's RunConfigurationUpdate request fields -- both share the same ApplicationRestoreConfiguration/FlinkRunConfiguration shape in real AWS.
type S3CodeLocationDesc ¶ added in v1.2.0
type S3CodeLocationDesc struct {
BucketARN string `json:"BucketARN"`
FileKey string `json:"FileKey"`
ObjectVersion string `json:"ObjectVersion,omitempty"`
}
S3CodeLocationDesc describes the S3 location of application code.
type S3ContentBaseLocationDesc ¶ added in v1.3.1
type S3ContentBaseLocationDesc struct {
BucketARN string `json:"BucketARN"`
BasePath string `json:"BasePath,omitempty"`
}
S3ContentBaseLocationDesc describes an S3 base location (bucket + optional path prefix), shared by DeployAsApplicationConfiguration's request and response fields -- real AWS's S3ContentBaseLocation and S3ContentBaseLocationDescription both use BucketARN/BasePath.
type S3ReferenceDataSourceDesc ¶
type S3ReferenceDataSourceDesc struct {
BucketARN string `json:"BucketARN"`
FileKey string `json:"FileKey"`
}
S3ReferenceDataSourceDesc describes the S3 source for reference data.
type SQLApplicationConfigUpdate ¶ added in v1.2.0
type SQLApplicationConfigUpdate struct {
InputUpdates []InputUpdate
OutputUpdates []OutputUpdate
ReferenceDataSourceUpdates []ReferenceDataSourceUpdate
}
SQLApplicationConfigUpdate bundles the three SQLApplicationConfigurationUpdate sub-updates.
type SQLRunConfigInput ¶ added in v1.3.1
type SQLRunConfigInput struct {
InputStartingPositionConfiguration *InputStartingPositionConfig `json:"InputStartingPositionConfiguration,omitempty"` //nolint:lll // AWS API name
InputID string `json:"InputId"`
}
SQLRunConfigInput carries one entry of StartApplication's RunConfiguration.SqlRunConfigurations -- the per-input starting position for a SQL-based application. Real AWS's RunConfigurationUpdate (used by UpdateApplication) has no such field: verified against botocore kinesisanalyticsv2/2018-05-23/service-2.json.gz, shape "RunConfigurationUpdate" only has FlinkRunConfiguration/ ApplicationRestoreConfiguration.
type SeedConfig ¶ added in v1.2.0
type SeedConfig struct {
CodeConfig *ApplicationCodeConfigDesc
FlinkConfig *FlinkApplicationConfigDesc
ZeppelinConfig *ZeppelinApplicationConfigDescription
SnapshotsEnabled *bool
RollbackEnabled *bool
EncryptionConfig *ApplicationEncryptionConfigDesc
Inputs []InputDescription
Outputs []OutputDescription
ReferenceDataSources []ReferenceDataSourceDescription
VpcConfigs []VpcConfigurationDescription
CWLOptions []CloudWatchLoggingOptionDesc
EnvironmentPropertyGroups []PropertyGroup
}
SeedConfig bundles every piece of inline configuration CreateApplication's ApplicationConfiguration/CloudWatchLoggingOptions request fields can carry. See SeedApplicationConfiguration.
func (SeedConfig) IsEmpty ¶ added in v1.2.0
func (cfg SeedConfig) IsEmpty() bool
IsEmpty reports whether cfg carries no inline configuration at all, so callers can skip the SeedApplicationConfiguration round-trip entirely (matching the pre-existing len(...)>0-checks convention in handleCreateApplication).
type Snapshot ¶
type Snapshot struct {
SnapshotCreation time.Time `json:"-"`
ApplicationARN string `json:"ApplicationARN"`
SnapshotName string `json:"SnapshotName"`
SnapshotStatus string `json:"SnapshotStatus"`
// Region and AppName are the owning region and application name, used
// only to derive the store.Table composite key (region#appName#name) and
// the byApp index -- SnapshotName alone is only unique within an
// application. Never serialized on the wire: handler.go always builds a
// dedicated snapshotDetail response DTO.
Region string `json:"-"`
AppName string `json:"-"`
ApplicationVersion int64 `json:"ApplicationVersionId"`
}
Snapshot represents an application snapshot.
type SourceSchemaDesc ¶ added in v1.5.0
type SourceSchemaDesc struct {
RecordFormat *RecordFormatDesc `json:"RecordFormat"`
RecordEncoding string `json:"RecordEncoding,omitempty"`
RecordColumns []RecordColumnDesc `json:"RecordColumns"`
}
SourceSchemaDesc describes the format of records on a streaming source and how they map to in-application columns (real AWS's SourceSchema shape, reused unrenamed for Input.InputSchema, InputDescription.InputSchema, ReferenceDataSource.ReferenceSchema, ReferenceDataSourceDescription.ReferenceSchema, and ReferenceDataSourceUpdate.ReferenceSchemaUpdate -- verified against botocore kinesisanalyticsv2/2018-05-23/service-2.json.gz, all five of those members are typed "SourceSchema" with no per-direction renaming).
type StorageBackend ¶
type StorageBackend interface {
Region() string
AccountID() string
GenerateApplicationARN(name string) string
CreateApplication(
ctx context.Context, name, runtimeEnv, serviceRole, description, mode string, tags []Tag,
) (*Application, error)
SeedApplicationConfiguration(ctx context.Context, name string, cfg SeedConfig) error
DescribeApplication(ctx context.Context, name string) (*Application, error)
ListApplications(ctx context.Context, nextToken string) ([]*Application, string)
UpdateApplication(ctx context.Context, params UpdateApplicationParams) (*Application, string, error)
DeleteApplication(ctx context.Context, name string, createTimestampSeconds *float64) error
StartApplication(
ctx context.Context, name string, runConfig *RunConfigInput, sqlRunConfigs []SQLRunConfigInput,
) (string, error)
StopApplication(ctx context.Context, name string, force bool) (string, error)
CreateApplicationSnapshot(ctx context.Context, appName, snapshotName string) (*Snapshot, error)
DescribeApplicationSnapshot(ctx context.Context, appName, snapshotName string) (*Snapshot, error)
ListApplicationSnapshots(ctx context.Context, appName, nextToken string) ([]*Snapshot, string, error)
DeleteApplicationSnapshot(ctx context.Context, appName, snapshotName string) error
TagResource(ctx context.Context, resourceARN string, tags []Tag) error
UntagResource(ctx context.Context, resourceARN string, tagKeys []string) error
ListTagsForResource(ctx context.Context, resourceARN string) ([]Tag, error)
// AddApplicationCloudWatchLoggingOption/AddApplicationVpcConfiguration/
// DeleteApplicationCloudWatchLoggingOption/DeleteApplicationVpcConfiguration
// return an OperationID -- real AWS's outputs for these four ops (and only
// these four among the Add*/Delete* config family) carry an OperationId
// field, verified against aws-sdk-go-v2's api_op_*.go.
AddApplicationCloudWatchLoggingOption(
ctx context.Context, name string, currentVersionID int64, logStreamARN, roleARN string,
) (string, error)
AddApplicationInput(ctx context.Context, name string, currentVersionID int64, input InputDescription) error
AddApplicationInputProcessingConfiguration(
ctx context.Context,
name string,
currentVersionID int64,
inputID string,
config *InputProcessingConfigurationDesc,
) error
AddApplicationOutput(ctx context.Context, name string, currentVersionID int64, output OutputDescription) error
AddApplicationReferenceDataSource(
ctx context.Context, name string, currentVersionID int64, ref ReferenceDataSourceDescription,
) error
AddApplicationVpcConfiguration(
ctx context.Context, name string, currentVersionID int64, vpc VpcConfigurationDescription,
) (string, error)
DeleteApplicationCloudWatchLoggingOption(
ctx context.Context, name string, currentVersionID int64, loggingOptionID string,
) (string, error)
DeleteApplicationInputProcessingConfiguration(
ctx context.Context, name string, currentVersionID int64, inputID string,
) error
DeleteApplicationOutput(ctx context.Context, name string, currentVersionID int64, outputID string) error
DeleteApplicationReferenceDataSource(
ctx context.Context, name string, currentVersionID int64, referenceID string,
) error
DeleteApplicationVpcConfiguration(
ctx context.Context, name string, currentVersionID int64, vpcConfigurationID string,
) (string, error)
DescribeApplicationOperation(ctx context.Context, name, operationID string) (*ApplicationOperation, error)
ListApplicationOperations(ctx context.Context, name, nextToken string) ([]*ApplicationOperation, string, error)
DescribeApplicationVersion(ctx context.Context, name string, versionID int64) (*Application, error)
ListApplicationVersions(ctx context.Context, name, nextToken string) ([]*ApplicationVersionSummary, string, error)
RollbackApplication(ctx context.Context, name string, currentVersionID int64) (*Application, string, error)
UpdateApplicationMaintenanceConfiguration(
ctx context.Context, name string, maintenanceWindowStartTime string,
) (*Application, error)
DiscoverInputSchema(
ctx context.Context, resourceARN, roleARN, inputStartingPosition string,
) (*DiscoveredSchema, error)
}
StorageBackend is the interface for the Kinesis Data Analytics v2 in-memory backend.
type TaggedEntry ¶ added in v1.3.1
TaggedEntry pairs a resource ARN with its tags.
type UpdateApplicationParams ¶ added in v1.2.0
type UpdateApplicationParams struct {
ApplicationConfigurationUpdate *ApplicationConfigurationUpdate
RunConfigurationUpdate *RunConfigInput
Name string
ConditionalToken string
ServiceExecutionRoleUpdate string
ApplicationDescription string
RuntimeEnvironmentUpdate string
CloudWatchLoggingOptionUpdates []CloudWatchLoggingOptionUpdate
CurrentApplicationVersionID int64
}
UpdateApplicationParams bundles every UpdateApplication request field.
type VpcConfigUpdate ¶ added in v1.2.0
type VpcConfigUpdate struct {
VpcConfigurationID string
SubnetIDUpdates []string
SecurityGroupIDUpdates []string
}
VpcConfigUpdate describes updates to an existing VPC configuration, identified by VpcConfigurationID.
type VpcConfigurationDescription ¶
type VpcConfigurationDescription struct {
VpcConfigurationID string `json:"VpcConfigurationId"`
VpcID string `json:"VpcId,omitempty"`
SubnetIDs []string `json:"SubnetIds"`
SecurityGroupIDs []string `json:"SecurityGroupIds"`
}
VpcConfigurationDescription describes a VPC configuration.
type ZeppelinApplicationConfigDescription ¶ added in v1.3.1
type ZeppelinApplicationConfigDescription struct {
MonitoringConfigurationDescription *ZeppelinMonitoringConfigDesc `json:"MonitoringConfigurationDescription"` //nolint:lll // AWS API name
CatalogConfigurationDescription *CatalogConfigDescription `json:"CatalogConfigurationDescription,omitempty"` //nolint:lll // AWS API name
DeployAsApplicationConfigurationDescription *DeployAsApplicationConfigDescription `json:"DeployAsApplicationConfigurationDescription,omitempty"` //nolint:lll // AWS API name
CustomArtifactsConfigurationDescription []CustomArtifactConfigDescription `json:"CustomArtifactsConfigurationDescription,omitempty"` //nolint:lll // AWS API name
}
ZeppelinApplicationConfigDescription mirrors real AWS's ZeppelinApplicationConfigurationDescription -- the Managed Service for Apache Flink Studio notebook configuration (Glue Data Catalog, Maven/S3 custom artifacts, deploy-as-application) echoed by DescribeApplication. Stored directly on Application and reused as the response wire shape (matches the FlinkApplicationConfigDesc/ApplicationCodeConfigDesc convention elsewhere in this file).
type ZeppelinApplicationConfigUpdate ¶ added in v1.3.1
type ZeppelinApplicationConfigUpdate struct {
MonitoringConfigurationUpdate *ZeppelinMonitoringConfigUpdate
CatalogConfigurationUpdate *CatalogConfigUpdate
DeployAsApplicationConfigurationUpdate *DeployAsApplicationConfigUpdate
CustomArtifactsConfigurationUpdate []CustomArtifactConfigDescription
// HasCustomArtifactsConfigurationUpdate distinguishes "no
// CustomArtifactsConfigurationUpdate in the request" from "...Update with
// zero entries" (which real AWS treats as clearing every custom artifact --
// same rationale as HasEnvironmentPropertyUpdates).
HasCustomArtifactsConfigurationUpdate bool
}
ZeppelinApplicationConfigUpdate bundles ZeppelinApplicationConfigurationUpdate's four sub-updates.
type ZeppelinMonitoringConfigDesc ¶ added in v1.3.1
type ZeppelinMonitoringConfigDesc struct {
LogLevel string `json:"LogLevel"`
}
ZeppelinMonitoringConfigDesc describes CloudWatch logging verbosity for a Managed Service for Apache Flink Studio notebook (shared shape for both the create request and the describe response -- real AWS's ZeppelinMonitoringConfiguration and ZeppelinMonitoringConfigurationDescription both use the field name "LogLevel").
type ZeppelinMonitoringConfigUpdate ¶ added in v1.3.1
type ZeppelinMonitoringConfigUpdate struct {
LogLevelUpdate string
}
ZeppelinMonitoringConfigUpdate describes an update to a Studio notebook's CloudWatch logging verbosity.
Source Files
¶
- application_config.go
- application_config_update.go
- application_snapshots.go
- application_update_apply.go
- application_versions.go
- applications.go
- errors.go
- handler.go
- handler_application_config.go
- handler_application_presigned_url.go
- handler_application_snapshots.go
- handler_application_update.go
- handler_application_versions.go
- handler_applications.go
- handler_tags.go
- interfaces.go
- models.go
- persistence.go
- provider.go
- store.go
- store_setup.go
- tags.go