Help us shape the future of Go! Take the 2026 Go Developer Survey

elbv2

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 44 Imported by: 0

README

ELBv2

Parity grade: A · SDK aws-sdk-go-v2/service/elasticloadbalancingv2@v1.58.5 · last audited 2026-10-11 (d522d763f)

Coverage

Metric Value
PARITY entries audited 51 (50 ok, 1 partial)
Feature families 9 (8 ok, 1 partial)
Known gaps 2
Structural gaps (can't be emulated) 2
Deferred items 2
Resource leaks clean
Known gaps
  • Kept lenient for in-repo fixtures: a target group attached to no listener reports healthy (real AWS: unused/Target.NotInUse), an ALB with subnets in one AZ is accepted, and health-check defaults stay 3/3/5 because the SDK docs and observed AWS values disagree.
  • LB VpcId/ZoneName from the real subnet needs internal/app/cli.go to give elbEC2ResolverAdapter SubnetVPC(id) and SubnetAZ(id) (same bodies as efsEC2ResolverAdapter); until then they stay vpc-00000000 and index-derived zones.
Structural gaps

These do not block an A grade — no implementation could produce real data here because the underlying data source cannot exist in an emulator.

  • Data plane has no real listener sockets or TLS: HTTPS listeners are served as plain HTTP on the emulator port (X-Forwarded-Proto reports the listener protocol), the client address is the TCP peer of the emulator, and HTTP/2, gRPC and WebSocket upgrades are not proxied.
  • GetTrustStoreCaCertificatesBundle/GetTrustStoreRevocationContent return an empty Location: the real value is a presigned URL to an AWS-owned copy of the bundle, which the emulator does not store. The ops still validate TrustStoreNotFound/RevocationIdNotFound.
Deferred
  • TargetHealth.AnomalyDetection and AdministrativeOverride are never returned: no anomaly-mitigation or zonal-shift subsystem exists to source them, and the default values AWS reports when idle are unverified.
  • authenticate-cognito, authenticate-oidc and jwt-validation actions are stored and echoed (including AuthenticationRequestExtraParams and JwtValidationConfig); the data plane answers 501 for them rather than executing them: no Cognito/OIDC redirect flow and no JWKS fetch or token validation exists.

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"`
	JwtValidationConfig       *JwtValidationConfig       `json:"jwtValidationConfig,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
	PinnedID                     string
	Scheme                       string
	Type                         string
	IPAddressType                string
	EnablePrefixForIpv6SourceNat string
	IPv4IPAMPoolID               string
	CustomerOwnedIPv4Pool        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
	IPAddressType              string
	HealthCheckProtocol        string
	HealthCheckPort            string
	HealthCheckPath            string
	Matcher                    Matcher
	Tags                       []tags.KV
	Port                       int32
	HealthCheckIntervalSeconds int32
	HealthCheckTimeoutSeconds  int32
	HealthyThresholdCount      int32
	UnhealthyThresholdCount    int32
	TargetControlPort          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) BackendFor

func (h *Handler) BackendFor(region string) StorageBackend

BackendFor returns the backend serving region: the home backend, or the sibling built on first use.

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

func (h *Handler) EnableRegions()

EnableRegions makes h serve every other region through lazily built per-region siblings.

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

func (h *Handler) RegionBackends() []StorageBackend

RegionBackends returns the home backend followed by every sibling built so far.

func (*Handler) RegionHandler

func (h *Handler) RegionHandler(region string) *Handler

RegionHandler returns the handler serving region: h itself for the home region, else its sibling.

func (*Handler) Restore

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

Restore implements persistence.Persistable.

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

func (h *Handler) SetInstanceAddressResolver(r InstanceAddressResolver)

SetInstanceAddressResolver wires instance-target address resolution.

func (*Handler) SetLambdaInvoker

func (h *Handler) SetLambdaInvoker(inv LambdaInvoker)

SetLambdaInvoker wires the invoker used for lambda target groups.

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; other regions ride in an additive "regions" key.

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,
	enforceInboundRulesOnPrivateLink string,
) (*LoadBalancer, error)

SetSecurityGroups updates the security groups associated with a load balancer.

func (*InMemoryBackend) SetSubnets

func (b *InMemoryBackend) SetSubnets(
	lbArn string,
	mappings []SubnetMapping,
	enablePrefixForIpv6SourceNat, ipAddressType string,
) (*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 InstanceAddressResolver

type InstanceAddressResolver interface {
	InstanceAddress(instanceID string) (string, bool)
}

InstanceAddressResolver reports the reachable private IP of a docker-launched EC2 instance.

type InstanceStateResolver

type InstanceStateResolver interface {
	InstanceStateName(id string) (string, bool)
}

InstanceStateResolver is the optional EC2Resolver extension DescribeTargetHealth uses to report targets on stopped or terminated instances as unused (Target.InvalidState).

type JwtAdditionalClaim

type JwtAdditionalClaim struct {
	Format string   `json:"format"`
	Name   string   `json:"name"`
	Values []string `json:"values"`
}

JwtAdditionalClaim is a claim a jwt-validation action must find in the token.

type JwtValidationConfig

type JwtValidationConfig struct {
	Issuer           string               `json:"issuer"`
	JwksEndpoint     string               `json:"jwksEndpoint"`
	AdditionalClaims []JwtAdditionalClaim `json:"additionalClaims,omitempty"`
}

JwtValidationConfig holds configuration for jwt-validation actions.

type LambdaInvoker

type LambdaInvoker interface {
	// InvokeFunction returns the response payload and the function error type (empty on success).
	InvokeFunction(ctx context.Context, functionARN string, payload []byte) ([]byte, string, error)
}

LambdaInvoker invokes a Lambda function synchronously for lambda target groups.

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"`
	Tags                               *tags.Tags           `json:"tags,omitempty"`
	Attributes                         map[string]string    `json:"attributes,omitempty"`
	CapacityReservation                *CapacityReservation `json:"capacityReservation,omitempty"`
	State                              LoadBalancerState    `json:"state"`
	CanonicalHostedZoneID              string               `json:"canonicalHostedZoneId"`
	LoadBalancerName                   string               `json:"loadBalancerName"`
	DNSName                            string               `json:"dnsName"`
	LoadBalancerArn                    string               `json:"loadBalancerArn"`
	VpcID                              string               `json:"vpcId"`
	Scheme                             string               `json:"scheme"`
	Type                               string               `json:"type"`
	IPAddressType                      string               `json:"ipAddressType"`
	IPv4IPAMPoolID                     string               `json:"ipv4IpamPoolId,omitempty"`
	CustomerOwnedIPv4Pool              string               `json:"customerOwnedIpv4Pool,omitempty"`
	EnablePrefixForIpv6SourceNat       string               `json:"enablePrefixForIpv6SourceNat,omitempty"`
	EnforceSGInboundRulesOnPrivateLink string               `json:"enforceSgInboundRulesOnPrivateLink,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
	SSLPolicy            *string
	Port                 *int32
	ListenerArn          string
	Protocol             string
	AlpnPolicy           []string
	DefaultActions       []Action
	Certificates         []Certificate
}

ModifyListenerInput holds the parameters for modifying a listener.

type ModifyTargetGroupInput

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

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"`
	AdvertiseTrustStoreCaNames        string `json:"advertiseTrustStoreCaNames,omitempty"`
	TrustStoreAssociationStatus       string `json:"trustStoreAssociationStatus,omitempty"`
	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 RegionalSubnetPlacementResolver

type RegionalSubnetPlacementResolver interface {
	SubnetVPCIn(region, id string) string
	SubnetAZIn(region, id string) string
}

RegionalSubnetPlacementResolver resolves a subnet within the load balancer's own region; subnet IDs such as subnet-default exist in every region, so a region-blind lookup can answer for the wrong one.

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, enforceInboundRulesOnPrivateLink string,
	) (*LoadBalancer, error)
	SetSubnets(
		lbArn string, mappings []SubnetMapping, enablePrefixForIpv6SourceNat, ipAddressType string,
	) (*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 SubnetPlacementResolver

type SubnetPlacementResolver interface {
	SubnetVPC(id string) string
	SubnetAZ(id string) string
}

SubnetPlacementResolver is the optional EC2Resolver extension CreateLoadBalancer uses to report a subnet's real VPC and Availability Zone instead of placeholders.

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"`
	IPAddressType              string            `json:"ipAddressType,omitempty"`
	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"`
	TargetControlPort          int32             `json:"targetControlPort,omitempty"`
	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"`
	HealthDescription string `json:"healthDescription,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