Documentation
¶
Index ¶
- Variables
- type AWSLocation
- type Attachment
- type AttachmentError
- type AttachmentKind
- type AttachmentRoutingPolicyLabel
- type Bandwidth
- type BgpOptions
- type ConnectAttachmentOptions
- type ConnectPeer
- type ConnectPeerAssociation
- type ConnectPeerBgpConfiguration
- type ConnectPeerConfiguration
- type ConnectPeerError
- type Connection
- type CoreNetwork
- type CoreNetworkChange
- type CoreNetworkChangeEvent
- type CoreNetworkChangeValues
- type CoreNetworkPolicyError
- type CoreNetworkPolicyHistory
- type CoreNetworkPolicyVersion
- type CoreNetworkPrefixListAssociation
- type CustomerGatewayAssociation
- type Device
- type DirectConnectResolver
- type EC2Resolver
- type EC2TransitGatewayRoute
- type GlobalNetwork
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Shutdown(_ context.Context)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- type InMemoryBackend
- func (b *InMemoryBackend) AcceptAttachment(id string) (*Attachment, error)
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) AssociateConnectPeer(globalNetworkID, connectPeerID, deviceID, linkID string) (*ConnectPeerAssociation, error)
- func (b *InMemoryBackend) AssociateCustomerGateway(globalNetworkID, customerGatewayArn, deviceID, linkID string) (*CustomerGatewayAssociation, error)
- func (b *InMemoryBackend) AssociateLink(globalNetworkID, deviceID, linkID string) (*LinkAssociation, error)
- func (b *InMemoryBackend) AssociateTransitGatewayConnectPeer(globalNetworkID, deviceID, transitGatewayConnectPeerArn, linkID string) (*TransitGatewayConnectPeerAssociation, error)
- func (b *InMemoryBackend) Close()
- func (b *InMemoryBackend) CreateConnectAttachment(coreNetworkID, edgeLocation, transportAttachmentID, protocol, ... string, ...) (*Attachment, error)
- func (b *InMemoryBackend) CreateConnectPeer(connectAttachmentID, peerAddress string, bgp *BgpOptions, ...) (*ConnectPeer, error)
- func (b *InMemoryBackend) CreateConnection(...) (*Connection, error)
- func (b *InMemoryBackend) CreateCoreNetwork(globalNetworkID, description, policyDocument string, tagMap map[string]string) (*CoreNetwork, error)
- func (b *InMemoryBackend) CreateCoreNetworkPrefixListAssociation(coreNetworkID, prefixListAlias, prefixListArn string) (*CoreNetworkPrefixListAssociation, error)
- func (b *InMemoryBackend) CreateDevice(globalNetworkID string, awsLoc *AWSLocation, loc *Location, ...) (*Device, error)
- func (b *InMemoryBackend) CreateDirectConnectGatewayAttachment(coreNetworkID, directConnectGatewayArn string, edgeLocations []string, ...) (*Attachment, error)
- func (b *InMemoryBackend) CreateGlobalNetwork(description string, tagMap map[string]string) *GlobalNetwork
- func (b *InMemoryBackend) CreateLink(globalNetworkID, siteID string, bw *Bandwidth, ...) (*Link, error)
- func (b *InMemoryBackend) CreateSite(globalNetworkID, description string, loc *Location, tagMap map[string]string) (*Site, error)
- func (b *InMemoryBackend) CreateSiteToSiteVpnAttachment(coreNetworkID, vpnConnectionArn, routingPolicyLabel string, ...) (*Attachment, error)
- func (b *InMemoryBackend) CreateTransitGatewayPeering(coreNetworkID, transitGatewayArn string, tagMap map[string]string) (*Peering, error)
- func (b *InMemoryBackend) CreateTransitGatewayRouteTableAttachment(peeringID, transitGatewayRouteTableArn, routingPolicyLabel string, ...) (*Attachment, error)
- func (b *InMemoryBackend) CreateVpcAttachment(coreNetworkID, vpcArn string, subnetArns []string, opts *VpcOptions, ...) (*Attachment, error)
- func (b *InMemoryBackend) DeleteAttachment(id string) (*Attachment, error)
- func (b *InMemoryBackend) DeleteConnectPeer(id string) (*ConnectPeer, error)
- func (b *InMemoryBackend) DeleteConnection(globalNetworkID, id string) (*Connection, error)
- func (b *InMemoryBackend) DeleteCoreNetwork(id string) (*CoreNetwork, error)
- func (b *InMemoryBackend) DeleteCoreNetworkPolicyVersion(coreNetworkID string, policyVersionID int32) (*CoreNetworkPolicyVersion, string, error)
- func (b *InMemoryBackend) DeleteCoreNetworkPrefixListAssociation(coreNetworkID, prefixListArn string) (*CoreNetworkPrefixListAssociation, error)
- func (b *InMemoryBackend) DeleteDevice(globalNetworkID, id string) (*Device, error)
- func (b *InMemoryBackend) DeleteGlobalNetwork(id string) (*GlobalNetwork, error)
- func (b *InMemoryBackend) DeleteLink(globalNetworkID, id string) (*Link, error)
- func (b *InMemoryBackend) DeletePeering(id string) (*Peering, error)
- func (b *InMemoryBackend) DeleteResourcePolicy(resourceArn string) error
- func (b *InMemoryBackend) DeleteSite(globalNetworkID, id string) (*Site, error)
- func (b *InMemoryBackend) DeregisterTransitGateway(globalNetworkID, transitGatewayArn string) (*TransitGatewayRegistration, error)
- func (b *InMemoryBackend) DescribeGlobalNetworks(ids []string, token string, limit int) (page.Page[*GlobalNetwork], error)
- func (b *InMemoryBackend) DisassociateConnectPeer(globalNetworkID, connectPeerID string) (*ConnectPeerAssociation, error)
- func (b *InMemoryBackend) DisassociateCustomerGateway(globalNetworkID, customerGatewayArn string) (*CustomerGatewayAssociation, error)
- func (b *InMemoryBackend) DisassociateLink(globalNetworkID, deviceID, linkID string) (*LinkAssociation, error)
- func (b *InMemoryBackend) DisassociateTransitGatewayConnectPeer(globalNetworkID, transitGatewayConnectPeerArn string) (*TransitGatewayConnectPeerAssociation, error)
- func (b *InMemoryBackend) ExecuteCoreNetworkChangeSet(coreNetworkID string, policyVersionID int32) error
- func (b *InMemoryBackend) GetConnectAttachment(id string) (*Attachment, error)
- func (b *InMemoryBackend) GetConnectPeer(id string) (*ConnectPeer, error)
- func (b *InMemoryBackend) GetConnectPeerAssociations(globalNetworkID string, ids []string, token string, limit int) (page.Page[*ConnectPeerAssociation], error)
- func (b *InMemoryBackend) GetConnections(globalNetworkID string, ids []string, deviceID, token string, limit int) (page.Page[*Connection], error)
- func (b *InMemoryBackend) GetCoreNetwork(id string) (*CoreNetwork, error)
- func (b *InMemoryBackend) GetCoreNetworkChangeEvents(coreNetworkID string, policyVersionID int32) ([]CoreNetworkChangeEvent, error)
- func (b *InMemoryBackend) GetCoreNetworkChangeSet(coreNetworkID string, policyVersionID int32) ([]CoreNetworkChange, error)
- func (b *InMemoryBackend) GetCoreNetworkPolicy(coreNetworkID, alias string, policyVersionID int32) (*CoreNetworkPolicyVersion, string, error)
- func (b *InMemoryBackend) GetCustomerGatewayAssociations(globalNetworkID string, arns []string, token string, limit int) (page.Page[*CustomerGatewayAssociation], error)
- func (b *InMemoryBackend) GetDevices(globalNetworkID string, ids []string, siteID, token string, limit int) (page.Page[*Device], error)
- func (b *InMemoryBackend) GetDirectConnectGatewayAttachment(id string) (*Attachment, error)
- func (b *InMemoryBackend) GetLinkAssociations(globalNetworkID, deviceID, linkID, token string, limit int) (page.Page[*LinkAssociation], error)
- func (b *InMemoryBackend) GetLinks(globalNetworkID string, ids []string, provider, siteID, linkType, token string, ...) (page.Page[*Link], error)
- func (b *InMemoryBackend) GetNetworkResourceCounts(globalNetworkID, resourceType string) map[string]int32
- func (b *InMemoryBackend) GetNetworkResourceRelationships(globalNetworkID string, filter networkResourceFilter, token string, limit int) (page.Page[networkRelationship], error)
- func (b *InMemoryBackend) GetNetworkResources(globalNetworkID string, filter networkResourceFilter, token string, limit int) (page.Page[networkResourceItem], error)
- func (b *InMemoryBackend) GetNetworkRoutes(globalNetworkID, transitGatewayRouteTableArn string, ...) (string, string, error)
- func (b *InMemoryBackend) GetNetworkTelemetry(globalNetworkID string, filter networkResourceFilter, token string, limit int) (page.Page[networkTelemetryWire], error)
- func (b *InMemoryBackend) GetResourcePolicy(resourceArn string) string
- func (b *InMemoryBackend) GetRouteAnalysis(globalNetworkID, id string) (*RouteAnalysis, error)
- func (b *InMemoryBackend) GetSiteToSiteVpnAttachment(id string) (*Attachment, error)
- func (b *InMemoryBackend) GetSites(globalNetworkID string, ids []string, token string, limit int) (page.Page[*Site], error)
- func (b *InMemoryBackend) GetTransitGatewayConnectPeerAssociations(globalNetworkID string, arns []string, token string, limit int) (page.Page[*TransitGatewayConnectPeerAssociation], error)
- func (b *InMemoryBackend) GetTransitGatewayPeering(id string) (*Peering, error)
- func (b *InMemoryBackend) GetTransitGatewayRegistrations(globalNetworkID string, arns []string, token string, limit int) (page.Page[*TransitGatewayRegistration], error)
- func (b *InMemoryBackend) GetTransitGatewayRouteTableAttachment(id string) (*Attachment, error)
- func (b *InMemoryBackend) GetVpcAttachment(id string) (*Attachment, error)
- func (b *InMemoryBackend) ListAttachmentRoutingPolicyAssociations(coreNetworkID, attachmentID, token string, limit int) (page.Page[*AttachmentRoutingPolicyLabel], error)
- func (b *InMemoryBackend) ListAttachments(attachmentType, coreNetworkID, edgeLocation, state, token string, limit int) page.Page[*Attachment]
- func (b *InMemoryBackend) ListConnectPeers(connectAttachmentID, coreNetworkID, token string, limit int) (page.Page[*ConnectPeer], error)
- func (b *InMemoryBackend) ListCoreNetworkPolicyVersions(coreNetworkID, token string, limit int) (page.Page[*CoreNetworkPolicyVersion], map[int32]string, error)
- func (b *InMemoryBackend) ListCoreNetworkPrefixListAssociations(coreNetworkID, prefixListArn, token string, limit int) (page.Page[*CoreNetworkPrefixListAssociation], error)
- func (b *InMemoryBackend) ListCoreNetworkRoutingInformation(coreNetworkID, edgeLocation, segmentName string) error
- func (b *InMemoryBackend) ListCoreNetworks(token string, limit int) page.Page[*CoreNetwork]
- func (b *InMemoryBackend) ListOrganizationServiceAccessStatus() *organizationStatus
- func (b *InMemoryBackend) ListPeerings(coreNetworkID, edgeLocation, peeringType, state, token string, limit int) page.Page[*Peering]
- func (b *InMemoryBackend) ListTagsForResource(resourceArn string) (map[string]string, error)
- func (b *InMemoryBackend) PutAttachmentRoutingPolicyLabel(coreNetworkID, attachmentID, label string) (*AttachmentRoutingPolicyLabel, error)
- func (b *InMemoryBackend) PutCoreNetworkPolicy(coreNetworkID, policyDocument, description string, latestVersionID int32) (*CoreNetworkPolicyHistory, *CoreNetworkPolicyVersion, error)
- func (b *InMemoryBackend) PutResourcePolicy(resourceArn, policyDocument string) error
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) RegisterTransitGateway(globalNetworkID, transitGatewayArn string) (*TransitGatewayRegistration, error)
- func (b *InMemoryBackend) RejectAttachment(id string) (*Attachment, error)
- func (b *InMemoryBackend) RemoveAttachmentRoutingPolicyLabel(coreNetworkID, attachmentID string) (*AttachmentRoutingPolicyLabel, error)
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) RestoreCoreNetworkPolicyVersion(coreNetworkID string, policyVersionID int32) (*CoreNetworkPolicyVersion, error)
- func (b *InMemoryBackend) SetDirectConnectResolver(r DirectConnectResolver)
- func (b *InMemoryBackend) SetEC2Resolver(r EC2Resolver)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StartOrganizationServiceAccessUpdate(action string) *organizationStatus
- func (b *InMemoryBackend) StartRouteAnalysis(globalNetworkID string, source, destination *RouteAnalysisEndpoint, ...) (*RouteAnalysis, error)
- func (b *InMemoryBackend) TagResource(resourceArn string, tagMap map[string]string) error
- func (b *InMemoryBackend) TaggedResources() []TaggedResource
- func (b *InMemoryBackend) UntagResource(resourceArn string, tagKeys []string) error
- func (b *InMemoryBackend) UpdateConnection(globalNetworkID, id, connectedLinkID, description, linkID string) (*Connection, error)
- func (b *InMemoryBackend) UpdateCoreNetwork(id, description string) (*CoreNetwork, error)
- func (b *InMemoryBackend) UpdateDevice(globalNetworkID, id string, awsLoc *AWSLocation, loc *Location, ...) (*Device, error)
- func (b *InMemoryBackend) UpdateDirectConnectGatewayAttachment(id string, edgeLocations []string) (*Attachment, error)
- func (b *InMemoryBackend) UpdateGlobalNetwork(id, description string) (*GlobalNetwork, error)
- func (b *InMemoryBackend) UpdateLink(globalNetworkID, id string, bw *Bandwidth, ...) (*Link, error)
- func (b *InMemoryBackend) UpdateNetworkResourceMetadata(globalNetworkID, resourceArn string, metadata map[string]string) (map[string]string, error)
- func (b *InMemoryBackend) UpdateSite(globalNetworkID, id, description string, loc *Location) (*Site, error)
- func (b *InMemoryBackend) UpdateVpcAttachment(id string, addSubnetArns, removeSubnetArns []string, opts *VpcOptions) (*Attachment, error)
- type Link
- type LinkAssociation
- type Location
- type NetworkResourceSummary
- type PathComponent
- type Peering
- type PeeringError
- type Provider
- type RouteAnalysis
- type RouteAnalysisCompletion
- type RouteAnalysisEndpoint
- type RouteAnalysisPath
- type Site
- type TaggedResource
- type TransitGatewayConnectPeerAssociation
- type TransitGatewayRegistration
- type TransitGatewayRegistrationStateReason
- type VpcOptions
Constants ¶
This section is empty.
Variables ¶
var ErrNilAppContext = errors.New("AppContext is required")
ErrNilAppContext is returned by Provider.Init when appCtx is nil.
Functions ¶
This section is empty.
Types ¶
type AWSLocation ¶
AWSLocation mirrors types.AWSLocation.
type Attachment ¶
type Attachment struct {
CreatedAt time.Time
UpdatedAt time.Time
Tags *tags.Tags
VpcOptions *VpcOptions
ConnectOptions *ConnectAttachmentOptions
OwnerAccountID string
RoutingPolicyLabel string
AttachmentType string
CoreNetworkArn string
CoreNetworkID string
EdgeLocation string
NetworkFunctionGroupName string
TransitGatewayRouteTableArn string
ResourceArn string
SegmentName string
State string
AttachmentID string
PeeringID string
DirectConnectGatewayArn string
VpcArn string
VpnConnectionArn string
TransportAttachmentID string
SubnetArns []string
EdgeLocations []string
LastModificationErrors []AttachmentError
AttachmentPolicyRuleNumber int32
}
Attachment is this backend's single flat representation of the shared base Attachment shape (types.Attachment) plus every subtype-specific field (VpcAttachment/ConnectAttachment/SiteToSiteVpnAttachment/ DirectConnectGatewayAttachment/TransitGatewayRouteTableAttachment), keyed by AttachmentId. A discriminator (Kind) selects which subtype-specific fields are populated -- simpler than 5 separate tables given every op in family Q operates generically across all 5 kinds by AttachmentId alone.
type AttachmentError ¶
AttachmentError mirrors types.AttachmentError -- this backend never populates a live Attachment's LastModificationErrors (no failure-injection engine models a real per-attachment error), but the type is declared so the wire shape stays complete.
type AttachmentKind ¶
type AttachmentKind string
AttachmentKind discriminates the 5 subtypes sharing the base Attachment shape (types.AttachmentType).
type AttachmentRoutingPolicyLabel ¶
type AttachmentRoutingPolicyLabel struct {
AttachmentID string
CoreNetworkID string
RoutingPolicyLabel string
}
AttachmentRoutingPolicyLabel mirrors types.AttachmentRoutingPolicyAssociationSummary's stored shape (one label per attachment, family P).
type ConnectAttachmentOptions ¶
type ConnectAttachmentOptions struct {
Protocol string
}
ConnectAttachmentOptions mirrors types.ConnectAttachmentOptions.
type ConnectPeer ¶
type ConnectPeer struct {
CreatedAt time.Time
Tags *tags.Tags
Configuration *ConnectPeerConfiguration
ConnectAttachmentID string
ConnectPeerID string
CoreNetworkID string
EdgeLocation string
State string
SubnetArn string
LastModificationErrors []ConnectPeerError
}
ConnectPeer mirrors types.ConnectPeer.
type ConnectPeerAssociation ¶
type ConnectPeerAssociation struct {
ConnectPeerID string
DeviceID string
GlobalNetworkID string
LinkID string
State string
}
ConnectPeerAssociation mirrors types.ConnectPeerAssociation -- the concrete Global-Networks/Cloud-WAN bridge (PARITY.md family J).
type ConnectPeerBgpConfiguration ¶
type ConnectPeerBgpConfiguration struct {
CoreNetworkAddress string
PeerAddress string
CoreNetworkAsn int64
PeerAsn int64
}
ConnectPeerBgpConfiguration mirrors types.ConnectPeerBgpConfiguration.
type ConnectPeerConfiguration ¶
type ConnectPeerConfiguration struct {
CoreNetworkAddress string
PeerAddress string
Protocol string
BgpConfigurations []ConnectPeerBgpConfiguration
InsideCidrBlocks []string
}
ConnectPeerConfiguration mirrors types.ConnectPeerConfiguration.
type ConnectPeerError ¶ added in v1.3.1
ConnectPeerError mirrors types.ConnectPeerError -- this backend never populates a live ConnectPeer's LastModificationErrors (no failure- injection engine models a real per-connect-peer error, same as AttachmentError/PeeringError), but the type is declared complete so the wire shape stays correct if that ever changes.
type Connection ¶
type Connection struct {
CreatedAt time.Time
Tags *tags.Tags
ConnectionID string
ConnectionArn string
ConnectedDeviceID string
ConnectedLinkID string
DeviceID string
GlobalNetworkID string
LinkID string
Description string
State string
}
Connection mirrors types.Connection.
type CoreNetwork ¶
type CoreNetwork struct {
CreatedAt time.Time
Tags *tags.Tags
CoreNetworkArn string
CoreNetworkID string
GlobalNetworkID string
Description string
State string
}
CoreNetwork mirrors types.CoreNetwork. Edges/Segments/NetworkFunctionGroups stay empty in this pass -- no policy-execution engine computes them (see corenetworks.go's doc comment on the scoped-down change-set diff).
type CoreNetworkChange ¶ added in v1.3.1
type CoreNetworkChange struct {
NewValues *CoreNetworkChangeValues
PreviousValues *CoreNetworkChangeValues
Action string
Identifier string
IdentifierPath string
Type string
}
CoreNetworkChange mirrors types.CoreNetworkChange -- one entry in the real structural ADD/MODIFY/REMOVE diff GetCoreNetworkChangeSet computes between the LIVE and submitted policy JSON documents (corenetworkpolicydiff.go).
type CoreNetworkChangeEvent ¶ added in v1.3.1
type CoreNetworkChangeEvent struct {
EventTime time.Time
Values *CoreNetworkChangeValues
Action string
IdentifierPath string
Status string
Type string
}
CoreNetworkChangeEvent mirrors types.CoreNetworkChangeEvent -- one change's EXECUTION progress, derived from the same diff as CoreNetworkChange plus the owning ChangeSetState (corenetworkpolicydiff.go).
type CoreNetworkChangeValues ¶ added in v1.3.1
type CoreNetworkChangeValues struct {
SegmentName string
NetworkFunctionGroupName string
RawJSON string
}
CoreNetworkChangeValues mirrors types.CoreNetworkChangeValues -- only the fields this document-level diff engine actually populates (SegmentName/NetworkFunctionGroupName plus the section's own raw content via RawJSON, which is NOT an SDK field but this backend's own honest way to expose a section-level ADD/MODIFY/REMOVE without inventing per-field SDK values -- see corenetworkpolicydiff.go's doc comment) rather than all ~15 SDK fields, most of which (Asn/Cidr/DestinationIdentifier/...) describe per-attachment route semantics this document-level diff does not correlate against live attachment state.
type CoreNetworkPolicyError ¶
CoreNetworkPolicyError mirrors types.CoreNetworkPolicyError.
type CoreNetworkPolicyHistory ¶
type CoreNetworkPolicyHistory struct {
Versions map[int32]*CoreNetworkPolicyVersion
LiveID int32 // 0 means "no LIVE version yet"
LatestID int32
NextID int32
// contains filtered or unexported fields
}
CoreNetworkPolicyHistory is the per-core-network policy state machine: every submitted version plus which version is LIVE (deployed by ExecuteCoreNetworkChangeSet) versus LATEST (most recently Put/Restored) -- see PARITY.md family M's doc comment on why these two pointers are NOT the same until execution happens.
type CoreNetworkPolicyVersion ¶
type CoreNetworkPolicyVersion struct {
CreatedAt time.Time
CoreNetworkID string
Description string
PolicyDocument string
ChangeSetState string
PolicyVersionID int32
}
CoreNetworkPolicyVersion is this backend's stored history entry for one PutCoreNetworkPolicy/RestoreCoreNetworkPolicyVersion call -- the versioned half of types.CoreNetworkPolicy plus types.CoreNetworkPolicyVersion.
type CoreNetworkPrefixListAssociation ¶
type CoreNetworkPrefixListAssociation struct {
CoreNetworkID string
PrefixListAlias string
PrefixListArn string
}
CoreNetworkPrefixListAssociation mirrors types.PrefixListAssociation.
type CustomerGatewayAssociation ¶
type CustomerGatewayAssociation struct {
CustomerGatewayArn string
DeviceID string
GlobalNetworkID string
LinkID string
State string
}
CustomerGatewayAssociation mirrors types.CustomerGatewayAssociation.
type Device ¶
type Device struct {
CreatedAt time.Time
Tags *tags.Tags
AWSLocation *AWSLocation
Location *Location
DeviceID string
DeviceArn string
GlobalNetworkID string
Description string
Model string
SerialNumber string
SiteID string
Type string
Vendor string
State string
}
Device mirrors types.Device.
type DirectConnectResolver ¶ added in v1.3.1
type DirectConnectResolver interface {
ResolveDirectConnectGateway(directConnectGatewayArn string) bool
}
DirectConnectResolver lets this backend validate DirectConnectGatewayArn against the real services/directconnect backend. Wired in by cli.go's wireNetworkManagerDirectConnect. A nil resolver (the default) accepts every DirectConnectGatewayArn unvalidated.
type EC2Resolver ¶ added in v1.3.1
type EC2Resolver interface {
ResolveVpc(vpcArn string) bool
ResolveSubnet(subnetArn string) bool
ResolveCustomerGateway(customerGatewayArn string) bool
ResolveTransitGateway(transitGatewayArn string) bool
ResolveVpnConnection(vpnConnectionArn string) bool
ResolveTransitGatewayConnectPeer(transitGatewayConnectPeerArn string) bool
ResolveTransitGatewayRouteTable(transitGatewayRouteTableArn string) bool
// TransitGatewayRouteTableForAttachment resolves a real EC2
// TransitGatewayAttachmentArn to the TransitGatewayRouteTable ID
// associated with it, for StartRouteAnalysis's real route-table walk
// (routeanalysis.go). ok is false when the attachment does not exist,
// is not available, or has no associated route table.
TransitGatewayRouteTableForAttachment(transitGatewayAttachmentArn string) (routeTableID string, ok bool)
// TransitGatewayRoutes returns every route in the named TGW route
// table, for the same real walk.
TransitGatewayRoutes(routeTableID string) []EC2TransitGatewayRoute
}
EC2Resolver lets this backend validate ARNs that reference EC2 resources (VPC/Subnet/CustomerGateway/TransitGateway/VpnConnection/ TransitGatewayConnectPeer/TransitGatewayRouteTable) against the real services/ec2 backend, mirroring services/directconnect's EC2GatewayResolver (services/directconnect/store.go). Wired in by cli.go's wireNetworkManagerEC2. A nil resolver (the default) accepts every EC2 ARN unvalidated -- e.g. isolated unit tests with no EC2 backend wired, matching this package's prior documented scope decision.
type EC2TransitGatewayRoute ¶ added in v1.3.1
EC2TransitGatewayRoute is the subset of services/ec2's TransitGatewayRoute this package's route-analysis walk needs, decoupled from ec2's own type so this package does not import services/ec2 directly -- cli.go's adapter bridges the two, matching services/directconnect's EC2GatewayResolver pattern.
type GlobalNetwork ¶
type GlobalNetwork struct {
CreatedAt time.Time
Tags *tags.Tags
GlobalNetworkID string
GlobalNetworkArn string
Description string
State string
}
GlobalNetwork mirrors types.GlobalNetwork.
type Handler ¶
type Handler struct {
Backend *InMemoryBackend
AccountID string
Region string
}
Handler is the HTTP handler for the AWS Network Manager API.
func NewHandler ¶
func NewHandler(backend *InMemoryBackend) *Handler
NewHandler creates a new Network Manager handler.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this handler handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the operation name from the request.
func (*Handler) ExtractResource ¶
ExtractResource extracts the primary resource identifier from the request -- the ARN in the /tags/{resourceArn} or /resource-policy/{resourceArn} path, or empty for every other (mostly ID-addressed) operation.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns every operation this handler routes -- all 95 operations on the aws-sdk-go-v2/service/networkmanager client, per sdk_completeness_test.go's empty exception list.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function for Network Manager requests.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a matcher that reports true iff the request resolves to a known route via matchRoute.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend is the in-memory store for AWS Network Manager.
A single coarse lock guards every collection below: this service spans two related product halves (Global Networks and Cloud WAN) with one real structural bridge between them (ConnectPeerAssociation binds a Cloud WAN ConnectPeer to a Global-Networks Device/Link), plus a versioned core network policy state machine and async attachment/peering/route-analysis transitions -- all cross-map transactions, so the invariant boundary is the whole backend (see .claude/memories/pkgs-catalog.md's locking rule).
func NewInMemoryBackend ¶
func NewInMemoryBackend(ctx context.Context, accountID, region string) *InMemoryBackend
NewInMemoryBackend creates a new in-memory AWS Network Manager backend.
func (*InMemoryBackend) AcceptAttachment ¶
func (b *InMemoryBackend) AcceptAttachment(id string) (*Attachment, error)
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the account ID for this backend.
func (*InMemoryBackend) AssociateConnectPeer ¶
func (b *InMemoryBackend) AssociateConnectPeer( globalNetworkID, connectPeerID, deviceID, linkID string, ) (*ConnectPeerAssociation, error)
func (*InMemoryBackend) AssociateCustomerGateway ¶
func (b *InMemoryBackend) AssociateCustomerGateway( globalNetworkID, customerGatewayArn, deviceID, linkID string, ) (*CustomerGatewayAssociation, error)
func (*InMemoryBackend) AssociateLink ¶
func (b *InMemoryBackend) AssociateLink(globalNetworkID, deviceID, linkID string) (*LinkAssociation, error)
func (*InMemoryBackend) AssociateTransitGatewayConnectPeer ¶
func (b *InMemoryBackend) AssociateTransitGatewayConnectPeer( globalNetworkID, deviceID, transitGatewayConnectPeerArn, linkID string, ) (*TransitGatewayConnectPeerAssociation, error)
func (*InMemoryBackend) Close ¶
func (b *InMemoryBackend) Close()
Close stops all scheduled state-transition timers so none outlives the backend. Safe to call multiple times.
func (*InMemoryBackend) CreateConnectAttachment ¶
func (b *InMemoryBackend) CreateConnectAttachment( coreNetworkID, edgeLocation, transportAttachmentID, protocol, routingPolicyLabel string, tagMap map[string]string, ) (*Attachment, error)
func (*InMemoryBackend) CreateConnectPeer ¶
func (b *InMemoryBackend) CreateConnectPeer( connectAttachmentID, peerAddress string, bgp *BgpOptions, coreNetworkAddress, subnetArn string, insideCidrs []string, tagMap map[string]string, ) (*ConnectPeer, error)
CreateConnectPeer creates a new Connect peer terminating connectAttachmentID (which must already exist and be a CONNECT attachment). State starts CREATING (ConnectPeerState has no PENDING value, unlike every other resource in this service), transitioning to AVAILABLE.
func (*InMemoryBackend) CreateConnection ¶
func (b *InMemoryBackend) CreateConnection( globalNetworkID, connectedDeviceID, deviceID, connectedLinkID, description, linkID string, tagMap map[string]string, ) (*Connection, error)
func (*InMemoryBackend) CreateCoreNetwork ¶
func (b *InMemoryBackend) CreateCoreNetwork( globalNetworkID, description, policyDocument string, tagMap map[string]string, ) (*CoreNetwork, error)
func (*InMemoryBackend) CreateCoreNetworkPrefixListAssociation ¶
func (b *InMemoryBackend) CreateCoreNetworkPrefixListAssociation( coreNetworkID, prefixListAlias, prefixListArn string, ) (*CoreNetworkPrefixListAssociation, error)
func (*InMemoryBackend) CreateDevice ¶
func (b *InMemoryBackend) CreateDevice( globalNetworkID string, awsLoc *AWSLocation, loc *Location, description, model, serialNumber, siteID, devType, vendor string, tagMap map[string]string, ) (*Device, error)
func (*InMemoryBackend) CreateDirectConnectGatewayAttachment ¶
func (b *InMemoryBackend) CreateDirectConnectGatewayAttachment( coreNetworkID, directConnectGatewayArn string, edgeLocations []string, routingPolicyLabel string, tagMap map[string]string, ) (*Attachment, error)
func (*InMemoryBackend) CreateGlobalNetwork ¶
func (b *InMemoryBackend) CreateGlobalNetwork(description string, tagMap map[string]string) *GlobalNetwork
CreateGlobalNetwork creates a new global network in PENDING state, transitioning to AVAILABLE after asyncTransitionDelay.
func (*InMemoryBackend) CreateLink ¶
func (*InMemoryBackend) CreateSite ¶
func (b *InMemoryBackend) CreateSite( globalNetworkID, description string, loc *Location, tagMap map[string]string, ) (*Site, error)
CreateSite creates a new site under globalNetworkID.
func (*InMemoryBackend) CreateSiteToSiteVpnAttachment ¶
func (b *InMemoryBackend) CreateSiteToSiteVpnAttachment( coreNetworkID, vpnConnectionArn, routingPolicyLabel string, tagMap map[string]string, ) (*Attachment, error)
func (*InMemoryBackend) CreateTransitGatewayPeering ¶
func (*InMemoryBackend) CreateTransitGatewayRouteTableAttachment ¶
func (b *InMemoryBackend) CreateTransitGatewayRouteTableAttachment( peeringID, transitGatewayRouteTableArn, routingPolicyLabel string, tagMap map[string]string, ) (*Attachment, error)
func (*InMemoryBackend) CreateVpcAttachment ¶
func (b *InMemoryBackend) CreateVpcAttachment( coreNetworkID, vpcArn string, subnetArns []string, opts *VpcOptions, routingPolicyLabel string, tagMap map[string]string, ) (*Attachment, error)
func (*InMemoryBackend) DeleteAttachment ¶
func (b *InMemoryBackend) DeleteAttachment(id string) (*Attachment, error)
func (*InMemoryBackend) DeleteConnectPeer ¶
func (b *InMemoryBackend) DeleteConnectPeer(id string) (*ConnectPeer, error)
func (*InMemoryBackend) DeleteConnection ¶
func (b *InMemoryBackend) DeleteConnection(globalNetworkID, id string) (*Connection, error)
func (*InMemoryBackend) DeleteCoreNetwork ¶
func (b *InMemoryBackend) DeleteCoreNetwork(id string) (*CoreNetwork, error)
func (*InMemoryBackend) DeleteCoreNetworkPolicyVersion ¶
func (b *InMemoryBackend) DeleteCoreNetworkPolicyVersion( coreNetworkID string, policyVersionID int32, ) (*CoreNetworkPolicyVersion, string, error)
func (*InMemoryBackend) DeleteCoreNetworkPrefixListAssociation ¶
func (b *InMemoryBackend) DeleteCoreNetworkPrefixListAssociation( coreNetworkID, prefixListArn string, ) (*CoreNetworkPrefixListAssociation, error)
func (*InMemoryBackend) DeleteDevice ¶
func (b *InMemoryBackend) DeleteDevice(globalNetworkID, id string) (*Device, error)
func (*InMemoryBackend) DeleteGlobalNetwork ¶
func (b *InMemoryBackend) DeleteGlobalNetwork(id string) (*GlobalNetwork, error)
DeleteGlobalNetwork marks id DELETING, removing it after asyncTransitionDelay.
func (*InMemoryBackend) DeleteLink ¶
func (b *InMemoryBackend) DeleteLink(globalNetworkID, id string) (*Link, error)
func (*InMemoryBackend) DeletePeering ¶
func (b *InMemoryBackend) DeletePeering(id string) (*Peering, error)
func (*InMemoryBackend) DeleteResourcePolicy ¶
func (b *InMemoryBackend) DeleteResourcePolicy(resourceArn string) error
func (*InMemoryBackend) DeleteSite ¶
func (b *InMemoryBackend) DeleteSite(globalNetworkID, id string) (*Site, error)
func (*InMemoryBackend) DeregisterTransitGateway ¶
func (b *InMemoryBackend) DeregisterTransitGateway( globalNetworkID, transitGatewayArn string, ) (*TransitGatewayRegistration, error)
func (*InMemoryBackend) DescribeGlobalNetworks ¶
func (b *InMemoryBackend) DescribeGlobalNetworks( ids []string, token string, limit int, ) (page.Page[*GlobalNetwork], error)
DescribeGlobalNetworks returns a page of global networks, optionally filtered by ids.
func (*InMemoryBackend) DisassociateConnectPeer ¶
func (b *InMemoryBackend) DisassociateConnectPeer( globalNetworkID, connectPeerID string, ) (*ConnectPeerAssociation, error)
func (*InMemoryBackend) DisassociateCustomerGateway ¶
func (b *InMemoryBackend) DisassociateCustomerGateway( globalNetworkID, customerGatewayArn string, ) (*CustomerGatewayAssociation, error)
func (*InMemoryBackend) DisassociateLink ¶
func (b *InMemoryBackend) DisassociateLink(globalNetworkID, deviceID, linkID string) (*LinkAssociation, error)
func (*InMemoryBackend) DisassociateTransitGatewayConnectPeer ¶
func (b *InMemoryBackend) DisassociateTransitGatewayConnectPeer( globalNetworkID, transitGatewayConnectPeerArn string, ) (*TransitGatewayConnectPeerAssociation, error)
func (*InMemoryBackend) ExecuteCoreNetworkChangeSet ¶
func (b *InMemoryBackend) ExecuteCoreNetworkChangeSet(coreNetworkID string, policyVersionID int32) error
func (*InMemoryBackend) GetConnectAttachment ¶
func (b *InMemoryBackend) GetConnectAttachment(id string) (*Attachment, error)
func (*InMemoryBackend) GetConnectPeer ¶
func (b *InMemoryBackend) GetConnectPeer(id string) (*ConnectPeer, error)
func (*InMemoryBackend) GetConnectPeerAssociations ¶
func (b *InMemoryBackend) GetConnectPeerAssociations( globalNetworkID string, ids []string, token string, limit int, ) (page.Page[*ConnectPeerAssociation], error)
func (*InMemoryBackend) GetConnections ¶
func (b *InMemoryBackend) GetConnections( globalNetworkID string, ids []string, deviceID, token string, limit int, ) (page.Page[*Connection], error)
func (*InMemoryBackend) GetCoreNetwork ¶
func (b *InMemoryBackend) GetCoreNetwork(id string) (*CoreNetwork, error)
func (*InMemoryBackend) GetCoreNetworkChangeEvents ¶
func (b *InMemoryBackend) GetCoreNetworkChangeEvents( coreNetworkID string, policyVersionID int32, ) ([]CoreNetworkChangeEvent, error)
GetCoreNetworkChangeEvents validates coreNetworkID/policyVersionID and derives per-change EXECUTION progress from the same diff GetCoreNetworkChangeSet computes, plus policyVersionID's own ChangeSetState -- see corenetworkpolicydiff.go's changesToEvents doc comment for the coarseness this implies (one status per changeset, not per IdentifierPath).
func (*InMemoryBackend) GetCoreNetworkChangeSet ¶
func (b *InMemoryBackend) GetCoreNetworkChangeSet( coreNetworkID string, policyVersionID int32, ) ([]CoreNetworkChange, error)
GetCoreNetworkChangeSet validates coreNetworkID/policyVersionID and returns the real structural diff between the LIVE policy and policyVersionID's own document -- see corenetworkpolicydiff.go.
func (*InMemoryBackend) GetCoreNetworkPolicy ¶
func (b *InMemoryBackend) GetCoreNetworkPolicy( coreNetworkID, alias string, policyVersionID int32, ) (*CoreNetworkPolicyVersion, string, error)
func (*InMemoryBackend) GetCustomerGatewayAssociations ¶
func (b *InMemoryBackend) GetCustomerGatewayAssociations( globalNetworkID string, arns []string, token string, limit int, ) (page.Page[*CustomerGatewayAssociation], error)
func (*InMemoryBackend) GetDevices ¶
func (*InMemoryBackend) GetDirectConnectGatewayAttachment ¶
func (b *InMemoryBackend) GetDirectConnectGatewayAttachment(id string) (*Attachment, error)
func (*InMemoryBackend) GetLinkAssociations ¶
func (b *InMemoryBackend) GetLinkAssociations( globalNetworkID, deviceID, linkID, token string, limit int, ) (page.Page[*LinkAssociation], error)
func (*InMemoryBackend) GetNetworkResourceCounts ¶
func (b *InMemoryBackend) GetNetworkResourceCounts( globalNetworkID, resourceType string, ) map[string]int32
GetNetworkResourceCounts deliberately does NOT validate globalNetworkID existence -- PARITY.md confirms this is the one Get* op in this family with no ResourceNotFoundException in its real error set, unlike its three siblings; an unknown GlobalNetworkID here honestly returns zero counts rather than an error the real SDK client has no typed case for.
func (*InMemoryBackend) GetNetworkResourceRelationships ¶
func (*InMemoryBackend) GetNetworkResources ¶
func (*InMemoryBackend) GetNetworkRoutes ¶
func (b *InMemoryBackend) GetNetworkRoutes( globalNetworkID, transitGatewayRouteTableArn string, hasCoreNetworkSegmentEdge bool, ) (string, string, error)
GetNetworkRoutes returns an honest empty route list -- see this file's doc comment. It still echoes back the resolved RouteTableType/ RouteTableArn derived from whichever RouteTableIdentifier field the caller supplied, and validates GlobalNetworkID.
func (*InMemoryBackend) GetNetworkTelemetry ¶
func (b *InMemoryBackend) GetNetworkTelemetry( globalNetworkID string, filter networkResourceFilter, token string, limit int, ) (page.Page[networkTelemetryWire], error)
GetNetworkTelemetry emits a deterministic Health.Status: UP entry for every Connection/ConnectPeer already AVAILABLE and in scope -- see this file's doc comment for why nothing else is ever reported.
func (*InMemoryBackend) GetResourcePolicy ¶
func (b *InMemoryBackend) GetResourcePolicy(resourceArn string) string
GetResourcePolicy returns the stored policy document, or an empty string if resourceArn has none -- real AWS's GetResourcePolicy carries NO ResourceNotFoundException in its error set (PARITY.md family W: "[base4] only"), so an absent policy is reported as empty content, not an error.
func (*InMemoryBackend) GetRouteAnalysis ¶
func (b *InMemoryBackend) GetRouteAnalysis(globalNetworkID, id string) (*RouteAnalysis, error)
func (*InMemoryBackend) GetSiteToSiteVpnAttachment ¶
func (b *InMemoryBackend) GetSiteToSiteVpnAttachment(id string) (*Attachment, error)
func (*InMemoryBackend) GetTransitGatewayConnectPeerAssociations ¶
func (b *InMemoryBackend) GetTransitGatewayConnectPeerAssociations( globalNetworkID string, arns []string, token string, limit int, ) (page.Page[*TransitGatewayConnectPeerAssociation], error)
func (*InMemoryBackend) GetTransitGatewayPeering ¶
func (b *InMemoryBackend) GetTransitGatewayPeering(id string) (*Peering, error)
func (*InMemoryBackend) GetTransitGatewayRegistrations ¶
func (b *InMemoryBackend) GetTransitGatewayRegistrations( globalNetworkID string, arns []string, token string, limit int, ) (page.Page[*TransitGatewayRegistration], error)
func (*InMemoryBackend) GetTransitGatewayRouteTableAttachment ¶
func (b *InMemoryBackend) GetTransitGatewayRouteTableAttachment(id string) (*Attachment, error)
func (*InMemoryBackend) GetVpcAttachment ¶
func (b *InMemoryBackend) GetVpcAttachment(id string) (*Attachment, error)
func (*InMemoryBackend) ListAttachmentRoutingPolicyAssociations ¶
func (b *InMemoryBackend) ListAttachmentRoutingPolicyAssociations( coreNetworkID, attachmentID, token string, limit int, ) (page.Page[*AttachmentRoutingPolicyLabel], error)
func (*InMemoryBackend) ListAttachments ¶
func (b *InMemoryBackend) ListAttachments( attachmentType, coreNetworkID, edgeLocation, state, token string, limit int, ) page.Page[*Attachment]
func (*InMemoryBackend) ListConnectPeers ¶
func (b *InMemoryBackend) ListConnectPeers( connectAttachmentID, coreNetworkID, token string, limit int, ) (page.Page[*ConnectPeer], error)
func (*InMemoryBackend) ListCoreNetworkPolicyVersions ¶
func (b *InMemoryBackend) ListCoreNetworkPolicyVersions( coreNetworkID, token string, limit int, ) (page.Page[*CoreNetworkPolicyVersion], map[int32]string, error)
func (*InMemoryBackend) ListCoreNetworkPrefixListAssociations ¶
func (b *InMemoryBackend) ListCoreNetworkPrefixListAssociations( coreNetworkID, prefixListArn, token string, limit int, ) (page.Page[*CoreNetworkPrefixListAssociation], error)
func (*InMemoryBackend) ListCoreNetworkRoutingInformation ¶
func (b *InMemoryBackend) ListCoreNetworkRoutingInformation(coreNetworkID, edgeLocation, segmentName string) error
ListCoreNetworkRoutingInformation is a real BGP route-table read filtered by BGP path attributes (AS path, communities, local preference, MED) -- honestly derivable ONLY if this emulator tracked real BGP-attribute- tagged routes per segment/edge, which it does not (no route-propagation engine exists here). This validates its required inputs and returns an honest empty list, per PARITY.md's own framing (matching directconnect's BGP-peering honesty precedent) rather than inventing plausible AS-path/ community values.
func (*InMemoryBackend) ListCoreNetworks ¶
func (b *InMemoryBackend) ListCoreNetworks(token string, limit int) page.Page[*CoreNetwork]
func (*InMemoryBackend) ListOrganizationServiceAccessStatus ¶
func (b *InMemoryBackend) ListOrganizationServiceAccessStatus() *organizationStatus
ListOrganizationServiceAccessStatus returns the current organization status -- the only op in this 95-op surface with zero typed exception cases (PARITY.md), so its handler never returns an apiError.
func (*InMemoryBackend) ListPeerings ¶
func (*InMemoryBackend) ListTagsForResource ¶
func (b *InMemoryBackend) ListTagsForResource(resourceArn string) (map[string]string, error)
ListTagsForResource returns the tags currently on resourceArn.
func (*InMemoryBackend) PutAttachmentRoutingPolicyLabel ¶
func (b *InMemoryBackend) PutAttachmentRoutingPolicyLabel( coreNetworkID, attachmentID, label string, ) (*AttachmentRoutingPolicyLabel, error)
func (*InMemoryBackend) PutCoreNetworkPolicy ¶
func (b *InMemoryBackend) PutCoreNetworkPolicy( coreNetworkID, policyDocument, description string, latestVersionID int32, ) (*CoreNetworkPolicyHistory, *CoreNetworkPolicyVersion, error)
func (*InMemoryBackend) PutResourcePolicy ¶
func (b *InMemoryBackend) PutResourcePolicy(resourceArn, policyDocument string) error
PutResourcePolicy stores policyDocument for resourceArn, creating the entry if absent (real AWS's PutResourcePolicy has no ResourceNotFound case, per PARITY.md, consistent with create-if-absent semantics).
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the AWS region this backend is configured for.
func (*InMemoryBackend) RegisterTransitGateway ¶
func (b *InMemoryBackend) RegisterTransitGateway( globalNetworkID, transitGatewayArn string, ) (*TransitGatewayRegistration, error)
func (*InMemoryBackend) RejectAttachment ¶
func (b *InMemoryBackend) RejectAttachment(id string) (*Attachment, error)
func (*InMemoryBackend) RemoveAttachmentRoutingPolicyLabel ¶
func (b *InMemoryBackend) RemoveAttachmentRoutingPolicyLabel( coreNetworkID, attachmentID string, ) (*AttachmentRoutingPolicyLabel, error)
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot.
func (*InMemoryBackend) RestoreCoreNetworkPolicyVersion ¶
func (b *InMemoryBackend) RestoreCoreNetworkPolicyVersion( coreNetworkID string, policyVersionID int32, ) (*CoreNetworkPolicyVersion, error)
func (*InMemoryBackend) SetDirectConnectResolver ¶ added in v1.3.1
func (b *InMemoryBackend) SetDirectConnectResolver(r DirectConnectResolver)
SetDirectConnectResolver wires the backend to validate DirectConnectGatewayArn against the real services/directconnect backend -- see DirectConnectResolver's doc comment. Called from cli.go's wireNetworkManagerDirectConnect.
func (*InMemoryBackend) SetEC2Resolver ¶ added in v1.3.1
func (b *InMemoryBackend) SetEC2Resolver(r EC2Resolver)
SetEC2Resolver wires the backend to validate cross-service ARNs against the real services/ec2 backend -- see EC2Resolver's doc comment. Called from cli.go's wireNetworkManagerEC2.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON.
func (*InMemoryBackend) StartOrganizationServiceAccessUpdate ¶
func (b *InMemoryBackend) StartOrganizationServiceAccessUpdate(action string) *organizationStatus
StartOrganizationServiceAccessUpdate flips the account's OrganizationAwsServiceAccessStatus per action ("ENABLE"/"DISABLE" -- PARITY.md notes this is a free-form *string on the wire, not a closed SDK enum).
func (*InMemoryBackend) StartRouteAnalysis ¶
func (b *InMemoryBackend) StartRouteAnalysis( globalNetworkID string, source, destination *RouteAnalysisEndpoint, includeReturnPath, useMiddleboxes bool, ) (*RouteAnalysis, error)
func (*InMemoryBackend) TagResource ¶
func (b *InMemoryBackend) TagResource(resourceArn string, tagMap map[string]string) error
TagResource adds/updates tags on resourceArn.
func (*InMemoryBackend) TaggedResources ¶
func (b *InMemoryBackend) TaggedResources() []TaggedResource
TaggedResources enumerates every tagged resource across all 9 taggable kinds, for cli.go's ResourceGroupsTaggingAPI wiring (wireTaggingNetworkManager).
func (*InMemoryBackend) UntagResource ¶
func (b *InMemoryBackend) UntagResource(resourceArn string, tagKeys []string) error
UntagResource removes the given tag keys from resourceArn.
func (*InMemoryBackend) UpdateConnection ¶
func (b *InMemoryBackend) UpdateConnection( globalNetworkID, id, connectedLinkID, description, linkID string, ) (*Connection, error)
func (*InMemoryBackend) UpdateCoreNetwork ¶
func (b *InMemoryBackend) UpdateCoreNetwork(id, description string) (*CoreNetwork, error)
func (*InMemoryBackend) UpdateDevice ¶
func (b *InMemoryBackend) UpdateDevice( globalNetworkID, id string, awsLoc *AWSLocation, loc *Location, description, model, serialNumber, siteID, devType, vendor string, ) (*Device, error)
func (*InMemoryBackend) UpdateDirectConnectGatewayAttachment ¶
func (b *InMemoryBackend) UpdateDirectConnectGatewayAttachment(id string, edgeLocations []string) (*Attachment, error)
func (*InMemoryBackend) UpdateGlobalNetwork ¶
func (b *InMemoryBackend) UpdateGlobalNetwork(id, description string) (*GlobalNetwork, error)
UpdateGlobalNetwork updates description, transitioning through UPDATING.
func (*InMemoryBackend) UpdateLink ¶
func (*InMemoryBackend) UpdateNetworkResourceMetadata ¶
func (*InMemoryBackend) UpdateSite ¶
func (b *InMemoryBackend) UpdateSite(globalNetworkID, id, description string, loc *Location) (*Site, error)
func (*InMemoryBackend) UpdateVpcAttachment ¶
func (b *InMemoryBackend) UpdateVpcAttachment( id string, addSubnetArns, removeSubnetArns []string, opts *VpcOptions, ) (*Attachment, error)
type Link ¶
type Link struct {
CreatedAt time.Time
Tags *tags.Tags
Bandwidth *Bandwidth
LinkID string
LinkArn string
GlobalNetworkID string
SiteID string
Description string
Provider string
Type string
State string
}
Link mirrors types.Link.
type LinkAssociation ¶
type LinkAssociation struct {
DeviceID string
GlobalNetworkID string
LinkID string
LinkAssociationState string
}
LinkAssociation mirrors types.LinkAssociation.
type NetworkResourceSummary ¶ added in v1.3.1
type NetworkResourceSummary struct {
Definition string
NameTag string
RegisteredGatewayArn string
ResourceArn string
ResourceType string
IsMiddlebox bool
}
NetworkResourceSummary mirrors types.NetworkResourceSummary.
type PathComponent ¶ added in v1.3.1
type PathComponent struct {
Resource *NetworkResourceSummary
DestinationCidrBlock string
Sequence int32
}
PathComponent mirrors types.PathComponent.
type Peering ¶
type Peering struct {
CreatedAt time.Time
Tags *tags.Tags
OwnerAccountID string
CoreNetworkArn string
CoreNetworkID string
EdgeLocation string
PeeringID string
PeeringType string
ResourceArn string
State string
TransitGatewayArn string
TransitGatewayPeeringAttachmentID string
LastModificationErrors []PeeringError
}
Peering is this backend's flat representation of the base Peering shape (types.Peering) plus TransitGatewayPeering's subtype fields -- the only peering subtype today (PeeringType has exactly 1 value).
type PeeringError ¶
PeeringError mirrors types.PeeringError -- this backend never populates a live Peering's LastModificationErrors (no failure-injection engine models a real per-peering error, same as AttachmentError), but the type is declared complete so the wire shape stays correct if that ever changes.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for AWS Network Manager.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the Network Manager service backend and handler.
type RouteAnalysis ¶
type RouteAnalysis struct {
StartTimestamp time.Time
Destination *RouteAnalysisEndpoint
Source *RouteAnalysisEndpoint
ForwardPath *RouteAnalysisPath
ReturnPath *RouteAnalysisPath
GlobalNetworkID string
OwnerAccountID string
RouteAnalysisID string
Status string
IncludeReturnPath bool
UseMiddleboxes bool
}
RouteAnalysis mirrors types.RouteAnalysis.
type RouteAnalysisCompletion ¶
RouteAnalysisCompletion mirrors types.RouteAnalysisCompletion.
type RouteAnalysisEndpoint ¶
type RouteAnalysisEndpoint struct {
IPAddress string
TransitGatewayArn string
TransitGatewayAttachmentArn string
}
RouteAnalysisEndpoint mirrors types.RouteAnalysisEndpointOptions (the resolved echo) built from the caller's RouteAnalysisEndpointOptionsSpecification input.
type RouteAnalysisPath ¶
type RouteAnalysisPath struct {
CompletionStatus *RouteAnalysisCompletion
Path []PathComponent
}
RouteAnalysisPath mirrors types.RouteAnalysisPath. Path is populated only when an EC2Resolver is wired in and the walk actually resolves a route -- see routeanalysis.go's doc comment: never a fabricated PathComponent sequence.
type Site ¶
type Site struct {
CreatedAt time.Time
Tags *tags.Tags
Location *Location
SiteID string
SiteArn string
GlobalNetworkID string
Description string
State string
}
Site mirrors types.Site.
type TaggedResource ¶
TaggedResource is one entry in TaggedResources' cross-service tagging rollup.
type TransitGatewayConnectPeerAssociation ¶
type TransitGatewayConnectPeerAssociation struct {
DeviceID string
GlobalNetworkID string
LinkID string
State string
TransitGatewayConnectPeerArn string
}
TransitGatewayConnectPeerAssociation mirrors types.TransitGatewayConnectPeerAssociation.
type TransitGatewayRegistration ¶
type TransitGatewayRegistration struct {
State *TransitGatewayRegistrationStateReason
GlobalNetworkID string
TransitGatewayArn string
}
TransitGatewayRegistration mirrors types.TransitGatewayRegistration.
type TransitGatewayRegistrationStateReason ¶
TransitGatewayRegistrationStateReason mirrors types.TransitGatewayRegistrationStateReason.
Source Files
¶
- associations.go
- attachments.go
- connectpeers.go
- consts.go
- corenetworkpolicydiff.go
- corenetworks.go
- crossservice.go
- errors.go
- globalnetworks.go
- handler.go
- handler_associations.go
- handler_attachments.go
- handler_connectpeers.go
- handler_corenetworks.go
- handler_globalnetworks.go
- handler_introspection.go
- handler_orgaccess.go
- handler_peerings.go
- handler_resourcepolicy.go
- handler_routeanalysis.go
- handler_tags.go
- introspection.go
- models.go
- orgaccess.go
- peerings.go
- persistence.go
- provider.go
- resourcepolicy.go
- routeanalysis.go
- store.go
- store_setup.go
- tagging.go
- wire.go
- wire_convert.go