elbv2

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 26 Imported by: 0

README

ELBv2

Parity grade: A · SDK aws-sdk-go-v2/service/elasticloadbalancingv2@v1.58.5 · last audited 2026-08-07 (198990e82)

Coverage

Metric Value
PARITY entries audited 51 (50 ok, 1 partial)
Feature families 8 (7 ok, 1 partial)
Known gaps 4
Deferred items 6
Resource leaks clean
Known gaps
  • ASG/ECS -> ELBv2 target registration is cross-service: RegisterTargets/DeregisterTargets/DescribeTargetHealth on the ELBv2 side are correct and complete (verified and improved this pass - see ops), but nothing on the ASG/ECS side calls them when instances/tasks scale (bd: gopherstack-18k) - NOT fixed here, out of scope per task instructions (elbv2-only edits)
  • GetTrustStoreCaCertificatesBundle / GetTrustStoreRevocationContent always return an empty Location (no real S3-backed object to point to) - documented simplification, not a hidden stub (the ops correctly validate the trust store/revocation exist and return 400 TrustStoreNotFound/RevocationIdNotFound otherwise). UPDATED (2026-08-13, bd gopherstack-hl3h): the RevocationIdNotFound check was previously not implemented despite this gap note claiming it was (GetTrustStoreRevocationContent never read RevocationId at all) - now genuinely true, see the op's PARITY note above. CreateTrustStore/ModifyTrustStore's CaCertificatesBundleS3Bucket/Key/ObjectVersion are recorded on TrustStore (same pass) but likewise never used to produce real bundle content, for the same no-real-S3 reason.
  • CreateTargetGroup's default TargetGroupAttributes map only pre-populates 5 of the ~15+ attribute keys real AWS always returns from DescribeTargetGroupAttributes (see target-group-attributes family note above) - explicitly-set attributes still round-trip correctly via ModifyTargetGroupAttributes, so this is a completeness gap in the defaults, not a wire-shape bug; deferred rather than rushed because the correct default value differs per target type (instance/ip vs lambda) and expanding the map risks breaking the ~30 existing tests that assert on today's 5-key map. No bd id filed yet - recommend filing one if prioritized.
  • (gopherstack-avy / gopherstack-t74c) CertificateNotFoundException (modeled on CreateListener/ModifyListener/AddListenerCertificates per deserializers.go, wire code "CertificateNotFound"; NOT modeled on CreateLoadBalancer) is never raised: requireCertsForProtocol (listeners.go) only checks a Certificate ARN is present for HTTPS/TLS listeners, never that it references a real ACM certificate. Same story for InvalidSubnetException/InvalidSecurityGroupException (modeled on CreateLoadBalancer per deserializers.go, wire codes "InvalidSubnet"/"InvalidSecurityGroup"; SubnetNotFound also modeled there) -- subnet/SG IDs are stored as opaque strings on CreateLoadBalancer/SetSecurityGroups/SetSubnets, never checked against ec2. CORRECTION (gopherstack-t74c, 2026-09-06): the prior "grepped the whole repo... found none anywhere" claim was wrong -- services/elb (classic ELB, NOT elbv2) already has exactly this pattern: elb.EC2Resolver/elb.CertificateResolver interfaces (services/elb/crossservice.go) plus InMemoryBackend.SetEC2Resolver/SetCertificateResolver, wired from cli.go's wireELBCrossService (added #2414, 2026-08-11 -- predates the incorrect claim). That wiring call is scoped to byName["ELB"] only; byName["ELBv2"] is never passed to it or any equivalent, and services/elbv2 has zero EC2Resolver/CertificateResolver-shaped types today (grepped clean). Mirroring the pattern for elbv2 needs: (1) an elbv2-side EC2Resolver/CertificateResolver pair + SetEC2Resolver/SetCertificateResolver + a modeled-error check in CreateLoadBalancer (subnets/security groups) and CreateListener/AddListenerCertificates (certificates), and (2) a cli.go change to construct and wire adapters for byName["ELBv2"] against EC2/ACM/IAM (either extending wireELBCrossService or a new wireELBv2CrossService, called alongside the existing ELB call around cli.go:2987). Not fixed here: cli.go is out of this task's scope (elbv2/sagemaker-only edits) and this repo's session rules require sequencing cli.go changes rather than two agents touching it concurrently -- reported instead of edited. FIXED (gopherstack-t74c, 2026-09-06): added elbv2.EC2Resolver/elbv2.CertificateResolver (services/elbv2/crossservice.go, context-free to match elbv2's own no-ctx backend methods, unlike elb's), SetEC2Resolver/SetCertificateResolver on InMemoryBackend, and modeled-error checks: CreateLoadBalancer now validates SecurityGroups (ErrInvalidSecurityGroup, "InvalidSecurityGroup") and subnet mappings (ErrSubnetNotFound, "SubnetNotFound" -- NOT InvalidSubnet: verified against elasticloadbalancingv2@v1.58.5 types/errors.go, InvalidSubnetException's doc comment is "the specified subnet is out of available addresses" -- a capacity condition -- while SubnetNotFoundException's is "the specified subnet does not exist", the one an existence check should raise); CreateListener, ModifyListener and AddListenerCertificates now validate CertificateArn (ErrCertificateNotFound, "CertificateNotFound"). cli.go's wireELBv2CrossService (new, called alongside wireELBCrossService at cli.go:2987-2988) wires EC2 via the existing elbEC2ResolverAdapter (identical no-ctx method set, reused as-is) and ACM/IAM via a new elbv2CertificateResolverAdapter. An unwired resolver (nil, the default) is a no-op, matching elb's contract -- verified by TestCreateLoadBalancer_EC2Resolver/no_resolver_wired_accepts_any_id and TestCreateListener_CertificateResolver/no_resolver_wired_accepts_any_cert (services/elbv2/crossservice_test.go), plus TestInitializeServices_ELBv2EC2ACMWiring (root package) driving the real cli.go composition root end-to-end. Also FIXED (gopherstack-v7ns) in the same pass: elbv2.CertificateResolver additionally carries AddInUseBy/RemoveInUseBy, called from CreateListener/DeleteListener/ModifyListener/AddListenerCertificates/RemoveListenerCertificates (attach marks, detach unmarks), forwarding to acm.InMemoryBackend.AddInUseBy/RemoveInUseBy -- previously zero callers repo-wide. This makes ACM's DeleteCertificate ResourceInUseException guard reachable for elbv2-attached certificates; TestInitializeServices_ELBv2EC2ACMWiring proves a certificate attached to a live listener resists DeleteCertificate and becomes deletable again once the listener is deleted. Classic elb.CertificateResolver was NOT extended with InUseBy methods -- a certificate attached only via classic ELB (SetLoadBalancerListenerSSLCertificate/CreateLoadBalancerListeners) still does not report usage to ACM; that remains open.
Deferred
  • IMPLEMENTED 2026-08-07 (bd gopherstack-q1z2): RuleTransforms -- see families.rule-transforms above.
  • jwt-validation is a real, newer Action type (types.ActionTypeEnum has "jwt-validation" alongside forward/redirect/fixed-response/authenticate-oidc/authenticate-cognito; backed by JwtValidationActionConfig/JwtValidationActionAdditionalClaim) not implemented here at all - not in this task's explicit actions checklist (forward/redirect/fixed-response/authenticate-oidc/authenticate-cognito). No bd id filed yet.
  • AnomalyDetection (types.TargetHealth.AnomalyDetection) and AdministrativeOverride (types.TargetHealth.AdministrativeOverride) are newer DescribeTargetHealth response fields (anomaly mitigation / zonal-shift administrative override status) not modeled on the backend Target/TargetHealthDescription types - not in this task's explicit target-health checklist. No bd id filed yet.
  • LoadBalancer fields added to the SDK since the last full field-diff: IpamPools, EnablePrefixForIpv6SourceNat, CustomerOwnedIpv4Pool, EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic (types.LoadBalancer / CreateLoadBalancerInput) - all Outposts/IPAM/UDP-source-NAT niche features, not in this task's explicit CreateLoadBalancer checklist (subnets/subnetMappings/securityGroups/scheme/ipAddressType). No bd id filed yet.
  • MutualAuthenticationAttributes.AdvertiseTrustStoreCaNames and .TrustStoreAssociationStatus (types.go) are not modeled on the backend MutualAuthentication struct - a newer mTLS/shared-trust-store feature, not in this task's explicit trust-store checklist. No bd id filed yet.
  • …and 1 more — see PARITY.md

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrLoadBalancerNotFound is returned when the requested load balancer does not exist.
	ErrLoadBalancerNotFound = awserr.New("LoadBalancerNotFound", awserr.ErrNotFound)
	// ErrTargetGroupNotFound is returned when the requested target group does not exist.
	ErrTargetGroupNotFound = awserr.New("TargetGroupNotFound", awserr.ErrNotFound)
	// ErrListenerNotFound is returned when the requested listener does not exist.
	ErrListenerNotFound = awserr.New("ListenerNotFound", awserr.ErrNotFound)
	// ErrRuleNotFound is returned when the requested rule does not exist.
	ErrRuleNotFound = awserr.New("RuleNotFound", awserr.ErrNotFound)
	// ErrTrustStoreNotFound is returned when the requested trust store does not exist.
	ErrTrustStoreNotFound = awserr.New("TrustStoreNotFound", awserr.ErrNotFound)
	// ErrLoadBalancerAlreadyExists is returned when a load balancer with that name already exists.
	ErrLoadBalancerAlreadyExists = awserr.New("DuplicateLoadBalancerName", awserr.ErrAlreadyExists)
	// ErrTargetGroupAlreadyExists is returned when a target group with that name already exists.
	ErrTargetGroupAlreadyExists = awserr.New("DuplicateTargetGroupName", awserr.ErrAlreadyExists)
	// ErrTrustStoreAlreadyExists is returned when a trust store with that name already exists.
	ErrTrustStoreAlreadyExists = awserr.New("DuplicateTrustStoreName", awserr.ErrAlreadyExists)
	// ErrInvalidParameter is returned when a request parameter is invalid or missing.
	ErrInvalidParameter = awserr.New("ValidationError", awserr.ErrInvalidParameter)
	// ErrUnknownAction is returned when the requested action is not recognized.
	ErrUnknownAction = awserr.New("InvalidAction", awserr.ErrInvalidParameter)
	// ErrDuplicateRulePriority is returned when two rules have the same priority.
	// AWS's real error code for this condition is "PriorityInUse" (PriorityInUseException),
	// not "DuplicatePriority" — verified against aws-sdk-go-v2/service/elasticloadbalancingv2/types.
	ErrDuplicateRulePriority = awserr.New("PriorityInUse", awserr.ErrInvalidParameter)
	// ErrOperationNotPermitted is returned when the operation is not allowed (e.g. deleting default rule).
	ErrOperationNotPermitted = awserr.New("OperationNotPermitted", awserr.ErrInvalidParameter)
	// ErrDuplicateListener is returned when a listener on the same port already exists.
	ErrDuplicateListener = awserr.New("DuplicateListener", awserr.ErrAlreadyExists)
	// ErrTargetGroupInUse is returned when attempting to delete a target group that is still referenced.
	ErrTargetGroupInUse = awserr.New("ResourceInUse", awserr.ErrInvalidParameter)
	// ErrInvalidConfigurationRequest is returned when a configuration is invalid for the LB type.
	ErrInvalidConfigurationRequest = awserr.New(
		"InvalidConfigurationRequest",
		awserr.ErrInvalidParameter,
	)
	// ErrResourcePolicyNotFound is returned when no resource policy is set for a resource.
	ErrResourcePolicyNotFound = awserr.New("ResourceNotFound", awserr.ErrNotFound)
	// ErrTrustStoreAssociationNotFound is returned when a shared trust store association does not exist.
	ErrTrustStoreAssociationNotFound = awserr.New("AssociationNotFound", awserr.ErrNotFound)
	// ErrRevocationIDNotFound is returned when the requested revocation ID does not exist
	// on the trust store (GetTrustStoreRevocationContent).
	ErrRevocationIDNotFound = awserr.New("RevocationIdNotFound", awserr.ErrNotFound)
	// ErrCertificateNotFound is returned when a listener's CertificateArn does not
	// resolve against ACM or IAM. Modeled on CreateListener, ModifyListener and
	// AddListenerCertificates (CertificateNotFoundException) -- NOT on
	// CreateLoadBalancer, which does not accept certificates.
	ErrCertificateNotFound = awserr.New("CertificateNotFound", awserr.ErrNotFound)
	// ErrInvalidSecurityGroup is returned when a security group passed to
	// CreateLoadBalancer does not exist. Modeled on
	// CreateLoadBalancer's InvalidSecurityGroupException.
	ErrInvalidSecurityGroup = awserr.New("InvalidSecurityGroup", awserr.ErrInvalidParameter)
	// ErrSubnetNotFound is returned when a subnet passed to CreateLoadBalancer does not
	// exist. Modeled on CreateLoadBalancer's SubnetNotFoundException ("The specified
	// subnet does not exist") -- NOT InvalidSubnetException, whose doc comment reads
	// "The specified subnet is out of available addresses" (a capacity condition, not
	// an existence check); verified in aws-sdk-go-v2/service/elasticloadbalancingv2
	// types/errors.go.
	ErrSubnetNotFound = awserr.New("SubnetNotFound", awserr.ErrNotFound)
)

Functions

This section is empty.

Types

type Action

type Action struct {
	RedirectConfig            *RedirectConfig            `json:"redirectConfig,omitempty"`
	FixedResponseConfig       *FixedResponseConfig       `json:"fixedResponseConfig,omitempty"`
	ForwardConfig             *ForwardConfig             `json:"forwardConfig,omitempty"`
	AuthenticateCognitoConfig *AuthenticateCognitoConfig `json:"authenticateCognitoConfig,omitempty"`
	AuthenticateOidcConfig    *AuthenticateOidcConfig    `json:"authenticateOidcConfig,omitempty"`
	Type                      string                     `json:"type"`
	TargetGroupArn            string                     `json:"targetGroupArn"`
	Order                     int32                      `json:"order,omitempty"`
}

Action represents a listener or rule action.

type AuthenticateCognitoConfig

type AuthenticateCognitoConfig struct {
	AuthenticationRequestExtraParams map[string]string `json:"authenticationRequestExtraParams,omitempty"`
	UserPoolArn                      string            `json:"userPoolArn"`
	UserPoolClientID                 string            `json:"userPoolClientId"`
	UserPoolDomain                   string            `json:"userPoolDomain"`
	SessionCookieName                string            `json:"sessionCookieName,omitempty"`
	Scope                            string            `json:"scope,omitempty"`
	OnUnauthenticatedRequest         string            `json:"onUnauthenticatedRequest,omitempty"`
	SessionTimeout                   int64             `json:"sessionTimeout,omitempty"`
}

AuthenticateCognitoConfig holds configuration for authenticate-cognito actions.

type AuthenticateOidcConfig

type AuthenticateOidcConfig struct {
	AuthenticationRequestExtraParams map[string]string `json:"authenticationRequestExtraParams,omitempty"`
	Issuer                           string            `json:"issuer"`
	AuthorizationEndpoint            string            `json:"authorizationEndpoint"`
	TokenEndpoint                    string            `json:"tokenEndpoint"`
	UserInfoEndpoint                 string            `json:"userInfoEndpoint"`
	ClientID                         string            `json:"clientId"`
	ClientSecret                     string            `json:"clientSecret,omitempty"`
	SessionCookieName                string            `json:"sessionCookieName,omitempty"`
	Scope                            string            `json:"scope,omitempty"`
	OnUnauthenticatedRequest         string            `json:"onUnauthenticatedRequest,omitempty"`
	SessionTimeout                   int64             `json:"sessionTimeout,omitempty"`
}

AuthenticateOidcConfig holds configuration for authenticate-oidc actions.

type AvailabilityZone

type AvailabilityZone struct {
	ZoneName string `json:"zoneName"`
	SubnetID string `json:"subnetId,omitempty"`
}

AvailabilityZone holds the zone name and subnet ID for an LB availability zone mapping.

type CapacityReservation

type CapacityReservation struct {
	LastModifiedTime          time.Time `json:"lastModifiedTime"`
	MinimumCapacityUnits      int32     `json:"minimumCapacityUnits"`
	DecreaseRequestsRemaining int32     `json:"decreaseRequestsRemaining"`
}

CapacityReservation holds the capacity reservation state for a load balancer, as set by ModifyCapacityReservation and read by DescribeCapacityReservation.

type Certificate

type Certificate struct {
	CertificateArn string `json:"certificateArn"`
	IsDefault      bool   `json:"isDefault"`
}

Certificate represents a listener certificate.

type CertificateResolver

type CertificateResolver interface {
	ResolveCertificate(certARN string) bool
	AddInUseBy(certARN, resourceARN string)
	RemoveInUseBy(certARN, resourceARN string)
}

CertificateResolver lets this backend validate a listener's CertificateArn against the real services/acm and services/iam backends, and report attach/detach so ACM's InUseBy tracking -- and therefore DeleteCertificate's ResourceInUseException guard -- becomes reachable. Wired in by cli.go's wireELBv2CrossService. A nil resolver (the default) accepts every CertificateArn unvalidated and reports no usage.

type Condition

type Condition struct {
	// Field is the condition type: host-header, path-pattern, http-header,
	// http-request-method, query-string, source-ip.
	Field string `json:"field"`
	// Values holds the condition values (used for host-header, path-pattern,
	// http-request-method, source-ip).
	Values []string `json:"values,omitempty"`
	// RegexValues holds regular expressions to match instead of exact/wildcard
	// Values. Valid only for host-header, path-pattern, and http-header conditions
	// (types.RuleCondition.RegexValues / HostHeaderConditionConfig.RegexValues /
	// PathPatternConditionConfig.RegexValues / HttpHeaderConditionConfig.RegexValues).
	RegexValues []string `json:"regexValues,omitempty"`
	// HTTPHeaderName is only set for http-header conditions.
	HTTPHeaderName string `json:"httpHeaderName,omitempty"`
	// QueryStringPairs holds key/value pairs for query-string conditions.
	QueryStringPairs []QueryStringPair `json:"queryStringPairs,omitempty"`
}

Condition represents an ELBv2 rule condition (e.g. host-header, path-pattern, http-header).

type CreateListenerInput

type CreateListenerInput struct {
	MutualAuthentication *MutualAuthentication
	LoadBalancerArn      string
	Protocol             string
	SSLPolicy            string
	AlpnPolicy           []string
	DefaultActions       []Action
	Tags                 []tags.KV
	Certificates         []Certificate
	Port                 int32
}

CreateListenerInput holds the parameters for creating a listener.

type CreateLoadBalancerInput

type CreateLoadBalancerInput struct {
	Name           string
	Scheme         string
	Type           string
	IPAddressType  string
	Subnets        []string        // plain subnet IDs (Subnets.member.N)
	SubnetMappings []SubnetMapping // rich subnet mappings (SubnetMappings.member.N)
	SecurityGroups []string
	Tags           []tags.KV
}

CreateLoadBalancerInput holds the parameters for creating a load balancer.

type CreateRuleInput

type CreateRuleInput struct {
	ListenerArn string
	Priority    string
	Actions     []Action
	Conditions  []Condition
	Transforms  []RuleTransform
	Tags        []tags.KV
}

CreateRuleInput holds the parameters for creating a listener rule.

type CreateTargetGroupInput

type CreateTargetGroupInput struct {
	Name                       string
	Protocol                   string
	ProtocolVersion            string
	VpcID                      string
	TargetType                 string
	HealthCheckProtocol        string
	HealthCheckPort            string
	HealthCheckPath            string
	Matcher                    Matcher
	Tags                       []tags.KV
	Port                       int32
	HealthCheckIntervalSeconds int32
	HealthCheckTimeoutSeconds  int32
	HealthyThresholdCount      int32
	UnhealthyThresholdCount    int32
	HealthCheckEnabled         bool
}

CreateTargetGroupInput holds the parameters for creating a target group.

type EC2Resolver

type EC2Resolver interface {
	SecurityGroupExists(id string) bool
	SubnetExists(id string) bool
}

EC2Resolver lets this backend validate SecurityGroups/Subnets passed to CreateLoadBalancer against the real services/ec2 backend, mirroring services/elb's EC2Resolver. Wired in by cli.go's wireELBv2CrossService. A nil resolver (the default) accepts every security-group/subnet id unvalidated -- e.g. isolated unit tests with no EC2 backend wired.

type FixedResponseConfig

type FixedResponseConfig struct {
	MessageBody string `json:"messageBody,omitempty"`
	StatusCode  string `json:"statusCode"`
	ContentType string `json:"contentType,omitempty"`
}

FixedResponseConfig holds configuration for fixed-response actions.

type ForwardConfig

type ForwardConfig struct {
	TargetGroups []TargetGroupTuple `json:"targetGroups,omitempty"`
}

ForwardConfig holds configuration for forward actions with multiple target groups.

type Handler

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

Handler is the Echo HTTP handler for ELBv2 operations.

func NewHandler

func NewHandler(backend StorageBackend) *Handler

NewHandler creates a new ELBv2 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 handler 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

ExtractOperation extracts the ELBv2 action from the request.

func (*Handler) ExtractResource

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

ExtractResource extracts the primary resource identifier from the request.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns the list of supported ELBv2 operations.

func (*Handler) Handler

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

Handler returns the Echo handler function for ELBv2 operations.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

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

RouteMatcher returns a function that matches ELBv2 requests. ELBv2 requests are form-encoded POSTs with Version=2015-12-01.

func (*Handler) Shutdown

func (h *Handler) Shutdown(_ context.Context)

Shutdown stops the backend's health reconciler goroutine so it does not outlive the service. Invoked on server shutdown via service.Shutdowner.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable by delegating to the backend.

type HostHeaderRewriteConfig added in v1.3.1

type HostHeaderRewriteConfig struct {
	Rewrites []RewriteConfig `json:"rewrites,omitempty"`
}

HostHeaderRewriteConfig holds the rewrite rules for a host-header-rewrite transform.

type InMemoryBackend

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

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new in-memory ELBv2 backend.

func (*InMemoryBackend) AddListenerCertificates

func (b *InMemoryBackend) AddListenerCertificates(listenerArn string, certs []Certificate) error

AddListenerCertificates adds certificates to a listener.

func (*InMemoryBackend) AddTags

func (b *InMemoryBackend) AddTags(resourceArns []string, kvs []tags.KV) error

AddTags adds or updates tags on ELBv2 resources.

func (*InMemoryBackend) AddTrustStoreRevocations

func (b *InMemoryBackend) AddTrustStoreRevocations(
	trustStoreArn string,
	contents []RevocationContentInput,
) ([]TrustStoreRevocation, error)

AddTrustStoreRevocations appends revocation entries to a trust store, assigning each a monotonically increasing RevocationId (real AWS assigns this server-side; see RevocationContentInput doc comment). Returns the newly created revocations so the caller can echo them in the AddTrustStoreRevocationsResult response.

func (*InMemoryBackend) Close

func (b *InMemoryBackend) Close()

Close stops the background health reconciler, waiting for it to exit so no goroutine outlives the backend. Safe to call more than once.

func (*InMemoryBackend) CreateListener

func (b *InMemoryBackend) CreateListener(input CreateListenerInput) (*Listener, error)

CreateListener creates a new listener on a load balancer.

func (*InMemoryBackend) CreateLoadBalancer

func (b *InMemoryBackend) CreateLoadBalancer(input CreateLoadBalancerInput) (*LoadBalancer, error)

CreateLoadBalancer creates a new load balancer.

func (*InMemoryBackend) CreateRule

func (b *InMemoryBackend) CreateRule(input CreateRuleInput) (*Rule, error)

CreateRule creates a new rule on a listener.

func (*InMemoryBackend) CreateTargetGroup

func (b *InMemoryBackend) CreateTargetGroup(input CreateTargetGroupInput) (*TargetGroup, error)

CreateTargetGroup creates a new target group.

func (*InMemoryBackend) CreateTrustStore

func (b *InMemoryBackend) CreateTrustStore(
	name string,
	kvs []tags.KV,
	s3Bucket, s3Key, s3ObjectVersion string,
) (*TrustStore, error)

CreateTrustStore creates a new trust store. s3Bucket/s3Key/s3ObjectVersion are CreateTrustStoreInput's CaCertificatesBundleS3* fields (Bucket/Key required on the real wire) -- stored inertly, see TrustStore's doc comment.

func (*InMemoryBackend) DeleteListener

func (b *InMemoryBackend) DeleteListener(listenerArn string) error

DeleteListener deletes a listener by ARN.

func (*InMemoryBackend) DeleteLoadBalancer

func (b *InMemoryBackend) DeleteLoadBalancer(lbArn string) error

DeleteLoadBalancer deletes a load balancer by ARN.

func (*InMemoryBackend) DeleteRule

func (b *InMemoryBackend) DeleteRule(ruleArn string) error

DeleteRule deletes a rule by ARN.

func (*InMemoryBackend) DeleteSharedTrustStoreAssociation

func (b *InMemoryBackend) DeleteSharedTrustStoreAssociation(trustStoreArn, resourceArn string) error

DeleteSharedTrustStoreAssociation removes the association between a trust store and a resource (listener). The association exists when the listener's MutualAuthentication references the trust store; deleting it clears that reference.

func (*InMemoryBackend) DeleteTargetGroup

func (b *InMemoryBackend) DeleteTargetGroup(tgArn string) error

DeleteTargetGroup deletes a target group by ARN. AWS: DeleteTargetGroup's own error switch models only ResourceInUse -- no TargetGroupNotFound -- so it is idempotent on a missing target group.

func (*InMemoryBackend) DeleteTrustStore

func (b *InMemoryBackend) DeleteTrustStore(trustStoreArn string) error

DeleteTrustStore deletes a trust store by ARN.

func (*InMemoryBackend) DeregisterTargets

func (b *InMemoryBackend) DeregisterTargets(tgArn string, targets []Target) error

DeregisterTargets transitions targets to draining state. They are removed after the deregistration_delay.timeout_seconds attribute expires.

func (*InMemoryBackend) DescribeCapacityReservation

func (b *InMemoryBackend) DescribeCapacityReservation(lbArn string) (*CapacityReservation, error)

DescribeCapacityReservation returns the capacity reservation state for a load balancer.

func (*InMemoryBackend) DescribeListenerAttributes

func (b *InMemoryBackend) DescribeListenerAttributes(
	listenerArn string,
) (map[string]string, error)

DescribeListenerAttributes returns attributes for a listener.

func (*InMemoryBackend) DescribeListenerCertificates

func (b *InMemoryBackend) DescribeListenerCertificates(listenerArn string) ([]Certificate, error)

DescribeListenerCertificates returns certificates on a listener.

func (*InMemoryBackend) DescribeListeners

func (b *InMemoryBackend) DescribeListeners(
	lbArn string,
	listenerArns []string,
) ([]Listener, error)

DescribeListeners returns listeners filtered by load balancer ARN and/or listener ARNs. The returned Listener values contain a Tags pointer that is backend-owned; callers must treat it as read-only.

Fast path: when only listener ARNs are supplied (no lbArn filter), look them up directly in the ARN-keyed map instead of scanning every listener.

func (*InMemoryBackend) DescribeLoadBalancers

func (b *InMemoryBackend) DescribeLoadBalancers(
	arns []string,
	names []string,
) ([]LoadBalancer, error)

DescribeLoadBalancers returns load balancers filtered by ARNs and/or names. The returned LoadBalancer values contain a Tags pointer that is backend-owned; callers must treat it as read-only.

Fast path: when only ARNs are supplied (no names), look them up directly in the ARN-keyed map instead of scanning every load balancer in the backend.

func (*InMemoryBackend) DescribeRules

func (b *InMemoryBackend) DescribeRules(listenerArn string, ruleArns []string) ([]Rule, error)

DescribeRules returns rules filtered by listener ARN and/or rule ARNs.

Fast path: when only rule ARNs are supplied (no listenerArn filter), look them up directly in the ARN-keyed map instead of scanning every rule.

func (*InMemoryBackend) DescribeTags

func (b *InMemoryBackend) DescribeTags(resourceArns []string) (map[string][]tags.KV, error)

DescribeTags returns tags for the specified resource ARNs.

func (*InMemoryBackend) DescribeTargetGroupAttributes

func (b *InMemoryBackend) DescribeTargetGroupAttributes(tgArn string) (map[string]string, error)

DescribeTargetGroupAttributes returns attributes for a target group.

func (*InMemoryBackend) DescribeTargetGroups

func (b *InMemoryBackend) DescribeTargetGroups(
	arns []string,
	names []string,
	lbArn string,
) ([]TargetGroup, error)

DescribeTargetGroups returns target groups filtered by ARNs, names, or load balancer ARN. The returned TargetGroup values contain a Tags pointer that is backend-owned; callers must treat it as read-only.

Fast path: when only ARNs are supplied (no names, no lbArn), look them up directly in the ARN-keyed map instead of scanning every target group.

func (*InMemoryBackend) DescribeTargetHealth

func (b *InMemoryBackend) DescribeTargetHealth(tgArn string) ([]TargetHealthDescription, error)

DescribeTargetHealth returns health descriptions for targets registered with the target group.

func (*InMemoryBackend) DescribeTrustStoreAssociations

func (b *InMemoryBackend) DescribeTrustStoreAssociations(trustStoreArn string) ([]string, error)

DescribeTrustStoreAssociations returns listener ARNs whose trust store is set to this ARN.

func (*InMemoryBackend) DescribeTrustStoreRevocations

func (b *InMemoryBackend) DescribeTrustStoreRevocations(
	trustStoreArn string, revocationIDs []int64,
) ([]TrustStoreRevocation, error)

DescribeTrustStoreRevocations returns revocation entries for a trust store. DescribeTrustStoreRevocations returns trustStoreArn's revocation files, optionally restricted to revocationIDs (api_op_DescribeTrustStoreRevocations.go's RevocationIds: "The revocation IDs of the revocation files you want to describe").

func (*InMemoryBackend) DescribeTrustStores

func (b *InMemoryBackend) DescribeTrustStores(arns []string, names []string) ([]TrustStore, error)

DescribeTrustStores returns trust stores filtered by ARNs and/or names.

func (*InMemoryBackend) GetResourcePolicy

func (b *InMemoryBackend) GetResourcePolicy(resourceArn string) (string, error)

GetResourcePolicy returns the stored resource policy for a resource ARN.

func (*InMemoryBackend) ModifyCapacityReservation

func (b *InMemoryBackend) ModifyCapacityReservation(
	lbArn string, minimumCapacityUnits *int32, reset bool,
) (*CapacityReservation, error)

ModifyCapacityReservation persists capacity reservation state on a load balancer.

func (*InMemoryBackend) ModifyIPPools

func (b *InMemoryBackend) ModifyIPPools(
	lbArn string, ipv4PoolID *string, removeIPv4 bool,
) (*LoadBalancer, error)

ModifyIPPools updates the IPAM pool configuration on a load balancer.

func (*InMemoryBackend) ModifyListener

func (b *InMemoryBackend) ModifyListener(input ModifyListenerInput) (*Listener, error)

ModifyListener updates the properties of an existing listener.

func (*InMemoryBackend) ModifyListenerAttributes

func (b *InMemoryBackend) ModifyListenerAttributes(
	listenerArn string,
	attrs map[string]string,
) (*Listener, error)

ModifyListenerAttributes updates attributes on a listener.

func (*InMemoryBackend) ModifyLoadBalancerAttributes

func (b *InMemoryBackend) ModifyLoadBalancerAttributes(
	lbArn string,
	attrs map[string]string,
) (*LoadBalancer, error)

ModifyLoadBalancerAttributes updates attributes on a load balancer.

func (*InMemoryBackend) ModifyRule

func (b *InMemoryBackend) ModifyRule(
	ruleArn string,
	actions []Action,
	conditions []Condition,
	transforms []RuleTransform,
	resetTransforms bool,
) (*Rule, error)

ModifyRule updates the actions, conditions, and/or transforms of an existing rule. resetTransforms clears Transforms entirely; it is mutually exclusive with a non-empty transforms (enforced by the handler, per ModifyRuleInput's doc comment).

func (*InMemoryBackend) ModifyTargetGroup

func (b *InMemoryBackend) ModifyTargetGroup(input ModifyTargetGroupInput) (*TargetGroup, error)

ModifyTargetGroup updates health-check settings on a target group.

func (*InMemoryBackend) ModifyTargetGroupAttributes

func (b *InMemoryBackend) ModifyTargetGroupAttributes(
	tgArn string,
	attrs map[string]string,
) (*TargetGroup, error)

ModifyTargetGroupAttributes updates attributes on a target group.

func (*InMemoryBackend) ModifyTrustStore

func (b *InMemoryBackend) ModifyTrustStore(
	trustStoreArn string,
	s3Bucket, s3Key, s3ObjectVersion string,
) (*TrustStore, error)

ModifyTrustStore looks up a trust store for ModifyTrustStoreInput, whose only real fields are TrustStoreArn and the CA certificates bundle location (CaCertificatesBundleS3Bucket/Key/ObjectVersion, both Bucket/Key required on the real wire). Bundle content itself stays inert -- see TrustStore's doc comment -- but the location is now recorded (gopherstack-hl3h), matching CreateTrustStore so the two ops model the same shape consistently.

func (*InMemoryBackend) PutResourcePolicy

func (b *InMemoryBackend) PutResourcePolicy(resourceArn, policy string) error

PutResourcePolicy stores a resource policy keyed by resource ARN.

func (*InMemoryBackend) RegisterTargets

func (b *InMemoryBackend) RegisterTargets(tgArn string, targets []Target) error

RegisterTargets registers targets with a target group.

func (*InMemoryBackend) RemoveListenerCertificates

func (b *InMemoryBackend) RemoveListenerCertificates(listenerArn string, certArns []string) error

RemoveListenerCertificates removes certificate ARNs from a listener.

func (*InMemoryBackend) RemoveTags

func (b *InMemoryBackend) RemoveTags(resourceArns []string, keys []string) error

RemoveTags removes tags from ELBv2 resources.

func (*InMemoryBackend) RemoveTrustStoreRevocations

func (b *InMemoryBackend) RemoveTrustStoreRevocations(
	trustStoreArn string,
	revocationIDs []int64,
) error

RemoveTrustStoreRevocations removes revocation entries from a trust store by RevocationID.

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

func (b *InMemoryBackend) SetCertificateResolver(r CertificateResolver)

SetCertificateResolver wires the backend to validate listener CertificateArns and report their attach/detach to ACM -- see CertificateResolver's doc comment. Called from cli.go's wireELBv2CrossService.

func (*InMemoryBackend) SetEC2Resolver

func (b *InMemoryBackend) SetEC2Resolver(r EC2Resolver)

SetEC2Resolver wires the backend to validate SecurityGroups/Subnets against the real services/ec2 backend -- see EC2Resolver's doc comment. Called from cli.go's wireELBv2CrossService.

func (*InMemoryBackend) SetIPAddressType

func (b *InMemoryBackend) SetIPAddressType(lbArn string, ipType string) (*LoadBalancer, error)

SetIPAddressType updates the IP address type of a load balancer.

func (*InMemoryBackend) SetRulePriorities

func (b *InMemoryBackend) SetRulePriorities(priorities []RulePriority) ([]Rule, error)

SetRulePriorities updates the priorities of one or more rules.

func (*InMemoryBackend) SetSecurityGroups

func (b *InMemoryBackend) SetSecurityGroups(lbArn string, sgs []string) (*LoadBalancer, error)

SetSecurityGroups updates the security groups associated with a load balancer.

func (*InMemoryBackend) SetSubnets

func (b *InMemoryBackend) SetSubnets(
	lbArn string,
	mappings []SubnetMapping,
) (*LoadBalancer, error)

SetSubnets updates the availability zones / subnets associated with a load balancer.

func (*InMemoryBackend) SetTargetHealthState

func (b *InMemoryBackend) SetTargetHealthState(
	tgArn, targetID string,
	port int32,
	state, reason string,
) error

SetTargetHealthState overrides the health state for a specific target in a target group. Used in tests to simulate health state transitions.

func (*InMemoryBackend) Snapshot

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

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

type Listener

type Listener struct {
	Tags                 *tags.Tags            `json:"tags,omitempty"`
	Attributes           map[string]string     `json:"attributes,omitempty"`
	MutualAuthentication *MutualAuthentication `json:"mutualAuthentication,omitempty"`
	ListenerArn          string                `json:"listenerArn"`
	LoadBalancerArn      string                `json:"loadBalancerArn"`
	Protocol             string                `json:"protocol"`
	SSLPolicy            string                `json:"sslPolicy,omitempty"`
	// AlpnPolicy is a list on the wire (AlpnPolicy.member.N / <AlpnPolicy><member>…),
	// not a bare string — verified against aws-sdk-go-v2 types.Listener.AlpnPolicy ([]string).
	AlpnPolicy     []string      `json:"alpnPolicy,omitempty"`
	DefaultActions []Action      `json:"defaultActions"`
	Certificates   []Certificate `json:"certificates,omitempty"`
	Port           int32         `json:"port"`
}

Listener represents an ELBv2 listener.

type LoadBalancer

type LoadBalancer struct {
	CreatedTime           time.Time            `json:"createdTime"`
	State                 LoadBalancerState    `json:"state"`
	Tags                  *tags.Tags           `json:"tags,omitempty"`
	Attributes            map[string]string    `json:"attributes,omitempty"`
	CapacityReservation   *CapacityReservation `json:"capacityReservation,omitempty"`
	LoadBalancerArn       string               `json:"loadBalancerArn"`
	LoadBalancerName      string               `json:"loadBalancerName"`
	DNSName               string               `json:"dnsName"`
	CanonicalHostedZoneID string               `json:"canonicalHostedZoneId"`
	VpcID                 string               `json:"vpcId"`
	Scheme                string               `json:"scheme"`
	Type                  string               `json:"type"`
	IPAddressType         string               `json:"ipAddressType"`
	IPv4IPAMPoolID        string               `json:"ipv4IpamPoolId,omitempty"`
	AvailabilityZones     []AvailabilityZone   `json:"availabilityZones"`
	SecurityGroups        []string             `json:"securityGroups"`
}

LoadBalancer represents an ELBv2 load balancer.

type LoadBalancerState

type LoadBalancerState struct {
	Code        string `json:"code"`
	Description string `json:"description"`
}

LoadBalancerState represents the state of a load balancer.

type Matcher

type Matcher struct {
	HTTPCode string `json:"httpCode,omitempty"`
	GrpcCode string `json:"grpcCode,omitempty"`
}

Matcher holds health-check matcher codes for a target group.

type ModifyListenerInput

type ModifyListenerInput struct {
	MutualAuthentication *MutualAuthentication
	ListenerArn          string
	Protocol             string
	SSLPolicy            string
	AlpnPolicy           []string
	DefaultActions       []Action
	Certificates         []Certificate
	Port                 int32
}

ModifyListenerInput holds the parameters for modifying a listener.

type ModifyTargetGroupInput

type ModifyTargetGroupInput struct {
	HealthCheckEnabled         *bool
	Matcher                    Matcher
	TargetGroupArn             string
	HealthCheckProtocol        string
	HealthCheckPort            string
	HealthCheckPath            string
	HealthCheckIntervalSeconds int32
	HealthCheckTimeoutSeconds  int32
	HealthyThresholdCount      int32
	UnhealthyThresholdCount    int32
}

ModifyTargetGroupInput holds the parameters for modifying a target group. HealthCheckEnabled is a pointer so that an absent parameter does not overwrite the stored value.

type MutualAuthentication

type MutualAuthentication struct {
	TrustStoreArn                     string `json:"trustStoreArn,omitempty"`
	Mode                              string `json:"mode"`
	IgnoreClientCertificateExpiration bool   `json:"ignoreClientCertificateExpiration,omitempty"`
}

MutualAuthentication holds mTLS configuration for a listener.

type Provider

type Provider struct{}

Provider implements service.Provider for the ELBv2 service.

func (*Provider) Init

Init initializes the ELBv2 backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the logical name of the provider.

type QueryStringPair

type QueryStringPair struct {
	Key   string `json:"key,omitempty"`
	Value string `json:"value"`
}

QueryStringPair is a key/value pair used in query-string rule conditions.

type RedirectConfig

type RedirectConfig struct {
	Protocol   string `json:"protocol,omitempty"`
	Port       string `json:"port,omitempty"`
	Host       string `json:"host,omitempty"`
	Path       string `json:"path,omitempty"`
	Query      string `json:"query,omitempty"`
	StatusCode string `json:"statusCode"`
}

RedirectConfig holds configuration for redirect actions.

type RevocationContentInput added in v1.2.0

type RevocationContentInput struct {
	S3Bucket        string `json:"s3Bucket,omitempty"`
	S3Key           string `json:"s3Key,omitempty"`
	S3ObjectVersion string `json:"s3ObjectVersion,omitempty"`
	RevocationType  string `json:"revocationType,omitempty"`
}

RevocationContentInput represents a single revocation-file reference submitted to AddTrustStoreRevocations. Mirrors aws-sdk-go-v2 types.RevocationContent exactly -- S3Bucket/S3Key/S3ObjectVersion/RevocationType is the only real wire shape; there is no plain/inline revocation-content field on the real API.

type RewriteConfig added in v1.3.1

type RewriteConfig struct {
	Regex   string `json:"regex"`
	Replace string `json:"replace"`
}

RewriteConfig holds a regex/replace pair applied by a host-header-rewrite or url-rewrite transform. Both Regex and Replace are required on the real wire (types.RewriteConfig).

type Rule

type Rule struct {
	Tags        *tags.Tags      `json:"tags,omitempty"`
	RuleArn     string          `json:"ruleArn"`
	ListenerArn string          `json:"listenerArn"`
	Priority    string          `json:"priority"`
	Actions     []Action        `json:"actions"`
	Conditions  []Condition     `json:"conditions,omitempty"`
	Transforms  []RuleTransform `json:"transforms,omitempty"`
	IsDefault   bool            `json:"isDefault"`
}

Rule represents an ELBv2 listener rule.

type RulePriority

type RulePriority struct {
	RuleArn  string
	Priority string
}

RulePriority holds an ARN-to-priority mapping used by SetRulePriorities.

type RuleTransform added in v1.3.1

type RuleTransform struct {
	HostHeaderRewriteConfig *HostHeaderRewriteConfig `json:"hostHeaderRewriteConfig,omitempty"`
	URLRewriteConfig        *URLRewriteConfig        `json:"urlRewriteConfig,omitempty"`
	Type                    string                   `json:"type"`
}

RuleTransform represents a single request transform applied before forwarding to targets. Type is one of "host-header-rewrite"/"url-rewrite" (types.TransformTypeEnum); exactly one of HostHeaderRewriteConfig/URLRewriteConfig is set, matching Type.

type StorageBackend

type StorageBackend interface {
	CreateLoadBalancer(input CreateLoadBalancerInput) (*LoadBalancer, error)
	DescribeLoadBalancers(arns []string, names []string) ([]LoadBalancer, error)
	DeleteLoadBalancer(lbArn string) error
	ModifyLoadBalancerAttributes(lbArn string, attrs map[string]string) (*LoadBalancer, error)
	SetSecurityGroups(lbArn string, sgs []string) (*LoadBalancer, error)
	SetSubnets(lbArn string, mappings []SubnetMapping) (*LoadBalancer, error)
	SetIPAddressType(lbArn string, ipType string) (*LoadBalancer, error)
	CreateTargetGroup(input CreateTargetGroupInput) (*TargetGroup, error)
	DescribeTargetGroups(arns []string, names []string, lbArn string) ([]TargetGroup, error)
	DeleteTargetGroup(tgArn string) error
	ModifyTargetGroup(input ModifyTargetGroupInput) (*TargetGroup, error)
	ModifyTargetGroupAttributes(tgArn string, attrs map[string]string) (*TargetGroup, error)
	DescribeTargetGroupAttributes(tgArn string) (map[string]string, error)
	RegisterTargets(tgArn string, targets []Target) error
	DeregisterTargets(tgArn string, targets []Target) error
	DescribeTargetHealth(tgArn string) ([]TargetHealthDescription, error)
	CreateListener(input CreateListenerInput) (*Listener, error)
	DescribeListeners(lbArn string, listenerArns []string) ([]Listener, error)
	DeleteListener(listenerArn string) error
	ModifyListener(input ModifyListenerInput) (*Listener, error)
	ModifyListenerAttributes(listenerArn string, attrs map[string]string) (*Listener, error)
	DescribeListenerAttributes(listenerArn string) (map[string]string, error)
	CreateRule(input CreateRuleInput) (*Rule, error)
	DescribeRules(listenerArn string, ruleArns []string) ([]Rule, error)
	DeleteRule(ruleArn string) error
	ModifyRule(
		ruleArn string, actions []Action, conditions []Condition,
		transforms []RuleTransform, resetTransforms bool,
	) (*Rule, error)
	AddTags(resourceArns []string, kvs []tags.KV) error
	RemoveTags(resourceArns []string, keys []string) error
	DescribeTags(resourceArns []string) (map[string][]tags.KV, error)
	// TrustStore operations.
	CreateTrustStore(name string, kvs []tags.KV, s3Bucket, s3Key, s3ObjectVersion string) (*TrustStore, error)
	DescribeTrustStores(arns []string, names []string) ([]TrustStore, error)
	DeleteTrustStore(trustStoreArn string) error
	ModifyTrustStore(trustStoreArn string, s3Bucket, s3Key, s3ObjectVersion string) (*TrustStore, error)
	AddTrustStoreRevocations(
		trustStoreArn string,
		contents []RevocationContentInput,
	) ([]TrustStoreRevocation, error)
	RemoveTrustStoreRevocations(trustStoreArn string, revocationIDs []int64) error
	DescribeTrustStoreRevocations(trustStoreArn string, revocationIDs []int64) ([]TrustStoreRevocation, error)
	DescribeTrustStoreAssociations(trustStoreArn string) ([]string, error)
	DeleteSharedTrustStoreAssociation(trustStoreArn, resourceArn string) error
	// Capacity reservation operations.
	ModifyCapacityReservation(lbArn string, minimumCapacityUnits *int32, reset bool) (*CapacityReservation, error)
	DescribeCapacityReservation(lbArn string) (*CapacityReservation, error)
	// IP pool operations.
	ModifyIPPools(lbArn string, ipv4PoolID *string, removeIPv4 bool) (*LoadBalancer, error)
	// Resource policy operations.
	GetResourcePolicy(resourceArn string) (string, error)
	PutResourcePolicy(resourceArn, policy string) error
	// Rule priority operations.
	SetRulePriorities(priorities []RulePriority) ([]Rule, error)
	// Listener certificate operations.
	AddListenerCertificates(listenerArn string, certs []Certificate) error
	DescribeListenerCertificates(listenerArn string) ([]Certificate, error)
	RemoveListenerCertificates(listenerArn string, certArns []string) error
}

StorageBackend is the interface for ELBv2 storage operations.

type SubnetMapping

type SubnetMapping struct {
	SubnetID            string
	AllocationID        string
	PrivateIPv4Address  string
	IPv6Address         string
	SourceNatIpv6Prefix string
}

SubnetMapping holds subnet configuration for CreateLoadBalancer and SetSubnets.

type Target

type Target struct {
	ID               string `json:"id"`
	HealthState      string `json:"healthState,omitempty"`
	HealthReason     string `json:"healthReason,omitempty"`
	AvailabilityZone string `json:"availabilityZone,omitempty"`
	QuicServerID     string `json:"quicServerId,omitempty"`
	Port             int32  `json:"port"`
}

Target represents a registered target in a target group.

type TargetGroup

type TargetGroup struct {
	Tags                       *tags.Tags        `json:"tags,omitempty"`
	TargetGroupAttributes      map[string]string `json:"targetGroupAttributes,omitempty"`
	TargetGroupArn             string            `json:"targetGroupArn"`
	TargetGroupName            string            `json:"targetGroupName"`
	Protocol                   string            `json:"protocol"`
	ProtocolVersion            string            `json:"protocolVersion,omitempty"`
	VpcID                      string            `json:"vpcId"`
	TargetType                 string            `json:"targetType"`
	HealthCheckProtocol        string            `json:"healthCheckProtocol"`
	HealthCheckPort            string            `json:"healthCheckPort"`
	HealthCheckPath            string            `json:"healthCheckPath"`
	Matcher                    Matcher           `json:"matcher"`
	Targets                    []Target          `json:"targets"`
	LoadBalancerArns           []string          `json:"loadBalancerArns,omitempty"`
	Port                       int32             `json:"port"`
	HealthCheckIntervalSeconds int32             `json:"healthCheckIntervalSeconds"`
	HealthCheckTimeoutSeconds  int32             `json:"healthCheckTimeoutSeconds"`
	HealthyThresholdCount      int32             `json:"healthyThresholdCount"`
	UnhealthyThresholdCount    int32             `json:"unhealthyThresholdCount"`
	HealthCheckEnabled         bool              `json:"healthCheckEnabled"`
	CrossZoneLoadBalancing     bool              `json:"crossZoneLoadBalancing"`
}

TargetGroup represents an ELBv2 target group.

type TargetGroupTuple

type TargetGroupTuple struct {
	TargetGroupArn string `json:"targetGroupArn"`
	Weight         int32  `json:"weight,omitempty"`
}

TargetGroupTuple is a target group reference used in ForwardConfig.

type TargetHealthDescription

type TargetHealthDescription struct {
	HealthState  string `json:"healthState"`
	HealthReason string `json:"healthReason,omitempty"`
	Target       Target `json:"target"`
}

TargetHealthDescription describes the health state of a registered target.

type TrustStore

type TrustStore struct {
	Tags                                *tags.Tags             `json:"tags,omitempty"`
	TrustStoreArn                       string                 `json:"trustStoreArn"`
	Name                                string                 `json:"name"`
	Status                              string                 `json:"status"`
	CaCertificatesBundleS3Bucket        string                 `json:"caCertificatesBundleS3Bucket,omitempty"`
	CaCertificatesBundleS3Key           string                 `json:"caCertificatesBundleS3Key,omitempty"`
	CaCertificatesBundleS3ObjectVersion string                 `json:"caCertificatesBundleS3ObjectVersion,omitempty"`
	Revocations                         []TrustStoreRevocation `json:"revocations,omitempty"`
	TotalRevokedEntries                 int64                  `json:"totalRevokedEntries"`
}

TrustStore represents an ELBv2 trust store. CaCertificatesBundleS3* fields are stored inertly -- this emulator has no real S3 to fetch the bundle from (see GetTrustStoreCaCertificatesBundle's always-empty Location), so they are recorded but never used to compute NumberOfCaCertificates or content.

type TrustStoreRevocation

type TrustStoreRevocation struct {
	RevocationType         string `json:"revocationType"`
	RevocationID           int64  `json:"revocationId"`
	NumberOfRevokedEntries int64  `json:"numberOfRevokedEntries"`
}

TrustStoreRevocation represents a single revocation entry stored in a trust store. RevocationID is int64 -- verified against aws-sdk-go-v2 types.TrustStoreRevocation / types.DescribeTrustStoreRevocation (RevocationId *int64). AWS assigns this ID itself when it parses the uploaded revocation file; it is never client-supplied.

type URLRewriteConfig added in v1.3.1

type URLRewriteConfig struct {
	Rewrites []RewriteConfig `json:"rewrites,omitempty"`
}

URLRewriteConfig holds the rewrite rules for a url-rewrite transform.

Jump to

Keyboard shortcuts

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