route53resolver

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 25 Imported by: 0

README

Route 53 Resolver

Parity grade: A · SDK aws-sdk-go-v2/service/route53resolver@v1.48.4 · last audited 2026-08-15 (22d69640)

Coverage

Metric Value
Operations audited 72 (69 ok, 3 other)
Feature families 3 (3 ok)
Known gaps 6
Deferred items 1
Resource leaks clean
Known gaps
  • gopherstack-4gzs: FIXED -- see ListFirewallDomainLists's ops entry above. This gap entry previously described the full-vs-metadata shape leak as harmless-and-left-as-is; that verdict was wrong (a raw-body/non-SDK caller saw the leak) and it's now fixed with a dedicated firewallDomainListMetadataOutput.
  • CLOSED 2026-08-13: resolverConfigOutput included a fabricated Arn field. Evidence: aws-sdk-go-v2/service/route53resolver@v1.48.4, types/types.go, checked 2026-08-13 -- types.ResolverConfig's exhaustive field list is AutodefinedReverse/Id/OwnerId/ResourceId, no Arn. (firewallConfigOutput's matching Arn field was already removed in an earlier pass today, see GetFirewallConfig's ops entry and TestFirewallConfig_NoArn.) Deleted from resolverConfigOutput/resolverConfigToOutput (handler_configs.go); the internal ResolverConfig.ARN domain field is untouched. Raw-body regression test: TestResolverConfig_NoArn (configs_test.go); TestResolverConfigToOutput's assert.NotEmpty(cfg["Arn"]) (which codified the fabricated field) was removed.
  • CreateFirewallRule/UpdateFirewallRule cannot create a rule using the FirewallAdvancedContentCategory, FirewallAdvancedThreatCategory, or PartnerThreatProtection FirewallRuleType variants (DnsThreatProtection is the only variant this backend accepts and evaluates). Verified against types.FirewallAdvancedContentCategoryConfig.Category / FirewallAdvancedThreatCategoryConfig.Category / PartnerThreatProtectionConfig.Partner: all three are untyped *string with no backing Go enum, and their own doc comments say the only way to learn valid values is to call ListFirewallRuleTypes -- i.e. the SDK provides no closed set gopherstack could correctly derive these three variants' concrete category/partner identifiers from. Accepting them would mean inventing identifiers (e.g. guessing 'VIOLENCE_AND_HATE_SPEECH' from a doc-comment example) that could silently diverge from what real AWS actually returns -- worse than an honest gap. RE-SCOPED THIS PASS (parity-5): this is a CreateFirewallRule/UpdateFirewallRule creation-surface limitation, not a ListFirewallRuleTypes reporting defect -- ListFirewallRuleTypes correctly and completely reports what this backend can create (see its own ops entry). Not implemented; PartnerThreatProtection additionally requires modeling an AWS Marketplace subscription resource this emulator has no other reason to have. UPDATED THIS PASS (gopherstack-y9w3): the top-level FirewallRuleType tagged-union field itself is now wired (see CreateFirewallRule/UpdateFirewallRule ops entries) -- its DnsThreatProtection member is fully supported (shares backend state with the flat top-level DnsThreatProtection/ConfidenceThreshold fields), and the other three members are now explicitly rejected with InvalidRequestException rather than being an absent field that silently dropped the whole request. This gap entry now describes only those three variants' creation surface, unchanged from before.
  • RuleTypeOption DELEGATE / ResolverEndpointDirection INBOUND_DELEGATION (Route 53 Profile delegation) -- re-verified this pass (gopherstack-3sgl) against aws-sdk-go-v2/service/route53resolver@v1.48.0 (up from the prior pass's v1.42.3): the RuleTypeOptionDelegate/ResolverEndpointDirectionInboundDelegation enum values are still real and unchanged. Assessed and NOT implemented this pass: modeling delegation rules correctly requires a different endpoint-direction state machine (CreateResolverEndpoint's Direction field) plus RuleType=DELEGATE validation/state -- a materially larger, cross-cutting change (touches resolver_endpoints.go's own direction handling, not just resolver_rules.go) than the DnsThreatProtection work done that pass. Flagged rather than half-modeled to avoid a fake DELEGATE mode that silently does nothing. UPDATED THIS PASS (gopherstack-y9w3): CreateResolverRuleInput.DelegationRecord (the plain string field, independent of the DELEGATE RuleTypeOption itself) was previously an inert extra field with no backend storage at all -- verified against api_op_CreateResolverRule.go and types.ResolverRule ('DNS queries with delegation records that point to this domain name are forwarded to resolvers on your network') -- and is now accepted, stored, and echoed on Create/Get/List, which is genuine parity per the stored-and-echoed rule even though the surrounding DELEGATE rule-type machinery remains the unimplemented part described above.
  • gopherstack-6flj: CreateResolverEndpointInput has no real VpcId member -- AWS derives HostVPCId server-side from IpAddresses[].SubnetId (verified: api_op_CreateResolverEndpoint.go/types.IpAddressRequest, SubnetId/Ip/Ipv6 only). This backend has no EC2 subnet->VPC registry to derive a real VPC identifier from a supplied SubnetId, and synthesizing one (e.g. relabeling the subnet ID's prefix) would be exactly the kind of plausible-looking fabricated value this campaign avoids. gopherstack's request-side VpcId field is kept as an internal-only convenience for its own seed/test callers (see handleCreateResolverEndpointInput's doc comment) -- a real, unmodified SDK client's CreateResolverEndpoint call has no way to populate HostVPCId at all, so it will always come back empty for such a client. Not fabricated; flagged as a genuine, currently-unfixable gap without new subnet/VPC modeling this service doesn't otherwise need.
  • gopherstack-6flj: ListResolverEndpointIpAddresses' per-item resolverEndpointIPAddressDetail is missing CreationTime/ModificationTime/StatusMessage, three real, non-required types.IpAddressResponse members (deserializers.go). The backend's IPAddress model (models.go) tracks no timestamps or status-detail for individual endpoint IPs at all (only IPID/SubnetID/IP/Ipv6) -- adding these would mean either fabricating values or a materially larger change (per-IP lifecycle tracking this backend doesn't otherwise need, since IPs attach/detach synchronously with no status transition). Disclosed, not fixed.
Deferred
  • none -- full op surface audited this pass

More

Documentation

Index

Constants

View Source
const (
	DirectionInbound        = directionInbound
	DirectionOutbound       = directionOutbound
	RuleTypeForward         = ruleTypeForward
	FirewallPriorityDefault = firewallPriorityAutoIncrement
)

Exported constants for use in demo seeding.

Variables

View Source
var (
	ErrNotFound         = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	ErrAlreadyExists    = awserr.New("ResourceExistsException", awserr.ErrAlreadyExists)
	ErrValidation       = awserr.New("InvalidRequestException", awserr.ErrInvalidParameter)
	ErrInvalidParameter = awserr.New("InvalidParameterException", awserr.ErrInvalidParameter)

	// ErrBatchValidation is used for envelope-level required-field validation on
	// BatchCreateFirewallRule/BatchUpdateFirewallRule/BatchDeleteFirewallRule.
	// Unlike every singular Firewall Rule op in this service (which raises
	// InvalidRequestException, see ErrValidation), AWS's own API reference
	// documents ValidationException as the error class for these three batch
	// operations specifically -- verified: the Errors sections of
	// API_route53resolver_Batch{Create,Update,Delete}FirewallRule.html each list
	// AccessDeniedException/InternalServiceErrorException/LimitExceededException/
	// ThrottlingException/ValidationException, with no InvalidRequestException.
	ErrBatchValidation = awserr.New("ValidationException", awserr.ErrInvalidParameter)
)
View Source
var ErrNilAppContext = errors.New("nil AppContext passed to Route53Resolver Provider.Init")

ErrNilAppContext is returned by Init when a nil AppContext is passed.

Functions

This section is empty.

Types

type CreateFirewallRuleParams

type CreateFirewallRuleParams struct {
	FirewallRuleGroupID             string
	Name                            string
	Action                          string
	BlockResponse                   string
	BlockOverrideDomain             string
	BlockOverrideDNSType            string
	Qtype                           string
	ConfidenceThreshold             string
	CreatorRequestID                string
	FirewallDomainListID            string
	DNSThreatProtection             string
	FirewallDomainRedirectionAction string
	BlockOverrideTTL                int32
	Priority                        int32
}

CreateFirewallRuleParams holds all parameters for creating a firewall rule.

DnsThreatProtection and FirewallDomainListID are mutually exclusive match sources (verified against CreateFirewallRuleInput's doc comment in aws-sdk-go-v2/service/route53resolver@v1.48.4: "they are mutually exclusive"); a rule created via DnsThreatProtection has no domain list and is identified on the wire by a system-generated FirewallThreatProtectionID instead (see FirewallRule.FirewallThreatProtectionID). The FirewallRuleType tagged union (FirewallAdvancedContentCategory/FirewallAdvancedThreatCategory/ PartnerThreatProtection) is intentionally not modeled -- see PARITY.md.

type FirewallConfig

type FirewallConfig struct {
	ID               string `json:"id"`
	OwnerID          string `json:"ownerId"`
	ResourceID       string `json:"resourceId"`
	FirewallFailOpen string `json:"firewallFailOpen"`
	// Region -- see FirewallRuleGroup.Region doc comment. FirewallConfig is
	// keyed by ResourceID (not ID) in the firewallConfigs table.
	Region string `json:"region"`
}

FirewallConfig represents the DNS Firewall configuration for a VPC.

type FirewallDomainList

type FirewallDomainList struct {
	ID               string `json:"id"`
	ARN              string `json:"arn"`
	Name             string `json:"name"`
	CreatorRequestID string `json:"creatorRequestId"`
	Status           string `json:"status"`
	StatusMessage    string `json:"statusMessage,omitempty"`
	ManagedOwnerName string `json:"managedOwnerName,omitempty"`
	CreationTime     string `json:"creationTime,omitempty"`
	ModificationTime string `json:"modificationTime,omitempty"`
	// Region -- see FirewallRuleGroup.Region doc comment.
	Region      string       `json:"region"`
	Tags        []svcTags.KV `json:"tags,omitempty"`
	Domains     []string     `json:"domains,omitempty"`
	DomainCount int32        `json:"domainCount"`
}

FirewallDomainList represents a DNS Firewall domain list.

type FirewallRule

type FirewallRule struct {
	ID                              string `json:"id"`
	ARN                             string `json:"arn"`
	Name                            string `json:"name"`
	FirewallRuleGroupID             string `json:"firewallRuleGroupId"`
	FirewallDomainListID            string `json:"firewallDomainListId"`
	Action                          string `json:"action"`
	BlockResponse                   string `json:"blockResponse,omitempty"`
	BlockOverrideDomain             string `json:"blockOverrideDomain,omitempty"`
	BlockOverrideDNSType            string `json:"blockOverrideDnsType,omitempty"`
	Qtype                           string `json:"qtype,omitempty"`
	ConfidenceThreshold             string `json:"confidenceThreshold,omitempty"`
	CreatorRequestID                string `json:"creatorRequestId,omitempty"`
	CreationTime                    string `json:"creationTime,omitempty"`
	ModificationTime                string `json:"modificationTime,omitempty"`
	DNSThreatProtection             string `json:"dnsThreatProtection,omitempty"`
	FirewallThreatProtectionID      string `json:"firewallThreatProtectionId,omitempty"`
	FirewallDomainRedirectionAction string `json:"firewallDomainRedirectionAction,omitempty"`
	// Region -- see FirewallRuleGroup.Region doc comment.
	Region           string `json:"region"`
	BlockOverrideTTL int32  `json:"blockOverrideTtl,omitempty"`
	Priority         int32  `json:"priority"`
}

FirewallRule represents a single rule within a DNS Firewall rule group.

DnsThreatProtection/FirewallThreatProtectionID/FirewallDomainRedirectionAction back the DNS Firewall Advanced match source (verified against types.FirewallRule/CreateFirewallRuleInput/UpdateFirewallRuleInput/ DeleteFirewallRuleInput in aws-sdk-go-v2/service/route53resolver@v1.48.4). A rule matches EITHER a domain list (FirewallDomainListID, the original path) OR a DnsThreatProtection detector (DGA/DNS_TUNNELING/DICTIONARY_DGA) -- the two are mutually exclusive, matching the real API's documented match sources. A DnsThreatProtection rule has no domain list, so it's identified on the wire by the system-generated FirewallThreatProtectionID instead. The other two FirewallRuleType tagged-union variants (FirewallAdvancedContentCategory/FirewallAdvancedThreatCategory) and PartnerThreatProtection are intentionally NOT modeled here -- see PARITY.md; they are AWS-managed catalogs with no closed SDK enum to source concrete values from, so implementing them would mean inventing category/partner identifiers.

type FirewallRuleGroup

type FirewallRuleGroup struct {
	ID               string `json:"id"`
	ARN              string `json:"arn"`
	Name             string `json:"name"`
	CreatorRequestID string `json:"creatorRequestId"`
	Status           string `json:"status"`
	StatusMessage    string `json:"statusMessage,omitempty"`
	OwnerID          string `json:"ownerId"`
	ShareStatus      string `json:"shareStatus"`
	CreationTime     string `json:"creationTime,omitempty"`
	ModificationTime string `json:"modificationTime,omitempty"`
	// Region is the AWS region this rule group belongs to. It is not part of
	// the wire response (handler.go builds a separate response type) -- it
	// exists purely so store.Table's key function (see store_setup.go) can
	// derive the region-scoped composite key ("<region>|<id>") that replaces
	// the old map[region]map[id]*FirewallRuleGroup nesting.
	Region    string       `json:"region"`
	Tags      []svcTags.KV `json:"tags,omitempty"`
	RuleCount int32        `json:"ruleCount"`
}

FirewallRuleGroup represents a DNS Firewall rule group.

type FirewallRuleGroupAssociation

type FirewallRuleGroupAssociation struct {
	ID                  string `json:"id"`
	ARN                 string `json:"arn"`
	Name                string `json:"name"`
	FirewallRuleGroupID string `json:"firewallRuleGroupId"`
	VpcID               string `json:"vpcId"`
	Status              string `json:"status"`
	StatusMessage       string `json:"statusMessage,omitempty"`
	MutationProtection  string `json:"mutationProtection"`
	ManagedOwnerName    string `json:"managedOwnerName,omitempty"`
	CreatorRequestID    string `json:"creatorRequestId,omitempty"`
	CreationTime        string `json:"creationTime,omitempty"`
	ModificationTime    string `json:"modificationTime,omitempty"`
	// Region -- see FirewallRuleGroup.Region doc comment.
	Region   string `json:"region"`
	Priority int32  `json:"priority"`
}

FirewallRuleGroupAssociation represents an association between a rule group and a VPC.

type Handler

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

func NewHandler

func NewHandler(backend StorageBackend) *Handler

func (*Handler) ChaosOperations

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

ChaosOperations returns all operations that can be fault-injected.

func (*Handler) ChaosRegions

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

ChaosRegions returns all regions this Route53 Resolver instance handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

ChaosServiceName returns the lowercase AWS service name for fault rule matching.

func (*Handler) ExtractOperation

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

func (*Handler) ExtractResource

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

func (*Handler) GetSupportedOperations

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

func (*Handler) Handler

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

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

func (*Handler) Name

func (h *Handler) Name() string

func (*Handler) Reset

func (h *Handler) Reset()

Reset clears all backend state.

func (*Handler) Restore

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

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

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

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable by delegating to the backend.

type IPAddress

type IPAddress struct {
	IPID     string `json:"ipID"`
	SubnetID string `json:"subnetID"`
	IP       string `json:"ip"`
	Ipv6     string `json:"ipv6,omitempty"`
}

type InMemoryBackend

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

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the AWS account ID this backend is configured for.

func (*InMemoryBackend) AddEndpointInternal

func (b *InMemoryBackend) AddEndpointInternal(name, direction string) *ResolverEndpoint

AddEndpointInternal adds a resolver endpoint directly to the backend (test seed helper).

func (*InMemoryBackend) AddFirewallDomainListInternal

func (b *InMemoryBackend) AddFirewallDomainListInternal(name string) *FirewallDomainList

AddFirewallDomainListInternal adds a firewall domain list directly to the backend (test seed helper).

func (*InMemoryBackend) AddFirewallRuleGroupInternal

func (b *InMemoryBackend) AddFirewallRuleGroupInternal(name string) *FirewallRuleGroup

AddFirewallRuleGroupInternal adds a firewall rule group directly to the backend (test seed helper).

func (*InMemoryBackend) AddFirewallRuleInternal

func (b *InMemoryBackend) AddFirewallRuleInternal(
	groupID, name, action, domainListID string,
	priority int32,
) *FirewallRule

AddFirewallRuleInternal adds a firewall rule directly to the backend (demo seed helper).

func (*InMemoryBackend) AddOutpostResolverInternal

func (b *InMemoryBackend) AddOutpostResolverInternal(name, outpostARN string) *OutpostResolver

AddOutpostResolverInternal adds an outpost resolver directly to the backend (test seed helper).

func (*InMemoryBackend) AddQueryLogConfigInternal

func (b *InMemoryBackend) AddQueryLogConfigInternal(
	name, destinationARN string,
) *ResolverQueryLogConfig

AddQueryLogConfigInternal adds a query log config directly to the backend (test seed helper).

func (*InMemoryBackend) AddRuleInternal

func (b *InMemoryBackend) AddRuleInternal(name, domainName, ruleType string) *ResolverRule

AddRuleInternal adds a resolver rule directly to the backend (test seed helper).

func (*InMemoryBackend) AddRuleInternalWithEndpoint

func (b *InMemoryBackend) AddRuleInternalWithEndpoint(
	name, domainName, ruleType, endpointID string,
) *ResolverRule

AddRuleInternalWithEndpoint adds a resolver rule with an endpoint ID directly to the backend (demo seed helper).

func (*InMemoryBackend) AssociateFirewallRuleGroup

func (b *InMemoryBackend) AssociateFirewallRuleGroup(
	ctx context.Context,
	firewallRuleGroupID, vpcID, name, creatorRequestID, mutationProtection string,
	priority int32,
) (*FirewallRuleGroupAssociation, error)

AssociateFirewallRuleGroup associates a FirewallRuleGroup with a VPC.

func (*InMemoryBackend) AssociateResolverEndpointIPAddress

func (b *InMemoryBackend) AssociateResolverEndpointIPAddress(
	ctx context.Context,
	endpointID, subnetID, ip, ipv6 string,
) (*ResolverEndpoint, error)

AssociateResolverEndpointIPAddress adds an IP address to a resolver endpoint.

func (*InMemoryBackend) AssociateResolverQueryLogConfig

func (b *InMemoryBackend) AssociateResolverQueryLogConfig(
	ctx context.Context,
	queryLogConfigID, resourceID string,
) (*ResolverQueryLogConfigAssociation, error)

AssociateResolverQueryLogConfig associates a VPC with a query log config.

func (*InMemoryBackend) AssociateResolverRule

func (b *InMemoryBackend) AssociateResolverRule(
	ctx context.Context,
	resolverRuleID, vpcID, name string,
) (*ResolverRuleAssociation, error)

AssociateResolverRule associates a resolver rule with a VPC.

func (*InMemoryBackend) CreateFirewallDomainList

func (b *InMemoryBackend) CreateFirewallDomainList(
	ctx context.Context,
	name, creatorRequestID string,
) (*FirewallDomainList, error)

CreateFirewallDomainList creates a new DNS Firewall domain list.

func (*InMemoryBackend) CreateFirewallRule

func (b *InMemoryBackend) CreateFirewallRule(ctx context.Context, p CreateFirewallRuleParams) (*FirewallRule, error)

CreateFirewallRule creates a new rule in a DNS Firewall rule group.

func (*InMemoryBackend) CreateFirewallRuleGroup

func (b *InMemoryBackend) CreateFirewallRuleGroup(
	ctx context.Context,
	name, creatorRequestID string,
) (*FirewallRuleGroup, error)

CreateFirewallRuleGroup creates a new DNS Firewall rule group.

func (*InMemoryBackend) CreateOutpostResolver

func (b *InMemoryBackend) CreateOutpostResolver(
	ctx context.Context,
	name, creatorRequestID, outpostARN, preferredInstanceType string,
	instanceCount int32,
) (*OutpostResolver, error)

CreateOutpostResolver creates a new Resolver on an Outpost.

func (*InMemoryBackend) CreateResolverEndpoint

func (b *InMemoryBackend) CreateResolverEndpoint(
	ctx context.Context,
	name, direction, vpcID string,
	ips []IPAddress,
	securityGroupIDs []string,
	resolverEndpointType string,
	protocols []string,
	outpostArn, preferredInstanceType, creatorRequestID string,
	rniEnhancedMetricsEnabled, targetNameServerMetricsEnabled bool,
	dns64Enabled, ipv6InternetAccessEnabled bool,
) (*ResolverEndpoint, error)

func (*InMemoryBackend) CreateResolverQueryLogConfig

func (b *InMemoryBackend) CreateResolverQueryLogConfig(
	ctx context.Context,
	name, creatorRequestID, destinationARN string,
) (*ResolverQueryLogConfig, error)

CreateResolverQueryLogConfig creates a new query logging configuration.

func (*InMemoryBackend) CreateResolverRule

func (b *InMemoryBackend) CreateResolverRule(
	ctx context.Context,
	name, domainName, ruleType, endpointID, creatorRequestID, delegationRecord string,
	targetIps []TargetIP,
) (*ResolverRule, error)

func (*InMemoryBackend) DeleteFirewallDomainList

func (b *InMemoryBackend) DeleteFirewallDomainList(ctx context.Context, id string) (*FirewallDomainList, error)

DeleteFirewallDomainList deletes a DNS Firewall domain list.

func (*InMemoryBackend) DeleteFirewallRule

func (b *InMemoryBackend) DeleteFirewallRule(
	ctx context.Context,
	firewallRuleGroupID, firewallDomainListID, firewallThreatProtectionID, qtype string,
) (*FirewallRule, error)

DeleteFirewallRule deletes a firewall rule identified by FirewallRuleGroupID plus EITHER firewallDomainListID (domain-list rules) OR firewallThreatProtectionID (DnsThreatProtection rules) -- see resolveFirewallRuleIdentity.

qtype, when supplied, must match the resolved rule's stored Qtype or the delete is treated as not-found. api_op_DeleteFirewallRule.go's own doc comment does not list Qtype among the identifying fields ("Identify the rule using either FirewallDomainListId ... or FirewallThreatProtectionId ... together with FirewallRuleGroupId"), so this is read as an additional precondition on the same request rather than a third identity key -- a conservative reading that still makes a caller-supplied Qtype load-bearing instead of silently discarded.

func (*InMemoryBackend) DeleteFirewallRuleGroup

func (b *InMemoryBackend) DeleteFirewallRuleGroup(ctx context.Context, id string) (*FirewallRuleGroup, error)

DeleteFirewallRuleGroup deletes a firewall rule group and cascades to its rules and associations.

func (*InMemoryBackend) DeleteOutpostResolver

func (b *InMemoryBackend) DeleteOutpostResolver(ctx context.Context, id string) (*OutpostResolver, error)

DeleteOutpostResolver deletes an outpost resolver.

func (*InMemoryBackend) DeleteResolverEndpoint

func (b *InMemoryBackend) DeleteResolverEndpoint(ctx context.Context, id string) error

func (*InMemoryBackend) DeleteResolverQueryLogConfig

func (b *InMemoryBackend) DeleteResolverQueryLogConfig(
	ctx context.Context,
	id string,
) (*ResolverQueryLogConfig, error)

DeleteResolverQueryLogConfig deletes a query log config and its associations.

func (*InMemoryBackend) DeleteResolverRule

func (b *InMemoryBackend) DeleteResolverRule(ctx context.Context, id string) error

func (*InMemoryBackend) DisassociateFirewallRuleGroup

func (b *InMemoryBackend) DisassociateFirewallRuleGroup(
	ctx context.Context,
	id string,
) (*FirewallRuleGroupAssociation, error)

DisassociateFirewallRuleGroup removes a firewall rule group association.

func (*InMemoryBackend) DisassociateResolverEndpointIPAddress

func (b *InMemoryBackend) DisassociateResolverEndpointIPAddress(
	ctx context.Context,
	endpointID, ipID string,
) (*ResolverEndpoint, error)

DisassociateResolverEndpointIPAddress removes an IP address from a resolver endpoint.

func (*InMemoryBackend) DisassociateResolverQueryLogConfig

func (b *InMemoryBackend) DisassociateResolverQueryLogConfig(
	ctx context.Context,
	queryLogConfigID, resourceID string,
) (*ResolverQueryLogConfigAssociation, error)

DisassociateResolverQueryLogConfig removes a query log config association, looked up by the (queryLogConfigID, resourceID) pair -- this matches the real DisassociateResolverQueryLogConfig API, which takes ResolverQueryLogConfigId + ResourceId (not an opaque association ID; that only appears in Get/List responses).

func (*InMemoryBackend) DisassociateResolverRule

func (b *InMemoryBackend) DisassociateResolverRule(
	ctx context.Context,
	resolverRuleID, vpcID string,
) (*ResolverRuleAssociation, error)

DisassociateResolverRule removes a resolver rule association, looked up by the (resolverRuleID, vpcID) pair -- this matches the real DisassociateResolverRule API, which takes ResolverRuleId + VPCId (not an opaque association ID; that only appears in Get/List responses).

func (*InMemoryBackend) GetFirewallConfig

func (b *InMemoryBackend) GetFirewallConfig(ctx context.Context, resourceID string) *FirewallConfig

GetFirewallConfig returns or lazily creates the firewall config for a resource (VPC).

func (*InMemoryBackend) GetFirewallDomainList

func (b *InMemoryBackend) GetFirewallDomainList(ctx context.Context, id string) (*FirewallDomainList, error)

GetFirewallDomainList retrieves a domain list by ID.

func (*InMemoryBackend) GetFirewallRuleGroup

func (b *InMemoryBackend) GetFirewallRuleGroup(ctx context.Context, id string) (*FirewallRuleGroup, error)

GetFirewallRuleGroup retrieves a firewall rule group by ID.

func (*InMemoryBackend) GetFirewallRuleGroupAssociation

func (b *InMemoryBackend) GetFirewallRuleGroupAssociation(
	ctx context.Context,
	id string,
) (*FirewallRuleGroupAssociation, error)

GetFirewallRuleGroupAssociation retrieves an association by ID.

func (*InMemoryBackend) GetFirewallRuleGroupPolicy

func (b *InMemoryBackend) GetFirewallRuleGroupPolicy(ctx context.Context, arnStr string) string

GetFirewallRuleGroupPolicy retrieves the resource policy for a firewall rule group ARN.

func (*InMemoryBackend) GetOutpostResolver

func (b *InMemoryBackend) GetOutpostResolver(ctx context.Context, id string) (*OutpostResolver, error)

GetOutpostResolver retrieves an outpost resolver by ID.

func (*InMemoryBackend) GetResolverConfig

func (b *InMemoryBackend) GetResolverConfig(ctx context.Context, resourceID string) *ResolverConfig

GetResolverConfig returns or lazily creates the resolver config for a resource (VPC).

func (*InMemoryBackend) GetResolverDnssecConfig

func (b *InMemoryBackend) GetResolverDnssecConfig(ctx context.Context, resourceID string) *ResolverDnssecConfig

GetResolverDnssecConfig returns or lazily creates the DNSSEC config for a resource.

func (*InMemoryBackend) GetResolverEndpoint

func (b *InMemoryBackend) GetResolverEndpoint(ctx context.Context, id string) (*ResolverEndpoint, error)

func (*InMemoryBackend) GetResolverQueryLogConfig

func (b *InMemoryBackend) GetResolverQueryLogConfig(ctx context.Context, id string) (*ResolverQueryLogConfig, error)

GetResolverQueryLogConfig retrieves a query log config by ID.

func (*InMemoryBackend) GetResolverQueryLogConfigAssociation

func (b *InMemoryBackend) GetResolverQueryLogConfigAssociation(
	ctx context.Context,
	id string,
) (*ResolverQueryLogConfigAssociation, error)

GetResolverQueryLogConfigAssociation retrieves an association by ID.

func (*InMemoryBackend) GetResolverQueryLogConfigPolicy

func (b *InMemoryBackend) GetResolverQueryLogConfigPolicy(ctx context.Context, arnStr string) string

GetResolverQueryLogConfigPolicy retrieves a resource policy for a query log config ARN.

func (*InMemoryBackend) GetResolverRule

func (b *InMemoryBackend) GetResolverRule(ctx context.Context, id string) (*ResolverRule, error)

func (*InMemoryBackend) GetResolverRuleAssociation

func (b *InMemoryBackend) GetResolverRuleAssociation(ctx context.Context, id string) (*ResolverRuleAssociation, error)

GetResolverRuleAssociation retrieves a rule association by ID.

func (*InMemoryBackend) GetResolverRulePolicy

func (b *InMemoryBackend) GetResolverRulePolicy(ctx context.Context, arnStr string) string

GetResolverRulePolicy retrieves a resource policy for a resolver rule ARN.

func (*InMemoryBackend) ImportFirewallDomains

func (b *InMemoryBackend) ImportFirewallDomains(
	ctx context.Context,
	id, operation, domainFileURL string,
) (*FirewallDomainList, error)

ImportFirewallDomains simulates importing domains from a URL into a domain list.

func (*InMemoryBackend) ListFirewallConfigs

func (b *InMemoryBackend) ListFirewallConfigs(ctx context.Context) []*FirewallConfig

ListFirewallConfigs lists all firewall configs.

func (*InMemoryBackend) ListFirewallDomainLists

func (b *InMemoryBackend) ListFirewallDomainLists(ctx context.Context) []*FirewallDomainList

ListFirewallDomainLists lists all firewall domain lists.

func (*InMemoryBackend) ListFirewallDomains

func (b *InMemoryBackend) ListFirewallDomains(ctx context.Context, id string) ([]string, error)

ListFirewallDomains returns the domains stored in a domain list.

func (*InMemoryBackend) ListFirewallRuleGroupAssociations

func (b *InMemoryBackend) ListFirewallRuleGroupAssociations(
	ctx context.Context,
	vpcID, firewallRuleGroupID string,
) []*FirewallRuleGroupAssociation

ListFirewallRuleGroupAssociations lists associations, optionally filtered by VPC or group.

func (*InMemoryBackend) ListFirewallRuleGroups

func (b *InMemoryBackend) ListFirewallRuleGroups(ctx context.Context) []*FirewallRuleGroup

ListFirewallRuleGroups lists all firewall rule groups.

func (*InMemoryBackend) ListFirewallRules

func (b *InMemoryBackend) ListFirewallRules(ctx context.Context, firewallRuleGroupID string) []*FirewallRule

ListFirewallRules lists firewall rules, optionally filtered by rule group ID.

func (*InMemoryBackend) ListOutpostResolvers

func (b *InMemoryBackend) ListOutpostResolvers(ctx context.Context) []*OutpostResolver

ListOutpostResolvers lists all outpost resolvers.

func (*InMemoryBackend) ListResolverConfigs

func (b *InMemoryBackend) ListResolverConfigs(ctx context.Context) []*ResolverConfig

ListResolverConfigs lists all resolver configs.

func (*InMemoryBackend) ListResolverDnssecConfigs

func (b *InMemoryBackend) ListResolverDnssecConfigs(ctx context.Context) []*ResolverDnssecConfig

ListResolverDnssecConfigs lists all DNSSEC configs.

func (*InMemoryBackend) ListResolverEndpointIPAddresses

func (b *InMemoryBackend) ListResolverEndpointIPAddresses(ctx context.Context, endpointID string) ([]IPAddress, error)

ListResolverEndpointIPAddresses returns the IP addresses associated with a resolver endpoint.

func (*InMemoryBackend) ListResolverEndpoints

func (b *InMemoryBackend) ListResolverEndpoints(ctx context.Context) []*ResolverEndpoint

func (*InMemoryBackend) ListResolverQueryLogConfigAssociations

func (b *InMemoryBackend) ListResolverQueryLogConfigAssociations(
	ctx context.Context,
) []*ResolverQueryLogConfigAssociation

ListResolverQueryLogConfigAssociations lists all query log config associations.

func (*InMemoryBackend) ListResolverQueryLogConfigs

func (b *InMemoryBackend) ListResolverQueryLogConfigs(ctx context.Context) []*ResolverQueryLogConfig

ListResolverQueryLogConfigs lists all query log configs.

func (*InMemoryBackend) ListResolverRuleAssociations

func (b *InMemoryBackend) ListResolverRuleAssociations(ctx context.Context) []*ResolverRuleAssociation

ListResolverRuleAssociations lists all resolver rule associations.

func (*InMemoryBackend) ListResolverRules

func (b *InMemoryBackend) ListResolverRules(ctx context.Context) []*ResolverRule

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(ctx context.Context, resourceARN string) []svcTags.KV

ListTagsForResource returns the tags for a resource identified by its ARN.

func (*InMemoryBackend) PutFirewallRuleGroupPolicy

func (b *InMemoryBackend) PutFirewallRuleGroupPolicy(ctx context.Context, arnStr, policy string) error

PutFirewallRuleGroupPolicy stores a resource policy for a firewall rule group ARN.

func (*InMemoryBackend) PutResolverQueryLogConfigPolicy

func (b *InMemoryBackend) PutResolverQueryLogConfigPolicy(ctx context.Context, arnStr, policy string) error

PutResolverQueryLogConfigPolicy stores a resource policy for a query log config ARN.

func (*InMemoryBackend) PutResolverRulePolicy

func (b *InMemoryBackend) PutResolverRulePolicy(ctx context.Context, arnStr, policy string) error

PutResolverRulePolicy stores a resource policy for a resolver rule ARN.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the AWS region this backend is configured for.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all backend state, returning it to an empty initial state.

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) Snapshot

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

Snapshot serialises the backend state to JSON. It implements persistence.Persistable.

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(ctx context.Context, resourceARN string, kvs []svcTags.KV) error

TagResource adds or updates tags on a resource identified by its ARN.

func (*InMemoryBackend) TaggedResources added in v1.3.1

func (b *InMemoryBackend) TaggedResources() []TaggedEntry

TaggedResources returns every Route 53 Resolver resource ARN that currently has at least one tag, across every region (unlike TagResource/UntagResource/ListTagsForResource, which are scoped to the caller's own region via getRegion).

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(ctx context.Context, resourceARN string, keys []string) error

UntagResource removes tags from a resource identified by its ARN.

func (*InMemoryBackend) UpdateFirewallConfig

func (b *InMemoryBackend) UpdateFirewallConfig(
	ctx context.Context,
	resourceID, firewallFailOpen string,
) (*FirewallConfig, error)

UpdateFirewallConfig updates the firewall fail-open setting for a resource.

func (*InMemoryBackend) UpdateFirewallDomains

func (b *InMemoryBackend) UpdateFirewallDomains(
	ctx context.Context,
	id, operation string,
	domains []string,
) (*FirewallDomainList, error)

UpdateFirewallDomains replaces, adds, or removes domains in a domain list.

func (*InMemoryBackend) UpdateFirewallRule

func (b *InMemoryBackend) UpdateFirewallRule(ctx context.Context, p UpdateFirewallRuleParams) (*FirewallRule, error)

UpdateFirewallRule updates an existing firewall rule.

func (*InMemoryBackend) UpdateFirewallRuleGroupAssociation

func (b *InMemoryBackend) UpdateFirewallRuleGroupAssociation(
	ctx context.Context,
	id, name, mutationProtection string,
	priority int32,
) (*FirewallRuleGroupAssociation, error)

UpdateFirewallRuleGroupAssociation updates name, priority, or mutation protection of an association.

func (*InMemoryBackend) UpdateOutpostResolver

func (b *InMemoryBackend) UpdateOutpostResolver(
	ctx context.Context,
	id, name, preferredInstanceType string,
	instanceCount int32,
) (*OutpostResolver, error)

UpdateOutpostResolver updates name, preferred instance type, or instance count.

func (*InMemoryBackend) UpdateResolverConfig

func (b *InMemoryBackend) UpdateResolverConfig(
	ctx context.Context,
	resourceID, autodefinedReverse string,
) (*ResolverConfig, error)

UpdateResolverConfig updates the AutodefinedReverse setting for a resource.

func (*InMemoryBackend) UpdateResolverDnssecConfig

func (b *InMemoryBackend) UpdateResolverDnssecConfig(
	ctx context.Context,
	resourceID, validation string,
) (*ResolverDnssecConfig, error)

UpdateResolverDnssecConfig updates DNSSEC validation for a resource.

func (*InMemoryBackend) UpdateResolverEndpoint

func (b *InMemoryBackend) UpdateResolverEndpoint(
	ctx context.Context,
	id, name, resolverEndpointType string,
	protocols []string,
	rniEnhancedMetricsEnabled, targetNameServerMetricsEnabled *bool,
	dns64Enabled, ipv6InternetAccessEnabled *bool,
	updateIPAddresses []UpdateIPAddress,
) (*ResolverEndpoint, error)

UpdateResolverEndpoint updates name, endpoint type, and/or protocols of a resolver endpoint.

func (*InMemoryBackend) UpdateResolverRule

func (b *InMemoryBackend) UpdateResolverRule(
	ctx context.Context,
	id, name, resolverEndpointID string,
	targetIps []TargetIP,
) (*ResolverRule, error)

UpdateResolverRule updates fields of a resolver rule.

type OutpostResolver

type OutpostResolver struct {
	ID                    string `json:"id"`
	ARN                   string `json:"arn"`
	Name                  string `json:"name"`
	CreatorRequestID      string `json:"creatorRequestId"`
	OutpostARN            string `json:"outpostArn"`
	PreferredInstanceType string `json:"preferredInstanceType"`
	Status                string `json:"status"`
	// Region -- see FirewallRuleGroup.Region doc comment.
	Region        string       `json:"region"`
	Tags          []svcTags.KV `json:"tags,omitempty"`
	InstanceCount int32        `json:"instanceCount"`
}

OutpostResolver represents a Resolver on an Outpost.

type Provider

type Provider struct{}

Provider implements service.Provider for Route 53 Resolver.

func (*Provider) Init

Init initializes the Route 53 Resolver service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type ResolverConfig

type ResolverConfig struct {
	ID                 string `json:"id"`
	ARN                string `json:"arn"`
	OwnerID            string `json:"ownerId"`
	ResourceID         string `json:"resourceId"`
	AutodefinedReverse string `json:"autodefinedReverse"`
	// Region -- see FirewallConfig.Region doc comment; also keyed by ResourceID.
	Region string `json:"region"`
}

ResolverConfig represents the Resolver configuration for a VPC.

type ResolverDnssecConfig

type ResolverDnssecConfig struct {
	ID               string `json:"id"`
	OwnerID          string `json:"ownerId"`
	ResourceID       string `json:"resourceId"`
	ValidationStatus string `json:"validationStatus"`
	// Region -- see FirewallConfig.Region doc comment; also keyed by ResourceID.
	Region string `json:"region"`
}

ResolverDnssecConfig represents the DNSSEC configuration for a VPC.

type ResolverEndpoint

type ResolverEndpoint struct {
	ID                             string       `json:"id"`
	ARN                            string       `json:"arn"`
	Direction                      string       `json:"direction"`
	Name                           string       `json:"name"`
	Status                         string       `json:"status"`
	StatusMessage                  string       `json:"statusMessage,omitempty"`
	VpcID                          string       `json:"vpcID"`
	HostVPCID                      string       `json:"hostVpcId"`
	AccountID                      string       `json:"accountID"`
	Region                         string       `json:"region"`
	ResolverEndpointType           string       `json:"resolverEndpointType"`
	OutpostArn                     string       `json:"outpostArn,omitempty"`
	PreferredInstanceType          string       `json:"preferredInstanceType,omitempty"`
	CreatorRequestID               string       `json:"creatorRequestId,omitempty"`
	CreationTime                   string       `json:"creationTime,omitempty"`
	ModificationTime               string       `json:"modificationTime,omitempty"`
	SecurityGroupIDs               []string     `json:"securityGroupIds"`
	IPAddresses                    []IPAddress  `json:"ipAddresses"`
	Tags                           []svcTags.KV `json:"tags,omitempty"`
	Protocols                      []string     `json:"protocols,omitempty"`
	RniEnhancedMetricsEnabled      bool         `json:"rniEnhancedMetricsEnabled"`
	TargetNameServerMetricsEnabled bool         `json:"targetNameServerMetricsEnabled"`
	DNS64Enabled                   bool         `json:"dns64Enabled"`
	Ipv6InternetAccessEnabled      bool         `json:"ipv6InternetAccessEnabled"`
}

type ResolverQueryLogConfig

type ResolverQueryLogConfig struct {
	ID               string `json:"id"`
	ARN              string `json:"arn"`
	Name             string `json:"name"`
	CreatorRequestID string `json:"creatorRequestId"`
	DestinationARN   string `json:"destinationArn"`
	Status           string `json:"status"`
	OwnerID          string `json:"ownerId"`
	ShareStatus      string `json:"shareStatus"`
	CreationTime     string `json:"creationTime,omitempty"`
	// Region -- see FirewallRuleGroup.Region doc comment.
	Region           string       `json:"region"`
	Tags             []svcTags.KV `json:"tags,omitempty"`
	AssociationCount int32        `json:"associationCount"`
}

ResolverQueryLogConfig represents a query logging configuration.

type ResolverQueryLogConfigAssociation

type ResolverQueryLogConfigAssociation struct {
	ID                       string `json:"id"`
	ResolverQueryLogConfigID string `json:"resolverQueryLogConfigId"`
	ResourceID               string `json:"resourceId"`
	Status                   string `json:"status"`
	Error                    string `json:"error,omitempty"`
	ErrorMessage             string `json:"errorMessage,omitempty"`
	CreationTime             string `json:"creationTime,omitempty"`
	// Region -- see FirewallRuleGroup.Region doc comment.
	Region string `json:"region"`
}

ResolverQueryLogConfigAssociation represents an association between a VPC and a query log config.

type ResolverRule

type ResolverRule struct {
	ID                 string     `json:"id"`
	ARN                string     `json:"arn"`
	Name               string     `json:"name"`
	DomainName         string     `json:"domainName"`
	RuleType           string     `json:"ruleType"`
	Status             string     `json:"status"`
	StatusMessage      string     `json:"statusMessage,omitempty"`
	ShareStatus        string     `json:"shareStatus"`
	ResolverEndpointID string     `json:"resolverEndpointID"`
	AccountID          string     `json:"accountID"`
	Region             string     `json:"region"`
	CreatorRequestID   string     `json:"creatorRequestId,omitempty"`
	OwnerID            string     `json:"ownerId,omitempty"`
	CreationTime       string     `json:"creationTime,omitempty"`
	ModificationTime   string     `json:"modificationTime,omitempty"`
	DelegationRecord   string     `json:"delegationRecord,omitempty"`
	TargetIps          []TargetIP `json:"targetIps,omitempty"`
}

type ResolverRuleAssociation

type ResolverRuleAssociation struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	ResolverRuleID string `json:"resolverRuleId"`
	VPCID          string `json:"vpcId"`
	Status         string `json:"status"`
	// Region -- see FirewallRuleGroup.Region doc comment.
	Region string `json:"region"`
}

ResolverRuleAssociation represents an association between a Resolver rule and a VPC.

type StorageBackend

type StorageBackend interface {
	// Endpoint operations
	CreateResolverEndpoint(
		ctx context.Context,
		name, direction, vpcID string,
		ips []IPAddress,
		securityGroupIDs []string,
		resolverEndpointType string,
		protocols []string,
		outpostArn, preferredInstanceType, creatorRequestID string,
		rniEnhancedMetricsEnabled, targetNameServerMetricsEnabled bool,
		dns64Enabled, ipv6InternetAccessEnabled bool,
	) (*ResolverEndpoint, error)
	GetResolverEndpoint(ctx context.Context, id string) (*ResolverEndpoint, error)
	ListResolverEndpoints(ctx context.Context) []*ResolverEndpoint
	DeleteResolverEndpoint(ctx context.Context, id string) error
	ListResolverEndpointIPAddresses(ctx context.Context, endpointID string) ([]IPAddress, error)
	AssociateResolverEndpointIPAddress(
		ctx context.Context,
		endpointID, subnetID, ip, ipv6 string,
	) (*ResolverEndpoint, error)
	UpdateResolverEndpoint(
		ctx context.Context,
		id, name, resolverEndpointType string,
		protocols []string,
		rniEnhancedMetricsEnabled, targetNameServerMetricsEnabled *bool,
		dns64Enabled, ipv6InternetAccessEnabled *bool,
		updateIPAddresses []UpdateIPAddress,
	) (*ResolverEndpoint, error)
	DisassociateResolverEndpointIPAddress(ctx context.Context, endpointID, ipID string) (*ResolverEndpoint, error)

	// Rule operations
	CreateResolverRule(
		ctx context.Context,
		name, domainName, ruleType, endpointID, creatorRequestID, delegationRecord string,
		targetIps []TargetIP,
	) (*ResolverRule, error)
	GetResolverRule(ctx context.Context, id string) (*ResolverRule, error)
	ListResolverRules(ctx context.Context) []*ResolverRule
	DeleteResolverRule(ctx context.Context, id string) error
	UpdateResolverRule(
		ctx context.Context,
		id, name, resolverEndpointID string,
		targetIps []TargetIP,
	) (*ResolverRule, error)
	AssociateResolverRule(ctx context.Context, resolverRuleID, vpcID, name string) (*ResolverRuleAssociation, error)
	GetResolverRuleAssociation(ctx context.Context, id string) (*ResolverRuleAssociation, error)
	DisassociateResolverRule(
		ctx context.Context,
		resolverRuleID, vpcID string,
	) (*ResolverRuleAssociation, error)
	ListResolverRuleAssociations(ctx context.Context) []*ResolverRuleAssociation
	GetResolverRulePolicy(ctx context.Context, arn string) string
	PutResolverRulePolicy(ctx context.Context, arn, policy string) error

	// Firewall rule group operations
	CreateFirewallRuleGroup(ctx context.Context, name, creatorRequestID string) (*FirewallRuleGroup, error)
	GetFirewallRuleGroup(ctx context.Context, id string) (*FirewallRuleGroup, error)
	ListFirewallRuleGroups(ctx context.Context) []*FirewallRuleGroup
	DeleteFirewallRuleGroup(ctx context.Context, id string) (*FirewallRuleGroup, error)
	GetFirewallRuleGroupPolicy(ctx context.Context, arn string) string
	PutFirewallRuleGroupPolicy(ctx context.Context, arn, policy string) error
	AssociateFirewallRuleGroup(
		ctx context.Context,
		firewallRuleGroupID, vpcID, name, creatorRequestID, mutationProtection string,
		priority int32,
	) (*FirewallRuleGroupAssociation, error)
	GetFirewallRuleGroupAssociation(ctx context.Context, id string) (*FirewallRuleGroupAssociation, error)
	ListFirewallRuleGroupAssociations(
		ctx context.Context,
		vpcID, firewallRuleGroupID string,
	) []*FirewallRuleGroupAssociation
	DisassociateFirewallRuleGroup(ctx context.Context, id string) (*FirewallRuleGroupAssociation, error)
	UpdateFirewallRuleGroupAssociation(
		ctx context.Context,
		id, name, mutationProtection string,
		priority int32,
	) (*FirewallRuleGroupAssociation, error)

	// Firewall domain list operations
	CreateFirewallDomainList(ctx context.Context, name, creatorRequestID string) (*FirewallDomainList, error)
	GetFirewallDomainList(ctx context.Context, id string) (*FirewallDomainList, error)
	ListFirewallDomainLists(ctx context.Context) []*FirewallDomainList
	DeleteFirewallDomainList(ctx context.Context, id string) (*FirewallDomainList, error)
	ListFirewallDomains(ctx context.Context, id string) ([]string, error)
	UpdateFirewallDomains(ctx context.Context, id, operation string, domains []string) (*FirewallDomainList, error)
	ImportFirewallDomains(ctx context.Context, id, operation, domainFileURL string) (*FirewallDomainList, error)

	// Firewall rule operations
	CreateFirewallRule(ctx context.Context, p CreateFirewallRuleParams) (*FirewallRule, error)
	DeleteFirewallRule(
		ctx context.Context,
		firewallRuleGroupID, firewallDomainListID, firewallThreatProtectionID, qtype string,
	) (*FirewallRule, error)
	UpdateFirewallRule(ctx context.Context, p UpdateFirewallRuleParams) (*FirewallRule, error)
	ListFirewallRules(ctx context.Context, firewallRuleGroupID string) []*FirewallRule

	// Firewall config operations
	GetFirewallConfig(ctx context.Context, resourceID string) *FirewallConfig
	UpdateFirewallConfig(ctx context.Context, resourceID, firewallFailOpen string) (*FirewallConfig, error)
	ListFirewallConfigs(ctx context.Context) []*FirewallConfig

	// Outpost resolver operations
	CreateOutpostResolver(
		ctx context.Context,
		name, creatorRequestID, outpostARN, preferredInstanceType string,
		instanceCount int32,
	) (*OutpostResolver, error)
	GetOutpostResolver(ctx context.Context, id string) (*OutpostResolver, error)
	ListOutpostResolvers(ctx context.Context) []*OutpostResolver
	DeleteOutpostResolver(ctx context.Context, id string) (*OutpostResolver, error)
	UpdateOutpostResolver(
		ctx context.Context,
		id, name, preferredInstanceType string,
		instanceCount int32,
	) (*OutpostResolver, error)

	// Query log config operations
	CreateResolverQueryLogConfig(
		ctx context.Context,
		name, creatorRequestID, destinationARN string,
	) (*ResolverQueryLogConfig, error)
	GetResolverQueryLogConfig(ctx context.Context, id string) (*ResolverQueryLogConfig, error)
	ListResolverQueryLogConfigs(ctx context.Context) []*ResolverQueryLogConfig
	DeleteResolverQueryLogConfig(ctx context.Context, id string) (*ResolverQueryLogConfig, error)
	AssociateResolverQueryLogConfig(
		ctx context.Context,
		queryLogConfigID, resourceID string,
	) (*ResolverQueryLogConfigAssociation, error)
	GetResolverQueryLogConfigAssociation(ctx context.Context, id string) (*ResolverQueryLogConfigAssociation, error)
	DisassociateResolverQueryLogConfig(
		ctx context.Context,
		queryLogConfigID, resourceID string,
	) (*ResolverQueryLogConfigAssociation, error)
	ListResolverQueryLogConfigAssociations(ctx context.Context) []*ResolverQueryLogConfigAssociation
	GetResolverQueryLogConfigPolicy(ctx context.Context, arn string) string
	PutResolverQueryLogConfigPolicy(ctx context.Context, arn, policy string) error

	// Resolver config operations
	GetResolverConfig(ctx context.Context, resourceID string) *ResolverConfig
	UpdateResolverConfig(ctx context.Context, resourceID, autodefinedReverse string) (*ResolverConfig, error)
	ListResolverConfigs(ctx context.Context) []*ResolverConfig

	// Resolver DNSSEC config operations
	GetResolverDnssecConfig(ctx context.Context, resourceID string) *ResolverDnssecConfig
	UpdateResolverDnssecConfig(ctx context.Context, resourceID, validation string) (*ResolverDnssecConfig, error)
	ListResolverDnssecConfigs(ctx context.Context) []*ResolverDnssecConfig

	// Tag operations
	TagResource(ctx context.Context, resourceARN string, kvs []svcTags.KV) error
	UntagResource(ctx context.Context, resourceARN string, keys []string) error
	ListTagsForResource(ctx context.Context, resourceARN string) []svcTags.KV

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

StorageBackend defines the interface for Route 53 Resolver backend implementations. All mutating methods must be safe for concurrent use.

Regional operations take a context.Context from which the target AWS region is resolved (see getRegion); same-named resources are isolated per region.

type TaggedEntry added in v1.3.1

type TaggedEntry struct {
	Tags map[string]string
	ARN  string
}

TaggedEntry pairs a resource ARN with its tags.

type TargetIP

type TargetIP struct {
	IP       string `json:"ip"`
	Ipv6     string `json:"ipv6,omitempty"`
	Protocol string `json:"protocol,omitempty"`
	Port     int32  `json:"port"`
}

TargetIP represents a forwarding target IP for a resolver rule.

type UpdateFirewallRuleParams

type UpdateFirewallRuleParams struct {
	FirewallRuleGroupID             string
	FirewallDomainListID            string
	FirewallThreatProtectionID      string
	Name                            string
	Action                          string
	BlockResponse                   string
	BlockOverrideDomain             string
	BlockOverrideDNSType            string
	Qtype                           string
	ConfidenceThreshold             string
	DNSThreatProtection             string
	FirewallDomainRedirectionAction string
	BlockOverrideTTL                int32
	Priority                        int32
}

UpdateFirewallRuleParams holds all updatable fields for a firewall rule. FirewallRuleGroupID plus EITHER FirewallDomainListID (domain-list rules) OR FirewallThreatProtectionID (DnsThreatProtection rules) identify which rule to update -- per the real API, a rule's match source is part of its identity, not a mutable property (verified against api_op_UpdateFirewallRule.go). FirewallDomainRedirectionAction IS a genuinely mutable property of a domain-list rule and is applied like any other updatable field below.

type UpdateIPAddress added in v1.3.1

type UpdateIPAddress struct {
	IPID string
	Ipv6 string
}

UpdateIPAddress carries a per-IP IPv6 assignment from UpdateResolverEndpointInput.UpdateIpAddresses -- verified against api_op_UpdateResolverEndpoint.go: "Specifies the IPv6 address when you update the Resolver endpoint from IPv4 to dual-stack." Each entry identifies an existing IP by IpId (the id returned by ListResolverEndpointIpAddresses) and supplies its new Ipv6 value.

Jump to

Keyboard shortcuts

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