Documentation
¶
Index ¶
- Variables
- type AccountAggregationSource
- type AggregateComplianceByConformancePack
- type AggregateComplianceCount
- type AggregateConformancePackCompliance
- type AggregateConformancePackComplianceCount
- type AggregateConformancePackComplianceSummary
- type AggregateEvaluationResult
- type AggregateResourceIdentifier
- type AggregatedSourceStatus
- type AggregationAuthorization
- type AzureConnectorConfiguration
- type BaseConfigurationItem
- type ComplianceByConfigRule
- type ComplianceByResource
- 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 ConformancePackComplianceScoreEntry
- type ConformancePackComplianceSummaryEntry
- type ConformancePackRuleLink
- type ConformancePackStatus
- type Connector
- type ConnectorConfiguration
- type ConnectorFilter
- type ConnectorSummary
- 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) DeleteConnector(arn 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(accountID, region 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(servicePrincipal string) (string, string, error)
- func (b *InMemoryBackend) DeleteStoredQuery(name string) error
- func (b *InMemoryBackend) DeliverConfigSnapshot(channelName string) (string, error)
- func (b *InMemoryBackend) DescribeAggregateComplianceByConfigRules() []any
- func (b *InMemoryBackend) DescribeAggregateComplianceByConformancePacks(aggregatorName, accountID, awsRegion string) ([]AggregateComplianceByConformancePack, error)
- func (b *InMemoryBackend) DescribeAggregationAuthorizations() []AggregationAuthorization
- func (b *InMemoryBackend) DescribeComplianceByConfigRule(names []string) []ComplianceByConfigRule
- func (b *InMemoryBackend) DescribeComplianceByResource(resourceType, resourceID string, complianceTypes []string) []ComplianceByResource
- func (b *InMemoryBackend) DescribeConfigRuleEvaluationStatus(names []string) []ConfigRuleEvaluationStatus
- func (b *InMemoryBackend) DescribeConfigRules(names []string) ([]ConfigRule, error)
- func (b *InMemoryBackend) DescribeConfigurationAggregatorSourcesStatus(aggregatorName string) ([]AggregatedSourceStatus, error)
- func (b *InMemoryBackend) DescribeConfigurationAggregators() []ConfigurationAggregator
- func (b *InMemoryBackend) DescribeConfigurationRecorderStatus(names []string) []ConfigurationRecorderStatus
- func (b *InMemoryBackend) DescribeConfigurationRecorders(names []string) []ConfigurationRecorder
- func (b *InMemoryBackend) DescribeConformancePackCompliance(packName string, ruleNameFilter []string, complianceTypeFilter string) ([]ConformancePackComplianceItem, error)
- 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() []PendingAggregationRequest
- func (b *InMemoryBackend) DescribeRemediationConfigurations(ruleNames []string) []RemediationConfiguration
- func (b *InMemoryBackend) DescribeRemediationExceptions(ruleName string) []RemediationException
- func (b *InMemoryBackend) DescribeRemediationExecutionStatus(ruleName string, keys []ResourceKey) ([]RemediationExecutionStatusEntry, error)
- func (b *InMemoryBackend) DescribeRetentionConfigurations() []RetentionConfiguration
- func (b *InMemoryBackend) DisassociateResourceTypes(recorderARN string, resourceTypes []string) error
- func (b *InMemoryBackend) GetAggregateComplianceDetailsByConfigRule(aggregatorName, ruleName, accountID, awsRegion string, ...) ([]AggregateEvaluationResult, error)
- func (b *InMemoryBackend) GetAggregateConfigRuleComplianceSummary(aggregatorName, groupByKey string) ([]AggregateComplianceCount, error)
- func (b *InMemoryBackend) GetAggregateConformancePackComplianceSummary(aggregatorName, groupByKey string) ([]AggregateConformancePackComplianceSummary, error)
- func (b *InMemoryBackend) GetAggregateDiscoveredResourceCounts() int32
- func (b *InMemoryBackend) GetAggregateResourceConfig() *BaseConfigurationItem
- func (b *InMemoryBackend) GetComplianceDetailsByConfigRule(ruleName string, complianceTypes []string) ([]DetailedEvaluationResult, error)
- 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(packName string, ruleNameFilter []string, resourceType string, ...) ([]DetailedEvaluationResult, error)
- func (b *InMemoryBackend) GetConformancePackComplianceSummary(packNames []string) ([]ConformancePackComplianceSummaryEntry, error)
- func (b *InMemoryBackend) GetConnector(arn string) (*Connector, error)
- func (b *InMemoryBackend) GetCustomRulePolicy(ruleName string) string
- func (b *InMemoryBackend) GetDiscoveredResourceCounts() int64
- func (b *InMemoryBackend) GetOrganizationConfigRuleDetailedStatus(ruleName, accountIDFilter string) ([]MemberAccountStatus, error)
- func (b *InMemoryBackend) GetOrganizationConformancePackDetailedStatus(packName, accountIDFilter string) ([]OrganizationConformancePackDetailedStatus, error)
- 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(...) ([]AggregateResourceIdentifier, error)
- func (b *InMemoryBackend) ListConfigurationRecorders() []ConfigurationRecorderSummary
- func (b *InMemoryBackend) ListConformancePackComplianceScores(packNameFilter []string) []ConformancePackComplianceScoreEntry
- func (b *InMemoryBackend) ListConnectors(filters []ConnectorFilter) []ConnectorSummary
- 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, templateBody string) error
- func (b *InMemoryBackend) PutConnector(config *ConnectorConfiguration, tags []Tag) (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(servicePrincipal string) (string, string, error)
- func (b *InMemoryBackend) PutStoredQuery(name string) error
- func (b *InMemoryBackend) PutThirdPartyServiceLinkedConfigurationRecorder(servicePrincipal, connectorArn string, scope *ScopeConfiguration, tags []Tag) (string, 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(ruleName string, keys []ResourceKey) 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 MemberAccountStatus
- type OrganizationAggregationSource
- type OrganizationConfigRule
- type OrganizationConfigRuleStatus
- type OrganizationConformancePack
- type OrganizationConformancePackDetailedStatus
- type OrganizationConformancePackStatus
- type PendingAggregationRequest
- type Provider
- type RecordingGroup
- type RemediationConfiguration
- type RemediationException
- type RemediationExecutionStatusEntry
- type RemediationExecutionStepStatus
- type ResourceConfigItem
- type ResourceCount
- type ResourceEvaluation
- type ResourceKey
- type RetentionConfiguration
- type ScopeConfiguration
- type ServiceLinkedRecorderLink
- 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) // ErrNoSuchConfigRuleInConformancePack is returned when a conformance pack // filter/lookup references a config rule name that the pack did not deploy // (verified against aws-sdk-go-v2/service/configservice's // DescribeConformancePackCompliance/GetConformancePackComplianceDetails // deserializers). ErrNoSuchConfigRuleInConformancePack = awserr.New( "NoSuchConfigRuleInConformancePackException", awserr.ErrNotFound, ) // ErrNoSuchRemediationConfiguration is returned when a remediation-execution op // targets a config rule with no remediation configuration (verified against // aws-sdk-go-v2/service/configservice's StartRemediationExecution/ // DescribeRemediationExecutionStatus deserializers). ErrNoSuchRemediationConfiguration = awserr.New("NoSuchRemediationConfigurationException", awserr.ErrNotFound) // ErrNoAvailableConfigurationRecorder is returned when an op that needs a // configuration recorder (e.g. DeliverConfigSnapshot) finds none configured. ErrNoAvailableConfigurationRecorder = awserr.New( "NoAvailableConfigurationRecorderException", awserr.ErrInvalidParameter, ) // ErrNoRunningConfigurationRecorder is returned when an op that needs an active // configuration recorder (e.g. DeliverConfigSnapshot) finds recorders configured // but none running. ErrNoRunningConfigurationRecorder = awserr.New( "NoRunningConfigurationRecorderException", awserr.ErrInvalidParameter, ) // ErrInvalidConfigurationRecorderName is returned when a configuration recorder // name fails validation (verified against aws-sdk-go-v2/service/configservice's // PutConfigurationRecorder deserializer, which declares // InvalidConfigurationRecorderNameException). ErrInvalidConfigurationRecorderName = awserr.New( "InvalidConfigurationRecorderNameException", awserr.ErrInvalidParameter, ) // ErrInvalidRole is returned when a configuration recorder's IAM role ARN fails // validation (verified against aws-sdk-go-v2/service/configservice's // PutConfigurationRecorder deserializer, which declares InvalidRoleException). ErrInvalidRole = awserr.New("InvalidRoleException", awserr.ErrInvalidParameter) // ErrInvalidDeliveryChannelName is returned when a delivery channel name fails // validation (verified against aws-sdk-go-v2/service/configservice's // PutDeliveryChannel deserializer, which declares // InvalidDeliveryChannelNameException). ErrInvalidDeliveryChannelName = awserr.New("InvalidDeliveryChannelNameException", awserr.ErrInvalidParameter) // ErrConflict is returned when a connector or third-party service-linked // recorder request conflicts with existing state: PutConnector with a // ConnectorConfiguration matching an already-existing connector, or // PutThirdPartyServiceLinkedConfigurationRecorder for a ServicePrincipal // that already owns a service-linked recorder tied to a different // connector (verified against the AWS Config API reference's PutConnector/ // PutThirdPartyServiceLinkedConfigurationRecorder error lists, which // declare ConflictException at HTTP status 400 -- not 409, unlike this // package's other conflict-shaped errors). ErrConflict = awserr.New("ConflictException", awserr.ErrConflict) )
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 AggregateComplianceByConformancePack ¶ added in v1.2.0
type AggregateComplianceByConformancePack struct {
Compliance *AggregateConformancePackCompliance `json:"Compliance,omitempty"`
AccountID string `json:"AccountId,omitempty"`
AwsRegion string `json:"AwsRegion,omitempty"`
ConformancePackName string `json:"ConformancePackName,omitempty"`
}
AggregateComplianceByConformancePack holds one conformance pack's compliance as seen through an aggregator for a single account/region source.
type AggregateComplianceCount ¶ added in v1.2.0
type AggregateComplianceCount struct {
GroupName string `json:"GroupName,omitempty"`
ComplianceSummary ComplianceSummary `json:"ComplianceSummary"`
}
AggregateComplianceCount holds the compliant/noncompliant rule counts for a single account/region group in an aggregator.
type AggregateConformancePackCompliance ¶ added in v1.2.0
type AggregateConformancePackCompliance struct {
ComplianceType string `json:"ComplianceType,omitempty"`
CompliantRuleCount int32 `json:"CompliantRuleCount"`
NonCompliantRuleCount int32 `json:"NonCompliantRuleCount"`
TotalRuleCount int32 `json:"TotalRuleCount"`
}
AggregateConformancePackCompliance holds one conformance pack's rule counts as seen through an aggregator.
type AggregateConformancePackComplianceCount ¶ added in v1.2.0
type AggregateConformancePackComplianceCount struct {
CompliantConformancePackCount int32 `json:"CompliantConformancePackCount"`
NonCompliantConformancePackCount int32 `json:"NonCompliantConformancePackCount"`
}
AggregateConformancePackComplianceCount holds compliant/noncompliant conformance pack counts for a single account/region group in an aggregator.
type AggregateConformancePackComplianceSummary ¶ added in v1.2.0
type AggregateConformancePackComplianceSummary struct {
GroupName string `json:"GroupName,omitempty"`
ComplianceSummary AggregateConformancePackComplianceCount `json:"ComplianceSummary"`
}
AggregateConformancePackComplianceSummary holds a conformance-pack compliance summary for one account/region group in an aggregator.
type AggregateEvaluationResult ¶ added in v1.2.0
type AggregateEvaluationResult struct {
ComplianceType string `json:"ComplianceType"`
AccountID string `json:"AccountId,omitempty"`
AwsRegion string `json:"AwsRegion,omitempty"`
Annotation string `json:"Annotation,omitempty"`
EvaluationResultIdentifier EvaluationResultIdentifier `json:"EvaluationResultIdentifier"`
ResultRecordedTime float64 `json:"ResultRecordedTime"`
ConfigRuleInvokedTime float64 `json:"ConfigRuleInvokedTime"`
}
AggregateEvaluationResult holds a single aggregate config-rule evaluation result for an account/region in an aggregator.
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 AggregatedSourceStatus ¶ added in v1.2.0
type AggregatedSourceStatus struct {
SourceID string `json:"SourceId,omitempty"`
SourceType string `json:"SourceType,omitempty"`
AwsRegion string `json:"AwsRegion,omitempty"`
LastUpdateStatus string `json:"LastUpdateStatus,omitempty"`
LastUpdateTime float64 `json:"LastUpdateTime,omitempty"`
}
AggregatedSourceStatus holds the sync status of one configuration aggregator source (an account/region pair, or an organization).
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 AzureConnectorConfiguration ¶ added in v1.2.0
type AzureConnectorConfiguration struct {
ClientIdentifier string `json:"clientIdentifier"`
TenantIdentifier string `json:"tenantIdentifier"`
}
AzureConnectorConfiguration is the Azure-specific half of ConnectorConfiguration -- the only third-party cloud provider AWS Config currently documents (types.Provider's sole enum value is "AZURE").
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 ComplianceByResource ¶ added in v1.2.0
type ComplianceByResource struct {
Compliance ComplianceResult `json:"Compliance"`
ResourceType string `json:"ResourceType,omitempty"`
ResourceID string `json:"ResourceId,omitempty"`
}
ComplianceByResource holds compliance information for a single AWS resource, as evaluated across every config rule that scoped it.
type ComplianceResult ¶
type ComplianceResult struct {
ComplianceContributorCount *ResourceCount `json:"ComplianceContributorCount,omitempty"`
ComplianceType string `json:"ComplianceType"`
}
ComplianceResult holds a compliance type value, optionally with the count of resources/rules responsible for that result (real AWS Config's shared "Compliance" shape, used by both ComplianceByConfigRule and ComplianceByResource).
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"`
ScopeConfiguration *ScopeConfiguration `json:"scopeConfiguration,omitempty"`
Arn string `json:"arn,omitempty"`
ConnectorArn string `json:"connectorArn,omitempty"`
Name string `json:"name"`
RoleARN string `json:"roleARN"`
ServicePrincipal string `json:"servicePrincipal,omitempty"`
Status string `json:"status,omitempty"` // PENDING or ACTIVE
}
ConfigurationRecorder represents an AWS Config configuration recorder.
ConnectorArn, ScopeConfiguration, and ServicePrincipal are only populated for a third-party service-linked recorder created via PutThirdPartyServiceLinkedConfigurationRecorder (verified against aws-sdk-go-v2/service/configservice's serializeDocumentConfigurationRecorder, which emits connectorArn/scopeConfiguration/servicePrincipal alongside the long-standing arn/name/recordingGroup/roleARN fields).
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"`
Controls []string `json:"Controls,omitempty"`
}
ConformancePackComplianceItem holds compliance info for a conformance pack rule.
type ConformancePackComplianceScoreEntry ¶ added in v1.2.0
type ConformancePackComplianceScoreEntry struct {
ConformancePackName string `json:"ConformancePackName,omitempty"`
Score string `json:"Score,omitempty"`
LastUpdatedTime float64 `json:"LastUpdatedTime,omitempty"`
}
ConformancePackComplianceScoreEntry holds a conformance pack's compliance score (the percentage of compliant rule-resource combinations).
type ConformancePackComplianceSummaryEntry ¶ added in v1.2.0
type ConformancePackComplianceSummaryEntry struct {
ConformancePackComplianceStatus string `json:"ConformancePackComplianceStatus"`
ConformancePackName string `json:"ConformancePackName"`
}
ConformancePackComplianceSummaryEntry holds the overall compliance status of a conformance pack (its deployed rules rolled up into a single status).
type ConformancePackRuleLink ¶ added in v1.2.0
type ConformancePackRuleLink struct {
ConformancePackName string `json:"ConformancePackName"`
ConfigRuleName string `json:"ConfigRuleName"`
}
ConformancePackRuleLink tracks a single config rule deployed by a conformance pack (parsed from PutConformancePack's TemplateBody), so the compliance family (DescribeConformancePackCompliance/GetConformancePackComplianceDetails/ GetConformancePackComplianceSummary/ListConformancePackComplianceScores) can roll up real per-rule evaluation state instead of returning an empty stub, and DeleteConformancePack can cascade-delete the rules it deployed. Purely internal bookkeeping -- never itself serialized to an AWS API response.
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 Connector ¶ added in v1.2.0
type Connector struct {
ConnectorConfiguration *ConnectorConfiguration `json:"connectorConfiguration,omitempty"`
Arn string `json:"arn"`
Name string `json:"name"`
CreatedTime float64 `json:"createdTime,omitempty"`
}
Connector represents a connection between AWS Config and a third-party cloud service provider, created by PutConnector (verified against aws-sdk-go-v2/service/configservice's GetConnector deserializer). CreatedTime is epoch seconds, matching this package's established convention for AWS Config's Date-shaped fields (see e.g. ResourceConfigItem.ConfigurationItemCaptureTime).
type ConnectorConfiguration ¶ added in v1.2.0
type ConnectorConfiguration struct {
Azure *AzureConnectorConfiguration `json:"azure,omitempty"`
}
ConnectorConfiguration is the provider-specific configuration for a connector between AWS Config and a third-party cloud service provider. Real AWS Config requires exactly one provider to be set; Azure is the only one it currently supports.
type ConnectorFilter ¶ added in v1.2.0
type ConnectorFilter struct {
FilterName string `json:"filterName,omitempty"`
FilterValues []string `json:"filterValues,omitempty"`
}
ConnectorFilter filters ListConnectors results (verified against aws-sdk-go-v2/service/configservice's ConnectorFilter type; "provider" is currently the only defined FilterName, with FilterValues like "AZURE").
type ConnectorSummary ¶ added in v1.2.0
type ConnectorSummary struct {
Arn string `json:"arn"`
Name string `json:"name"`
Provider string `json:"provider"`
TenantIdentifier string `json:"tenantIdentifier"`
CreatedTime float64 `json:"createdTime,omitempty"`
}
ConnectorSummary is the lightweight summary returned by ListConnectors (verified against aws-sdk-go-v2/service/configservice's ListConnectors deserializer, which flattens the provider and Azure tenantIdentifier up from the connector's ConnectorConfiguration onto the summary itself).
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, cascade-deleting every config rule it deployed (and their evaluations) along with it -- matching real AWS Config, where deleting a conformance pack removes the managed rules it created.
func (*InMemoryBackend) DeleteConnector ¶ added in v1.2.0
func (b *InMemoryBackend) DeleteConnector(arn string) error
DeleteConnector deletes the connector identified by arn. ResourceNotFoundException/ValidationException are the only errors the real DeleteConnector op declares (verified against its deserializer's error switch); it does not declare a ConflictException for "still referenced by a configuration recorder", so this backend doesn't invent one either.
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(accountID, region string) error
DeletePendingAggregationRequest dismisses a pending aggregation request, removing the underlying aggregation authorization it was derived from. Idempotent -- like DeleteAggregationAuthorization, real AWS Config's declared error model for this op has no not-found exception (verified against aws-sdk-go-v2/service/configservice's DeletePendingAggregationRequest deserializer, which declares only InvalidParameterValueException).
func (*InMemoryBackend) DeleteRemediationConfiguration ¶
func (b *InMemoryBackend) DeleteRemediationConfiguration(ruleName string) error
DeleteRemediationConfiguration removes the remediation configuration for the given rule, cascade-deleting any recorded remediation executions for it too (StartRemediationExecution/DescribeRemediationExecutionStatus both require a remediation configuration to exist, so leaving them behind would strand permanently-unreachable rows instead of a clean delete).
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( servicePrincipal string, ) (string, string, error)
DeleteServiceLinkedConfigurationRecorder deletes the service-linked configuration recorder owned by servicePrincipal. Errors with ErrNotFound (wire type NoSuchConfigurationRecorderException) when no matching service-linked recorder exists, matching the real API's declared error model (verified against aws-sdk-go-v2/service/configservice's DeleteServiceLinkedConfigurationRecorder deserializer).
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(channelName string) (string, error)
DeliverConfigSnapshot triggers an on-demand snapshot delivery through the named delivery channel and returns a generated snapshot ID, matching real AWS Config's DeliverConfigSnapshotOutput.ConfigSnapshotId. Errors (verified against aws-sdk-go-v2/service/configservice's DeliverConfigSnapshot deserializer, which declares NoSuchDeliveryChannelException/ NoAvailableConfigurationRecorderException/NoRunningConfigurationRecorderException):
- NoSuchDeliveryChannelException when the named channel does not exist
- NoAvailableConfigurationRecorderException when no configuration recorder has ever been created
- NoRunningConfigurationRecorderException when recorders exist but none is currently ACTIVE
func (*InMemoryBackend) DescribeAggregateComplianceByConfigRules ¶
func (b *InMemoryBackend) DescribeAggregateComplianceByConfigRules() []any
DescribeAggregateComplianceByConfigRules returns compliance by rule using ruleEvaluations.
func (*InMemoryBackend) DescribeAggregateComplianceByConformancePacks ¶
func (b *InMemoryBackend) DescribeAggregateComplianceByConformancePacks( aggregatorName, accountID, awsRegion string, ) ([]AggregateComplianceByConformancePack, error)
DescribeAggregateComplianceByConformancePacks returns every conformance pack's compliance as seen through aggregatorName, echoing the requested accountID/awsRegion into each result. Mirrors GetAggregateComplianceDetailsByConfigRule's approach: this emulator has no real multi-account data source, so it reuses local per-pack rule-count state once the aggregator's existence is genuinely validated (NoSuchConfigurationAggregatorException).
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( resourceType, resourceID string, complianceTypes []string, ) []ComplianceByResource
DescribeComplianceByResource returns compliance rollups for discovered resources, derived from the same per-(rule, resource) evaluation state (b.ruleResourceEvals) that DescribeComplianceByConfigRule/ GetComplianceSummaryByResourceType roll up from -- mirroring their approach instead of the previous intentional empty-list stub. A resource is NON_COMPLIANT if any rule evaluated it as such, COMPLIANT if every rule that evaluated it found it compliant, else INSUFFICIENT_DATA. resourceType/ resourceID (both optional; resourceID is only meaningful alongside a resourceType) and complianceTypes narrow the result set, matching real AWS Config's DescribeComplianceByResource filters (verified against aws-sdk-go-v2/service/configservice's DescribeComplianceByResourceInput).
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, error)
DescribeConfigRules returns config rules optionally filtered by name list, sorted by name. An unknown name in a non-empty filter list errors NoSuchConfigRuleException, matching real AWS Config (verified against aws-sdk-go-v2/service/configservice's DescribeConfigRules deserializer, which declares NoSuchConfigRuleException).
func (*InMemoryBackend) DescribeConfigurationAggregatorSourcesStatus ¶
func (b *InMemoryBackend) DescribeConfigurationAggregatorSourcesStatus( aggregatorName string, ) ([]AggregatedSourceStatus, error)
DescribeConfigurationAggregatorSourcesStatus returns one status entry per account/region source configured on the aggregator (from PutConfigurationAggregator's AccountAggregationSources/ OrganizationAggregationSource, already stored on the aggregator), reporting SUCCEEDED since this emulator has no real per-source sync failures to model.
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( packName string, ruleNameFilter []string, complianceTypeFilter string, ) ([]ConformancePackComplianceItem, error)
DescribeConformancePackCompliance returns per-rule compliance for the config rules a conformance pack deployed, rolled up from the same b.ruleEvaluations state DescribeComplianceByConfigRule reads (real AWS Config's DescribeConformancePackCompliance -- verified against aws-sdk-go-v2/service/configservice's deserializer, which declares NoSuchConformancePackException/NoSuchConfigRuleInConformancePackException). ruleNameFilter narrows the result to specific rule names (each must belong to the pack); complianceTypeFilter narrows to a single compliance type.
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() []PendingAggregationRequest
DescribePendingAggregationRequests returns every aggregation authorization this account has granted (via PutAggregationAuthorization) that no local configuration aggregator has yet incorporated into its AccountAggregationSources -- the only cross-account "pending" state a single-account emulator can genuinely derive, since b.aggregationAuths already records exactly which (account, region) pairs were granted permission to aggregate this account's data.
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( ruleName string, keys []ResourceKey, ) ([]RemediationExecutionStatusEntry, error)
DescribeRemediationExecutionStatus returns the recorded remediation executions for ruleName, optionally narrowed to specific resource keys. Errors with ErrNoSuchRemediationConfiguration when ruleName has no remediation configuration, matching real AWS Config's declared error model (verified against aws-sdk-go-v2/service/configservice's DescribeRemediationExecutionStatus deserializer).
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( aggregatorName, ruleName, accountID, awsRegion string, complianceTypes []string, ) ([]AggregateEvaluationResult, error)
GetAggregateComplianceDetailsByConfigRule returns per-resource evaluation results for ruleName as seen through aggregatorName, echoing the requested accountID/awsRegion into each result. This emulator has no real multi-account data source, so (mirroring DescribeAggregateComplianceByConfigRules, already-established for this same reason) it reuses the local account's own per-rule evaluation state rather than returning an empty stub; only the aggregator's existence is genuinely validated (NoSuchConfigurationAggregatorException).
func (*InMemoryBackend) GetAggregateConfigRuleComplianceSummary ¶
func (b *InMemoryBackend) GetAggregateConfigRuleComplianceSummary( aggregatorName, groupByKey string, ) ([]AggregateComplianceCount, error)
GetAggregateConfigRuleComplianceSummary returns compliant/non-compliant rule counts grouped by account ID or AWS region (groupByKey; ACCOUNT_ID when empty). Since this emulator only ever has one local account/region as its aggregated source, the result is a single group -- mirroring GetComplianceSummaryByConfigRule's rollup logic -- once the aggregator's existence is validated (NoSuchConfigurationAggregatorException).
func (*InMemoryBackend) GetAggregateConformancePackComplianceSummary ¶
func (b *InMemoryBackend) GetAggregateConformancePackComplianceSummary( aggregatorName, groupByKey string, ) ([]AggregateConformancePackComplianceSummary, error)
GetAggregateConformancePackComplianceSummary returns compliant/noncompliant conformance-pack counts grouped by account ID or AWS region (groupByKey; ACCOUNT_ID when empty), mirroring GetAggregateConfigRuleComplianceSummary's single-group rollup once the aggregator's existence is validated (NoSuchConfigurationAggregatorException).
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, error)
GetComplianceDetailsByConfigRule returns per-resource evaluation results for a config rule, optionally filtered to the given compliance types. An unknown rule name errors NoSuchConfigRuleException, matching real AWS Config (verified against aws-sdk-go-v2/service/configservice's GetComplianceDetailsByConfigRule deserializer, which declares NoSuchConfigRuleException).
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( packName string, ruleNameFilter []string, resourceType string, resourceIDs []string, complianceTypeFilter string, ) ([]DetailedEvaluationResult, error)
GetConformancePackComplianceDetails returns the per-resource evaluation results for the config rules a conformance pack deployed, reusing the same buildDetailedResults shape GetComplianceDetailsByConfigRule returns (real AWS Config's ConformancePackEvaluationResult is wire-shape identical to DetailedEvaluationResult -- verified against aws-sdk-go-v2/service/configservice's types.ConformancePackEvaluationResult).
func (*InMemoryBackend) GetConformancePackComplianceSummary ¶
func (b *InMemoryBackend) GetConformancePackComplianceSummary( packNames []string, ) ([]ConformancePackComplianceSummaryEntry, error)
GetConformancePackComplianceSummary returns the overall compliance status of each named conformance pack: NON_COMPLIANT if any deployed rule is NON_COMPLIANT, COMPLIANT if every deployed rule that has been evaluated is COMPLIANT, else INSUFFICIENT_DATA -- matching real AWS Config's documented rollup ("A conformance pack is compliant if all of the rules... are compliant. It is noncompliant if any of the rules are not compliant.").
func (*InMemoryBackend) GetConnector ¶ added in v1.2.0
func (b *InMemoryBackend) GetConnector(arn string) (*Connector, error)
GetConnector returns a copy of the connector identified by arn. ResourceNotFoundException/ValidationException are the only errors the real GetConnector op declares (verified against its deserializer's error switch), so an unknown arn errors ErrResourceNotFound, not the NoSuchConfigurationRecorderException-style ErrNotFound this package uses for configuration recorders.
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( ruleName, accountIDFilter string, ) ([]MemberAccountStatus, error)
GetOrganizationConfigRuleDetailedStatus returns one MemberAccountStatus per member account in the organization for ruleName. This emulator models only the local account as the organization's single member (it has no real multi-account membership to enumerate), so the result is a single CREATE_SUCCESSFUL entry for the local account unless accountIDFilter excludes it. Errors with ErrNoSuchOrganizationConfigRule when ruleName is unknown, matching real AWS Config's declared error model (verified against aws-sdk-go-v2/service/configservice's GetOrganizationConfigRuleDetailedStatus deserializer).
func (*InMemoryBackend) GetOrganizationConformancePackDetailedStatus ¶
func (b *InMemoryBackend) GetOrganizationConformancePackDetailedStatus( packName, accountIDFilter string, ) ([]OrganizationConformancePackDetailedStatus, error)
GetOrganizationConformancePackDetailedStatus returns one OrganizationConformancePackDetailedStatus per member account in the organization for packName, mirroring GetOrganizationConfigRuleDetailedStatus's single-local-account model. Errors with ErrNoSuchOrganizationConformancePack when packName is unknown, matching real AWS Config's declared error model (verified against aws-sdk-go-v2/service/configservice's GetOrganizationConformancePackDetailedStatus deserializer).
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( aggregatorName, resourceType, accountFilter, regionFilter, resourceIDFilter string, ) ([]AggregateResourceIdentifier, error)
ListAggregateDiscoveredResources returns discovered resources of resourceType as seen through aggregatorName, tagged with the local account/region as the source (mirroring SelectAggregateResourceConfig/GetAggregateResourceConfig, already-established for the same single-account-emulator reason). Only the aggregator's existence is genuinely validated (NoSuchConfigurationAggregatorException); accountFilter/regionFilter narrow against the local account/region, resourceIDFilter against the resource ID.
func (*InMemoryBackend) ListConfigurationRecorders ¶
func (b *InMemoryBackend) ListConfigurationRecorders() []ConfigurationRecorderSummary
ListConfigurationRecorders returns summaries of all configuration recorders.
func (*InMemoryBackend) ListConformancePackComplianceScores ¶
func (b *InMemoryBackend) ListConformancePackComplianceScores( packNameFilter []string, ) []ConformancePackComplianceScoreEntry
ListConformancePackComplianceScores returns a compliance score (the percentage of compliant rule evaluations among a pack's deployed rules) for each conformance pack, or every pack when packNameFilter is empty. A pack with no recorded evaluations scores INSUFFICIENT_DATA, matching real AWS Config's documented behavior ("Conformance packs with no evaluation results will have a compliance score of INSUFFICIENT_DATA").
func (*InMemoryBackend) ListConnectors ¶ added in v1.2.0
func (b *InMemoryBackend) ListConnectors(filters []ConnectorFilter) []ConnectorSummary
ListConnectors returns connector summaries matching filters, sorted by ARN for deterministic pagination (real AWS Config's own ordering is unspecified; a fixed order is what makes this backend's pagination stable across calls).
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. An empty/blank name errors InvalidConfigurationRecorderNameException and an empty roleARN errors InvalidRoleException, matching real AWS Config's declared error model (verified against aws-sdk-go-v2/service/configservice's PutConfigurationRecorder deserializer).
func (*InMemoryBackend) PutConformancePack ¶
func (b *InMemoryBackend) PutConformancePack(name, deliveryS3Bucket, deliveryS3KeyPrefix, templateBody string) error
PutConformancePack creates or updates a conformance pack. When templateBody is a JSON CloudFormation-shaped template containing AWS::Config::ConfigRule resources (see conformance_pack_template.go), those rules are created/updated as real config rules and linked to the pack, matching real AWS Config where a conformance pack literally deploys managed config rules on the account -- this makes the compliance family (DescribeConformancePackCompliance et al.) derivable from genuine per-rule evaluation state instead of an empty stub. Updating an existing pack's template replaces its rule set: rules no longer present in the new template are deleted along with their evaluations (cascade), matching AWS's conformance-pack-update semantics.
func (*InMemoryBackend) PutConnector ¶ added in v1.2.0
func (b *InMemoryBackend) PutConnector(config *ConnectorConfiguration, tags []Tag) (string, error)
PutConnector creates a connector to a third-party cloud service provider. Connectors cannot be updated once created (verified against the real PutConnector doc comment: "Connectors cannot be updated -- To update the connector configuration, you must delete all associated configuration recorders, delete the connector, and recreate it with the updated configuration"), so unlike PutServiceLinkedConfigurationRecorder this is NOT an upsert: a repeat call with a ConnectorConfiguration matching an existing connector errors ConflictException instead of returning the existing connector. ConnectorConfiguration must specify exactly one provider (Azure, with both ClientIdentifier and TenantIdentifier set) -- ValidationException otherwise, matching the "You must specify exactly one provider configuration" doc comment (the SDK's client-side validators.go doesn't itself enforce this, since it's a server-side rule).
func (*InMemoryBackend) PutDeliveryChannel ¶
func (b *InMemoryBackend) PutDeliveryChannel( name, s3Bucket, snsArn, s3KeyPrefix string, props *DeliverySnapshotProperties, ) error
PutDeliveryChannel creates or updates a delivery channel. An empty/blank name errors InvalidDeliveryChannelNameException, matching real AWS Config's declared error model (verified against aws-sdk-go-v2/service/configservice's PutDeliveryChannel deserializer).
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(servicePrincipal string) (string, string, error)
PutServiceLinkedConfigurationRecorder creates (or idempotently returns) the service-linked configuration recorder for servicePrincipal. Service-linked recorders are AWS-managed: they need no caller-supplied IAM role and start ACTIVE immediately (matching real AWS Config, which auto-starts them), unlike customer-managed recorders created via PutConfigurationRecorder. The servicePrincipal -> recorder-name link is tracked separately (see ServiceLinkedRecorderLink's doc comment) so it survives persistence without leaking onto ConfigurationRecorder's wire-verbatim shape.
func (*InMemoryBackend) PutStoredQuery ¶
func (b *InMemoryBackend) PutStoredQuery(name string) error
PutStoredQuery stores a query by name.
func (*InMemoryBackend) PutThirdPartyServiceLinkedConfigurationRecorder ¶ added in v1.2.0
func (b *InMemoryBackend) PutThirdPartyServiceLinkedConfigurationRecorder( servicePrincipal, connectorArn string, scope *ScopeConfiguration, tags []Tag, ) (string, string, error)
PutThirdPartyServiceLinkedConfigurationRecorder creates or updates the service-linked configuration recorder that links a third-party cloud service provider (via connectorArn) to servicePrincipal. Verified against aws-sdk-go-v2/service/configservice's PutThirdPartyServiceLinkedConfigurationRecorder doc comment and deserializer:
- ServicePrincipal, ConnectorArn, and ScopeConfiguration (with ScopeType set) are all required -- ValidationException otherwise.
- connectorArn must reference a connector already known to this backend ("The specified connector must exist"). The op's declared error model has no ResourceNotFoundException (only ConflictException/ InsufficientPermissionsException/ValidationException), so an unknown connector errors ValidationException, not ErrResourceNotFound.
- If a service-linked recorder already exists for servicePrincipal with the SAME connectorArn, the call is idempotent: only ScopeConfiguration is updated ("calling this operation again updates the ScopeConfiguration").
- If a service-linked recorder already exists for servicePrincipal with a DIFFERENT connectorArn, this errors ConflictException ("the specified service principal does not support multiple configuration recorders and one already exists") -- one recorder per service principal, the real API's documented constraint for this op (unlike the still-unenforced single-customer-managed-recorder limit elsewhere in this file).
The created recorder reuses serviceLinkedRecorderName's "AWSConfigurationRecorderFor<Service>" convention, since real AWS Config documents that name prefix for service-linked recorders generally (not just the AWS-native ones PutServiceLinkedConfigurationRecorder creates).
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(ruleName string, keys []ResourceKey) error
StartRemediationExecution runs the remediation configured for ruleName against each resource key, recording a SUCCEEDED execution for each (readable back via DescribeRemediationExecutionStatus) since this emulator has no real SSM Automation runner to execute against. Errors with ErrNoSuchRemediationConfiguration (wire type NoSuchRemediationConfigurationException) when ruleName has no remediation configuration, matching real AWS Config's declared error model (verified against aws-sdk-go-v2/service/configservice's StartRemediationExecution deserializer).
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 MemberAccountStatus ¶ added in v1.2.0
type MemberAccountStatus struct {
AccountID string `json:"AccountId"`
ConfigRuleName string `json:"ConfigRuleName"`
MemberAccountRuleStatus string `json:"MemberAccountRuleStatus"`
}
MemberAccountStatus holds a single member account's deployment status for an organization config rule.
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 OrganizationConformancePackDetailedStatus ¶ added in v1.2.0
type OrganizationConformancePackDetailedStatus struct {
AccountID string `json:"AccountId"`
ConformancePackName string `json:"ConformancePackName"`
Status string `json:"Status"`
}
OrganizationConformancePackDetailedStatus holds a single member account's deployment status for an 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 PendingAggregationRequest ¶ added in v1.2.0
type PendingAggregationRequest struct {
RequesterAccountID string `json:"RequesterAccountId,omitempty"`
RequesterAwsRegion string `json:"RequesterAwsRegion,omitempty"`
}
PendingAggregationRequest identifies an account/region that requested aggregation permission but whose data no configuration aggregator has yet incorporated.
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 RemediationExecutionStatusEntry ¶ added in v1.2.0
type RemediationExecutionStatusEntry struct {
RuleName string `json:"-"`
State string `json:"State,omitempty"`
ResourceKey ResourceKey `json:"ResourceKey"`
StepDetails []RemediationExecutionStepStatus `json:"StepDetails,omitempty"`
InvocationTime float64 `json:"InvocationTime,omitempty"`
LastUpdatedTime float64 `json:"LastUpdatedTime,omitempty"`
}
RemediationExecutionStatusEntry holds the status of a remediation execution for a single resource. RuleName is internal bookkeeping used to key/index executions per config rule -- it is never itself present on the wire (real AWS Config scopes DescribeRemediationExecutionStatus results by the ConfigRuleName request parameter instead of echoing it per-entry).
type RemediationExecutionStepStatus ¶ added in v1.2.0
type RemediationExecutionStepStatus struct {
Name string `json:"Name,omitempty"`
State string `json:"State,omitempty"`
ErrorMessage string `json:"ErrorMessage,omitempty"`
StartTime float64 `json:"StartTime,omitempty"`
StopTime float64 `json:"StopTime,omitempty"`
}
RemediationExecutionStepStatus holds the status of a single step of a remediation execution.
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 ScopeConfiguration ¶ added in v1.2.0
type ScopeConfiguration struct {
ScopeType string `json:"scopeType,omitempty"`
IncludedRegions []string `json:"includedRegions,omitempty"`
ScopeValues []string `json:"scopeValues,omitempty"`
AllRegions bool `json:"allRegions"`
}
ScopeConfiguration specifies which resources a third-party service-linked configuration recorder records from the connected third-party cloud service provider (verified against aws-sdk-go-v2/service/configservice's PutThirdPartyServiceLinkedConfigurationRecorder serializer, which emits allRegions/includedRegions/scopeType/scopeValues; allRegions has no omitempty since the real serializer always writes it, even false).
type ServiceLinkedRecorderLink ¶ added in v1.2.0
type ServiceLinkedRecorderLink struct {
ServicePrincipal string `json:"ServicePrincipal"`
RecorderName string `json:"RecorderName"`
}
ServiceLinkedRecorderLink tracks which AWS service principal owns a service-linked configuration recorder, so PutServiceLinkedConfigurationRecorder/DeleteServiceLinkedConfigurationRecorder can look the recorder back up by principal. Kept as its own store.Table (instead of a field on ConfigurationRecorder) because ConfigurationRecorder is serialized verbatim as the real AWS wire response -- a bookkeeping field there would need a json:"-" tag to stay off the wire, which would also make it invisible to store.Table's persistence (Snapshot/Restore marshal the same struct with the same tags), silently losing the service-linked recorder's identity across a snapshot/restore round trip.
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_pack_compliance.go
- conformance_pack_template.go
- conformance_packs.go
- connectors.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_connectors.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