outposts

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package outposts emulates the AWS Outposts control-plane API (aws-sdk-go-v2/service/outposts, protocol restjson1).

Index

Constants

View Source
const (
	LifeCycleStatusActive              = "ACTIVE"
	LifeCycleStatusPendingDecommission = "PENDING_DECOMMISSION"
)

LifeCycleStatus values. types.Outpost.LifeCycleStatus is a bare *string with NO enum type anywhere in this SDK module (confirmed: no LifeCycleStatus type exists in types/enums.go) -- these values are a documented, unconfirmed choice (general AWS documentation commonly references ACTIVE/CREATED/ PENDING/DEGRADED, but that is not something this SDK checkout can back with a file:line). See PARITY.md's "Outpost lifecycle" note.

View Source
const (
	ResourceTypeOutpost = "OUTPOST"
	ResourceTypeOrder   = "ORDER"
)

ResourceType wire values (types.ResourceType) -- the ONLY two values this closed enum supports. ConflictException.ResourceType can therefore never legitimately carry "SITE" or "QUOTE"; conflicts on those resources omit ResourceType/ResourceId rather than fabricate an enum value the SDK does not declare. See errors.go.

View Source
const (
	OrderStatusPreparing = "PREPARING"
	OrderStatusCompleted = "COMPLETED"
	OrderStatusCancelled = "CANCELLED"
)

OrderStatus wire values (types.OrderStatus). This backend only ever produces Preparing, Completed, Cancelled, and Error -- the deprecated (RECEIVED/PENDING/PROCESSING/INSTALLING/FULFILLED) and intermediate (IN_PROGRESS/DELIVERED) values are real, wire-accurate constants this emulator declares no transition path through. See PARITY.md's "Order lifecycle" note for the single-hop simplification this mirrors from services/grafana's workspace-transition pattern.

View Source
const (
	LineItemStatusPreparing = "PREPARING"
	LineItemStatusInstalled = "INSTALLED"
	LineItemStatusCancelled = "CANCELLED"
)

LineItemStatus wire values (types.LineItemStatus) this backend produces.

View Source
const (
	QuoteStatusCreated        = "CREATED"
	QuoteStatusOrderSubmitted = "ORDER_SUBMITTED"
	QuoteStatusExpired        = "EXPIRED"
)

QuoteStatus wire values (types.QuoteStatus).

View Source
const (
	OrderingRequirementTypeOutpostIDMissing = "OUTPOST_ID_MISSING_ON_QUOTE_ERROR"
	OrderingRequirementTypeOutpostActive    = "OUTPOST_ACTIVE_CHECK_ERROR"

	OrderingRequirementStatusPass   = "PASS"
	OrderingRequirementStatusFail   = "FAIL"
	OrderingRequirementStatusExempt = "EXEMPT"
)

OrderingRequirementType/OrderingRequirementStatus subset this backend actually evaluates -- see quotes.go's buildOrderingRequirements. The other 15 OrderingRequirementType enum values declared by the SDK (ENTERPRISE_SUPPORT_ERROR, VALID_ZIP_CODE_CHECK_ERROR, etc.) are real, wire-accurate constants this emulator has no backing state to evaluate -- see PARITY.md.

View Source
const (
	CapacityTaskStatusRequested = "REQUESTED"
	CapacityTaskStatusCompleted = "COMPLETED"
	CapacityTaskStatusCancelled = "CANCELLED"
)

CapacityTaskStatus wire values (types.CapacityTaskStatus) this backend produces. WAITING_FOR_EVACUATION never occurs: it requires a live blocking EC2 instance, and this backend has no cross-service instance-placement data (see ListAssetInstances/ListBlockingInstancesForCapacityTask, always empty) -- see PARITY.md.

View Source
const (
	DecommissionStatusRequested = "REQUESTED"
	DecommissionStatusSkipped   = "SKIPPED"
	DecommissionStatusBlocked   = "BLOCKED"
)

DecommissionRequestStatus wire values (types.DecommissionRequestStatus).

View Source
const (
	SubscriptionStatusActive = "ACTIVE"
	SubscriptionTypeOriginal = "ORIGINAL"
	SubscriptionTypeRenewal  = "RENEWAL"
)

SubscriptionStatus/SubscriptionType wire values.

View Source
const (
	HardwareTypeRack   = "RACK"
	HardwareTypeServer = "SERVER"
)

SupportedHardwareType wire values (types.SupportedHardwareType), also reused as CatalogItemClass values (types.CatalogItemClass shares the same two RACK/SERVER strings) and OrderableInstanceType.FormFactor.

View Source
const (
	PaymentOptionAllUpfront     = "ALL_UPFRONT"
	PaymentOptionPartialUpfront = "PARTIAL_UPFRONT"
	PaymentOptionNoUpfront      = "NO_UPFRONT"
)

PaymentOption wire values (types.PaymentOption).

View Source
const (
	PaymentTermOneYear    = "ONE_YEAR"
	PaymentTermThreeYears = "THREE_YEARS"
	PaymentTermFiveYears  = "FIVE_YEARS"
)

PaymentTerm wire values (types.PaymentTerm).

View Source
const (
	QuoteCapacityTypeEC2 = "EC2"
	QuoteCapacityTypeEBS = "EBS"
	QuoteCapacityTypeS3  = "S3"
)

QuoteCapacityType wire values (types.QuoteCapacityType).

View Source
const (
	AddressTypeShipping  = "SHIPPING_ADDRESS"
	AddressTypeOperating = "OPERATING_ADDRESS"
)

AddressType wire values (types.AddressType).

View Source
const (
	PricingResultPriced        = "PRICED"
	PricingResultUnableToPrice = "UNABLE_TO_PRICE"
)

PricingResult wire values (types.PricingResult).

View Source
const (
	AssetStateActive = "ACTIVE"
)

ComputeAssetState / AssetState wire values this backend produces for the single seeded asset per Outpost.

View Source
const (
	AssetTypeCompute = "COMPUTE"
)

AssetType wire values (types.AssetType) this backend produces.

Variables

View Source
var ErrNilAppContext = errors.New("AppContext is required")

ErrNilAppContext is returned by Provider.Init when appCtx is nil.

Functions

This section is empty.

Types

type Address

type Address struct {
	AddressLine1       string
	AddressLine2       string
	AddressLine3       string
	City               string
	ContactName        string
	ContactPhoneNumber string
	CountryCode        string
	DistrictOrCounty   string
	Municipality       string
	PostalCode         string
	StateOrRegion      string
}

Address mirrors types.Address.

type Asset

type Asset struct {
	ComputeAttributes *ComputeAttributes
	ID                string
	OutpostID         string
	RackID            string
	AssetType         string
	RackElevation     float32
}

Asset is the internal state of one hardware asset on an Outpost. Real Outposts assets arrive via physical hardware installation, not a public CreateAsset API (there is none among these 43 operations) -- this backend seeds exactly one COMPUTE asset per created Outpost so capacity-task and asset-listing operations have real state to read and mutate. See PARITY.md's "Asset seeding" note.

type CapacityTask

type CapacityTask struct {
	CreationDate                  time.Time
	LastModifiedDate              time.Time
	CompletionDate                time.Time
	Failed                        *CapacityTaskFailure
	InstancesToExclude            *InstancesToExclude
	ID                            string
	OutpostID                     string
	AssetID                       string
	OrderID                       string
	Status                        string
	TaskActionOnBlockingInstances string
	RequestedInstancePools        []InstanceTypeCapacity
	DryRun                        bool
}

CapacityTask is the internal state of one capacity task.

type CapacityTaskFailure

type CapacityTaskFailure struct {
	Reason string
	Type   string
}

CapacityTaskFailure mirrors types.CapacityTaskFailure.

type CatalogItem

type CatalogItem struct {
	ID                  string
	ItemClass           string
	ItemStatus          string
	SupportedStorage    []string
	SupportedUplinkGbps []int32
	EC2Capacities       []EC2Capacity
	PowerKva            float32
	WeightLbs           int32
}

CatalogItem is a static reference-catalog entry (see seed_data.go). ItemClass is filterable (ListCatalogItemsInput.ItemClassFilter) but is not a field on the real types.CatalogItem output shape -- it is kept here for internal filtering only and is never serialized on the wire.

type ComputeAttributes

type ComputeAttributes struct {
	HostID                 string
	State                  string
	InstanceFamilies       []string
	InstanceTypeCapacities []InstanceTypeCapacity
	MaxVcpus               int32
}

ComputeAttributes mirrors types.ComputeAttributes.

type Connection

type Connection struct {
	ID                  string
	AssetID             string
	ClientPublicKey     string
	ServerPublicKey     string
	ClientTunnelAddress string
	ServerTunnelAddress string
	ServerEndpoint      string
	UnderlayIPAddress   string
	AllowedIps          []string
}

Connection is the internal state of one WireGuard-style installation tunnel (StartConnection/GetConnection). Every cryptographic-looking field is a synthetic placeholder, not real key material -- see PARITY.md.

type CreateRenewalResult

type CreateRenewalResult struct {
	Currency              string
	OutpostID             string
	PaymentOption         string
	PaymentTerm           string
	MonthlyRecurringPrice float32
	UpfrontPrice          float32
}

CreateRenewalResult is CreateRenewal's flat response shape (also the idempotency-cache value type -- see store.go's renewalIdempotency). It is exported (unlike CreateRenewal's unexported request type) to match this package's convention: CreateOutpost, CreateQuote, CreateSite, and StartConnection all return an exported result type while taking an unexported request DTO.

type EC2Capacity

type EC2Capacity struct {
	Family   string
	MaxSize  string
	Quantity string
}

EC2Capacity mirrors types.EC2Capacity. Quantity and MaxSize are strings on the real wire type (not numeric), despite looking like they should be int32 -- confirmed from the SDK's types.go, preserved here deliberately.

type Handler

type Handler struct {
	Backend   *InMemoryBackend
	AccountID string
	Region    string
}

Handler is the HTTP handler for the AWS Outposts API.

func NewHandler

func NewHandler(backend *InMemoryBackend) *Handler

NewHandler creates a new Outposts handler.

func (*Handler) ChaosOperations

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

ChaosOperations returns all operations that can be fault-injected.

func (*Handler) ChaosRegions

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

ChaosRegions returns all regions this handler handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

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

func (*Handler) ExtractOperation

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

ExtractOperation extracts the operation name 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 every operation this handler routes -- all 43 operations on the aws-sdk-go-v2/service/outposts 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 Outposts 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 clears all stored state in the backend.

func (*Handler) Restore

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

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

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

RouteMatcher returns a function that matches Outposts API requests.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable by delegating to the backend.

type InMemoryBackend

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

InMemoryBackend is the in-memory store for AWS Outposts.

A single coarse lock guards every collection below: operations routinely cross resource boundaries (CreateOutpost seeds an Asset; StartCapacityTask reads an Asset and writes a CapacityTask; CreateOrder reads a Quote and writes an Order; TagResource resolves an ARN into either the Outposts or Sites table), 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 Outposts backend.

func (*InMemoryBackend) AccountID

func (b *InMemoryBackend) AccountID() string

AccountID returns the account ID for this backend.

func (*InMemoryBackend) CancelCapacityTask

func (b *InMemoryBackend) CancelCapacityTask(outpostIdentifier, capacityTaskID string) error

CancelCapacityTask cancels the capacity task identified by (outpostIdentifier, capacityTaskID). Rejected (ConflictException) once the task has already reached a terminal state. This backend transitions directly to CANCELLED rather than pausing at the transient CANCELLATION_IN_PROGRESS state -- a documented simplification, since cancellation here is synchronous (there is no real hardware-side cleanup to wait for) -- see PARITY.md.

func (*InMemoryBackend) CancelOrder

func (b *InMemoryBackend) CancelOrder(id string) error

CancelOrder cancels the order with the given ID. Rejected (ConflictException) once the order has already reached a terminal state.

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

func (b *InMemoryBackend) CreateOrder(req *createOrderRequest) (*Order, error)

CreateOrder creates a new order against an existing Outpost, optionally consuming a Quote, and schedules its async single-hop completion (see scheduleOrderCompletion) -- OrderType is always "OUTPOST": CreateOrderInput has no OrderType member, so "REPLACEMENT" can never be produced by this API surface (see models.go's Order doc comment).

func (*InMemoryBackend) CreateOutpost

func (b *InMemoryBackend) CreateOutpost(req *createOutpostRequest) (*Outpost, error)

CreateOutpost creates a new Outpost belonging to an existing Site, and seeds it with one COMPUTE asset (see assets.go's seedAssetForOutpostLocked).

func (*InMemoryBackend) CreateQuote

func (b *InMemoryBackend) CreateQuote(req *createQuoteRequest) (*Quote, error)

CreateQuote creates a new quote, optionally associated with an existing Outpost.

func (*InMemoryBackend) CreateRenewal

func (b *InMemoryBackend) CreateRenewal(idOrARN string, req *createRenewalRequest) (*CreateRenewalResult, error)

CreateRenewal computes and records a renewal subscription for the Outpost identified by idOrARN. A non-empty ClientToken is honored as an idempotency key (see PARITY.md trap #8): a retried request with the same (Outpost, ClientToken) pair replays the original response without recomputing or re-recording a new subscription.

func (*InMemoryBackend) CreateSite

func (b *InMemoryBackend) CreateSite(req *createSiteRequest) (*Site, error)

CreateSite creates a new Outposts Site.

func (*InMemoryBackend) DeleteOutpost

func (b *InMemoryBackend) DeleteOutpost(idOrARN string) error

DeleteOutpost deletes the Outpost identified by idOrARN, along with its seeded assets. Rejected (ConflictException) while a capacity task is still REQUESTED against it -- a real FK-integrity check, not a stub.

func (*InMemoryBackend) DeleteQuote

func (b *InMemoryBackend) DeleteQuote(id string) error

DeleteQuote deletes the quote with the given ID.

func (*InMemoryBackend) DeleteSite

func (b *InMemoryBackend) DeleteSite(idOrARN string) error

DeleteSite deletes the Site identified by idOrARN. Rejected (ConflictException) while any Outpost still references it -- a real FK-integrity check.

func (*InMemoryBackend) GetCapacityTask

func (b *InMemoryBackend) GetCapacityTask(outpostIdentifier, capacityTaskID string) (*CapacityTask, error)

GetCapacityTask returns a copy of the capacity task identified by (outpostIdentifier, capacityTaskID).

func (*InMemoryBackend) GetCatalogItem

func (b *InMemoryBackend) GetCatalogItem(id string) (CatalogItem, error)

GetCatalogItem returns the seeded catalog item with the given ID (a static reference catalog -- see seed_data.go).

func (*InMemoryBackend) GetConnection

func (b *InMemoryBackend) GetConnection(id string) (*Connection, error)

GetConnection returns a copy of the connection with the given ID.

func (*InMemoryBackend) GetOrder

func (b *InMemoryBackend) GetOrder(id string) (*Order, error)

GetOrder returns a copy of the order with the given ID (Orders have no ARN form -- GetOrderInput.OrderId is "The ID of the order", not "ID or ARN").

func (*InMemoryBackend) GetOutpost

func (b *InMemoryBackend) GetOutpost(idOrARN string) (*Outpost, error)

GetOutpost returns a copy of the Outpost identified by idOrARN.

func (*InMemoryBackend) GetOutpostBillingInformation

func (b *InMemoryBackend) GetOutpostBillingInformation(idOrARN string) (*Outpost, error)

GetOutpostBillingInformation returns a copy of the Outpost identified by idOrARN, for the handler to read PaymentOption/PaymentTerm/ ContractEndDate/Subscriptions off of.

func (*InMemoryBackend) GetOutpostInstanceTypes

func (b *InMemoryBackend) GetOutpostInstanceTypes(idOrARN string) (*Outpost, []InstanceTypeCapacity, error)

GetOutpostInstanceTypes returns the Outpost (for OutpostArn/OutpostId in the response) and the instance-type capacities CURRENTLY CONFIGURED on it -- the aggregate of every seeded Asset's ComputeAttributes.InstanceTypeCapacities, which StartCapacityTask mutates on completion. This is deliberately distinct from GetOutpostSupportedInstanceTypes (below), which answers a different question -- see PARITY.md's trap #5.

func (*InMemoryBackend) GetOutpostSupportedInstanceTypes

func (b *InMemoryBackend) GetOutpostSupportedInstanceTypes(
	idOrARN, assetID, orderID string,
) ([]OrderableInstanceType, error)

GetOutpostSupportedInstanceTypes returns everything the Outpost's hardware type could support -- a superset that "generally include[s] instance types that are not currently configured" per the SDK's own doc comment. assetID/orderID, if given, must reference real resources but do not further filter the (already small, static) result set -- a documented simplification, see PARITY.md.

func (*InMemoryBackend) GetQuote

func (b *InMemoryBackend) GetQuote(id string) (*Quote, error)

GetQuote returns a copy of the quote with the given ID (Quotes have no ARN form -- GetQuoteInput.QuoteIdentifier is "The ID of the quote").

func (*InMemoryBackend) GetRenewalPricing

func (b *InMemoryBackend) GetRenewalPricing(idOrARN string) (string, []PricingOption, error)

GetRenewalPricing returns the renewal pricing options for the Outpost identified by idOrARN. Only an ACTIVE Outpost can be priced -- an Outpost pending decommission returns UNABLE_TO_PRICE with no options, a chosen, documented interpretation of an otherwise-unspecified case (see PARITY.md).

func (*InMemoryBackend) GetSite

func (b *InMemoryBackend) GetSite(idOrARN string) (*Site, error)

GetSite returns a copy of the Site identified by idOrARN.

func (*InMemoryBackend) GetSiteAddress

func (b *InMemoryBackend) GetSiteAddress(idOrARN, addressType string) (*Address, error)

GetSiteAddress returns the address of the given type for the Site identified by idOrARN.

func (*InMemoryBackend) ListAssetInstances

func (b *InMemoryBackend) ListAssetInstances(outpostIdentifier string) error

ListAssetInstances returns the EC2 instances placed on outpostIdentifier's assets. This backend has no cross-service EC2-on-Outposts placement data (see PARITY.md's "EC2 capacity coupling" gap) -- after validating the Outpost exists, it always returns an empty, real (not fabricated) result, matching parity-principles.md's guidance that a correctly-empty result after real validation is not a stub.

func (*InMemoryBackend) ListAssets

func (b *InMemoryBackend) ListAssets(outpostIdentifier string, f assetFilter) ([]*Asset, error)

ListAssets returns the assets belonging to outpostID, filtered by f, or a NotFoundException if the Outpost does not exist.

func (*InMemoryBackend) ListBlockingInstancesForCapacityTask

func (b *InMemoryBackend) ListBlockingInstancesForCapacityTask(outpostIdentifier, capacityTaskID string) error

ListBlockingInstancesForCapacityTask validates that (outpostIdentifier, capacityTaskID) resolves to a real capacity task, then always returns an empty result -- this backend has no cross-service EC2-on-Outposts placement data (see PARITY.md's "EC2 capacity coupling" gap), so a correctly-empty result after real validation is not a stub (see parity-principles.md).

func (*InMemoryBackend) ListCapacityTasks

func (b *InMemoryBackend) ListCapacityTasks(f capacityTaskFilter, token string, limit int) page.Page[*CapacityTask]

ListCapacityTasks returns a page of capacity task summaries matching f.

func (*InMemoryBackend) ListCatalogItems

func (b *InMemoryBackend) ListCatalogItems(f catalogItemFilter, token string, limit int) page.Page[CatalogItem]

ListCatalogItems returns a page of the static seeded catalog matching f.

func (*InMemoryBackend) ListOrderableInstanceTypes

func (b *InMemoryBackend) ListOrderableInstanceTypes(
	generationFilter, token string, limit int,
) page.Page[OrderableInstanceType]

ListOrderableInstanceTypes returns a page of the static seeded orderable instance types, optionally filtered by OutpostGeneration.

func (*InMemoryBackend) ListOrders

func (b *InMemoryBackend) ListOrders(outpostIdentifierFilter, token string, limit int) page.Page[*Order]

ListOrders returns a page of order summaries, optionally filtered by outpostIdentifierFilter (an Outpost ID or ARN).

func (*InMemoryBackend) ListOutposts

func (b *InMemoryBackend) ListOutposts(f listOutpostsFilter, token string, limit int) page.Page[*Outpost]

ListOutposts returns a page of Outposts matching f.

func (*InMemoryBackend) ListQuotes

func (b *InMemoryBackend) ListQuotes(token string, limit int) page.Page[*Quote]

ListQuotes returns a page of quotes. ListQuotesInput has no filters at all besides pagination (verified -- see PARITY.md).

func (*InMemoryBackend) ListSites

func (b *InMemoryBackend) ListSites(f listSitesFilter, token string, limit int) page.Page[*Site]

ListSites returns a page of Sites matching f.

func (*InMemoryBackend) ListTagsForResource

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

ListTagsForResource returns the tags for the Outpost or Site identified by resourceArn.

func (*InMemoryBackend) OutpostARN

func (b *InMemoryBackend) OutpostARN(id string) string

OutpostARN builds the ARN for an Outpost ID. Confirmed shape (in-repo test fixture precedent from services/ec2 and services/route53resolver -- see PARITY.md's ARN section): "arn:{partition}:outposts:{region}:{account}:outpost/{id}".

func (*InMemoryBackend) Region

func (b *InMemoryBackend) Region() string

Region returns the AWS region this backend is configured for.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all stored state.

func (*InMemoryBackend) Restore

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

Restore loads backend state from a JSON snapshot.

func (*InMemoryBackend) SiteARN

func (b *InMemoryBackend) SiteARN(id string) string

SiteARN builds the ARN for a Site ID. UNCONFIRMED shape -- no primary source (SDK trait, real Terraform provider, or AWS docs) could confirm the Site ARN resource-path segment; "site/{id}" is a defensible analogy to the confirmed "outpost/{id}" shape, not a verified fact. See PARITY.md.

func (*InMemoryBackend) Snapshot

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

Snapshot serialises the backend state to JSON.

func (*InMemoryBackend) StartCapacityTask

func (b *InMemoryBackend) StartCapacityTask(
	outpostIdentifier string, req *startCapacityTaskRequest,
) (*CapacityTask, error)

StartCapacityTask starts a new capacity task against outpostIdentifier's Outpost. A non-dry-run task is REQUESTED and completes asynchronously (see scheduleCapacityTaskCompletion); a dry run never mutates state and completes synchronously, matching StartCapacityTaskInput.DryRun's doc comment ("does not make any changes to your plan").

func (*InMemoryBackend) StartConnection

func (b *InMemoryBackend) StartConnection(req *startConnectionRequest) (*Connection, error)

StartConnection starts a new installation tunnel against an existing Asset (the Outpost server being installed).

func (*InMemoryBackend) StartOutpostDecommission

func (b *InMemoryBackend) StartOutpostDecommission(idOrARN string, validateOnly bool) (string, error)

StartOutpostDecommission requests decommissioning of the Outpost identified by idOrARN. See PARITY.md's "Outpost lifecycle" note for the SKIPPED/BLOCKED/REQUESTED state machine this implements: SKIPPED when a decommission is already pending (idempotent replay), REQUESTED otherwise (BLOCKED never occurs -- this backend has no cross-service blocking-resource data, so BlockingResourceTypes is always empty). ValidateOnly performs every check but never mutates state.

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(_ context.Context, resourceArn string, newTags map[string]string) error

TagResource adds or updates tags on the Outpost or Site identified by resourceArn.

func (*InMemoryBackend) TaggedResources

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

TaggedResources returns every tagged Outpost and Site, for the resourcegroupstaggingapi integration.

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(_ context.Context, resourceArn string, tagKeys []string) error

UntagResource removes tags from the Outpost or Site identified by resourceArn.

func (*InMemoryBackend) UpdateOutpost

func (b *InMemoryBackend) UpdateOutpost(idOrARN string, req *updateOutpostRequest) (*Outpost, error)

UpdateOutpost applies a partial update to the Outpost identified by idOrARN.

func (*InMemoryBackend) UpdateQuote

func (b *InMemoryBackend) UpdateQuote(id string, req *updateQuoteRequest) (*Quote, error)

UpdateQuote applies a partial update to the quote with the given ID. UpdateQuoteInput's own wire error set has no ConflictException (verified via serializers/deserializers -- see PARITY.md), so this never rejects based on the quote's current status, even ORDER_SUBMITTED/EXPIRED -- there is no wire-accurate error to signal that with.

func (*InMemoryBackend) UpdateSite

func (b *InMemoryBackend) UpdateSite(idOrARN string, req *updateSiteRequest) (*Site, error)

UpdateSite applies a partial update to the Site identified by idOrARN.

func (*InMemoryBackend) UpdateSiteAddress

func (b *InMemoryBackend) UpdateSiteAddress(idOrARN, addressType string, addr *Address) (*Address, error)

UpdateSiteAddress replaces the address of the given type for the Site identified by idOrARN with addr (a full replacement, not a merge -- the only PUT in this service, per its own doc comment).

func (*InMemoryBackend) UpdateSiteRackPhysicalProperties

func (b *InMemoryBackend) UpdateSiteRackPhysicalProperties(
	idOrARN string,
	patch *RackPhysicalProperties,
) (*Site, error)

UpdateSiteRackPhysicalProperties merges patch's non-empty fields into the Site identified by idOrARN's RackPhysicalProperties.

type InstanceTypeCapacity

type InstanceTypeCapacity struct {
	InstanceType string
	Count        int32
}

InstanceTypeCapacity mirrors both types.InstanceTypeCapacity and types.AssetInstanceTypeCapacity, which are identically shaped (Count int32, InstanceType string) -- one internal type serves both wire shapes.

type InstancesToExclude

type InstancesToExclude struct {
	AccountIDs []string
	Instances  []string
	Services   []string
}

InstancesToExclude mirrors types.InstancesToExclude.

type LineItem

type LineItem struct {
	LineItemID         string
	CatalogItemID      string
	Status             string
	PreviousLineItemID string
	PreviousOrderID    string
	Quantity           int32
}

LineItem mirrors types.LineItem. AssetInformationList and ShipmentInformation are always empty/nil in this backend -- see PARITY.md's "Order lifecycle" note for why (no real shipment/asset-install data source exists to populate them from).

type Order

type Order struct {
	OrderSubmissionDate   time.Time
	OrderFulfilledDate    time.Time
	ID                    string
	OutpostID             string
	OrderType             string
	Status                string
	PaymentOption         string
	PaymentTerm           string
	QuoteIdentifier       string
	QuoteOptionIdentifier string
	LineItems             []LineItem
}

Order is the internal state of one order. OrderType is always "OUTPOST": CreateOrderInput has no OrderType member, so a "REPLACEMENT" order (the only other enum value) can never be produced by this API surface -- see PARITY.md.

type OrderableInstanceType

type OrderableInstanceType struct {
	InstanceType       string
	NetworkPerformance string
	FormFactor         string
	OutpostGeneration  string
	VCPUs              int32
	MemoryInMib        int32
}

OrderableInstanceType is a static reference-catalog entry (see seed_data.go) backing ListOrderableInstanceTypes and the VCPUs lookup used by GetOutpostInstanceTypes/GetOutpostSupportedInstanceTypes.

type OrderingRequirement

type OrderingRequirement struct {
	OrderingRequirementType string
	Status                  string
	StatusMessage           string
}

OrderingRequirement mirrors types.OrderingRequirement.

type Outpost

type Outpost struct {
	ContractEndDate       time.Time
	Tags                  *tags.Tags
	AvailabilityZoneID    string
	LifeCycleStatus       string
	SiteARN               string
	Name                  string
	Description           string
	AvailabilityZone      string
	ARN                   string
	SiteID                string
	OwnerID               string
	SupportedHardwareType string
	PaymentOption         string
	PaymentTerm           string
	ID                    string
	Subscriptions         []Subscription
}

Outpost is the internal state of one Outpost, a superset of types.Outpost plus the billing/subscription sub-state that GetOutpostBillingInformation exposes but the Outpost type itself does not carry any fields for -- see PARITY.md's "Billing model" note for how this backend accumulates Subscriptions (order fulfillment and CreateRenewal), since types.Outpost has no CreatedDate/ModifiedDate members to hang bookkeeping off of.

type PricingOption

type PricingOption struct {
	Currency              string
	PaymentOption         string
	PaymentTerm           string
	MonthlyRecurringPrice float32
	UpfrontPrice          float32
}

PricingOption mirrors a flattened types.PricingOption + types.SubscriptionPricingDetails (the only PricingType this SDK declares is SUBSCRIPTION, so the union is collapsed to one shape here).

type Provider

type Provider struct{}

Provider implements service.Provider for AWS Outposts.

func (*Provider) Init

Init initializes the Outposts service backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the provider name.

type Quote

type Quote struct {
	CreatedDate      time.Time
	ExpirationDate   time.Time
	ID               string
	AccountID        string
	CountryCode      string
	Description      string
	OutpostID        string
	OutpostARN       string
	Status           string
	StatusMessage    string
	SubmittedOrderID string
	QuoteOptionID    string

	RequestedCapacities     []QuoteCapacity
	RequestedConstraints    []QuoteConstraint
	RequestedPaymentOptions []string
	RequestedPaymentTerms   []string
	OrderingRequirements    []OrderingRequirement
	PricingOptions          []PricingOption
}

Quote is the internal state of one quote. This backend synthesizes a single QuoteOption per quote (QuoteOptionID/PricingOptions below) rather than the full N-option combinatorial shape real AWS could in principle return -- see PARITY.md's "Quote pricing model" note.

type QuoteCapacity

type QuoteCapacity struct {
	QuoteCapacityType string
	Unit              string
	Quantity          float32
}

QuoteCapacity mirrors types.QuoteCapacity.

type QuoteConstraint

type QuoteConstraint struct {
	QuoteConstraintType string
	Value               string
}

QuoteConstraint mirrors types.QuoteConstraint.

type RackPhysicalProperties

type RackPhysicalProperties struct {
	FiberOpticCableType       string
	MaximumSupportedWeightLbs string
	OpticalStandard           string
	PowerConnector            string
	PowerDrawKva              string
	PowerFeedDrop             string
	PowerPhase                string
	UplinkCount               string
	UplinkGbps                string
}

RackPhysicalProperties mirrors types.RackPhysicalProperties. Every member is a small closed enum on the real type; they are stored here as plain strings (the wire value) rather than re-declaring nine near-identical Go enum types.

type Site

type Site struct {
	OperatingAddress       *Address
	ShippingAddress        *Address
	RackPhysicalProperties *RackPhysicalProperties
	Tags                   *tags.Tags
	ID                     string
	ARN                    string
	AccountID              string
	Name                   string
	Description            string
	Notes                  string
}

Site is the internal state of one Outposts Site. ShippingAddress is write-only from the wire's perspective: types.Site (the GetSite/ListSites response shape) only exposes OperatingAddress, flattened to three fields (City/CountryCode/StateOrRegion) -- ShippingAddress only ever surfaces via GetSiteAddress(AddressType=SHIPPING_ADDRESS). See PARITY.md's ARN note for why SiteARN's resource-path segment is a documented, unconfirmed choice.

type Subscription

type Subscription struct {
	BeginDate             time.Time
	EndDate               time.Time
	Currency              string
	SubscriptionID        string
	SubscriptionStatus    string
	SubscriptionType      string
	OrderIDs              []string
	MonthlyRecurringPrice float64
	UpfrontPrice          float64
}

Subscription mirrors types.Subscription, one entry in an Outpost's billing/subscription history (see Outpost.Subscriptions).

type TaggedEntry

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

TaggedEntry is one tagged resource, used by TaggedResources for the resourcegroupstaggingapi integration (cli.go's wireTaggingOutposts).

Jump to

Keyboard shortcuts

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