vpclattice

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 22 Imported by: 0

README

VPC Lattice

Parity grade: A · SDK aws-sdk-go-v2/service/vpclattice@v1.22.2 · last audited 2026-07-12 (6642a73c)

Coverage

Metric Value
Operations audited 52 (52 ok)
Feature families 2 (2 ok)
Known gaps 5
Deferred items 1
Resource leaks clean
Known gaps
  • Resource Gateway / ResourceConfiguration / ServiceNetworkResourceAssociation / ServiceNetworkVpcEndpointAssociation / DomainVerification op families are entirely unimplemented (newer VPC Lattice feature set). Already explicitly acknowledged in sdk_completeness_test.go's notImplemented list — not a silent gap, but still real missing surface. Out of scope for this pass (would blow the ~2000 LOC budget); flag for a dedicated future audit pass if these become load-bearing.
  • Service/SNSA/SNVA dnsEntry object omits hostedZoneId (real API returns {domainName, hostedZoneId}); only domainName is populated. Low priority since gopherstack has no Route53 hosted-zone concept to source a realistic value from.
  • GetServiceOutput/GetServiceNetworkVpcAssociationOutput failureCode/failureMessage fields (populated when a resource is stuck in a *_FAILED state) are never set because this backend's Create paths are synchronous and never fail after validation — acceptable since there's no in-progress/failed state machine to represent, but worth knowing if async failure simulation is ever added.
  • ServiceNetworkVpcAssociation is missing newer real-API fields dnsOptions, privateDnsEnabled, failureCode, failureMessage (private-DNS support, added after this backend was authored). Deferred — not exercised by common test/client flows.
  • DeleteService/DeleteServiceNetwork/DeleteTargetGroup do not reject deletion when dependent resources exist (e.g. deleting a service with active SNSAs, or a service network with active associations). Real AWS returns a Conflict-style error in some of these cases. Not fixed this pass (behavior-changing, would need new error paths + tests); flag for follow-up bd issue if this proves to matter for negative-path test coverage.
Deferred
  • Resource Gateway / ResourceConfiguration family (see gaps)

More

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a resource does not exist.
	ErrNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound)
	// ErrAlreadyExists is returned when a resource already exists with the same name.
	ErrAlreadyExists = awserr.New("ConflictException", awserr.ErrAlreadyExists)
	// ErrInvalidParameter is returned for invalid input.
	ErrInvalidParameter = awserr.New("ValidationException", awserr.ErrInvalidParameter)
)
View Source
var ErrNilAppContext = errors.New("AppContext is required")

ErrNilAppContext is returned when Provider.Init is called with a nil AppContext.

Functions

This section is empty.

Types

type AccessLogSubscription

type AccessLogSubscription struct {
	CreatedAt             time.Time
	LastUpdatedAt         time.Time
	ARN                   string
	ID                    string
	ResourceARN           string
	ResourceID            string
	DestinationARN        string
	ServiceNetworkLogType string
}

AccessLogSubscription represents a VPC Lattice access log subscription.

type AccessLogSubscriptionSummary

type AccessLogSubscriptionSummary struct {
	CreatedAt      time.Time
	LastUpdatedAt  time.Time
	ARN            string
	ID             string
	ResourceARN    string
	ResourceID     string
	DestinationARN string
}

AccessLogSubscriptionSummary is a summary for list responses.

type AuthPolicy

type AuthPolicy struct {
	Policy string
	State  string
}

AuthPolicy represents an auth policy on a VPC Lattice resource.

type Handler

type Handler struct {
	Backend StorageBackend
}

Handler handles VPC Lattice HTTP requests.

func NewHandler

func NewHandler(b StorageBackend) *Handler

NewHandler constructs a new Handler.

func (*Handler) ExtractOperation

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

ExtractOperation classifies the request into an operation name.

func (*Handler) ExtractResource

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

ExtractResource returns the primary resource identifier.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns all supported operations.

func (*Handler) Handler

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

Handler returns the Echo handler function for VPC Lattice requests.

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

func (h *Handler) Reset()

Reset resets the backend.

func (*Handler) Restore

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

Restore implements persistence.Persistable by delegating to the backend. See the Snapshot doc comment above for why this delegation is new.

func (*Handler) RouteMatcher

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

RouteMatcher returns a function that matches VPC Lattice API requests.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable by delegating to the backend.

Prior to Phase 3.3, Handler had no Snapshot/Restore of its own even though InMemoryBackend implemented both (dead wiring: cli.go's setupPersistence type-asserts each registered service.Registerable -- here, *Handler -- against a persistable{Snapshot,Restore} interface, and only registers it with the persistence.Manager if that assertion succeeds; since Handler never declared these methods, VPC Lattice was silently never registered and never persisted). This delegation is what actually wires VPC Lattice into the persistence Manager.

type HeaderMatch

type HeaderMatch struct {
	Name          string `json:"name"`
	MatchType     string `json:"matchType"`
	MatchValue    string `json:"matchValue"`
	CaseSensitive bool   `json:"caseSensitive"`
}

HeaderMatch is an HTTP header match condition.

type HealthCheckConfig

type HealthCheckConfig struct {
	Protocol                   string `json:"protocol,omitempty"`
	ProtocolVersion            string `json:"protocolVersion,omitempty"`
	Path                       string `json:"path,omitempty"`
	MatcherHTTPCode            string `json:"matcherHttpCode,omitempty"`
	Port                       int32  `json:"port,omitempty"`
	HealthyThresholdCount      int32  `json:"healthyThresholdCount,omitempty"`
	UnhealthyThresholdCount    int32  `json:"unhealthyThresholdCount,omitempty"`
	HealthCheckIntervalSeconds int32  `json:"healthCheckIntervalSeconds,omitempty"`
	HealthCheckTimeoutSeconds  int32  `json:"healthCheckTimeoutSeconds,omitempty"`
	Enabled                    bool   `json:"enabled,omitempty"`
}

HealthCheckConfig is the health check configuration for a target group.

type InMemoryBackend

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

InMemoryBackend is an in-memory implementation of StorageBackend.

func NewInMemoryBackend

func NewInMemoryBackend(accountID, region string) *InMemoryBackend

NewInMemoryBackend creates a new InMemoryBackend.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the configured account ID.

func (*InMemoryBackend) BatchUpdateRule

func (b *InMemoryBackend) BatchUpdateRule(
	serviceID, listenerID string,
	updates []*RuleUpdate,
) ([]*RuleUpdateSuccess, []*RuleUpdateFailure, error)

BatchUpdateRule updates multiple rules atomically.

func (*InMemoryBackend) CreateAccessLogSubscription

func (b *InMemoryBackend) CreateAccessLogSubscription(
	ctx context.Context,
	resourceID, destinationArn, logType string,
	tags map[string]string,
) (*AccessLogSubscription, error)

CreateAccessLogSubscription creates an access log subscription.

func (*InMemoryBackend) CreateListener

func (b *InMemoryBackend) CreateListener(
	serviceID, name, protocol string,
	port int32,
	defaultAction *RuleAction,
	tags map[string]string,
) (*Listener, error)

CreateListener creates a listener on a service.

func (*InMemoryBackend) CreateRule

func (b *InMemoryBackend) CreateRule(
	serviceID, listenerID, name string,
	priority int32,
	action *RuleAction,
	match *RuleMatch,
	tags map[string]string,
) (*Rule, error)

CreateRule creates a listener rule.

func (*InMemoryBackend) CreateService

func (b *InMemoryBackend) CreateService(
	ctx context.Context,
	name, authType, certificateArn, customDomainName string,
	tags map[string]string,
) (*Service, error)

CreateService creates a new service.

func (*InMemoryBackend) CreateServiceNetwork

func (b *InMemoryBackend) CreateServiceNetwork(
	ctx context.Context,
	name, authType string,
	tags map[string]string,
) (*ServiceNetwork, error)

CreateServiceNetwork creates a new service network.

func (*InMemoryBackend) CreateServiceNetworkServiceAssociation

func (b *InMemoryBackend) CreateServiceNetworkServiceAssociation(
	ctx context.Context,
	serviceNetworkID, serviceID string,
	tags map[string]string,
) (*ServiceNetworkServiceAssociation, error)

CreateServiceNetworkServiceAssociation creates a service-to-network association.

func (*InMemoryBackend) CreateServiceNetworkVpcAssociation

func (b *InMemoryBackend) CreateServiceNetworkVpcAssociation(
	ctx context.Context,
	serviceNetworkID, vpcID string,
	securityGroupIDs []string,
	tags map[string]string,
) (*ServiceNetworkVpcAssociation, error)

CreateServiceNetworkVpcAssociation creates a VPC-to-network association.

func (*InMemoryBackend) CreateTargetGroup

func (b *InMemoryBackend) CreateTargetGroup(
	ctx context.Context,
	name, tgType string,
	config *TargetGroupConfig,
	tags map[string]string,
) (*TargetGroup, error)

CreateTargetGroup creates a target group.

func (*InMemoryBackend) DeleteAccessLogSubscription

func (b *InMemoryBackend) DeleteAccessLogSubscription(alsID string) error

DeleteAccessLogSubscription deletes an access log subscription.

func (*InMemoryBackend) DeleteAuthPolicy

func (b *InMemoryBackend) DeleteAuthPolicy(resourceID string) error

DeleteAuthPolicy deletes the auth policy for a resource.

func (*InMemoryBackend) DeleteListener

func (b *InMemoryBackend) DeleteListener(serviceID, listenerID string) error

DeleteListener deletes a listener and its rules.

func (*InMemoryBackend) DeleteResourcePolicy

func (b *InMemoryBackend) DeleteResourcePolicy(resourceArn string) error

DeleteResourcePolicy deletes a resource policy.

func (*InMemoryBackend) DeleteRule

func (b *InMemoryBackend) DeleteRule(serviceID, listenerID, ruleID string) error

DeleteRule deletes a rule.

func (*InMemoryBackend) DeleteService

func (b *InMemoryBackend) DeleteService(serviceID string) (*Service, error)

DeleteService deletes a service.

func (*InMemoryBackend) DeleteServiceNetwork

func (b *InMemoryBackend) DeleteServiceNetwork(snID string) error

DeleteServiceNetwork deletes a service network.

func (*InMemoryBackend) DeleteServiceNetworkServiceAssociation

func (b *InMemoryBackend) DeleteServiceNetworkServiceAssociation(snsaID string) error

DeleteServiceNetworkServiceAssociation deletes a SNSA.

func (*InMemoryBackend) DeleteServiceNetworkVpcAssociation

func (b *InMemoryBackend) DeleteServiceNetworkVpcAssociation(snvaID string) error

DeleteServiceNetworkVpcAssociation deletes a SNVA.

func (*InMemoryBackend) DeleteTargetGroup

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

DeleteTargetGroup deletes a target group.

func (*InMemoryBackend) DeregisterTargets

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

DeregisterTargets deregisters targets from a target group.

func (*InMemoryBackend) GetAccessLogSubscription

func (b *InMemoryBackend) GetAccessLogSubscription(alsID string) (*AccessLogSubscription, error)

GetAccessLogSubscription returns an access log subscription.

func (*InMemoryBackend) GetAuthPolicy

func (b *InMemoryBackend) GetAuthPolicy(resourceID string) (*AuthPolicy, error)

GetAuthPolicy returns the auth policy for a resource.

func (*InMemoryBackend) GetListener

func (b *InMemoryBackend) GetListener(serviceID, listenerID string) (*Listener, error)

GetListener returns a listener.

func (*InMemoryBackend) GetResourcePolicy

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

GetResourcePolicy returns a resource policy.

func (*InMemoryBackend) GetRule

func (b *InMemoryBackend) GetRule(serviceID, listenerID, ruleID string) (*Rule, error)

GetRule returns a rule.

func (*InMemoryBackend) GetService

func (b *InMemoryBackend) GetService(serviceID string) (*Service, error)

GetService returns a service by ID or ARN.

func (*InMemoryBackend) GetServiceNetwork

func (b *InMemoryBackend) GetServiceNetwork(snID string) (*ServiceNetwork, error)

GetServiceNetwork returns a service network.

func (*InMemoryBackend) GetServiceNetworkServiceAssociation

func (b *InMemoryBackend) GetServiceNetworkServiceAssociation(
	snsaID string,
) (*ServiceNetworkServiceAssociation, error)

GetServiceNetworkServiceAssociation returns a SNSA by ID or ARN.

func (*InMemoryBackend) GetServiceNetworkVpcAssociation

func (b *InMemoryBackend) GetServiceNetworkVpcAssociation(
	snvaID string,
) (*ServiceNetworkVpcAssociation, error)

GetServiceNetworkVpcAssociation returns a SNVA.

func (*InMemoryBackend) GetTargetGroup

func (b *InMemoryBackend) GetTargetGroup(tgID string) (*TargetGroup, error)

GetTargetGroup returns a target group.

func (*InMemoryBackend) ListAccessLogSubscriptions

func (b *InMemoryBackend) ListAccessLogSubscriptions(
	_ context.Context,
	resourceID string,
	maxResults int32,
	nextToken string,
) ([]*AccessLogSubscriptionSummary, string, error)

ListAccessLogSubscriptions lists access log subscriptions for a resource.

func (*InMemoryBackend) ListListeners

func (b *InMemoryBackend) ListListeners(
	serviceID string,
	maxResults int32,
	nextToken string,
) ([]*ListenerSummary, string, error)

ListListeners lists listeners for a service.

func (*InMemoryBackend) ListRules

func (b *InMemoryBackend) ListRules(
	serviceID, listenerID string,
	maxResults int32,
	nextToken string,
) ([]*RuleSummary, string, error)

ListRules lists rules for a listener.

func (*InMemoryBackend) ListServiceNetworkServiceAssociations

func (b *InMemoryBackend) ListServiceNetworkServiceAssociations(
	ctx context.Context,
	serviceNetworkID, serviceID string,
	maxResults int32,
	nextToken string,
) ([]*ServiceNetworkServiceAssociationSummary, string, error)

ListServiceNetworkServiceAssociations lists SNSAs with optional filters.

func (*InMemoryBackend) ListServiceNetworkVpcAssociations

func (b *InMemoryBackend) ListServiceNetworkVpcAssociations(
	ctx context.Context,
	serviceNetworkID, vpcID string,
	maxResults int32,
	nextToken string,
) ([]*ServiceNetworkVpcAssociationSummary, string, error)

ListServiceNetworkVpcAssociations lists SNVAs with optional filters.

func (*InMemoryBackend) ListServiceNetworks

func (b *InMemoryBackend) ListServiceNetworks(
	ctx context.Context,
	maxResults int32,
	nextToken string,
) ([]*ServiceNetworkSummary, string, error)

ListServiceNetworks returns a paginated list of service networks.

func (*InMemoryBackend) ListServices

func (b *InMemoryBackend) ListServices(
	ctx context.Context,
	maxResults int32,
	nextToken string,
) ([]*ServiceSummary, string, error)

ListServices returns a paginated list of services.

func (*InMemoryBackend) ListTagsForResource

func (b *InMemoryBackend) ListTagsForResource(resourceArn string) (map[string]string, error)

ListTagsForResource returns tags for a resource.

func (*InMemoryBackend) ListTargetGroups

func (b *InMemoryBackend) ListTargetGroups(
	ctx context.Context,
	tgType, serviceArn string,
	maxResults int32,
	nextToken string,
) ([]*TargetGroupSummary, string, error)

ListTargetGroups lists target groups with optional filters.

func (*InMemoryBackend) ListTargets

func (b *InMemoryBackend) ListTargets(
	_ context.Context,
	tgID string,
	filters []Target,
	maxResults int32,
	nextToken string,
) ([]*TargetSummary, string, error)

ListTargets lists registered targets for a target group.

func (*InMemoryBackend) PutAuthPolicy

func (b *InMemoryBackend) PutAuthPolicy(resourceID, policy string) (*AuthPolicy, error)

PutAuthPolicy sets an auth policy on a resource.

func (*InMemoryBackend) PutResourcePolicy

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

PutResourcePolicy sets a resource policy.

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the configured region.

func (*InMemoryBackend) RegisterTargets

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

RegisterTargets registers targets to a target group.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all stored data.

func (*InMemoryBackend) Restore

func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error

Restore deserializes state from JSON.

func (*InMemoryBackend) Snapshot

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

Snapshot serializes current state to JSON.

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(resourceArn string, tags map[string]string) error

TagResource adds tags to a resource.

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(resourceArn string, keys []string) error

UntagResource removes tags from a resource.

func (*InMemoryBackend) UpdateAccessLogSubscription

func (b *InMemoryBackend) UpdateAccessLogSubscription(
	alsID, destinationArn string,
) (*AccessLogSubscription, error)

UpdateAccessLogSubscription updates the destination ARN.

func (*InMemoryBackend) UpdateListener

func (b *InMemoryBackend) UpdateListener(
	serviceID, listenerID string,
	defaultAction *RuleAction,
) (*Listener, error)

UpdateListener updates the default action of a listener.

func (*InMemoryBackend) UpdateRule

func (b *InMemoryBackend) UpdateRule(
	serviceID, listenerID, ruleID string,
	priority int32,
	action *RuleAction,
	match *RuleMatch,
) (*Rule, error)

UpdateRule updates a rule.

func (*InMemoryBackend) UpdateService

func (b *InMemoryBackend) UpdateService(
	serviceID, authType, certificateArn string,
) (*Service, error)

UpdateService updates a service.

func (*InMemoryBackend) UpdateServiceNetwork

func (b *InMemoryBackend) UpdateServiceNetwork(snID, authType string) (*ServiceNetwork, error)

UpdateServiceNetwork updates a service network.

func (*InMemoryBackend) UpdateServiceNetworkVpcAssociation

func (b *InMemoryBackend) UpdateServiceNetworkVpcAssociation(
	snvaID string,
	securityGroupIDs []string,
) (*ServiceNetworkVpcAssociation, error)

UpdateServiceNetworkVpcAssociation updates security groups on a SNVA.

func (*InMemoryBackend) UpdateTargetGroup

func (b *InMemoryBackend) UpdateTargetGroup(
	tgID string,
	healthCheck *HealthCheckConfig,
) (*TargetGroup, error)

UpdateTargetGroup updates a target group's health check config.

type Listener

type Listener struct {
	DefaultAction *RuleAction
	CreatedAt     time.Time
	LastUpdatedAt time.Time
	ARN           string
	ID            string
	ServiceARN    string
	ServiceID     string
	Name          string
	Protocol      string
	Port          int32
}

Listener represents a VPC Lattice listener.

type ListenerSummary

type ListenerSummary struct {
	CreatedAt     time.Time
	LastUpdatedAt time.Time
	ARN           string
	ID            string
	Name          string
	Protocol      string
	Port          int32
}

ListenerSummary is a listener entry for list responses.

type Provider

type Provider struct{}

Provider implements service.Provider for the VPC Lattice service.

func (*Provider) Init

Init initializes the VPC Lattice backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the logical name of the provider.

type Rule

type Rule struct {
	Action        *RuleAction
	Match         *RuleMatch
	CreatedAt     time.Time
	LastUpdatedAt time.Time
	ARN           string
	ID            string
	Name          string
	Priority      int32
	IsDefault     bool
}

Rule represents a VPC Lattice listener rule.

type RuleAction

type RuleAction struct {
	ForwardTargetGroups     []*WeightedTargetGroup `json:"forwardTargetGroups,omitempty"`
	FixedResponseStatusCode int32                  `json:"fixedResponseStatusCode,omitempty"`
	IsFixedResponse         bool                   `json:"isFixedResponse,omitempty"`
}

RuleAction is the action for a listener rule.

type RuleMatch

type RuleMatch struct {
	HTTPMethod     string         `json:"httpMethod,omitempty"`
	PathMatchType  string         `json:"pathMatchType,omitempty"`
	PathMatchValue string         `json:"pathMatchValue,omitempty"`
	HeaderMatches  []*HeaderMatch `json:"headerMatches,omitempty"`
}

RuleMatch is the match conditions for a listener rule.

type RuleSummary

type RuleSummary struct {
	CreatedAt     time.Time
	LastUpdatedAt time.Time
	ARN           string
	ID            string
	Name          string
	Priority      int32
	IsDefault     bool
}

RuleSummary is a rule entry for list responses.

type RuleUpdate

type RuleUpdate struct {
	Action         *RuleAction
	Match          *RuleMatch
	RuleIdentifier string
	Priority       int32
}

RuleUpdate is an update spec for BatchUpdateRule.

type RuleUpdateFailure

type RuleUpdateFailure struct {
	RuleIdentifier string
	Message        string
	Code           string
}

RuleUpdateFailure is a failed rule update result.

type RuleUpdateSuccess

type RuleUpdateSuccess struct {
	Action    *RuleAction
	Match     *RuleMatch
	ARN       string
	ID        string
	Name      string
	Priority  int32
	IsDefault bool
}

RuleUpdateSuccess is a successful rule update result.

type Service

type Service struct {
	CreatedAt        time.Time
	LastUpdatedAt    time.Time
	ARN              string
	ID               string
	Name             string
	AuthType         string
	CertificateArn   string
	CustomDomainName string
	DNSName          string
	Status           string
}

Service represents a VPC Lattice service.

type ServiceNetwork

type ServiceNetwork struct {
	CreatedAt                  time.Time
	LastUpdatedAt              time.Time
	ARN                        string
	ID                         string
	Name                       string
	AuthType                   string
	NumberOfAssociatedServices int64
	NumberOfAssociatedVPCs     int64
}

ServiceNetwork represents a VPC Lattice service network.

type ServiceNetworkServiceAssociation

type ServiceNetworkServiceAssociation struct {
	CreatedAt          time.Time
	ARN                string
	ID                 string
	ServiceARN         string
	ServiceID          string
	ServiceName        string
	ServiceNetworkARN  string
	ServiceNetworkID   string
	ServiceNetworkName string
	Status             string
	CreatedBy          string
	CustomDomainName   string
	DNSName            string
}

ServiceNetworkServiceAssociation is a service-to-service-network association.

type ServiceNetworkServiceAssociationSummary

type ServiceNetworkServiceAssociationSummary struct {
	CreatedAt          time.Time
	ARN                string
	ID                 string
	ServiceARN         string
	ServiceID          string
	ServiceName        string
	ServiceNetworkARN  string
	ServiceNetworkID   string
	ServiceNetworkName string
	Status             string
	CustomDomainName   string
	DNSName            string
}

ServiceNetworkServiceAssociationSummary is a summary for list responses.

type ServiceNetworkSummary

type ServiceNetworkSummary struct {
	CreatedAt                  time.Time
	ARN                        string
	ID                         string
	Name                       string
	NumberOfAssociatedServices int64
	NumberOfAssociatedVPCs     int64
}

ServiceNetworkSummary is a service network entry for list responses.

type ServiceNetworkVpcAssociation

type ServiceNetworkVpcAssociation struct {
	CreatedAt          time.Time
	LastUpdatedAt      time.Time
	ARN                string
	ID                 string
	VpcID              string
	ServiceNetworkARN  string
	ServiceNetworkID   string
	ServiceNetworkName string
	Status             string
	CreatedBy          string
	SecurityGroupIDs   []string
}

ServiceNetworkVpcAssociation is a VPC-to-service-network association.

type ServiceNetworkVpcAssociationSummary

type ServiceNetworkVpcAssociationSummary struct {
	CreatedAt          time.Time
	ARN                string
	ID                 string
	VpcID              string
	ServiceNetworkARN  string
	ServiceNetworkID   string
	ServiceNetworkName string
	Status             string
}

ServiceNetworkVpcAssociationSummary is a summary for list responses.

type ServiceSummary

type ServiceSummary struct {
	CreatedAt        time.Time
	LastUpdatedAt    time.Time
	ARN              string
	ID               string
	Name             string
	CustomDomainName string
	DNSName          string
	Status           string
}

ServiceSummary is a service entry for list responses.

type StorageBackend

type StorageBackend interface {
	CreateService(
		ctx context.Context,
		name, authType, certificateArn, customDomainName string,
		tags map[string]string,
	) (*Service, error)
	GetService(serviceID string) (*Service, error)
	UpdateService(serviceID, authType, certificateArn string) (*Service, error)
	DeleteService(serviceID string) (*Service, error)
	ListServices(ctx context.Context, maxResults int32, nextToken string) ([]*ServiceSummary, string, error)

	CreateServiceNetwork(ctx context.Context, name, authType string, tags map[string]string) (*ServiceNetwork, error)
	GetServiceNetwork(snID string) (*ServiceNetwork, error)
	UpdateServiceNetwork(snID, authType string) (*ServiceNetwork, error)
	DeleteServiceNetwork(snID string) error
	ListServiceNetworks(
		ctx context.Context,
		maxResults int32,
		nextToken string,
	) ([]*ServiceNetworkSummary, string, error)

	CreateServiceNetworkServiceAssociation(
		ctx context.Context,
		serviceNetworkID, serviceID string,
		tags map[string]string,
	) (*ServiceNetworkServiceAssociation, error)
	GetServiceNetworkServiceAssociation(snsaID string) (*ServiceNetworkServiceAssociation, error)
	DeleteServiceNetworkServiceAssociation(snsaID string) error
	ListServiceNetworkServiceAssociations(
		ctx context.Context,
		serviceNetworkID, serviceID string,
		maxResults int32,
		nextToken string,
	) ([]*ServiceNetworkServiceAssociationSummary, string, error)

	CreateServiceNetworkVpcAssociation(
		ctx context.Context,
		serviceNetworkID, vpcID string,
		securityGroupIDs []string,
		tags map[string]string,
	) (*ServiceNetworkVpcAssociation, error)
	GetServiceNetworkVpcAssociation(snvaID string) (*ServiceNetworkVpcAssociation, error)
	UpdateServiceNetworkVpcAssociation(
		snvaID string,
		securityGroupIDs []string,
	) (*ServiceNetworkVpcAssociation, error)
	DeleteServiceNetworkVpcAssociation(snvaID string) error
	ListServiceNetworkVpcAssociations(
		ctx context.Context,
		serviceNetworkID, vpcID string,
		maxResults int32,
		nextToken string,
	) ([]*ServiceNetworkVpcAssociationSummary, string, error)

	CreateListener(
		serviceID, name, protocol string,
		port int32,
		defaultAction *RuleAction,
		tags map[string]string,
	) (*Listener, error)
	GetListener(serviceID, listenerID string) (*Listener, error)
	UpdateListener(serviceID, listenerID string, defaultAction *RuleAction) (*Listener, error)
	DeleteListener(serviceID, listenerID string) error
	ListListeners(
		serviceID string,
		maxResults int32,
		nextToken string,
	) ([]*ListenerSummary, string, error)

	CreateRule(
		serviceID, listenerID, name string,
		priority int32,
		action *RuleAction,
		match *RuleMatch,
		tags map[string]string,
	) (*Rule, error)
	GetRule(serviceID, listenerID, ruleID string) (*Rule, error)
	UpdateRule(
		serviceID, listenerID, ruleID string,
		priority int32,
		action *RuleAction,
		match *RuleMatch,
	) (*Rule, error)
	DeleteRule(serviceID, listenerID, ruleID string) error
	ListRules(
		serviceID, listenerID string,
		maxResults int32,
		nextToken string,
	) ([]*RuleSummary, string, error)
	BatchUpdateRule(
		serviceID, listenerID string,
		updates []*RuleUpdate,
	) ([]*RuleUpdateSuccess, []*RuleUpdateFailure, error)

	CreateTargetGroup(
		ctx context.Context,
		name, tgType string,
		config *TargetGroupConfig,
		tags map[string]string,
	) (*TargetGroup, error)
	GetTargetGroup(tgID string) (*TargetGroup, error)
	UpdateTargetGroup(tgID string, healthCheck *HealthCheckConfig) (*TargetGroup, error)
	DeleteTargetGroup(tgID string) error
	ListTargetGroups(
		ctx context.Context,
		tgType, serviceArn string,
		maxResults int32,
		nextToken string,
	) ([]*TargetGroupSummary, string, error)
	RegisterTargets(tgID string, targets []*Target) ([]*TargetFailure, error)
	DeregisterTargets(tgID string, targets []*Target) ([]*TargetFailure, error)
	ListTargets(
		ctx context.Context,
		tgID string,
		filters []Target,
		maxResults int32,
		nextToken string,
	) ([]*TargetSummary, string, error)

	CreateAccessLogSubscription(
		ctx context.Context,
		resourceID, destinationArn, logType string,
		tags map[string]string,
	) (*AccessLogSubscription, error)
	GetAccessLogSubscription(alsID string) (*AccessLogSubscription, error)
	UpdateAccessLogSubscription(alsID, destinationArn string) (*AccessLogSubscription, error)
	DeleteAccessLogSubscription(alsID string) error
	ListAccessLogSubscriptions(
		ctx context.Context,
		resourceID string,
		maxResults int32,
		nextToken string,
	) ([]*AccessLogSubscriptionSummary, string, error)

	PutAuthPolicy(resourceID, policy string) (*AuthPolicy, error)
	GetAuthPolicy(resourceID string) (*AuthPolicy, error)
	DeleteAuthPolicy(resourceID string) error

	PutResourcePolicy(resourceArn, policy string) error
	GetResourcePolicy(resourceArn string) (string, error)
	DeleteResourcePolicy(resourceArn string) error

	TagResource(resourceArn string, tags map[string]string) error
	UntagResource(resourceArn string, keys []string) error
	ListTagsForResource(resourceArn string) (map[string]string, error)

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

StorageBackend is the interface for VPC Lattice storage operations.

type Target

type Target struct {
	ID   string
	Port int32
}

Target is a target registered to a target group.

type TargetFailure

type TargetFailure struct {
	ID      string
	Code    string
	Message string
	Port    int32
}

TargetFailure is a target registration/deregistration failure.

type TargetGroup

type TargetGroup struct {
	CreatedAt     time.Time
	LastUpdatedAt time.Time
	ARN           string
	ID            string
	Name          string
	Type          string
	Status        string
	Config        *TargetGroupConfig
	ServiceARNs   []string
}

TargetGroup represents a VPC Lattice target group.

type TargetGroupConfig

type TargetGroupConfig struct {
	HealthCheck                 *HealthCheckConfig `json:"healthCheck,omitempty"`
	Protocol                    string             `json:"protocol,omitempty"`
	ProtocolVersion             string             `json:"protocolVersion,omitempty"`
	VpcID                       string             `json:"vpcId,omitempty"`
	IPAddressType               string             `json:"ipAddressType,omitempty"`
	LambdaEventStructureVersion string             `json:"lambdaEventStructureVersion,omitempty"`
	Port                        int32              `json:"port,omitempty"`
}

TargetGroupConfig is the configuration for a target group.

type TargetGroupSummary

type TargetGroupSummary struct {
	CreatedAt                   time.Time
	LastUpdatedAt               time.Time
	ARN                         string
	ID                          string
	Name                        string
	Type                        string
	Status                      string
	Protocol                    string
	VpcID                       string
	IPAddressType               string
	LambdaEventStructureVersion string
	ServiceARNs                 []string
	Port                        int32
}

TargetGroupSummary is a target group entry for list responses.

type TargetSummary

type TargetSummary struct {
	ID         string
	Status     string
	ReasonCode string
	Port       int32
}

TargetSummary is a target entry for list responses.

type WeightedTargetGroup

type WeightedTargetGroup struct {
	TargetGroupID string `json:"targetGroupId"`
	Weight        int32  `json:"weight"`
}

WeightedTargetGroup is a weighted target group for forward actions.

Jump to

Keyboard shortcuts

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