Documentation
¶
Index ¶
- Variables
- type AccountAggregationSource
- type AggregateResourceIdentifier
- type AggregationAuthorization
- type BaseConfigurationItem
- type ComplianceByConfigRule
- type ComplianceResult
- type ComplianceSummary
- type ComplianceSummaryByResourceType
- type ComplianceSummaryDetail
- type ConfigRule
- type ConfigRuleEvaluationStatus
- type ConfigRuleScope
- type ConfigRuleSource
- type ConfigurationAggregator
- type ConfigurationRecorder
- type ConfigurationRecorderStatus
- type ConfigurationRecorderSummary
- type ConformancePack
- type ConformancePackComplianceItem
- type ConformancePackStatus
- type DeliveryChannel
- type DeliveryChannelStatus
- type DeliveryChannelStatusInfo
- type DeliverySnapshotProperties
- type DetailedEvaluationResult
- type EvaluationResult
- type EvaluationResultIdentifier
- type EvaluationResultQualifier
- 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) AssociateResourceTypes(recorderARN string, resourceTypes []string) (*ConfigurationRecorder, error)
- func (b *InMemoryBackend) BatchGetAggregateResourceConfig(_ string, identifiers []AggregateResourceIdentifier) ([]BaseConfigurationItem, []AggregateResourceIdentifier)
- func (b *InMemoryBackend) BatchGetResourceConfig(keys []ResourceKey) ([]BaseConfigurationItem, []ResourceKey)
- func (b *InMemoryBackend) DeleteAggregationAuthorization(accountID, region string) error
- func (b *InMemoryBackend) DeleteConfigRule(name string) error
- func (b *InMemoryBackend) DeleteConfigurationAggregator(name string) error
- func (b *InMemoryBackend) DeleteConfigurationRecorder(name string) error
- func (b *InMemoryBackend) DeleteConformancePack(name string) error
- func (b *InMemoryBackend) DeleteDeliveryChannel(name string) error
- func (b *InMemoryBackend) DeleteEvaluationResults(ruleName string) error
- func (b *InMemoryBackend) DeleteOrganizationConfigRule(name string) error
- func (b *InMemoryBackend) DeleteOrganizationConformancePack(name string) error
- func (b *InMemoryBackend) DeletePendingAggregationRequest(_, _ string) error
- func (b *InMemoryBackend) DeleteRemediationConfiguration(ruleName string) error
- func (b *InMemoryBackend) DeleteRemediationExceptions(ruleName, resourceID string) error
- func (b *InMemoryBackend) DeleteResourceConfig(resourceType, resourceID string) error
- func (b *InMemoryBackend) DeleteRetentionConfiguration(name string) error
- func (b *InMemoryBackend) DeleteServiceLinkedConfigurationRecorder(_ string) error
- func (b *InMemoryBackend) DeleteStoredQuery(name string) error
- func (b *InMemoryBackend) DeliverConfigSnapshot(_ string) error
- func (b *InMemoryBackend) DescribeAggregateComplianceByConfigRules() []any
- func (b *InMemoryBackend) DescribeAggregateComplianceByConformancePacks() []any
- func (b *InMemoryBackend) DescribeAggregationAuthorizations() []AggregationAuthorization
- func (b *InMemoryBackend) DescribeComplianceByConfigRule(names []string) []ComplianceByConfigRule
- func (b *InMemoryBackend) DescribeComplianceByResource() []any
- func (b *InMemoryBackend) DescribeConfigRuleEvaluationStatus(names []string) []ConfigRuleEvaluationStatus
- func (b *InMemoryBackend) DescribeConfigRules(names []string) []ConfigRule
- func (b *InMemoryBackend) DescribeConfigurationAggregatorSourcesStatus() []any
- func (b *InMemoryBackend) DescribeConfigurationAggregators() []ConfigurationAggregator
- func (b *InMemoryBackend) DescribeConfigurationRecorderStatus(names []string) []ConfigurationRecorderStatus
- func (b *InMemoryBackend) DescribeConfigurationRecorders(names []string) []ConfigurationRecorder
- func (b *InMemoryBackend) DescribeConformancePackCompliance(_ string) []ConformancePackComplianceItem
- func (b *InMemoryBackend) DescribeConformancePackStatus(names []string) []ConformancePackStatus
- func (b *InMemoryBackend) DescribeConformancePacks() []ConformancePack
- func (b *InMemoryBackend) DescribeDeliveryChannelStatus(names []string) []DeliveryChannelStatus
- func (b *InMemoryBackend) DescribeDeliveryChannels(names []string) []DeliveryChannel
- func (b *InMemoryBackend) DescribeOrganizationConfigRuleStatuses(names []string) []OrganizationConfigRuleStatus
- func (b *InMemoryBackend) DescribeOrganizationConfigRules() []OrganizationConfigRule
- func (b *InMemoryBackend) DescribeOrganizationConformancePackStatuses(names []string) []OrganizationConformancePackStatus
- func (b *InMemoryBackend) DescribeOrganizationConformancePacks() []OrganizationConformancePack
- func (b *InMemoryBackend) DescribePendingAggregationRequests() []any
- func (b *InMemoryBackend) DescribeRemediationConfigurations(ruleNames []string) []RemediationConfiguration
- func (b *InMemoryBackend) DescribeRemediationExceptions(ruleName string) []RemediationException
- func (b *InMemoryBackend) DescribeRemediationExecutionStatus() []any
- func (b *InMemoryBackend) DescribeRetentionConfigurations() []RetentionConfiguration
- func (b *InMemoryBackend) DisassociateResourceTypes(recorderARN string, resourceTypes []string) error
- func (b *InMemoryBackend) GetAggregateComplianceDetailsByConfigRule() []any
- func (b *InMemoryBackend) GetAggregateConfigRuleComplianceSummary() []any
- func (b *InMemoryBackend) GetAggregateConformancePackComplianceSummary() []any
- func (b *InMemoryBackend) GetAggregateDiscoveredResourceCounts() int32
- func (b *InMemoryBackend) GetAggregateResourceConfig() *BaseConfigurationItem
- func (b *InMemoryBackend) GetComplianceDetailsByConfigRule(ruleName string, complianceTypes []string) []DetailedEvaluationResult
- func (b *InMemoryBackend) GetComplianceDetailsByResource(resourceType, resourceID string, complianceTypes []string) []DetailedEvaluationResult
- func (b *InMemoryBackend) GetComplianceSummaryByConfigRule() []ComplianceSummary
- func (b *InMemoryBackend) GetComplianceSummaryByResourceType(resourceTypes []string) []ComplianceSummaryByResourceType
- func (b *InMemoryBackend) GetConfigRuleComplianceType(ruleName string) string
- func (b *InMemoryBackend) GetConformancePackComplianceDetails() []any
- func (b *InMemoryBackend) GetConformancePackComplianceSummary() []any
- func (b *InMemoryBackend) GetCustomRulePolicy(ruleName string) string
- func (b *InMemoryBackend) GetDiscoveredResourceCounts() int64
- func (b *InMemoryBackend) GetOrganizationConfigRuleDetailedStatus() []any
- func (b *InMemoryBackend) GetOrganizationConformancePackDetailedStatus() []any
- func (b *InMemoryBackend) GetOrganizationCustomRulePolicy(ruleName string) string
- func (b *InMemoryBackend) GetResourceConfigHistory(resourceType, resourceID string) []ResourceConfigItem
- func (b *InMemoryBackend) GetResourceConfigHistoryPage(resourceType, resourceID string, limit int, token string) ([]ResourceConfigItem, string)
- func (b *InMemoryBackend) GetResourceEvaluationSummaryByID(id string) *ResourceEvaluation
- func (b *InMemoryBackend) GetStoredQuery(name string) *StoredQuery
- func (b *InMemoryBackend) ListAggregateDiscoveredResources() []any
- func (b *InMemoryBackend) ListConfigurationRecorders() []ConfigurationRecorderSummary
- func (b *InMemoryBackend) ListConformancePackComplianceScores() []any
- func (b *InMemoryBackend) ListDiscoveredResources(resourceType string) []ResourceConfigItem
- func (b *InMemoryBackend) ListResourceEvaluationSummaries() []ResourceEvaluation
- func (b *InMemoryBackend) ListStoredQueries() []StoredQueryMetadata
- func (b *InMemoryBackend) ListTagsForResource(arn string) []Tag
- func (b *InMemoryBackend) PutAggregationAuthorization(accountID, region string) error
- func (b *InMemoryBackend) PutConfigRule(input *ConfigRule) error
- func (b *InMemoryBackend) PutConfigurationAggregator(name string, accountSources []AccountAggregationSource, ...) error
- func (b *InMemoryBackend) PutConfigurationRecorder(name, roleARN string, recordingGroup *RecordingGroup) error
- func (b *InMemoryBackend) PutConformancePack(name, deliveryS3Bucket, deliveryS3KeyPrefix string) error
- func (b *InMemoryBackend) PutDeliveryChannel(name, s3Bucket, snsArn, s3KeyPrefix string, props *DeliverySnapshotProperties) error
- func (b *InMemoryBackend) PutEvaluations(results []EvaluationResult) error
- func (b *InMemoryBackend) PutExternalEvaluation(result EvaluationResult) error
- func (b *InMemoryBackend) PutOrganizationConfigRule(name string) error
- func (b *InMemoryBackend) PutOrganizationConformancePack(name string) error
- func (b *InMemoryBackend) PutRemediationConfigurations(configs []RemediationConfiguration) error
- func (b *InMemoryBackend) PutRemediationExceptions(ruleName, resourceType, resourceID string) error
- func (b *InMemoryBackend) PutResourceConfig(resourceType, resourceID, configuration string) error
- func (b *InMemoryBackend) PutRetentionConfiguration(name string, days int32) error
- func (b *InMemoryBackend) PutServiceLinkedConfigurationRecorder() error
- func (b *InMemoryBackend) PutStoredQuery(name string) error
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) SelectAggregateResourceConfig(expression string) []string
- func (b *InMemoryBackend) SelectResourceConfig(expression string) []string
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartConfigRulesEvaluation() error
- func (b *InMemoryBackend) StartConfigRulesEvaluationFor(names []string) error
- func (b *InMemoryBackend) StartConfigurationRecorder(name string) error
- func (b *InMemoryBackend) StartRemediationExecution() error
- func (b *InMemoryBackend) StartResourceEvaluation(resourceType, resourceID, evaluationMode, configuration string) string
- func (b *InMemoryBackend) StopConfigurationRecorder(name string) error
- func (b *InMemoryBackend) TagResource(arn string, tags []Tag) error
- func (b *InMemoryBackend) UntagResource(arn string, keys []string) error
- type OrganizationAggregationSource
- type OrganizationConfigRule
- type OrganizationConfigRuleStatus
- type OrganizationConformancePack
- type OrganizationConformancePackStatus
- type Provider
- type RecordingGroup
- type RemediationConfiguration
- type RemediationException
- type ResourceConfigItem
- type ResourceCount
- type ResourceEvaluation
- type ResourceKey
- type RetentionConfiguration
- type StoredEvaluation
- type StoredQuery
- type StoredQueryMetadata
- type Tag
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotFound is returned when a configuration recorder is not found. ErrNotFound = awserr.New("NoSuchConfigurationRecorder", awserr.ErrNotFound) // ErrNoSuchDeliveryChannel is returned when a delivery channel is not found. ErrNoSuchDeliveryChannel = awserr.New("NoSuchDeliveryChannelException", awserr.ErrNotFound) // ErrNoSuchConfigRule is returned when a config rule is not found. ErrNoSuchConfigRule = awserr.New("NoSuchConfigRuleException", awserr.ErrNotFound) // ErrNoSuchAggregator is returned when a configuration aggregator is not found. ErrNoSuchAggregator = awserr.New("NoSuchConfigurationAggregatorException", awserr.ErrNotFound) // ErrNoSuchConformancePack is returned when a conformance pack is not found. ErrNoSuchConformancePack = awserr.New("NoSuchConformancePackException", awserr.ErrNotFound) // ErrNoSuchOrganizationConfigRule is returned when an organization config rule is not found. ErrNoSuchOrganizationConfigRule = awserr.New("NoSuchOrganizationConfigRuleException", awserr.ErrNotFound) // ErrNoSuchOrganizationConformancePack is returned when an org conformance pack is not found. // The wire error type is NoSuchOrganizationConformancePackException (verified against // aws-sdk-go-v2/service/configservice's DeleteOrganizationConformancePack deserializer). ErrNoSuchOrganizationConformancePack = awserr.New( "NoSuchOrganizationConformancePackException", awserr.ErrNotFound, ) // ErrAlreadyExists is returned when a resource already exists. ErrAlreadyExists = awserr.New("MaxNumberOfConfigurationRecordersExceededException", awserr.ErrAlreadyExists) // ErrNoDeliveryChannel is returned when starting a recorder with no delivery channel configured. ErrNoDeliveryChannel = awserr.New("NoAvailableDeliveryChannelException", awserr.ErrInvalidParameter) // ErrValidation is returned when a required field is missing or invalid. ErrValidation = awserr.New("ValidationException", awserr.ErrInvalidParameter) // ErrResourceNotFound is returned when a referenced resource evaluation does not exist. ErrResourceNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) )
Functions ¶
This section is empty.
Types ¶
type AccountAggregationSource ¶
type AccountAggregationSource struct {
AccountIDs []string `json:"AccountIds"`
AwsRegions []string `json:"AwsRegions,omitempty"`
AllAwsRegions bool `json:"AllAwsRegions,omitempty"`
}
AccountAggregationSource identifies AWS accounts to aggregate from.
type AggregateResourceIdentifier ¶
type AggregateResourceIdentifier struct {
SourceAccountID string `json:"SourceAccountId,omitempty"`
SourceRegion string `json:"SourceRegion,omitempty"`
ResourceID string `json:"ResourceId,omitempty"`
ResourceType string `json:"ResourceType,omitempty"`
}
AggregateResourceIdentifier identifies a resource in an aggregator.
type AggregationAuthorization ¶
type AggregationAuthorization struct {
AggregationAuthorizationArn string `json:"AggregationAuthorizationArn,omitempty"`
AuthorizedAccountID string `json:"authorizedAccountId"`
AuthorizedAwsRegion string `json:"authorizedAwsRegion"`
CreationTime string `json:"CreationTime,omitempty"`
}
AggregationAuthorization represents an AWS Config aggregation authorization.
type BaseConfigurationItem ¶
type BaseConfigurationItem struct {
ResourceType string `json:"resourceType,omitempty"`
ResourceID string `json:"resourceId,omitempty"`
}
BaseConfigurationItem is a lightweight configuration snapshot for a single resource.
type ComplianceByConfigRule ¶
type ComplianceByConfigRule struct {
ConfigRuleName string `json:"ConfigRuleName"`
Compliance ComplianceResult `json:"Compliance"`
}
ComplianceByConfigRule holds compliance information for a config rule.
type ComplianceResult ¶
type ComplianceResult struct {
ComplianceType string `json:"ComplianceType"`
}
ComplianceResult holds a compliance type value.
type ComplianceSummary ¶
type ComplianceSummary struct {
ComplianceType string `json:"ComplianceType"`
ComplianceSummary ComplianceSummaryDetail `json:"ComplianceSummary"`
}
ComplianceSummary holds a compliance summary by type.
type ComplianceSummaryByResourceType ¶
type ComplianceSummaryByResourceType struct {
ResourceType string `json:"ResourceType"`
ComplianceSummary ComplianceSummaryDetail `json:"ComplianceSummary"`
}
ComplianceSummaryByResourceType holds a compliance summary for one resource type.
type ComplianceSummaryDetail ¶
type ComplianceSummaryDetail struct {
CompliantResourceCount ResourceCount `json:"CompliantResourceCount"`
NonCompliantResourceCount ResourceCount `json:"NonCompliantResourceCount"`
}
ComplianceSummaryDetail holds the per-compliance-type counts.
type ConfigRule ¶
type ConfigRule struct {
Source *ConfigRuleSource `json:"Source,omitempty"`
Scope *ConfigRuleScope `json:"Scope,omitempty"`
ConfigRuleName string `json:"ConfigRuleName"`
ConfigRuleArn string `json:"ConfigRuleArn,omitempty"`
ConfigRuleID string `json:"ConfigRuleId,omitempty"`
Description string `json:"Description,omitempty"`
InputParameters string `json:"InputParameters,omitempty"`
MaximumExecutionFrequency string `json:"MaximumExecutionFrequency,omitempty"`
ConfigRuleState string `json:"ConfigRuleState,omitempty"`
}
ConfigRule represents an AWS Config config rule.
type ConfigRuleEvaluationStatus ¶
type ConfigRuleEvaluationStatus struct {
ConfigRuleName string `json:"ConfigRuleName"`
LastSuccessfulInvocationTime string `json:"LastSuccessfulInvocationTime,omitempty"`
LastFailedInvocationTime string `json:"LastFailedInvocationTime,omitempty"`
LastSuccessfulEvaluationTime string `json:"LastSuccessfulEvaluationTime,omitempty"`
LastFailedEvaluationTime string `json:"LastFailedEvaluationTime,omitempty"`
}
ConfigRuleEvaluationStatus holds the evaluation status for a config rule.
type ConfigRuleScope ¶
type ConfigRuleScope struct {
ComplianceResourceID string `json:"ComplianceResourceId,omitempty"`
TagKey string `json:"TagKey,omitempty"`
TagValue string `json:"TagValue,omitempty"`
ComplianceResourceTypes []string `json:"ComplianceResourceTypes,omitempty"`
}
ConfigRuleScope restricts which resources trigger an AWS Config rule.
type ConfigRuleSource ¶
type ConfigRuleSource struct {
Owner string `json:"Owner,omitempty"`
SourceIdentifier string `json:"SourceIdentifier,omitempty"`
}
ConfigRuleSource represents the source definition of an AWS Config config rule.
type ConfigurationAggregator ¶
type ConfigurationAggregator struct {
OrganizationAggregationSource *OrganizationAggregationSource `json:"OrganizationAggregationSource,omitempty"`
ConfigurationAggregatorArn string `json:"ConfigurationAggregatorArn,omitempty"`
ConfigurationAggregatorName string `json:"ConfigurationAggregatorName"`
CreationTime string `json:"CreationTime,omitempty"`
AccountAggregationSources []AccountAggregationSource `json:"AccountAggregationSources,omitempty"`
}
ConfigurationAggregator represents an AWS Config configuration aggregator.
type ConfigurationRecorder ¶
type ConfigurationRecorder struct {
RecordingGroup *RecordingGroup `json:"recordingGroup,omitempty"`
Arn string `json:"arn,omitempty"`
Name string `json:"name"`
RoleARN string `json:"roleARN"`
Status string `json:"status,omitempty"` // PENDING or ACTIVE
}
ConfigurationRecorder represents an AWS Config configuration recorder.
type ConfigurationRecorderStatus ¶
type ConfigurationRecorderStatus struct {
LastErrorCode string `json:"lastErrorCode,omitempty"`
LastStartTime string `json:"lastStartTime,omitempty"`
LastStatus string `json:"lastStatus,omitempty"`
LastStopTime string `json:"lastStopTime,omitempty"`
Name string `json:"name"`
Recording bool `json:"recording"`
}
ConfigurationRecorderStatus represents the recording status of a recorder.
type ConfigurationRecorderSummary ¶
type ConfigurationRecorderSummary struct {
Arn string `json:"arn"`
Name string `json:"name"`
RecordingScope string `json:"recordingScope"`
}
ConfigurationRecorderSummary is a lightweight summary returned by ListConfigurationRecorders.
type ConformancePack ¶
type ConformancePack struct {
ConformancePackArn string `json:"ConformancePackArn,omitempty"`
ConformancePackID string `json:"ConformancePackId,omitempty"`
ConformancePackName string `json:"ConformancePackName"`
DeliveryS3Bucket string `json:"DeliveryS3Bucket,omitempty"`
DeliveryS3KeyPrefix string `json:"DeliveryS3KeyPrefix,omitempty"`
LastUpdateRequestedTime string `json:"LastUpdateRequestedTime,omitempty"`
}
ConformancePack represents an AWS Config conformance pack.
type ConformancePackComplianceItem ¶
type ConformancePackComplianceItem struct {
ConfigRuleName string `json:"ConfigRuleName"`
ComplianceType string `json:"ComplianceType"`
}
ConformancePackComplianceItem holds compliance info for a conformance pack rule.
type ConformancePackStatus ¶
type ConformancePackStatus struct {
ConformancePackName string `json:"ConformancePackName"`
ConformancePackState string `json:"ConformancePackState"`
ConformancePackArn string `json:"ConformancePackArn"`
}
ConformancePackStatus holds status of a conformance pack.
type DeliveryChannel ¶
type DeliveryChannel struct {
ConfigSnapshotDeliveryProperties *DeliverySnapshotProperties `json:"configSnapshotDeliveryProperties,omitempty"`
Name string `json:"name"`
S3Bucket string `json:"s3BucketName,omitempty"`
S3KeyPrefix string `json:"s3KeyPrefix,omitempty"`
SNSArn string `json:"snsTopicARN,omitempty"`
}
DeliveryChannel represents an AWS Config delivery channel.
type DeliveryChannelStatus ¶
type DeliveryChannelStatus struct {
ConfigHistoryDeliveryInfo *DeliveryChannelStatusInfo `json:"ConfigHistoryDeliveryInfo,omitempty"`
ConfigStreamDeliveryInfo *DeliveryChannelStatusInfo `json:"ConfigStreamDeliveryInfo,omitempty"`
Name string `json:"Name"`
}
DeliveryChannelStatus holds the status of a delivery channel.
type DeliveryChannelStatusInfo ¶
type DeliveryChannelStatusInfo struct {
LastStatus string `json:"LastStatus"`
LastAttemptTime float64 `json:"LastAttemptTime"`
}
DeliveryChannelStatusInfo holds status info for a delivery channel.
type DeliverySnapshotProperties ¶
type DeliverySnapshotProperties struct {
DeliveryFrequency string `json:"deliveryFrequency,omitempty"`
}
DeliverySnapshotProperties holds snapshot delivery configuration for a channel.
type DetailedEvaluationResult ¶
type DetailedEvaluationResult struct {
ComplianceType string `json:"ComplianceType"`
Annotation string `json:"Annotation,omitempty"`
EvaluationResultIdentifier EvaluationResultIdentifier `json:"EvaluationResultIdentifier"`
ResultRecordedTime float64 `json:"ResultRecordedTime"`
ConfigRuleInvokedTime float64 `json:"ConfigRuleInvokedTime"`
}
DetailedEvaluationResult is the per-resource evaluation result returned by the GetComplianceDetailsBy* APIs. Timestamps are epoch seconds.
type EvaluationResult ¶
type EvaluationResult struct {
ConfigRuleName string `json:"ConfigRuleName"`
ComplianceType string `json:"ComplianceType"`
ResourceType string `json:"ResourceType"`
ResourceID string `json:"ResourceId"`
Annotation string `json:"Annotation,omitempty"`
}
EvaluationResult holds an evaluation result for a config rule.
type EvaluationResultIdentifier ¶
type EvaluationResultIdentifier struct {
EvaluationResultQualifier EvaluationResultQualifier `json:"EvaluationResultQualifier"`
OrderingTimestamp float64 `json:"OrderingTimestamp"`
}
EvaluationResultIdentifier uniquely identifies an evaluation result.
type EvaluationResultQualifier ¶
type EvaluationResultQualifier struct {
ConfigRuleName string `json:"ConfigRuleName"`
ResourceType string `json:"ResourceType,omitempty"`
ResourceID string `json:"ResourceId,omitempty"`
}
EvaluationResultQualifier identifies the rule and resource an evaluation is for.
type Handler ¶
type Handler struct {
Backend *InMemoryBackend
// contains filtered or unexported fields
}
Handler is the Echo HTTP handler for AWS Config operations.
func NewHandler ¶
func NewHandler(backend *InMemoryBackend) *Handler
NewHandler creates a new AWS Config handler.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this AWS Config instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the AWS Config action from the X-Amz-Target header.
func (*Handler) ExtractResource ¶
ExtractResource extracts a resource identifier from the request body based on the operation.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns the list of supported AWS Config 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) Reset ¶
func (h *Handler) Reset()
Reset implements service.Resettable by delegating to the backend.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches AWS Config requests.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend is the in-memory store for AWS Config resources.
Phase 3.3 datalayer conversion: every map[string]*T resource collection is now a *store.Table[T] registered on b.registry (see store_setup.go's registerAllTables), which collapses Reset/Snapshot/Restore to one b.registry call each instead of one hand-written block per map. Fields whose value is not a *T (a scalar, a slice, or a nested map) have no natural store.Table key and are left as plain maps -- see each field's own comment for why, and persistence.go's doc comment for the persistence audit of each.
func NewInMemoryBackend ¶
func NewInMemoryBackend() *InMemoryBackend
NewInMemoryBackend creates a new InMemoryBackend.
func NewInMemoryBackendWithMeta ¶
func NewInMemoryBackendWithMeta(accountID, region string) *InMemoryBackend
NewInMemoryBackendWithMeta creates a new InMemoryBackend with account and region context.
func (*InMemoryBackend) AssociateResourceTypes ¶
func (b *InMemoryBackend) AssociateResourceTypes( recorderARN string, resourceTypes []string, ) (*ConfigurationRecorder, error)
AssociateResourceTypes adds resourceTypes to a configuration recorder's RecordingGroup, matching AssociateResourceTypesInput/Output (aws-sdk-go-v2/service/configservice). recorderARN may be the recorder's bare name or its full ARN. Errors with ErrNotFound (wire type NoSuchConfigurationRecorderException) when no matching recorder exists, matching the real API's declared error model instead of fabricating a synthetic recorder for unknown input.
func (*InMemoryBackend) BatchGetAggregateResourceConfig ¶
func (b *InMemoryBackend) BatchGetAggregateResourceConfig( _ string, identifiers []AggregateResourceIdentifier, ) ([]BaseConfigurationItem, []AggregateResourceIdentifier)
BatchGetAggregateResourceConfig returns configuration items for aggregate resources. This emulator does not model multi-account aggregation separately from the account's own resource-config state (mirroring SelectAggregateResourceConfig), so each identifier is resolved against b.resourceConfigs (populated by PutResourceConfig) instead of being blanket-reported unprocessed; only identifiers with no matching discovered resource are unprocessed.
func (*InMemoryBackend) BatchGetResourceConfig ¶
func (b *InMemoryBackend) BatchGetResourceConfig( keys []ResourceKey, ) ([]BaseConfigurationItem, []ResourceKey)
BatchGetResourceConfig returns configuration items for the requested resource keys, resolving each against b.resourceConfigs (populated by PutResourceConfig) instead of blanket-reporting every key unprocessed; only keys with no matching discovered resource are unprocessed.
func (*InMemoryBackend) DeleteAggregationAuthorization ¶
func (b *InMemoryBackend) DeleteAggregationAuthorization(accountID, region string) error
DeleteAggregationAuthorization deletes an aggregation authorization by account ID and region. Real AWS Config's DeleteAggregationAuthorization is idempotent -- its error model (verified against aws-sdk-go-v2/service/configservice's deserializer) only lists InvalidParameterValueException, never a not-found exception -- so deleting a nonexistent authorization succeeds silently, matching AWS.
func (*InMemoryBackend) DeleteConfigRule ¶
func (b *InMemoryBackend) DeleteConfigRule(name string) error
DeleteConfigRule deletes a config rule by name.
func (*InMemoryBackend) DeleteConfigurationAggregator ¶
func (b *InMemoryBackend) DeleteConfigurationAggregator(name string) error
DeleteConfigurationAggregator deletes a configuration aggregator by name.
func (*InMemoryBackend) DeleteConfigurationRecorder ¶
func (b *InMemoryBackend) DeleteConfigurationRecorder(name string) error
DeleteConfigurationRecorder removes a configuration recorder by name.
func (*InMemoryBackend) DeleteConformancePack ¶
func (b *InMemoryBackend) DeleteConformancePack(name string) error
DeleteConformancePack deletes a conformance pack by name.
func (*InMemoryBackend) DeleteDeliveryChannel ¶
func (b *InMemoryBackend) DeleteDeliveryChannel(name string) error
DeleteDeliveryChannel removes a delivery channel by name.
func (*InMemoryBackend) DeleteEvaluationResults ¶
func (b *InMemoryBackend) DeleteEvaluationResults(ruleName string) error
DeleteEvaluationResults clears the rollup and per-resource evaluation results recorded for a config rule (so a subsequent StartConfigRulesEvaluation starts from a clean slate), matching real AWS Config which errors NoSuchConfigRuleException for an unknown rule (verified against aws-sdk-go-v2/service/configservice's DeleteEvaluationResults deserializer).
func (*InMemoryBackend) DeleteOrganizationConfigRule ¶
func (b *InMemoryBackend) DeleteOrganizationConfigRule(name string) error
DeleteOrganizationConfigRule deletes an organization config rule by name.
func (*InMemoryBackend) DeleteOrganizationConformancePack ¶
func (b *InMemoryBackend) DeleteOrganizationConformancePack(name string) error
DeleteOrganizationConformancePack deletes an organization conformance pack by name.
func (*InMemoryBackend) DeletePendingAggregationRequest ¶
func (b *InMemoryBackend) DeletePendingAggregationRequest(_, _ string) error
DeletePendingAggregationRequest is a no-op stub.
func (*InMemoryBackend) DeleteRemediationConfiguration ¶
func (b *InMemoryBackend) DeleteRemediationConfiguration(ruleName string) error
DeleteRemediationConfiguration removes the remediation configuration for the given rule.
func (*InMemoryBackend) DeleteRemediationExceptions ¶
func (b *InMemoryBackend) DeleteRemediationExceptions(ruleName, resourceID string) error
DeleteRemediationExceptions removes an exception for a rule + resource.
func (*InMemoryBackend) DeleteResourceConfig ¶
func (b *InMemoryBackend) DeleteResourceConfig(resourceType, resourceID string) error
DeleteResourceConfig removes the discovered configuration item for a resource from b.resourceConfigs. Deletion is idempotent (no error for an already-absent resource), matching real AWS Config's DeleteResourceConfig error model (verified against aws-sdk-go-v2/service/configservice's deserializer: only NoRunningConfigurationRecorderException/ ValidationException, never a not-found exception). The resource's history (b.resourceHistory) is intentionally preserved, mirroring AWS which keeps prior configuration history entries after a resource is deleted.
func (*InMemoryBackend) DeleteRetentionConfiguration ¶
func (b *InMemoryBackend) DeleteRetentionConfiguration(name string) error
DeleteRetentionConfiguration removes a retention configuration by name.
func (*InMemoryBackend) DeleteServiceLinkedConfigurationRecorder ¶
func (b *InMemoryBackend) DeleteServiceLinkedConfigurationRecorder(_ string) error
DeleteServiceLinkedConfigurationRecorder is a no-op stub.
func (*InMemoryBackend) DeleteStoredQuery ¶
func (b *InMemoryBackend) DeleteStoredQuery(name string) error
DeleteStoredQuery removes the stored query with the given name.
func (*InMemoryBackend) DeliverConfigSnapshot ¶
func (b *InMemoryBackend) DeliverConfigSnapshot(_ string) error
DeliverConfigSnapshot is a no-op stub.
func (*InMemoryBackend) DescribeAggregateComplianceByConfigRules ¶
func (b *InMemoryBackend) DescribeAggregateComplianceByConfigRules() []any
DescribeAggregateComplianceByConfigRules returns compliance by rule using ruleEvaluations.
func (*InMemoryBackend) DescribeAggregateComplianceByConformancePacks ¶
func (b *InMemoryBackend) DescribeAggregateComplianceByConformancePacks() []any
DescribeAggregateComplianceByConformancePacks returns an empty list.
func (*InMemoryBackend) DescribeAggregationAuthorizations ¶
func (b *InMemoryBackend) DescribeAggregationAuthorizations() []AggregationAuthorization
DescribeAggregationAuthorizations returns all aggregation authorizations sorted by account ID then region.
func (*InMemoryBackend) DescribeComplianceByConfigRule ¶
func (b *InMemoryBackend) DescribeComplianceByConfigRule(names []string) []ComplianceByConfigRule
DescribeComplianceByConfigRule returns compliance info for the given rule names. If names is empty, all rules are returned.
func (*InMemoryBackend) DescribeComplianceByResource ¶
func (b *InMemoryBackend) DescribeComplianceByResource() []any
DescribeComplianceByResource returns an empty list (intentionally minimal stub).
func (*InMemoryBackend) DescribeConfigRuleEvaluationStatus ¶
func (b *InMemoryBackend) DescribeConfigRuleEvaluationStatus(names []string) []ConfigRuleEvaluationStatus
DescribeConfigRuleEvaluationStatus returns evaluation statuses for config rules. If names is empty, all rules are returned.
func (*InMemoryBackend) DescribeConfigRules ¶
func (b *InMemoryBackend) DescribeConfigRules(names []string) []ConfigRule
DescribeConfigRules returns config rules optionally filtered by name list, sorted by name.
func (*InMemoryBackend) DescribeConfigurationAggregatorSourcesStatus ¶
func (b *InMemoryBackend) DescribeConfigurationAggregatorSourcesStatus() []any
DescribeConfigurationAggregatorSourcesStatus returns an empty list.
func (*InMemoryBackend) DescribeConfigurationAggregators ¶
func (b *InMemoryBackend) DescribeConfigurationAggregators() []ConfigurationAggregator
DescribeConfigurationAggregators returns all aggregators sorted by name.
func (*InMemoryBackend) DescribeConfigurationRecorderStatus ¶
func (b *InMemoryBackend) DescribeConfigurationRecorderStatus(names []string) []ConfigurationRecorderStatus
DescribeConfigurationRecorderStatus returns recording status for recorders filtered by the provided name list. An empty/nil list returns status for all recorders, sorted by name.
func (*InMemoryBackend) DescribeConfigurationRecorders ¶
func (b *InMemoryBackend) DescribeConfigurationRecorders(names []string) []ConfigurationRecorder
DescribeConfigurationRecorders returns configuration recorders filtered by the provided name list. An empty/nil names list returns all recorders sorted by name.
func (*InMemoryBackend) DescribeConformancePackCompliance ¶
func (b *InMemoryBackend) DescribeConformancePackCompliance(_ string) []ConformancePackComplianceItem
DescribeConformancePackCompliance returns compliance items for a conformance pack. Returns an empty list (intentionally minimal stub).
func (*InMemoryBackend) DescribeConformancePackStatus ¶
func (b *InMemoryBackend) DescribeConformancePackStatus(names []string) []ConformancePackStatus
DescribeConformancePackStatus returns conformance pack statuses. If names is empty, all packs are returned.
func (*InMemoryBackend) DescribeConformancePacks ¶
func (b *InMemoryBackend) DescribeConformancePacks() []ConformancePack
DescribeConformancePacks returns all conformance packs.
func (*InMemoryBackend) DescribeDeliveryChannelStatus ¶
func (b *InMemoryBackend) DescribeDeliveryChannelStatus(names []string) []DeliveryChannelStatus
DescribeDeliveryChannelStatus returns statuses for delivery channels. If names is empty, all channels are returned.
func (*InMemoryBackend) DescribeDeliveryChannels ¶
func (b *InMemoryBackend) DescribeDeliveryChannels(names []string) []DeliveryChannel
DescribeDeliveryChannels returns delivery channels filtered by the provided name list. An empty/nil names list returns all channels sorted by name.
func (*InMemoryBackend) DescribeOrganizationConfigRuleStatuses ¶
func (b *InMemoryBackend) DescribeOrganizationConfigRuleStatuses(names []string) []OrganizationConfigRuleStatus
DescribeOrganizationConfigRuleStatuses returns statuses for organization config rules. If names is empty, all rules are returned.
func (*InMemoryBackend) DescribeOrganizationConfigRules ¶
func (b *InMemoryBackend) DescribeOrganizationConfigRules() []OrganizationConfigRule
DescribeOrganizationConfigRules returns all organization config rules.
func (*InMemoryBackend) DescribeOrganizationConformancePackStatuses ¶
func (b *InMemoryBackend) DescribeOrganizationConformancePackStatuses( names []string, ) []OrganizationConformancePackStatus
DescribeOrganizationConformancePackStatuses returns statuses for organization conformance packs. If names is empty, all packs are returned.
func (*InMemoryBackend) DescribeOrganizationConformancePacks ¶
func (b *InMemoryBackend) DescribeOrganizationConformancePacks() []OrganizationConformancePack
DescribeOrganizationConformancePacks returns all organization conformance packs.
func (*InMemoryBackend) DescribePendingAggregationRequests ¶
func (b *InMemoryBackend) DescribePendingAggregationRequests() []any
DescribePendingAggregationRequests returns an empty list.
func (*InMemoryBackend) DescribeRemediationConfigurations ¶
func (b *InMemoryBackend) DescribeRemediationConfigurations(ruleNames []string) []RemediationConfiguration
DescribeRemediationConfigurations returns remediation configurations for the given rule names. If ruleNames is empty, all configurations are returned.
func (*InMemoryBackend) DescribeRemediationExceptions ¶
func (b *InMemoryBackend) DescribeRemediationExceptions(ruleName string) []RemediationException
DescribeRemediationExceptions returns all remediation exceptions for the given rule name.
func (*InMemoryBackend) DescribeRemediationExecutionStatus ¶
func (b *InMemoryBackend) DescribeRemediationExecutionStatus() []any
DescribeRemediationExecutionStatus returns an empty list (intentionally minimal stub).
func (*InMemoryBackend) DescribeRetentionConfigurations ¶
func (b *InMemoryBackend) DescribeRetentionConfigurations() []RetentionConfiguration
DescribeRetentionConfigurations returns all retention configurations.
func (*InMemoryBackend) DisassociateResourceTypes ¶
func (b *InMemoryBackend) DisassociateResourceTypes(recorderARN string, resourceTypes []string) error
DisassociateResourceTypes removes resourceTypes from a configuration recorder's RecordingGroup, the inverse of AssociateResourceTypes. recorderARN may be the recorder's bare name or its full ARN. Errors with ErrNotFound (wire type NoSuchConfigurationRecorderException) when no matching recorder exists, matching the real API's declared error model (verified against aws-sdk-go-v2/service/configservice's DisassociateResourceTypes deserializer).
func (*InMemoryBackend) GetAggregateComplianceDetailsByConfigRule ¶
func (b *InMemoryBackend) GetAggregateComplianceDetailsByConfigRule() []any
GetAggregateComplianceDetailsByConfigRule returns an empty list (intentionally minimal stub).
func (*InMemoryBackend) GetAggregateConfigRuleComplianceSummary ¶
func (b *InMemoryBackend) GetAggregateConfigRuleComplianceSummary() []any
GetAggregateConfigRuleComplianceSummary returns an empty summary (intentionally minimal stub).
func (*InMemoryBackend) GetAggregateConformancePackComplianceSummary ¶
func (b *InMemoryBackend) GetAggregateConformancePackComplianceSummary() []any
GetAggregateConformancePackComplianceSummary returns an empty summary (intentionally minimal stub).
func (*InMemoryBackend) GetAggregateDiscoveredResourceCounts ¶
func (b *InMemoryBackend) GetAggregateDiscoveredResourceCounts() int32
GetAggregateDiscoveredResourceCounts returns the total count of discovered resources.
func (*InMemoryBackend) GetAggregateResourceConfig ¶
func (b *InMemoryBackend) GetAggregateResourceConfig() *BaseConfigurationItem
GetAggregateResourceConfig returns the first resource config found, or an empty item.
func (*InMemoryBackend) GetComplianceDetailsByConfigRule ¶
func (b *InMemoryBackend) GetComplianceDetailsByConfigRule( ruleName string, complianceTypes []string, ) []DetailedEvaluationResult
GetComplianceDetailsByConfigRule returns per-resource evaluation results for a config rule, optionally filtered to the given compliance types.
func (*InMemoryBackend) GetComplianceDetailsByResource ¶
func (b *InMemoryBackend) GetComplianceDetailsByResource( resourceType, resourceID string, complianceTypes []string, ) []DetailedEvaluationResult
GetComplianceDetailsByResource returns per-rule evaluation results recorded for a single resource, optionally filtered to the given compliance types.
func (*InMemoryBackend) GetComplianceSummaryByConfigRule ¶
func (b *InMemoryBackend) GetComplianceSummaryByConfigRule() []ComplianceSummary
GetComplianceSummaryByConfigRule returns a compliance summary aggregated from the recorded rule evaluations. AWS returns counts of compliant and non-compliant config rules; here we derive those counts from the stored per-rule compliance types populated via PutEvaluation(s)/PutExternalEvaluation. When no evaluations have been recorded the result is an empty slice.
func (*InMemoryBackend) GetComplianceSummaryByResourceType ¶
func (b *InMemoryBackend) GetComplianceSummaryByResourceType( resourceTypes []string, ) []ComplianceSummaryByResourceType
GetComplianceSummaryByResourceType returns compliant/non-compliant resource counts grouped by resource type, derived from the same per-(rule, resource) evaluation state (b.ruleResourceEvals) that rolls up into b.ruleEvaluations for DescribeAggregateComplianceByConfigRules. A resource counts as NON_COMPLIANT if any rule evaluated it as such, else COMPLIANT. When resourceTypes is non-empty, only those types are included.
func (*InMemoryBackend) GetConfigRuleComplianceType ¶
func (b *InMemoryBackend) GetConfigRuleComplianceType(ruleName string) string
GetConfigRuleComplianceType returns the rolled-up compliance type for a config rule after evaluation, or empty string if no evaluation has run for that rule yet.
func (*InMemoryBackend) GetConformancePackComplianceDetails ¶
func (b *InMemoryBackend) GetConformancePackComplianceDetails() []any
GetConformancePackComplianceDetails returns an empty list (intentionally minimal stub).
func (*InMemoryBackend) GetConformancePackComplianceSummary ¶
func (b *InMemoryBackend) GetConformancePackComplianceSummary() []any
GetConformancePackComplianceSummary returns an empty list (intentionally minimal stub).
func (*InMemoryBackend) GetCustomRulePolicy ¶
func (b *InMemoryBackend) GetCustomRulePolicy(ruleName string) string
GetCustomRulePolicy returns the policy text for the given custom rule.
func (*InMemoryBackend) GetDiscoveredResourceCounts ¶
func (b *InMemoryBackend) GetDiscoveredResourceCounts() int64
GetDiscoveredResourceCounts returns zero counts.
func (*InMemoryBackend) GetOrganizationConfigRuleDetailedStatus ¶
func (b *InMemoryBackend) GetOrganizationConfigRuleDetailedStatus() []any
GetOrganizationConfigRuleDetailedStatus returns an empty list.
func (*InMemoryBackend) GetOrganizationConformancePackDetailedStatus ¶
func (b *InMemoryBackend) GetOrganizationConformancePackDetailedStatus() []any
GetOrganizationConformancePackDetailedStatus returns an empty list.
func (*InMemoryBackend) GetOrganizationCustomRulePolicy ¶
func (b *InMemoryBackend) GetOrganizationCustomRulePolicy(ruleName string) string
GetOrganizationCustomRulePolicy returns the policy text for the given org custom rule.
func (*InMemoryBackend) GetResourceConfigHistory ¶
func (b *InMemoryBackend) GetResourceConfigHistory(resourceType, resourceID string) []ResourceConfigItem
GetResourceConfigHistory returns the full configuration history for a resource, most-recent first.
func (*InMemoryBackend) GetResourceConfigHistoryPage ¶
func (b *InMemoryBackend) GetResourceConfigHistoryPage( resourceType, resourceID string, limit int, token string, ) ([]ResourceConfigItem, string)
GetResourceConfigHistoryPage returns a page of a resource's configuration history (most-recent first) along with an opaque continuation token.
func (*InMemoryBackend) GetResourceEvaluationSummaryByID ¶
func (b *InMemoryBackend) GetResourceEvaluationSummaryByID(id string) *ResourceEvaluation
GetResourceEvaluationSummaryByID returns the recorded resource evaluation, or nil when the id is unknown.
func (*InMemoryBackend) GetStoredQuery ¶
func (b *InMemoryBackend) GetStoredQuery(name string) *StoredQuery
GetStoredQuery returns the stored query with the given name, or nil if not found.
func (*InMemoryBackend) ListAggregateDiscoveredResources ¶
func (b *InMemoryBackend) ListAggregateDiscoveredResources() []any
ListAggregateDiscoveredResources returns an empty list.
func (*InMemoryBackend) ListConfigurationRecorders ¶
func (b *InMemoryBackend) ListConfigurationRecorders() []ConfigurationRecorderSummary
ListConfigurationRecorders returns summaries of all configuration recorders.
func (*InMemoryBackend) ListConformancePackComplianceScores ¶
func (b *InMemoryBackend) ListConformancePackComplianceScores() []any
ListConformancePackComplianceScores returns an empty list.
func (*InMemoryBackend) ListDiscoveredResources ¶
func (b *InMemoryBackend) ListDiscoveredResources(resourceType string) []ResourceConfigItem
ListDiscoveredResources returns all discovered resources of the given type.
func (*InMemoryBackend) ListResourceEvaluationSummaries ¶
func (b *InMemoryBackend) ListResourceEvaluationSummaries() []ResourceEvaluation
ListResourceEvaluationSummaries returns all recorded resource evaluations, most-recent first.
func (*InMemoryBackend) ListStoredQueries ¶
func (b *InMemoryBackend) ListStoredQueries() []StoredQueryMetadata
ListStoredQueries returns metadata for all stored queries.
func (*InMemoryBackend) ListTagsForResource ¶
func (b *InMemoryBackend) ListTagsForResource(arn string) []Tag
ListTagsForResource returns all tags for the resource identified by arn.
func (*InMemoryBackend) PutAggregationAuthorization ¶
func (b *InMemoryBackend) PutAggregationAuthorization(accountID, region string) error
PutAggregationAuthorization creates or updates an aggregation authorization.
func (*InMemoryBackend) PutConfigRule ¶
func (b *InMemoryBackend) PutConfigRule(input *ConfigRule) error
PutConfigRule creates or updates a config rule with full metadata.
func (*InMemoryBackend) PutConfigurationAggregator ¶
func (b *InMemoryBackend) PutConfigurationAggregator( name string, accountSources []AccountAggregationSource, orgSource *OrganizationAggregationSource, ) error
PutConfigurationAggregator creates or updates a configuration aggregator.
func (*InMemoryBackend) PutConfigurationRecorder ¶
func (b *InMemoryBackend) PutConfigurationRecorder(name, roleARN string, recordingGroup *RecordingGroup) error
PutConfigurationRecorder creates or updates a configuration recorder. When updating an existing recorder, the Status is preserved; RoleARN and RecordingGroup are updated. A new recorder starts in PENDING state.
func (*InMemoryBackend) PutConformancePack ¶
func (b *InMemoryBackend) PutConformancePack(name, deliveryS3Bucket, deliveryS3KeyPrefix string) error
PutConformancePack creates or updates a conformance pack.
func (*InMemoryBackend) PutDeliveryChannel ¶
func (b *InMemoryBackend) PutDeliveryChannel( name, s3Bucket, snsArn, s3KeyPrefix string, props *DeliverySnapshotProperties, ) error
PutDeliveryChannel creates or updates a delivery channel.
func (*InMemoryBackend) PutEvaluations ¶
func (b *InMemoryBackend) PutEvaluations(results []EvaluationResult) error
PutEvaluations stores evaluation results from an AWS Lambda function for a config rule. Each result is retained per-(rule, resource) so the compliance detail APIs can return real per-resource outcomes.
func (*InMemoryBackend) PutExternalEvaluation ¶
func (b *InMemoryBackend) PutExternalEvaluation(result EvaluationResult) error
PutExternalEvaluation stores a single external evaluation result per-resource.
func (*InMemoryBackend) PutOrganizationConfigRule ¶
func (b *InMemoryBackend) PutOrganizationConfigRule(name string) error
PutOrganizationConfigRule creates or updates an organization config rule.
func (*InMemoryBackend) PutOrganizationConformancePack ¶
func (b *InMemoryBackend) PutOrganizationConformancePack(name string) error
PutOrganizationConformancePack creates or updates an organization conformance pack.
func (*InMemoryBackend) PutRemediationConfigurations ¶
func (b *InMemoryBackend) PutRemediationConfigurations(configs []RemediationConfiguration) error
PutRemediationConfigurations stores remediation configurations keyed by rule name.
func (*InMemoryBackend) PutRemediationExceptions ¶
func (b *InMemoryBackend) PutRemediationExceptions(ruleName, resourceType, resourceID string) error
PutRemediationExceptions stores a remediation exception for a rule + resource.
func (*InMemoryBackend) PutResourceConfig ¶
func (b *InMemoryBackend) PutResourceConfig(resourceType, resourceID, configuration string) error
PutResourceConfig stores configuration for a resource. The latest state is kept for discovery, and a configuration-history entry is appended whenever the configuration actually changes (mirroring AWS Config which records on change).
func (*InMemoryBackend) PutRetentionConfiguration ¶
func (b *InMemoryBackend) PutRetentionConfiguration(name string, days int32) error
PutRetentionConfiguration creates or updates a retention configuration.
func (*InMemoryBackend) PutServiceLinkedConfigurationRecorder ¶
func (b *InMemoryBackend) PutServiceLinkedConfigurationRecorder() error
PutServiceLinkedConfigurationRecorder is a no-op stub.
func (*InMemoryBackend) PutStoredQuery ¶
func (b *InMemoryBackend) PutStoredQuery(name string) error
PutStoredQuery stores a query by name.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all in-memory state. Note conformancePackCounter and aggregatorCounter are deliberately NOT reset here -- this is a pre-existing quirk of the map-based implementation (they were never zeroed in the old Reset either), preserved as-is per Phase 3.3's mechanical-conversion scope.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot. It implements persistence.Persistable.
func (*InMemoryBackend) SelectAggregateResourceConfig ¶
func (b *InMemoryBackend) SelectAggregateResourceConfig(expression string) []string
SelectAggregateResourceConfig evaluates the same query language as SelectResourceConfig. This emulator does not model multi-account aggregation separately from the account's own resource-config state, so (mirroring DescribeAggregateComplianceByConfigRules, which reuses the account's rule evaluations for its aggregate view) it reuses resourceConfigItemsLocked rather than returning an empty result.
func (*InMemoryBackend) SelectResourceConfig ¶
func (b *InMemoryBackend) SelectResourceConfig(expression string) []string
SelectResourceConfig evaluates a minimal SQL-like "SELECT fields WHERE key = value / LIKE pattern" query (see select_query.go) against the account's discovered resource configurations, instead of ignoring the query entirely.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON. It implements persistence.Persistable.
func (*InMemoryBackend) StartConfigRulesEvaluation ¶
func (b *InMemoryBackend) StartConfigRulesEvaluation() error
StartConfigRulesEvaluation evaluates every config rule against current state.
func (*InMemoryBackend) StartConfigRulesEvaluationFor ¶
func (b *InMemoryBackend) StartConfigRulesEvaluationFor(names []string) error
StartConfigRulesEvaluationFor evaluates the named config rules (all when empty). Managed rules with modelable logic are evaluated against stored resource config items; custom rules keep whatever PutEvaluations reported; unmodelable managed rules are reported as INSUFFICIENT_DATA rather than blanket COMPLIANT.
func (*InMemoryBackend) StartConfigurationRecorder ¶
func (b *InMemoryBackend) StartConfigurationRecorder(name string) error
StartConfigurationRecorder starts a configuration recorder.
func (*InMemoryBackend) StartRemediationExecution ¶
func (b *InMemoryBackend) StartRemediationExecution() error
StartRemediationExecution is an intentionally minimal no-op stub.
func (*InMemoryBackend) StartResourceEvaluation ¶
func (b *InMemoryBackend) StartResourceEvaluation( resourceType, resourceID, evaluationMode, configuration string, ) string
StartResourceEvaluation records a resource evaluation run and returns its unique identifier.
func (*InMemoryBackend) StopConfigurationRecorder ¶
func (b *InMemoryBackend) StopConfigurationRecorder(name string) error
StopConfigurationRecorder stops an active configuration recorder.
func (*InMemoryBackend) TagResource ¶
func (b *InMemoryBackend) TagResource(arn string, tags []Tag) error
TagResource adds tags to the resource identified by arn.
func (*InMemoryBackend) UntagResource ¶
func (b *InMemoryBackend) UntagResource(arn string, keys []string) error
UntagResource removes tags from the resource identified by arn.
type OrganizationAggregationSource ¶
type OrganizationAggregationSource struct {
RoleArn string `json:"RoleArn"`
AwsRegions []string `json:"AwsRegions,omitempty"`
AllAwsRegions bool `json:"AllAwsRegions,omitempty"`
}
OrganizationAggregationSource identifies an organization to aggregate from.
type OrganizationConfigRule ¶
type OrganizationConfigRule struct {
OrganizationConfigRuleName string `json:"organizationConfigRuleName"`
}
OrganizationConfigRule represents an AWS Config organization config rule.
type OrganizationConfigRuleStatus ¶
type OrganizationConfigRuleStatus struct {
OrganizationConfigRuleName string `json:"OrganizationConfigRuleName"`
OrganizationRuleStatus string `json:"OrganizationRuleStatus"`
}
OrganizationConfigRuleStatus holds the status of an organization config rule.
type OrganizationConformancePack ¶
type OrganizationConformancePack struct {
OrganizationConformancePackName string `json:"organizationConformancePackName"`
}
OrganizationConformancePack represents an AWS Config organization conformance pack.
type OrganizationConformancePackStatus ¶
type OrganizationConformancePackStatus struct {
OrganizationConformancePackName string `json:"OrganizationConformancePackName"`
Status string `json:"Status"`
}
OrganizationConformancePackStatus holds the status of an organization conformance pack.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for AWS Config.
func (*Provider) Init ¶
func (p *Provider) Init(_ *service.AppContext) (service.Registerable, error)
Init initializes the AWS Config service backend and handler.
type RecordingGroup ¶
type RecordingGroup struct {
ResourceTypes []string `json:"resourceTypes,omitempty"`
AllSupported bool `json:"allSupported,omitempty"`
IncludeGlobalResourceTypes bool `json:"includeGlobalResourceTypes,omitempty"`
}
RecordingGroup holds the resource recording configuration for a recorder.
type RemediationConfiguration ¶
type RemediationConfiguration struct {
ConfigRuleName string `json:"ConfigRuleName"`
TargetType string `json:"TargetType"`
TargetID string `json:"TargetId"`
}
RemediationConfiguration holds a remediation configuration for a config rule.
type RemediationException ¶
type RemediationException struct {
ConfigRuleName string `json:"ConfigRuleName"`
ResourceType string `json:"ResourceType"`
ResourceID string `json:"ResourceId"`
}
RemediationException holds an exception for remediation of a resource.
type ResourceConfigItem ¶
type ResourceConfigItem struct {
ResourceType string `json:"ResourceType"`
ResourceID string `json:"ResourceId"`
Configuration string `json:"Configuration"`
ConfigurationItemCaptureTime float64 `json:"ConfigurationItemCaptureTime"`
}
ResourceConfigItem holds configuration info for a discovered resource.
type ResourceCount ¶
type ResourceCount struct {
CappedCount int32 `json:"CappedCount"`
CapExceeded bool `json:"CapExceeded"`
}
ResourceCount holds a capped resource count returned by compliance summary APIs.
type ResourceEvaluation ¶
type ResourceEvaluation struct {
ResourceEvaluationID string `json:"ResourceEvaluationId"`
ResourceType string `json:"ResourceType"`
ResourceID string `json:"ResourceId"`
EvaluationMode string `json:"EvaluationMode"`
Status string `json:"Status"`
Compliance string `json:"Compliance,omitempty"`
Configuration string `json:"-"`
StartTime float64 `json:"EvaluationStartTimestamp"`
}
ResourceEvaluation records a StartResourceEvaluation run so the Get/List operations can read it back.
type ResourceKey ¶
type ResourceKey struct {
ResourceType string `json:"resourceType,omitempty"`
ResourceID string `json:"resourceId,omitempty"`
}
ResourceKey identifies a resource by type and ID.
type RetentionConfiguration ¶
type RetentionConfiguration struct {
Name string `json:"Name"`
RetentionPeriodInDays int32 `json:"RetentionPeriodInDays"`
}
RetentionConfiguration holds the retention period configuration.
type StoredEvaluation ¶
type StoredEvaluation struct {
ComplianceType string
ResourceType string
ResourceID string
Annotation string
RuleName string
OrderingTimestamp float64
ResultRecordedTime float64
}
StoredEvaluation is a single per-(rule, resource) evaluation outcome. It is purely internal bookkeeping -- never serialized directly to an AWS API response (DetailedEvaluationResult is the wire type built from it) -- so RuleName was added here (Phase 3.3 store.Table conversion) purely to give the flattened ruleResourceEvals table a composite primary key ("<ruleName>|<resourceType>\x1f<resourceID>", see store_setup.go's storedEvaluationKeyFn) without affecting any wire shape.
type StoredQuery ¶
type StoredQuery struct {
QueryName string `json:"QueryName"`
QueryID string `json:"QueryId,omitempty"`
}
StoredQuery represents an AWS Config stored query.
type StoredQueryMetadata ¶
type StoredQueryMetadata struct {
QueryArn string `json:"QueryArn"`
QueryID string `json:"QueryId"`
QueryName string `json:"QueryName"`
}
StoredQueryMetadata is summary metadata returned by ListStoredQueries.
Source Files
¶
- aggregators.go
- config_rules.go
- configuration_recorders.go
- conformance_packs.go
- delivery_channels.go
- errors.go
- evaluation.go
- handler.go
- handler_aggregators.go
- handler_config_rules.go
- handler_configuration_recorders.go
- handler_conformance_packs.go
- handler_delivery_channels.go
- handler_organization.go
- handler_remediation.go
- handler_resources.go
- handler_retention.go
- handler_stored_queries.go
- handler_tags.go
- models.go
- organization.go
- persistence.go
- provider.go
- remediation.go
- resources.go
- retention.go
- select_query.go
- store.go
- store_setup.go
- stored_queries.go
- tags.go