apigatewayv2

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 36 Imported by: 0

README

API Gateway v2

Parity grade: A · SDK aws-sdk-go-v2/service/apigatewayv2@v1.37.4 · last audited 2026-08-10 (7c8077891)

Coverage

Metric Value
Operations audited 77 (77 ok)
Known gaps 2
Deferred items 3
Resource leaks clean
Known gaps
  • "Quick-create route/stage immutability partially enforced (gopherstack-2tx, narrowed): UpdateRoute now rejects a route-key change on an apiGatewayManaged route ("You can't modify the $default route key") and UpdateStage now rejects any modification of an apiGatewayManaged stage ("You can't modify the $default stage") -- both backed by BadRequestException, which IS in UpdateRoute/UpdateStage's modeled error set (service-2.json). Still NOT enforced: DeleteRoute/DeleteStage/DeleteIntegration on a managed resource. Deliberately not extended there: those three operations' error sets in service-2.json list only NotFoundException/ TooManyRequestsException, no BadRequestException or ConflictException, so there is no wire-verifiable error code to reject with -- guessing one would violate the wire-verification principle the same way UpdateRoute/UpdateStage's prior deferral (re-confirmed open, then narrowed this pass) originally cited."
  • "ImportApi/ReimportApi's basepath query param now supports "prepend" (prefixes route paths with the spec's declared base path -- Swagger 2 basePath or OpenAPI 3 servers[0].url's path). "split" is not implemented (falls back to ignore-like behavior): API Gateway's split semantics (part of the base path becomes an ApiMapping key, part stays in routes) aren't described by the SDK wire model, only by prose docs, so implementing it would mean guessing at unverified behavior. failOnWarnings is now read and validated (boolean) but has no observable effect: the emulator's OpenAPI import (parseOpenAPISpec/applyOpenAPIToAPI) never generates import warnings for any spec it accepts (see Notes #8), so there is never a warning for failOnWarnings to escalate into an error. Not fabricating warning-generation heuristics to manufacture an effect -- see the existing trap note on API.ImportInfo/Warnings below. bd: gopherstack-jni0, narrowed to these two residual items."
Deferred
  • Portal / PortalProduct / ProductPage / ProductRestEndpointPage field-level wire audit (family confirmed fully implemented this pass, but not re-verified field-by-field against botocore)
  • ImportApi/ReimportApi basepath=split; failOnWarnings real effect (see gaps, bd gopherstack-jni0)
  • Quick-create DeleteRoute/DeleteStage/DeleteIntegration rejection (see gaps, bd gopherstack-2tx)

More

Documentation

Index

Constants

View Source
const (
	// IntegrationTypeAWSProxy is the AWS_PROXY integration type.
	IntegrationTypeAWSProxy = "AWS_PROXY"
)

Variables

View Source
var (
	// ErrAPINotFound is returned when a requested API does not exist.
	ErrAPINotFound = errors.New("NotFoundException")
	// ErrStageNotFound is returned when a requested stage does not exist.
	ErrStageNotFound = errors.New("NotFoundException")
	// ErrRouteNotFound is returned when a requested route does not exist.
	ErrRouteNotFound = errors.New("NotFoundException")
	// ErrIntegrationNotFound is returned when a requested integration does not exist.
	ErrIntegrationNotFound = errors.New("NotFoundException")
	// ErrDeploymentNotFound is returned when a requested deployment does not exist.
	ErrDeploymentNotFound = errors.New("NotFoundException")
	// ErrAuthorizerNotFound is returned when a requested authorizer does not exist.
	ErrAuthorizerNotFound = errors.New("NotFoundException")
	// ErrDomainNameNotFound is returned when a requested domain name does not exist.
	ErrDomainNameNotFound = errors.New("NotFoundException")
	// ErrAPIMappingNotFound is returned when a requested API mapping does not exist.
	ErrAPIMappingNotFound = errors.New("NotFoundException")
	// ErrIntegrationResponseNotFound is returned when a requested integration response does not exist.
	ErrIntegrationResponseNotFound = errors.New("NotFoundException")
	// ErrModelNotFound is returned when a requested model does not exist.
	ErrModelNotFound = errors.New("NotFoundException")
	// ErrRouteResponseNotFound is returned when a requested route response does not exist.
	ErrRouteResponseNotFound = errors.New("NotFoundException")
	// ErrPortalNotFound is returned when a requested portal does not exist.
	ErrPortalNotFound = errors.New("NotFoundException")
	// ErrPortalProductNotFound is returned when a requested portal product does not exist.
	ErrPortalProductNotFound = errors.New("NotFoundException")
	// ErrBadRequest is returned when required fields are missing or invalid.
	ErrBadRequest = errors.New("BadRequestException")
	// ErrAlreadyExists is returned when a resource with the same identifier already exists.
	ErrAlreadyExists = awserr.New("ConflictException", awserr.ErrAlreadyExists)
	// ErrProductPageNotFound is returned when a requested product page does not exist.
	ErrProductPageNotFound = errors.New("NotFoundException")
	// ErrProductREPageNotFound is returned when a requested product REST endpoint page does not exist.
	ErrProductREPageNotFound = errors.New("NotFoundException")
	// ErrVpcLinkNotFound is returned when a requested VPC link does not exist.
	ErrVpcLinkNotFound = errors.New("NotFoundException")
	// ErrRoutingRuleNotFound is returned when a requested routing rule does not exist.
	ErrRoutingRuleNotFound = errors.New("NotFoundException")
)
View Source
var (
	ErrUnsupportedType  = errors.New("unsupported integration type")
	ErrInvalidLambdaArn = errors.New("invalid lambda arn")
)

Functions

func EvalRouteSelectionExpression

func EvalRouteSelectionExpression(expr string, r *http.Request) string

EvalRouteSelectionExpression evaluates an AWS API Gateway v2 route-selection expression against an HTTP request.

AWS API Gateway v2 uses route-selection expressions to determine which route handles an incoming request. The expression supports variable substitution using ${<variable>} placeholders.

Supported variables:

  • ${request.method} — HTTP method (e.g. "GET")
  • ${request.path} — Full request path (e.g. "/items/123")
  • ${request.header.<name>} — Value of the named request header
  • ${request.querystring.<name>} — Value of the named query-string parameter
  • ${request.body.<path>} — Value of the dot-separated JSON path in the request body (e.g. ${request.body.action} or ${request.body.detail.type}); resolves to empty string when the body is absent, not JSON, or the field is missing.

If expr is empty the literal "$default" route key is returned, which is the catch-all route AWS uses when no other route matches.

Types

type ACMManaged added in v1.3.1

type ACMManaged struct {
	CertificateArn string `json:"certificateArn"`
	DomainName     string `json:"domainName"`
}

ACMManaged mirrors types.ACMManaged (types.go:24): both members are required whenever ACMManaged is present (verified against validateACMManaged, validators.go).

type API

type API struct {
	CorsConfiguration         *CorsConfiguration `json:"corsConfiguration,omitempty"`
	CreatedDate               isoTime            `json:"createdDate"`
	Tags                      map[string]string  `json:"tags,omitempty"`
	APIID                     string             `json:"apiId"`
	Name                      string             `json:"name"`
	Description               string             `json:"description,omitempty"`
	ProtocolType              string             `json:"protocolType"`
	RouteSelectionExpression  string             `json:"routeSelectionExpression,omitempty"`
	APIEndpoint               string             `json:"apiEndpoint,omitempty"`
	Version                   string             `json:"version,omitempty"`
	APIKeySelectionExpression string             `json:"apiKeySelectionExpression,omitempty"`
	// IPAddressType is the IP address types that can invoke the API: "ipv4"
	// (default) or "dualstack".
	IPAddressType string `json:"ipAddressType,omitempty"`
	// ImportInfo carries validation feedback from an ImportApi/ReimportApi
	// call about OpenAPI properties ignored during import. Always empty for
	// an API created via CreateApi (not applicable) or via a well-formed
	// import (no properties ignored).
	ImportInfo []string `json:"importInfo,omitempty"`
	// Warnings carries warning messages reported when FailOnWarnings is set
	// during an ImportApi/ReimportApi call. Always empty for an API created
	// via CreateApi, or a well-formed import.
	Warnings                  []string `json:"warnings,omitempty"`
	DisableSchemaValidation   bool     `json:"disableSchemaValidation,omitempty"`
	DisableExecuteAPIEndpoint bool     `json:"disableExecuteApiEndpoint,omitempty"`
}

API represents an HTTP API (API Gateway v2).

type APIMapping

type APIMapping struct {
	APIID         string `json:"apiId"`
	APIMappingID  string `json:"apiMappingId"`
	DomainName    string `json:"-"`
	Stage         string `json:"stage"`
	APIMappingKey string `json:"apiMappingKey,omitempty"`
}

APIMapping represents an API mapping for a custom domain name.

type AccessLogSettings

type AccessLogSettings struct {
	DestinationArn string `json:"destinationArn,omitempty"`
	Format         string `json:"format,omitempty"`
}

AccessLogSettings holds access log destination settings for a stage.

type Authorization added in v1.3.1

type Authorization struct {
	CognitoConfig *CognitoConfig `json:"cognitoConfig,omitempty"`
	None          *None          `json:"none,omitempty"`
}

Authorization mirrors types.Authorization (types.go:142), a union of CognitoConfig and None. Neither branch is required by validateAuthorization -- only Authorization itself is required on CreatePortalInput.

type Authorizer

type Authorizer struct {
	JwtConfiguration               *JwtConfiguration `json:"jwtConfiguration,omitempty"`
	AuthorizerID                   string            `json:"authorizerId"`
	APIID                          string            `json:"-"`
	Name                           string            `json:"name"`
	AuthorizerType                 string            `json:"authorizerType"`
	AuthorizerURI                  string            `json:"authorizerUri,omitempty"`
	AuthorizerCredentialsArn       string            `json:"authorizerCredentialsArn,omitempty"`
	AuthorizerPayloadFormatVersion string            `json:"authorizerPayloadFormatVersion,omitempty"`
	IdentitySource                 []string          `json:"identitySource,omitempty"`
	AuthorizerResultTTLInSeconds   int32             `json:"authorizerResultTtlInSeconds,omitempty"`
	EnableSimpleResponses          bool              `json:"enableSimpleResponses,omitempty"`
}

Authorizer represents an authorizer for an HTTP API.

type CognitoConfig added in v1.3.1

type CognitoConfig struct {
	AppClientID    string `json:"appClientId"`
	UserPoolArn    string `json:"userPoolArn"`
	UserPoolDomain string `json:"userPoolDomain"`
}

CognitoConfig mirrors types.CognitoConfig (types.go:245): all three members are required whenever CognitoConfig is present (verified against validateCognitoConfig, validators.go).

type CorsConfiguration

type CorsConfiguration struct {
	AllowOrigins     []string `json:"allowOrigins,omitempty"`
	AllowMethods     []string `json:"allowMethods,omitempty"`
	AllowHeaders     []string `json:"allowHeaders,omitempty"`
	ExposeHeaders    []string `json:"exposeHeaders,omitempty"`
	MaxAge           int32    `json:"maxAge,omitempty"`
	AllowCredentials bool     `json:"allowCredentials,omitempty"`
}

CorsConfiguration holds CORS settings for an HTTP API.

type CreateAPIInput

type CreateAPIInput struct {
	CorsConfiguration         *CorsConfiguration `json:"corsConfiguration,omitempty"`
	Tags                      map[string]string  `json:"tags,omitempty"`
	Name                      string             `json:"name"`
	Description               string             `json:"description,omitempty"`
	ProtocolType              string             `json:"protocolType"`
	RouteSelectionExpression  string             `json:"routeSelectionExpression,omitempty"`
	Version                   string             `json:"version,omitempty"`
	APIKeySelectionExpression string             `json:"apiKeySelectionExpression,omitempty"`
	// RouteKey and Target together drive CreateApi's "quick create" shortcut
	// (HTTP APIs only): when both are set, the backend auto-provisions a
	// $default route, an integration targeting Target, and an auto-deployed
	// $default stage, all marked apiGatewayManaged.
	RouteKey string `json:"routeKey,omitempty"`
	Target   string `json:"target,omitempty"`
	// CredentialsArn is part of quick create: the credentials (IAM role ARN)
	// for the auto-provisioned integration, if any.
	CredentialsArn string `json:"credentialsArn,omitempty"`
	// IPAddressType is the IP address types that can invoke the API: "ipv4"
	// (default) or "dualstack".
	IPAddressType             string `json:"ipAddressType,omitempty"`
	DisableSchemaValidation   bool   `json:"disableSchemaValidation,omitempty"`
	DisableExecuteAPIEndpoint bool   `json:"disableExecuteApiEndpoint,omitempty"`
}

CreateAPIInput is the input for CreateAPI.

type CreateAPIMappingInput

type CreateAPIMappingInput struct {
	APIID         string `json:"apiId"`
	Stage         string `json:"stage"`
	APIMappingKey string `json:"apiMappingKey,omitempty"`
}

CreateAPIMappingInput is the input for CreateAPIMapping.

type CreateAuthorizerInput

type CreateAuthorizerInput struct {
	JwtConfiguration               *JwtConfiguration `json:"jwtConfiguration,omitempty"`
	Name                           string            `json:"name"`
	AuthorizerType                 string            `json:"authorizerType"`
	AuthorizerURI                  string            `json:"authorizerUri,omitempty"`
	AuthorizerCredentialsArn       string            `json:"authorizerCredentialsArn,omitempty"`
	AuthorizerPayloadFormatVersion string            `json:"authorizerPayloadFormatVersion,omitempty"`
	IdentitySource                 []string          `json:"identitySource,omitempty"`
	AuthorizerResultTTLInSeconds   int32             `json:"authorizerResultTtlInSeconds,omitempty"`
	EnableSimpleResponses          bool              `json:"enableSimpleResponses,omitempty"`
}

CreateAuthorizerInput is the input for CreateAuthorizer.

type CreateDeploymentInput

type CreateDeploymentInput struct {
	Description string `json:"description,omitempty"`
	StageName   string `json:"stageName,omitempty"`
}

CreateDeploymentInput is the input for CreateDeployment.

type CreateDomainNameInput

type CreateDomainNameInput struct {
	MutualTLSAuthentication  *MutualTLSAuthentication  `json:"mutualTlsAuthentication,omitempty"`
	Tags                     map[string]string         `json:"tags,omitempty"`
	DomainNameValue          string                    `json:"domainName"`
	RoutingMode              string                    `json:"routingMode,omitempty"`
	DomainNameConfigurations []DomainNameConfiguration `json:"domainNameConfigurations,omitempty"`
}

CreateDomainNameInput is the input for CreateDomainName.

type CreateIntegrationInput

type CreateIntegrationInput struct {
	TLSConfig                   *IntegrationTLSConfig `json:"tlsConfig,omitempty"`
	RequestParameters           map[string]string     `json:"requestParameters,omitempty"`
	RequestTemplates            map[string]string     `json:"requestTemplates,omitempty"`
	IntegrationType             string                `json:"integrationType"`
	IntegrationSubtype          string                `json:"integrationSubtype,omitempty"`
	IntegrationMethod           string                `json:"integrationMethod,omitempty"`
	IntegrationURI              string                `json:"integrationUri,omitempty"`
	Description                 string                `json:"description,omitempty"`
	PayloadFormatVersion        string                `json:"payloadFormatVersion,omitempty"`
	ConnectionType              string                `json:"connectionType,omitempty"`
	ConnectionID                string                `json:"connectionId,omitempty"`
	TemplateSelectionExpression string                `json:"templateSelectionExpression,omitempty"`
	PassthroughBehavior         string                `json:"passthroughBehavior,omitempty"`
	CredentialsArn              string                `json:"credentialsArn,omitempty"`
	TimeoutInMillis             int32                 `json:"timeoutInMillis,omitempty"`
}

CreateIntegrationInput is the input for CreateIntegration.

type CreateIntegrationResponseInput

type CreateIntegrationResponseInput struct {
	ResponseParameters          map[string]string `json:"responseParameters,omitempty"`
	ResponseTemplates           map[string]string `json:"responseTemplates,omitempty"`
	IntegrationResponseKey      string            `json:"integrationResponseKey"`
	ContentHandlingStrategy     string            `json:"contentHandlingStrategy,omitempty"`
	TemplateSelectionExpression string            `json:"templateSelectionExpression,omitempty"`
}

CreateIntegrationResponseInput is the input for CreateIntegrationResponse.

type CreateModelInput

type CreateModelInput struct {
	Name        string `json:"name"`
	Schema      string `json:"schema,omitempty"`
	ContentType string `json:"contentType,omitempty"`
	Description string `json:"description,omitempty"`
}

CreateModelInput is the input for CreateModel.

type CreatePortalInput

type CreatePortalInput struct {
	Authorization         *Authorization                `json:"authorization"`
	EndpointConfiguration *EndpointConfigurationRequest `json:"endpointConfiguration"`
	PortalContent         *PortalContent                `json:"portalContent"`
	Tags                  map[string]string             `json:"tags,omitempty"`
	LogoURI               string                        `json:"logoUri,omitempty"`
}

CreatePortalInput is the input for CreatePortal.

type CreatePortalProductInput

type CreatePortalProductInput struct {
	Tags        map[string]string `json:"tags,omitempty"`
	DisplayName string            `json:"displayName"`
	Description string            `json:"description,omitempty"`
}

CreatePortalProductInput is the input for CreatePortalProduct.

type CreateProductPageInput

type CreateProductPageInput struct {
	DisplayContent  map[string]any `json:"displayContent,omitempty"`
	PortalProductID string         `json:"-"`
}

CreateProductPageInput is the input for CreateProductPage. DisplayContent is a real, required CreateProductPageInput member (aws-sdk-go-v2/service/apigatewayv2@v1.37.4's api_op_CreateProductPage.go) this backend previously dropped entirely -- the handler decoded a request body into this struct, which had no field to receive it.

type CreateProductRestEndpointPageInput

type CreateProductRestEndpointPageInput struct {
	RestEndpointIdentifier *RestEndpointIdentifier `json:"restEndpointIdentifier"`
	DisplayContent         map[string]any          `json:"displayContent,omitempty"`
	PortalProductID        string                  `json:"-"`
}

CreateProductRestEndpointPageInput is the input for CreateProductRestEndpointPage. DisplayContent is a real, optional member (aws-sdk-go-v2/service/apigatewayv2@v1.37.4's api_op_CreateProductRestEndpointPage.go) this backend previously dropped entirely, even though the sibling UpdateProductRestEndpointPage already accepts and stores it correctly on the same ProductRestEndpointPage.DisplayContent field.

type CreateRouteInput

type CreateRouteInput struct {
	RequestModels            map[string]string                 `json:"requestModels,omitempty"`
	RequestParameters        map[string]RouteRequiredParameter `json:"requestParameters,omitempty"`
	RouteKey                 string                            `json:"routeKey"`
	Target                   string                            `json:"target,omitempty"`
	AuthorizationType        string                            `json:"authorizationType,omitempty"`
	AuthorizerID             string                            `json:"authorizerId,omitempty"`
	OperationName            string                            `json:"operationName,omitempty"`
	ModelSelectionExpression string                            `json:"modelSelectionExpression,omitempty"`
	AuthorizationScopes      []string                          `json:"authorizationScopes,omitempty"`
	APIKeyRequired           bool                              `json:"apiKeyRequired,omitempty"`
}

CreateRouteInput is the input for CreateRoute.

type CreateRouteResponseInput

type CreateRouteResponseInput struct {
	ResponseModels           map[string]string `json:"responseModels,omitempty"`
	RouteResponseKey         string            `json:"routeResponseKey"`
	ModelSelectionExpression string            `json:"modelSelectionExpression,omitempty"`
}

CreateRouteResponseInput is the input for CreateRouteResponse.

type CreateRoutingRuleInput

type CreateRoutingRuleInput struct {
	Actions    []RoutingRuleAction    `json:"actions,omitempty"`
	Conditions []RoutingRuleCondition `json:"conditions,omitempty"`
	Priority   int32                  `json:"priority"`
}

CreateRoutingRuleInput is the input for CreateRoutingRule.

type CreateStageInput

type CreateStageInput struct {
	AccessLogSettings    *AccessLogSettings       `json:"accessLogSettings,omitempty"`
	DefaultRouteSettings *RouteSettings           `json:"defaultRouteSettings,omitempty"`
	RouteSettings        map[string]RouteSettings `json:"routeSettings,omitempty"`
	StageVariables       map[string]string        `json:"stageVariables,omitempty"`
	Tags                 map[string]string        `json:"tags,omitempty"`
	StageName            string                   `json:"stageName"`
	DeploymentID         string                   `json:"deploymentId,omitempty"`
	Description          string                   `json:"description,omitempty"`
	ClientCertificateID  string                   `json:"clientCertificateId,omitempty"`
	AutoDeploy           bool                     `json:"autoDeploy"`
}

CreateStageInput is the input for CreateStage.

type CreateVpcLinkInput

type CreateVpcLinkInput struct {
	Tags             map[string]string `json:"tags,omitempty"`
	Name             string            `json:"name"`
	SecurityGroupIDs []string          `json:"securityGroupIds,omitempty"`
	SubnetIDs        []string          `json:"subnetIds,omitempty"`
}

CreateVpcLinkInput is the input for CreateVpcLink.

type CustomColors added in v1.3.1

type CustomColors struct {
	AccentColor          string `json:"accentColor"`
	BackgroundColor      string `json:"backgroundColor"`
	ErrorValidationColor string `json:"errorValidationColor"`
	HeaderColor          string `json:"headerColor"`
	NavigationColor      string `json:"navigationColor"`
	TextColor            string `json:"textColor"`
}

CustomColors mirrors types.CustomColors (types.go:295): all six members are required whenever CustomColors is present (verified against validateCustomColors, validators.go).

type Deployment

type Deployment struct {
	CreatedDate      isoTime `json:"createdDate"`
	DeploymentID     string  `json:"deploymentId"`
	APIID            string  `json:"-"`
	Description      string  `json:"description,omitempty"`
	DeploymentStatus string  `json:"deploymentStatus"`
	AutoDeployed     bool    `json:"autoDeployed"`
}

Deployment represents an API deployment.

type DomainName

type DomainName struct {
	MutualTLSAuthentication       *MutualTLSAuthentication `json:"mutualTlsAuthentication,omitempty"`
	Tags                          map[string]string        `json:"tags,omitempty"`
	DomainNameValue               string                   `json:"domainName"`
	DomainNameArn                 string                   `json:"domainNameArn,omitempty"`
	APIMappingSelectionExpression string                   `json:"apiMappingSelectionExpression,omitempty"`
	// RoutingMode is the routing mode: API_MAPPING_ONLY (default),
	// ROUTING_RULE_ONLY, or ROUTING_RULE_THEN_API_MAPPING. The
	// ROUTING_RULE_* modes only take effect together with RoutingRule
	// resources on this domain name, which are out of scope for this
	// emulator (see gopherstack-e81); the field itself is still stored and
	// round-tripped for wire completeness.
	RoutingMode              string                    `json:"routingMode,omitempty"`
	DomainNameConfigurations []DomainNameConfiguration `json:"domainNameConfigurations"`
}

DomainName represents a custom domain name for API Gateway v2.

type DomainNameConfiguration

type DomainNameConfiguration struct {
	CertificateArn                      string `json:"certificateArn,omitempty"`
	DomainNameStatus                    string `json:"domainNameStatus,omitempty"`
	EndpointType                        string `json:"endpointType,omitempty"`
	SecurityPolicy                      string `json:"securityPolicy,omitempty"`
	APIGatewayDomainName                string `json:"apiGatewayDomainName,omitempty"`
	HostedZoneID                        string `json:"hostedZoneId,omitempty"`
	CertificateName                     string `json:"certificateName,omitempty"`
	OwnershipVerificationCertificateArn string `json:"ownershipVerificationCertificateArn,omitempty"`
}

DomainNameConfiguration represents a domain name configuration entry.

type EndpointConfigurationRequest added in v1.3.1

type EndpointConfigurationRequest struct {
	AcmManaged *ACMManaged `json:"acmManaged,omitempty"`
	None       *None       `json:"none,omitempty"`
}

EndpointConfigurationRequest mirrors types.EndpointConfigurationRequest (types.go:486), a union of ACMManaged and None.

type EndpointConfigurationResponse added in v1.3.1

type EndpointConfigurationResponse struct {
	CertificateArn           string `json:"certificateArn,omitempty"`
	DomainName               string `json:"domainName,omitempty"`
	PortalDefaultDomainName  string `json:"portalDefaultDomainName"`
	PortalDomainHostedZoneID string `json:"portalDomainHostedZoneId"`
}

EndpointConfigurationResponse mirrors types.EndpointConfigurationResponse (types.go:498). PortalDefaultDomainName/PortalDomainHostedZoneId are required response members with no client-supplied equivalent -- this backend synthesizes them the same way it synthesizes ARNs and execute-api endpoints elsewhere (see randomID/defaultRegion), not fabricated business data.

type Handler

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

func NewHandler

func NewHandler(backend StorageBackend) *Handler

NewHandler creates a new API Gateway v2 Handler.

func (*Handler) ChaosOperations

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

ChaosOperations returns all operations that can be fault-injected.

func (*Handler) ChaosRegions

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

ChaosRegions returns all regions this handler instance handles.

func (*Handler) ChaosServiceName

func (h *Handler) ChaosServiceName() string

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

func (*Handler) ExtractOperation

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

ExtractOperation returns the operation name from the request.

func (*Handler) ExtractResource

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

ExtractResource extracts the API ID from the URL path for metrics.

func (*Handler) GetSupportedOperations

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

GetSupportedOperations returns all supported API operations.

func (*Handler) Handler

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

Handler returns the Echo handler function for API Gateway v2 operations.

func (*Handler) MatchPriority

func (h *Handler) MatchPriority() int

MatchPriority returns the routing priority.

func (*Handler) Name

func (h *Handler) Name() string

Name returns the service name.

func (*Handler) Restore

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

Restore implements persistence.Persistable by delegating to the backend.

func (*Handler) RouteMatcher

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

RouteMatcher returns a function matching API Gateway v2 requests.

func (*Handler) SetJWKSProvider

func (h *Handler) SetJWKSProvider(p JWKSProvider)

SetJWKSProvider configures the JWKS provider used to verify JWT authorizer signatures.

func (*Handler) SetLambdaInvoker

func (h *Handler) SetLambdaInvoker(lambda LambdaInvoker)

SetLambdaInvoker configures the Lambda invoker for AWS_PROXY integrations.

func (*Handler) SetManagementAPIBackend

func (h *Handler) SetManagementAPIBackend(managementAPI apigatewaymanagementapi.StorageBackend)

SetManagementAPIBackend configures the Management API backend for WebSocket connections.

func (*Handler) Snapshot

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

Snapshot implements persistence.Persistable by delegating to the backend.

type IdentifierParts added in v1.3.1

type IdentifierParts struct {
	Method    string `json:"method"`
	Path      string `json:"path"`
	RestAPIID string `json:"restApiId"`
	Stage     string `json:"stage"`
}

IdentifierParts mirrors types.IdentifierParts (types.go:551): all four members are required whenever IdentifierParts is present (verified against validateIdentifierParts, validators.go).

type InMemoryBackend

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

InMemoryBackend implements StorageBackend using pkgs/store tables. Every resource family nested under an API/domain name/portal product (formerly a per-parent nested map -- see apiData in the pre-Phase-3.3 history) is now a single flat table keyed by a composite "<parentID>#<childID>" string, with a secondary store.Index grouping by parent ID. See store_setup.go's doc comment for the full clean/dirty table split.

func NewInMemoryBackend

func NewInMemoryBackend() *InMemoryBackend

NewInMemoryBackend creates a new InMemoryBackend.

func (*InMemoryBackend) CreateAPI

func (b *InMemoryBackend) CreateAPI(ctx context.Context, input CreateAPIInput) (*API, error)

CreateAPI creates a new HTTP API.

func (*InMemoryBackend) CreateAPIMapping

func (b *InMemoryBackend) CreateAPIMapping(domainName string, input CreateAPIMappingInput) (*APIMapping, error)

CreateAPIMapping creates a new API mapping for a custom domain name.

func (*InMemoryBackend) CreateAuthorizer

func (b *InMemoryBackend) CreateAuthorizer(apiID string, input CreateAuthorizerInput) (*Authorizer, error)

CreateAuthorizer creates a new authorizer for an API.

func (*InMemoryBackend) CreateDeployment

func (b *InMemoryBackend) CreateDeployment(apiID string, input CreateDeploymentInput) (*Deployment, error)

CreateDeployment creates a new deployment for an API.

func (*InMemoryBackend) CreateDomainName

func (b *InMemoryBackend) CreateDomainName(
	ctx context.Context,
	input CreateDomainNameInput,
) (*DomainName, error)

CreateDomainName creates a new custom domain name.

func (*InMemoryBackend) CreateIntegration

func (b *InMemoryBackend) CreateIntegration(apiID string, input CreateIntegrationInput) (*Integration, error)

CreateIntegration creates a new integration for an API.

func (*InMemoryBackend) CreateIntegrationResponse

func (b *InMemoryBackend) CreateIntegrationResponse(
	apiID, integrationID string,
	input CreateIntegrationResponseInput,
) (*IntegrationResponse, error)

CreateIntegrationResponse creates a new integration response.

func (*InMemoryBackend) CreateModel

func (b *InMemoryBackend) CreateModel(apiID string, input CreateModelInput) (*Model, error)

CreateModel creates a new model for an API.

func (*InMemoryBackend) CreatePortal

func (b *InMemoryBackend) CreatePortal(input CreatePortalInput) (*Portal, error)

CreatePortal creates a new portal.

func (*InMemoryBackend) CreatePortalProduct

func (b *InMemoryBackend) CreatePortalProduct(input CreatePortalProductInput) (*PortalProduct, error)

CreatePortalProduct creates a new portal product.

func (*InMemoryBackend) CreateProductPage

func (b *InMemoryBackend) CreateProductPage(
	portalProductID string,
	input CreateProductPageInput,
) (*ProductPage, error)

CreateProductPage creates a new product page for a portal product.

func (*InMemoryBackend) CreateProductRestEndpointPage

func (b *InMemoryBackend) CreateProductRestEndpointPage(
	portalProductID string,
	input CreateProductRestEndpointPageInput,
) (*ProductRestEndpointPage, error)

CreateProductRestEndpointPage creates a new product REST endpoint page for a portal product.

func (*InMemoryBackend) CreateRoute

func (b *InMemoryBackend) CreateRoute(apiID string, input CreateRouteInput) (*Route, error)

CreateRoute creates a new route for an API.

func (*InMemoryBackend) CreateRouteResponse

func (b *InMemoryBackend) CreateRouteResponse(
	apiID, routeID string,
	input CreateRouteResponseInput,
) (*RouteResponse, error)

CreateRouteResponse creates a new route response.

func (*InMemoryBackend) CreateRoutingRule

func (b *InMemoryBackend) CreateRoutingRule(
	ctx context.Context,
	domainName string,
	input CreateRoutingRuleInput,
) (*RoutingRule, error)

CreateRoutingRule creates a routing rule under a domain name.

func (*InMemoryBackend) CreateStage

func (b *InMemoryBackend) CreateStage(apiID string, input CreateStageInput) (*Stage, error)

CreateStage creates a new stage for an API.

func (b *InMemoryBackend) CreateVpcLink(input CreateVpcLinkInput) (*VpcLink, error)

CreateVpcLink creates a new VPC link.

func (*InMemoryBackend) DeleteAPI

func (b *InMemoryBackend) DeleteAPI(apiID string) error

DeleteAPI removes an API by ID.

func (*InMemoryBackend) DeleteAPIMapping

func (b *InMemoryBackend) DeleteAPIMapping(domainName, mappingID string) error

DeleteAPIMapping removes an API mapping from a domain name.

func (*InMemoryBackend) DeleteAccessLogSettings

func (b *InMemoryBackend) DeleteAccessLogSettings(apiID, stageName string) error

DeleteAccessLogSettings clears the access log settings on a stage.

func (*InMemoryBackend) DeleteAuthorizer

func (b *InMemoryBackend) DeleteAuthorizer(apiID, authorizerID string) error

DeleteAuthorizer removes an authorizer from an API.

func (*InMemoryBackend) DeleteCorsConfiguration

func (b *InMemoryBackend) DeleteCorsConfiguration(apiID string) error

DeleteCorsConfiguration clears the CORS configuration on an API.

func (*InMemoryBackend) DeleteDeployment

func (b *InMemoryBackend) DeleteDeployment(apiID, deploymentID string) error

DeleteDeployment removes a deployment from an API.

func (*InMemoryBackend) DeleteDomainName

func (b *InMemoryBackend) DeleteDomainName(domainName string) error

DeleteDomainName removes a custom domain name and all its API mappings.

func (*InMemoryBackend) DeleteIntegration

func (b *InMemoryBackend) DeleteIntegration(apiID, integrationID string) error

DeleteIntegration removes an integration from an API.

func (*InMemoryBackend) DeleteIntegrationResponse

func (b *InMemoryBackend) DeleteIntegrationResponse(apiID, integrationID, responseID string) error

DeleteIntegrationResponse removes an integration response.

func (*InMemoryBackend) DeleteModel

func (b *InMemoryBackend) DeleteModel(apiID, modelID string) error

DeleteModel removes a model from an API.

func (*InMemoryBackend) DeletePortal

func (b *InMemoryBackend) DeletePortal(portalID string) error

DeletePortal removes a portal by ID.

func (*InMemoryBackend) DeletePortalProduct

func (b *InMemoryBackend) DeletePortalProduct(portalProductID string) error

DeletePortalProduct removes a portal product and all its associated pages.

func (*InMemoryBackend) DeletePortalProductSharingPolicy

func (b *InMemoryBackend) DeletePortalProductSharingPolicy(portalProductID string) error

DeletePortalProductSharingPolicy deletes sharing policy for a portal product.

func (*InMemoryBackend) DeleteProductPage

func (b *InMemoryBackend) DeleteProductPage(portalProductID, pageID string) error

DeleteProductPage removes a product page from a portal product.

func (*InMemoryBackend) DeleteProductRestEndpointPage

func (b *InMemoryBackend) DeleteProductRestEndpointPage(portalProductID, pageID string) error

DeleteProductRestEndpointPage removes a product REST endpoint page from a portal product.

func (*InMemoryBackend) DeleteRoute

func (b *InMemoryBackend) DeleteRoute(apiID, routeID string) error

DeleteRoute removes a route from an API.

func (*InMemoryBackend) DeleteRouteRequestParameter

func (b *InMemoryBackend) DeleteRouteRequestParameter(
	apiID, routeID, requestParameterKey string,
) error

DeleteRouteRequestParameter removes a specific request parameter from a route.

func (*InMemoryBackend) DeleteRouteResponse

func (b *InMemoryBackend) DeleteRouteResponse(apiID, routeID, responseID string) error

DeleteRouteResponse removes a route response.

func (*InMemoryBackend) DeleteRouteSettings

func (b *InMemoryBackend) DeleteRouteSettings(apiID, stageName, routeKey string) error

DeleteRouteSettings removes per-route settings for a specific routeKey from a stage.

func (*InMemoryBackend) DeleteRoutingRule

func (b *InMemoryBackend) DeleteRoutingRule(domainName, routingRuleID string) error

DeleteRoutingRule deletes a routing rule.

func (*InMemoryBackend) DeleteStage

func (b *InMemoryBackend) DeleteStage(apiID, stageName string) error

DeleteStage removes a stage from an API.

func (b *InMemoryBackend) DeleteVpcLink(vpcLinkID string) error

DeleteVpcLink removes a VPC link.

func (*InMemoryBackend) ExportAPI

func (b *InMemoryBackend) ExportAPI(apiID string) (map[string]any, error)

ExportAPI generates a basic OpenAPI 3.0 specification for the API's routes.

func (*InMemoryBackend) GetAPI

func (b *InMemoryBackend) GetAPI(apiID string) (*API, error)

GetAPI retrieves an API by ID.

func (*InMemoryBackend) GetAPIMapping

func (b *InMemoryBackend) GetAPIMapping(domainName, mappingID string) (*APIMapping, error)

GetAPIMapping retrieves a specific API mapping.

func (*InMemoryBackend) GetAPIMappings

func (b *InMemoryBackend) GetAPIMappings(domainName string) ([]APIMapping, error)

GetAPIMappings retrieves all API mappings for a domain name.

func (*InMemoryBackend) GetAPIs

func (b *InMemoryBackend) GetAPIs() ([]API, error)

GetAPIs retrieves all APIs.

func (*InMemoryBackend) GetAuthorizer

func (b *InMemoryBackend) GetAuthorizer(apiID, authorizerID string) (*Authorizer, error)

GetAuthorizer retrieves an authorizer by ID.

func (*InMemoryBackend) GetAuthorizers

func (b *InMemoryBackend) GetAuthorizers(apiID string) ([]Authorizer, error)

GetAuthorizers retrieves all authorizers for an API.

func (*InMemoryBackend) GetDeployment

func (b *InMemoryBackend) GetDeployment(apiID, deploymentID string) (*Deployment, error)

GetDeployment retrieves a deployment by ID.

func (*InMemoryBackend) GetDeployments

func (b *InMemoryBackend) GetDeployments(apiID string) ([]Deployment, error)

GetDeployments retrieves all deployments for an API.

func (*InMemoryBackend) GetDomainName

func (b *InMemoryBackend) GetDomainName(domainName string) (*DomainName, error)

GetDomainName retrieves a domain name by name.

func (*InMemoryBackend) GetDomainNames

func (b *InMemoryBackend) GetDomainNames() ([]DomainName, error)

GetDomainNames retrieves all custom domain names.

func (*InMemoryBackend) GetIntegration

func (b *InMemoryBackend) GetIntegration(apiID, integrationID string) (*Integration, error)

GetIntegration retrieves an integration by ID.

func (*InMemoryBackend) GetIntegrationResponse

func (b *InMemoryBackend) GetIntegrationResponse(
	apiID, integrationID, responseID string,
) (*IntegrationResponse, error)

GetIntegrationResponse retrieves a specific integration response.

func (*InMemoryBackend) GetIntegrationResponses

func (b *InMemoryBackend) GetIntegrationResponses(apiID, integrationID string) ([]IntegrationResponse, error)

GetIntegrationResponses retrieves all integration responses for an integration.

func (*InMemoryBackend) GetIntegrations

func (b *InMemoryBackend) GetIntegrations(apiID string) ([]Integration, error)

GetIntegrations retrieves all integrations for an API.

func (*InMemoryBackend) GetModel

func (b *InMemoryBackend) GetModel(apiID, modelID string) (*Model, error)

GetModel retrieves a model by ID.

func (*InMemoryBackend) GetModels

func (b *InMemoryBackend) GetModels(apiID string) ([]Model, error)

GetModels retrieves all models for an API.

func (*InMemoryBackend) GetPortal

func (b *InMemoryBackend) GetPortal(portalID string) (*Portal, error)

GetPortal retrieves a portal by ID.

func (*InMemoryBackend) GetPortalProduct

func (b *InMemoryBackend) GetPortalProduct(portalProductID string) (*PortalProduct, error)

GetPortalProduct retrieves a portal product by ID.

func (*InMemoryBackend) GetPortalProductSharingPolicy

func (b *InMemoryBackend) GetPortalProductSharingPolicy(portalProductID string) (*PortalProductSharingPolicy, error)

GetPortalProductSharingPolicy gets sharing policy for a portal product.

func (*InMemoryBackend) GetProductPage

func (b *InMemoryBackend) GetProductPage(portalProductID, pageID string) (*ProductPage, error)

GetProductPage retrieves a specific product page.

func (*InMemoryBackend) GetProductRestEndpointPage

func (b *InMemoryBackend) GetProductRestEndpointPage(portalProductID, pageID string) (*ProductRestEndpointPage, error)

GetProductRestEndpointPage retrieves a specific product REST endpoint page.

func (*InMemoryBackend) GetRoute

func (b *InMemoryBackend) GetRoute(apiID, routeID string) (*Route, error)

GetRoute retrieves a route by ID.

func (*InMemoryBackend) GetRouteResponse

func (b *InMemoryBackend) GetRouteResponse(apiID, routeID, responseID string) (*RouteResponse, error)

GetRouteResponse retrieves a specific route response.

func (*InMemoryBackend) GetRouteResponses

func (b *InMemoryBackend) GetRouteResponses(apiID, routeID string) ([]RouteResponse, error)

GetRouteResponses retrieves all route responses for a route.

func (*InMemoryBackend) GetRoutes

func (b *InMemoryBackend) GetRoutes(apiID string) ([]Route, error)

GetRoutes retrieves all routes for an API.

func (*InMemoryBackend) GetRoutingRule

func (b *InMemoryBackend) GetRoutingRule(domainName, routingRuleID string) (*RoutingRule, error)

GetRoutingRule retrieves a routing rule.

func (*InMemoryBackend) GetStage

func (b *InMemoryBackend) GetStage(apiID, stageName string) (*Stage, error)

GetStage retrieves a stage by name.

func (*InMemoryBackend) GetStages

func (b *InMemoryBackend) GetStages(apiID string) ([]Stage, error)

GetStages retrieves all stages for an API.

func (*InMemoryBackend) GetTags

func (b *InMemoryBackend) GetTags(resourceARN string) (map[string]string, error)

GetTags retrieves all tags for a resource identified by ARN. Supports APIs, stages, VPC links, domain names, portals, and portal products.

func (b *InMemoryBackend) GetVpcLink(vpcLinkID string) (*VpcLink, error)

GetVpcLink retrieves a VPC link by ID.

func (b *InMemoryBackend) GetVpcLinks() ([]VpcLink, error)

GetVpcLinks retrieves all VPC links.

func (*InMemoryBackend) ListPortalProducts

func (b *InMemoryBackend) ListPortalProducts() ([]PortalProduct, error)

ListPortalProducts retrieves all portal products.

func (*InMemoryBackend) ListPortals

func (b *InMemoryBackend) ListPortals() ([]Portal, error)

ListPortals retrieves all portals.

func (*InMemoryBackend) ListProductPages

func (b *InMemoryBackend) ListProductPages(portalProductID string) ([]ProductPage, error)

ListProductPages retrieves all product pages for a portal product.

func (*InMemoryBackend) ListProductRestEndpointPages

func (b *InMemoryBackend) ListProductRestEndpointPages(portalProductID string) ([]ProductRestEndpointPage, error)

ListProductRestEndpointPages retrieves all product REST endpoint pages for a portal product.

func (*InMemoryBackend) ListRoutingRules

func (b *InMemoryBackend) ListRoutingRules(domainName string) ([]RoutingRule, error)

ListRoutingRules lists routing rules for a domain.

func (*InMemoryBackend) PutPortalProductSharingPolicy

func (b *InMemoryBackend) PutPortalProductSharingPolicy(
	portalProductID, policyDocument string,
) (*PortalProductSharingPolicy, error)

PutPortalProductSharingPolicy stores sharing policy for a portal product.

func (*InMemoryBackend) PutRoutingRule

func (b *InMemoryBackend) PutRoutingRule(
	domainName, routingRuleID string,
	input PutRoutingRuleInput,
) (*RoutingRule, error)

PutRoutingRule updates an existing routing rule.

func (*InMemoryBackend) Reset

func (b *InMemoryBackend) Reset()

Reset clears all backend state, reinitialising all tables.

func (*InMemoryBackend) ResetAuthorizersCache

func (b *InMemoryBackend) ResetAuthorizersCache(apiID, stageName string) error

ResetAuthorizersCache is a no-op for the in-memory backend (caching is not simulated).

func (*InMemoryBackend) Restore

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

Restore loads backend state from a JSON snapshot. It implements persistence.Persistable.

func (*InMemoryBackend) Snapshot

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

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

func (*InMemoryBackend) TagResource

func (b *InMemoryBackend) TagResource(resourceARN string, tagMap map[string]string) error

TagResource adds tags to a resource identified by ARN. Supports APIs, stages, VPC links, domain names, portals, and portal products.

func (*InMemoryBackend) UntagResource

func (b *InMemoryBackend) UntagResource(resourceARN string, tagKeys []string) error

UntagResource removes tag keys from a resource identified by ARN. Supports APIs, stages, VPC links, domain names, portals, and portal products.

func (*InMemoryBackend) UpdateAPI

func (b *InMemoryBackend) UpdateAPI(apiID string, input UpdateAPIInput) (*API, error)

UpdateAPI updates fields on an existing API. All of input is validated before any field is mutated, so a rejected update never leaves the API (or its quick-create route/integration) in a partially-applied state.

func (*InMemoryBackend) UpdateAPIMapping

func (b *InMemoryBackend) UpdateAPIMapping(
	domainName, mappingID string,
	input UpdateAPIMappingInput,
) (*APIMapping, error)

UpdateAPIMapping updates fields on an existing API mapping.

func (*InMemoryBackend) UpdateAuthorizer

func (b *InMemoryBackend) UpdateAuthorizer(
	apiID, authorizerID string,
	input UpdateAuthorizerInput,
) (*Authorizer, error)

UpdateAuthorizer updates fields on an existing authorizer.

func (*InMemoryBackend) UpdateDeployment

func (b *InMemoryBackend) UpdateDeployment(
	apiID, deploymentID string,
	input UpdateDeploymentInput,
) (*Deployment, error)

UpdateDeployment updates fields on an existing deployment.

func (*InMemoryBackend) UpdateDomainName

func (b *InMemoryBackend) UpdateDomainName(domainName string, input UpdateDomainNameInput) (*DomainName, error)

UpdateDomainName updates fields on an existing domain name. All of input is validated before any field of dn is mutated, so a rejected update never leaves the domain name in a partially-applied state.

func (*InMemoryBackend) UpdateIntegration

func (b *InMemoryBackend) UpdateIntegration(
	apiID, integrationID string,
	input UpdateIntegrationInput,
) (*Integration, error)

UpdateIntegration updates fields on an existing integration.

func (*InMemoryBackend) UpdateIntegrationResponse

func (b *InMemoryBackend) UpdateIntegrationResponse(
	apiID, integrationID, responseID string,
	input UpdateIntegrationResponseInput,
) (*IntegrationResponse, error)

UpdateIntegrationResponse updates fields on an existing integration response.

func (*InMemoryBackend) UpdateModel

func (b *InMemoryBackend) UpdateModel(apiID, modelID string, input UpdateModelInput) (*Model, error)

UpdateModel updates fields on an existing model.

func (*InMemoryBackend) UpdatePortal

func (b *InMemoryBackend) UpdatePortal(portalID string, input UpdatePortalInput) (*Portal, error)

UpdatePortal updates fields on an existing portal.

func (*InMemoryBackend) UpdatePortalProduct

func (b *InMemoryBackend) UpdatePortalProduct(
	portalProductID string,
	input UpdatePortalProductInput,
) (*PortalProduct, error)

UpdatePortalProduct updates fields on an existing portal product.

func (*InMemoryBackend) UpdateProductPage

func (b *InMemoryBackend) UpdateProductPage(
	portalProductID, pageID string,
	input UpdateProductPageInput,
) (*ProductPage, error)

UpdateProductPage updates a product page.

func (*InMemoryBackend) UpdateProductRestEndpointPage

func (b *InMemoryBackend) UpdateProductRestEndpointPage(
	portalProductID, pageID string,
	input UpdateProductRestEndpointPageInput,
) (*ProductRestEndpointPage, error)

UpdateProductRestEndpointPage updates a product REST endpoint page.

func (*InMemoryBackend) UpdateRoute

func (b *InMemoryBackend) UpdateRoute(
	apiID, routeID string,
	input UpdateRouteInput,
) (*Route, error)

UpdateRoute updates fields on an existing route. All of input is validated before any field of r is mutated, so a rejected update never leaves the route in a partially-applied state.

func (*InMemoryBackend) UpdateRouteResponse

func (b *InMemoryBackend) UpdateRouteResponse(
	apiID, routeID, responseID string,
	input UpdateRouteResponseInput,
) (*RouteResponse, error)

UpdateRouteResponse updates fields on an existing route response.

func (*InMemoryBackend) UpdateStage

func (b *InMemoryBackend) UpdateStage(apiID, stageName string, input UpdateStageInput) (*Stage, error)

UpdateStage updates fields on an existing stage.

func (b *InMemoryBackend) UpdateVpcLink(vpcLinkID string, input UpdateVpcLinkInput) (*VpcLink, error)

UpdateVpcLink updates a VPC link.

type Integration

type Integration struct {
	TLSConfig                   *IntegrationTLSConfig `json:"tlsConfig,omitempty"`
	RequestParameters           map[string]string     `json:"requestParameters,omitempty"`
	RequestTemplates            map[string]string     `json:"requestTemplates,omitempty"`
	IntegrationID               string                `json:"integrationId"`
	APIID                       string                `json:"-"`
	IntegrationType             string                `json:"integrationType"`
	IntegrationSubtype          string                `json:"integrationSubtype,omitempty"`
	IntegrationMethod           string                `json:"integrationMethod,omitempty"`
	IntegrationURI              string                `json:"integrationUri,omitempty"`
	Description                 string                `json:"description,omitempty"`
	PayloadFormatVersion        string                `json:"payloadFormatVersion,omitempty"`
	ConnectionType              string                `json:"connectionType,omitempty"`
	ConnectionID                string                `json:"connectionId,omitempty"`
	TemplateSelectionExpression string                `json:"templateSelectionExpression,omitempty"`
	PassthroughBehavior         string                `json:"passthroughBehavior,omitempty"`
	// CredentialsArn specifies the credentials required for the integration,
	// if any: an IAM role ARN, or "arn:aws:iam::*:user/*" to pass the
	// caller's identity through. Empty (unset) uses resource-based
	// permissions on supported AWS services.
	CredentialsArn  string `json:"credentialsArn,omitempty"`
	TimeoutInMillis int32  `json:"timeoutInMillis,omitempty"`
	// APIGatewayManaged is true for the integration auto-provisioned by
	// CreateApi's quick-create shortcut (routeKey+target). Unlike managed
	// routes/stages, a managed integration can still be updated -- just not
	// deleted. False for integrations a caller created directly.
	APIGatewayManaged bool `json:"apiGatewayManaged"`
}

Integration represents a backend integration for a route.

type IntegrationResponse

type IntegrationResponse struct {
	ResponseParameters          map[string]string `json:"responseParameters,omitempty"`
	ResponseTemplates           map[string]string `json:"responseTemplates,omitempty"`
	IntegrationResponseID       string            `json:"integrationResponseId"`
	IntegrationResponseKey      string            `json:"integrationResponseKey"`
	APIID                       string            `json:"-"`
	IntegrationID               string            `json:"-"`
	ContentHandlingStrategy     string            `json:"contentHandlingStrategy,omitempty"`
	TemplateSelectionExpression string            `json:"templateSelectionExpression,omitempty"`
}

IntegrationResponse represents an integration response.

type IntegrationTLSConfig

type IntegrationTLSConfig struct {
	ServerNameToVerify string `json:"serverNameToVerify,omitempty"`
}

IntegrationTLSConfig holds the TLS configuration for a private integration. Supported only for HTTP APIs.

type JWKSProvider

type JWKSProvider interface {
	GetJWTPublicKey(issuerURL, kid string) (*rsa.PublicKey, error)
}

JWKSProvider resolves RSA public keys for JWT signature verification. Implementations return an error when the issuer or key is unknown.

type JwtConfiguration

type JwtConfiguration struct {
	Issuer   string   `json:"issuer,omitempty"`
	Audience []string `json:"audience,omitempty"`
}

JwtConfiguration holds JWT authorizer configuration.

type LambdaInvoker

type LambdaInvoker interface {
	InvokeFunction(ctx context.Context, name, invocationType string, payload []byte) ([]byte, int, error)
}

LambdaInvoker is the interface for invoking Lambda functions.

type Model

type Model struct {
	ModelID     string `json:"modelId"`
	APIID       string `json:"-"`
	Name        string `json:"name"`
	Schema      string `json:"schema,omitempty"`
	ContentType string `json:"contentType,omitempty"`
	Description string `json:"description,omitempty"`
}

Model represents a data model for an API.

type MutualTLSAuthentication

type MutualTLSAuthentication struct {
	TruststoreURI      string   `json:"truststoreUri,omitempty"`
	TruststoreVersion  string   `json:"truststoreVersion,omitempty"`
	TruststoreWarnings []string `json:"truststoreWarnings,omitempty"`
}

MutualTLSAuthentication holds the mutual TLS authentication configuration for a custom domain name.

type None added in v1.3.1

type None struct{}

None mirrors types.None (types.go:901), an empty marker struct used by the Authorization and EndpointConfigurationRequest unions to select the "no auth" / "default domain" branch.

type Portal

type Portal struct {
	Authorization         *Authorization                 `json:"authorization,omitempty"`
	EndpointConfiguration *EndpointConfigurationResponse `json:"endpointConfiguration,omitempty"`
	PortalContent         *PortalContent                 `json:"portalContent,omitempty"`
	LastModified          *isoTime                       `json:"lastModified,omitempty"`
	Tags                  map[string]string              `json:"tags,omitempty"`
	PortalID              string                         `json:"portalId"`
	PortalArn             string                         `json:"portalArn,omitempty"`
	LogoURI               string                         `json:"logoUri,omitempty"`
	PublishStatus         string                         `json:"publishStatus,omitempty"`
}

Portal represents an API Gateway v2 portal. PublishStatus's wire key is "publishStatus", not "status" -- confirmed against aws-sdk-go-v2/service/apigatewayv2@v1.37.4's GetPortalOutput/PortalSummary (types.PublishStatus: PUBLISHED/PUBLISH_IN_PROGRESS/PUBLISH_FAILED/ DISABLE_IN_PROGRESS/DISABLE_FAILED/DISABLED -- no "ACTIVE" value exists).

type PortalContent added in v1.3.1

type PortalContent struct {
	Theme       *PortalTheme `json:"theme"`
	DisplayName string       `json:"displayName"`
	Description string       `json:"description,omitempty"`
}

PortalContent mirrors types.PortalContent (types.go:917).

type PortalProduct

type PortalProduct struct {
	LastModified     *isoTime          `json:"lastModified,omitempty"`
	Tags             map[string]string `json:"tags,omitempty"`
	PortalProductID  string            `json:"portalProductId"`
	PortalProductArn string            `json:"portalProductArn,omitempty"`
	DisplayName      string            `json:"displayName"`
	Description      string            `json:"description,omitempty"`
}

PortalProduct represents a portal product. LastModified is a real, required PortalProductSummary member (aws-sdk-go-v2/service/ apigatewayv2@v1.37.4's types.go) this backend previously never tracked.

type PortalProductSharingPolicy

type PortalProductSharingPolicy struct {
	PolicyDocument string `json:"policyDocument,omitempty"`
}

PortalProductSharingPolicy is the response body for portal product sharing policy operations.

type PortalTheme added in v1.3.1

type PortalTheme struct {
	CustomColors *CustomColors `json:"customColors"`
}

PortalTheme mirrors types.PortalTheme (types.go:1034). LogoLastUploaded is set by the (unmodeled) logo-upload API, never by CreatePortal/UpdatePortal, so it is omitted here rather than accepted from the client and echoed dishonestly.

type ProductPage

type ProductPage struct {
	LastModified    *isoTime       `json:"lastModified,omitempty"`
	DisplayContent  map[string]any `json:"displayContent,omitempty"`
	ProductPageID   string         `json:"productPageId"`
	PortalProductID string         `json:"-"`
}

ProductPage represents a product page within a portal product.

type ProductRestEndpointPage

type ProductRestEndpointPage struct {
	LastModified              *isoTime                `json:"lastModified,omitempty"`
	RestEndpointIdentifier    *RestEndpointIdentifier `json:"restEndpointIdentifier,omitempty"`
	DisplayContent            map[string]any          `json:"displayContent,omitempty"`
	ProductRestEndpointPageID string                  `json:"productRestEndpointPageId"`
	PortalProductID           string                  `json:"-"`
}

ProductRestEndpointPage represents a REST endpoint page within a portal product.

type Provider

type Provider struct{}

Provider implements service.Provider for the API Gateway v2 service.

func (*Provider) Init

Init initializes the API Gateway v2 backend and handler.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the logical name of the provider.

type PublishPortalInput

type PublishPortalInput struct {
	Description string `json:"description,omitempty"`
}

PublishPortalInput is the input for PublishPortal (POST).

type PutRoutingRuleInput

type PutRoutingRuleInput struct {
	Actions    []RoutingRuleAction    `json:"actions,omitempty"`
	Conditions []RoutingRuleCondition `json:"conditions,omitempty"`
	Priority   int32                  `json:"priority"`
}

PutRoutingRuleInput is the input for PutRoutingRule.

type RestEndpointIdentifier added in v1.3.1

type RestEndpointIdentifier struct {
	IdentifierParts *IdentifierParts `json:"identifierParts,omitempty"`
}

RestEndpointIdentifier mirrors types.RestEndpointIdentifier (types.go:1138). IdentifierParts itself is optional per validateRestEndpointIdentifier -- only RestEndpointIdentifier as a whole is a required CreateProductRestEndpointPageInput member.

type Route

type Route struct {
	RequestModels            map[string]string                 `json:"requestModels,omitempty"`
	RequestParameters        map[string]RouteRequiredParameter `json:"requestParameters,omitempty"`
	RouteID                  string                            `json:"routeId"`
	APIID                    string                            `json:"-"`
	RouteKey                 string                            `json:"routeKey"`
	Target                   string                            `json:"target,omitempty"`
	AuthorizationType        string                            `json:"authorizationType,omitempty"`
	AuthorizerID             string                            `json:"authorizerId,omitempty"`
	OperationName            string                            `json:"operationName,omitempty"`
	ModelSelectionExpression string                            `json:"modelSelectionExpression,omitempty"`
	AuthorizationScopes      []string                          `json:"authorizationScopes"`
	APIKeyRequired           bool                              `json:"apiKeyRequired"`
	// APIGatewayManaged is true for the $default route auto-provisioned by
	// CreateApi's quick-create shortcut (routeKey+target); its route key
	// cannot be modified. False for routes a caller created directly.
	APIGatewayManaged bool `json:"apiGatewayManaged"`
}

Route represents a route in an HTTP API.

type RouteRequiredParameter

type RouteRequiredParameter struct {
	Required bool `json:"required"`
}

RouteRequiredParameter indicates whether a request parameter is required.

type RouteResponse

type RouteResponse struct {
	ResponseModels           map[string]string `json:"responseModels,omitempty"`
	RouteResponseID          string            `json:"routeResponseId"`
	RouteResponseKey         string            `json:"routeResponseKey"`
	APIID                    string            `json:"-"`
	RouteID                  string            `json:"-"`
	ModelSelectionExpression string            `json:"modelSelectionExpression,omitempty"`
}

RouteResponse represents a route response.

type RouteSettings

type RouteSettings struct {
	LoggingLevel           string  `json:"loggingLevel,omitempty"`
	ThrottlingRateLimit    float64 `json:"throttlingRateLimit,omitempty"`
	ThrottlingBurstLimit   int32   `json:"throttlingBurstLimit,omitempty"`
	DataTraceEnabled       bool    `json:"dataTraceEnabled,omitempty"`
	DetailedMetricsEnabled bool    `json:"detailedMetricsEnabled,omitempty"`
}

RouteSettings holds per-route throttling and logging settings for a stage.

type RoutingRule

type RoutingRule struct {
	DomainName     string                 `json:"-"`
	RoutingRuleID  string                 `json:"routingRuleId"`
	RoutingRuleARN string                 `json:"routingRuleArn,omitempty"`
	Actions        []RoutingRuleAction    `json:"actions,omitempty"`
	Conditions     []RoutingRuleCondition `json:"conditions,omitempty"`
	Priority       int32                  `json:"priority"`
}

RoutingRule represents an API Gateway domain routing rule.

type RoutingRuleAction added in v1.3.1

type RoutingRuleAction struct {
	InvokeAPI *RoutingRuleActionInvokeAPI `json:"invokeApi,omitempty"`
}

RoutingRuleAction is a routing rule action. InvokeApi is the only action AWS supports (types.go:1280-1287, aws-sdk-go-v2/service/apigatewayv2@v1.37.4).

type RoutingRuleActionInvokeAPI added in v1.3.1

type RoutingRuleActionInvokeAPI struct {
	APIID         string `json:"apiId"`
	Stage         string `json:"stage"`
	StripBasePath bool   `json:"stripBasePath,omitempty"`
}

RoutingRuleActionInvokeAPI is the InvokeApi routing rule action target.

type RoutingRuleCondition added in v1.3.1

type RoutingRuleCondition struct {
	MatchBasePaths *RoutingRuleMatchBasePaths `json:"matchBasePaths,omitempty"`
	MatchHeaders   *RoutingRuleMatchHeaders   `json:"matchHeaders,omitempty"`
}

RoutingRuleCondition is a routing rule condition: base-path and/or header matching, ANDed together when both are set (types.go:1310-1319).

type RoutingRuleMatchBasePaths added in v1.3.1

type RoutingRuleMatchBasePaths struct {
	AnyOf []string `json:"anyOf,omitempty"`
}

RoutingRuleMatchBasePaths matches if the request base path is any of AnyOf.

type RoutingRuleMatchHeaderValue added in v1.3.1

type RoutingRuleMatchHeaderValue struct {
	Header    string `json:"header"`
	ValueGlob string `json:"valueGlob"`
}

RoutingRuleMatchHeaderValue is a single header/value-glob pair to match.

type RoutingRuleMatchHeaders added in v1.3.1

type RoutingRuleMatchHeaders struct {
	AnyOf []RoutingRuleMatchHeaderValue `json:"anyOf,omitempty"`
}

RoutingRuleMatchHeaders matches if any header name/value-glob pair in AnyOf matches.

type Stage

type Stage struct {
	AccessLogSettings    *AccessLogSettings       `json:"accessLogSettings,omitempty"`
	DefaultRouteSettings *RouteSettings           `json:"defaultRouteSettings,omitempty"`
	RouteSettings        map[string]RouteSettings `json:"routeSettings,omitempty"`
	Tags                 map[string]string        `json:"tags,omitempty"`
	CreatedDate          isoTime                  `json:"createdDate"`
	LastUpdatedDate      isoTime                  `json:"lastUpdatedDate"`
	StageVariables       map[string]string        `json:"stageVariables,omitempty"`
	StageName            string                   `json:"stageName"`
	APIID                string                   `json:"-"`
	DeploymentID         string                   `json:"deploymentId,omitempty"`
	Description          string                   `json:"description,omitempty"`
	// ClientCertificateID identifies a client certificate for a Stage. Supported
	// only for WebSocket APIs.
	ClientCertificateID string `json:"clientCertificateId,omitempty"`
	AutoDeploy          bool   `json:"autoDeploy"`
	// APIGatewayManaged is true for the $default stage auto-provisioned by
	// CreateApi's quick-create shortcut (routeKey+target); such a stage cannot
	// be modified via UpdateStage. False for stages a caller created directly.
	APIGatewayManaged bool `json:"apiGatewayManaged"`
}

Stage represents a deployment stage for an HTTP API.

type StorageBackend

type StorageBackend interface {
	// APIs
	CreateAPI(ctx context.Context, input CreateAPIInput) (*API, error)
	GetAPI(apiID string) (*API, error)
	GetAPIs() ([]API, error)
	DeleteAPI(apiID string) error
	UpdateAPI(apiID string, input UpdateAPIInput) (*API, error)

	// Stages
	CreateStage(apiID string, input CreateStageInput) (*Stage, error)
	GetStage(apiID, stageName string) (*Stage, error)
	GetStages(apiID string) ([]Stage, error)
	DeleteStage(apiID, stageName string) error
	UpdateStage(apiID, stageName string, input UpdateStageInput) (*Stage, error)

	// Routes
	CreateRoute(apiID string, input CreateRouteInput) (*Route, error)
	GetRoute(apiID, routeID string) (*Route, error)
	GetRoutes(apiID string) ([]Route, error)
	DeleteRoute(apiID, routeID string) error
	UpdateRoute(apiID, routeID string, input UpdateRouteInput) (*Route, error)

	// Integrations
	CreateIntegration(apiID string, input CreateIntegrationInput) (*Integration, error)
	GetIntegration(apiID, integrationID string) (*Integration, error)
	GetIntegrations(apiID string) ([]Integration, error)
	DeleteIntegration(apiID, integrationID string) error
	UpdateIntegration(apiID, integrationID string, input UpdateIntegrationInput) (*Integration, error)

	// Deployments
	CreateDeployment(apiID string, input CreateDeploymentInput) (*Deployment, error)
	GetDeployment(apiID, deploymentID string) (*Deployment, error)
	GetDeployments(apiID string) ([]Deployment, error)
	DeleteDeployment(apiID, deploymentID string) error

	// Authorizers
	CreateAuthorizer(apiID string, input CreateAuthorizerInput) (*Authorizer, error)
	GetAuthorizer(apiID, authorizerID string) (*Authorizer, error)
	GetAuthorizers(apiID string) ([]Authorizer, error)
	DeleteAuthorizer(apiID, authorizerID string) error
	UpdateAuthorizer(apiID, authorizerID string, input UpdateAuthorizerInput) (*Authorizer, error)

	// Domain Names
	CreateDomainName(ctx context.Context, input CreateDomainNameInput) (*DomainName, error)

	// API Mappings
	CreateAPIMapping(domainName string, input CreateAPIMappingInput) (*APIMapping, error)

	// Integration Responses
	CreateIntegrationResponse(
		apiID, integrationID string,
		input CreateIntegrationResponseInput,
	) (*IntegrationResponse, error)

	// Models
	CreateModel(apiID string, input CreateModelInput) (*Model, error)

	// Route Responses
	CreateRouteResponse(apiID, routeID string, input CreateRouteResponseInput) (*RouteResponse, error)

	// Portals
	CreatePortal(input CreatePortalInput) (*Portal, error)

	// Portal Products
	CreatePortalProduct(input CreatePortalProductInput) (*PortalProduct, error)

	// Product Pages
	CreateProductPage(portalProductID string, input CreateProductPageInput) (*ProductPage, error)

	// Product REST Endpoint Pages
	CreateProductRestEndpointPage(
		portalProductID string,
		input CreateProductRestEndpointPageInput,
	) (*ProductRestEndpointPage, error)

	// VPC links
	CreateVpcLink(input CreateVpcLinkInput) (*VpcLink, error)
	GetVpcLink(vpcLinkID string) (*VpcLink, error)
	GetVpcLinks() ([]VpcLink, error)
	UpdateVpcLink(vpcLinkID string, input UpdateVpcLinkInput) (*VpcLink, error)
	DeleteVpcLink(vpcLinkID string) error

	// Routing rules
	CreateRoutingRule(
		ctx context.Context,
		domainName string,
		input CreateRoutingRuleInput,
	) (*RoutingRule, error)
	GetRoutingRule(domainName, routingRuleID string) (*RoutingRule, error)
	ListRoutingRules(domainName string) ([]RoutingRule, error)
	PutRoutingRule(domainName, routingRuleID string, input PutRoutingRuleInput) (*RoutingRule, error)
	DeleteRoutingRule(domainName, routingRuleID string) error

	// Portal sharing policy
	GetPortalProductSharingPolicy(portalProductID string) (*PortalProductSharingPolicy, error)
	PutPortalProductSharingPolicy(portalProductID, policyDocument string) (*PortalProductSharingPolicy, error)
	DeletePortalProductSharingPolicy(portalProductID string) error

	// Domain Names - Get/Delete
	GetDomainName(domainName string) (*DomainName, error)
	GetDomainNames() ([]DomainName, error)
	DeleteDomainName(domainName string) error

	// API Mappings - Get/Delete
	GetAPIMapping(domainName, mappingID string) (*APIMapping, error)
	GetAPIMappings(domainName string) ([]APIMapping, error)
	DeleteAPIMapping(domainName, mappingID string) error

	// Integration Responses - Get/Delete
	GetIntegrationResponse(apiID, integrationID, responseID string) (*IntegrationResponse, error)
	GetIntegrationResponses(apiID, integrationID string) ([]IntegrationResponse, error)
	DeleteIntegrationResponse(apiID, integrationID, responseID string) error

	// Models - Get/Delete
	GetModel(apiID, modelID string) (*Model, error)
	GetModels(apiID string) ([]Model, error)
	DeleteModel(apiID, modelID string) error

	// Route Responses - Get/Delete
	GetRouteResponse(apiID, routeID, responseID string) (*RouteResponse, error)
	GetRouteResponses(apiID, routeID string) ([]RouteResponse, error)
	DeleteRouteResponse(apiID, routeID, responseID string) error

	// Portals - Get/List
	GetPortal(portalID string) (*Portal, error)
	ListPortals() ([]Portal, error)

	// Portal Products - Get/List
	GetPortalProduct(portalProductID string) (*PortalProduct, error)
	ListPortalProducts() ([]PortalProduct, error)

	// Product Pages - List
	ListProductPages(portalProductID string) ([]ProductPage, error)

	// Product REST Endpoint Pages - List
	ListProductRestEndpointPages(portalProductID string) ([]ProductRestEndpointPage, error)

	// Tags
	TagResource(resourceARN string, tags map[string]string) error
	UntagResource(resourceARN string, tagKeys []string) error
	GetTags(resourceARN string) (map[string]string, error)

	// ExportAPI generates an OpenAPI specification for the API's routes.
	ExportAPI(apiID string) (map[string]any, error)

	// UpdateAPIMapping
	UpdateAPIMapping(domainName, mappingID string, input UpdateAPIMappingInput) (*APIMapping, error)

	// UpdateDeployment
	UpdateDeployment(apiID, deploymentID string, input UpdateDeploymentInput) (*Deployment, error)

	// UpdateDomainName
	UpdateDomainName(domainName string, input UpdateDomainNameInput) (*DomainName, error)

	// UpdateIntegrationResponse
	UpdateIntegrationResponse(
		apiID, integrationID, responseID string,
		input UpdateIntegrationResponseInput,
	) (*IntegrationResponse, error)

	// UpdateModel
	UpdateModel(apiID, modelID string, input UpdateModelInput) (*Model, error)

	// UpdateRouteResponse
	UpdateRouteResponse(apiID, routeID, responseID string, input UpdateRouteResponseInput) (*RouteResponse, error)

	// UpdatePortal
	UpdatePortal(portalID string, input UpdatePortalInput) (*Portal, error)

	// UpdatePortalProduct
	UpdatePortalProduct(portalProductID string, input UpdatePortalProductInput) (*PortalProduct, error)

	// UpdateProductPage
	UpdateProductPage(portalProductID, pageID string, input UpdateProductPageInput) (*ProductPage, error)

	// UpdateProductRestEndpointPage
	UpdateProductRestEndpointPage(
		portalProductID, pageID string,
		input UpdateProductRestEndpointPageInput,
	) (*ProductRestEndpointPage, error)

	// DeletePortal
	DeletePortal(portalID string) error

	// DeletePortalProduct
	DeletePortalProduct(portalProductID string) error

	// GetProductPage
	GetProductPage(portalProductID, pageID string) (*ProductPage, error)

	// GetProductRestEndpointPage
	GetProductRestEndpointPage(portalProductID, pageID string) (*ProductRestEndpointPage, error)

	// DeleteProductPage
	DeleteProductPage(portalProductID, pageID string) error

	// DeleteProductRestEndpointPage
	DeleteProductRestEndpointPage(portalProductID, pageID string) error

	// ResetAuthorizersCache
	ResetAuthorizersCache(apiID, stageName string) error

	// DeleteCorsConfiguration clears the CORS configuration on an API.
	DeleteCorsConfiguration(apiID string) error

	// DeleteAccessLogSettings clears the access log settings on a stage.
	DeleteAccessLogSettings(apiID, stageName string) error

	// DeleteRouteSettings removes per-route settings for a specific routeKey from a stage.
	DeleteRouteSettings(apiID, stageName, routeKey string) error

	// DeleteRouteRequestParameter removes a specific request parameter from a route.
	DeleteRouteRequestParameter(apiID, routeID, requestParameterKey string) error
}

StorageBackend is the interface for the API Gateway v2 in-memory store.

type UpdateAPIInput

type UpdateAPIInput struct {
	CorsConfiguration         *CorsConfiguration `json:"corsConfiguration,omitempty"`
	Tags                      map[string]string  `json:"tags,omitempty"`
	DisableSchemaValidation   *bool              `json:"disableSchemaValidation,omitempty"`
	DisableExecuteAPIEndpoint *bool              `json:"disableExecuteApiEndpoint,omitempty"`
	Name                      string             `json:"name,omitempty"`
	Description               string             `json:"description,omitempty"`
	RouteSelectionExpression  string             `json:"routeSelectionExpression,omitempty"`
	Version                   string             `json:"version,omitempty"`
	APIKeySelectionExpression string             `json:"apiKeySelectionExpression,omitempty"`
	// RouteKey and Target are part of quick create: if set, they replace the
	// route key / integration target of the API's existing quick-create
	// route and integration (each is independently optional; either requires
	// the API to already have a quick-create route/integration).
	RouteKey string `json:"routeKey,omitempty"`
	Target   string `json:"target,omitempty"`
	// CredentialsArn is part of quick create: if set, it replaces the
	// credentials associated with the quick-create integration (requires the
	// API to already have a quick-create integration).
	CredentialsArn string `json:"credentialsArn,omitempty"`
	// IPAddressType is the IP address types that can invoke the API: "ipv4"
	// or "dualstack".
	IPAddressType string `json:"ipAddressType,omitempty"`
}

UpdateAPIInput is the input for UpdateAPI (PATCH).

type UpdateAPIMappingInput

type UpdateAPIMappingInput struct {
	APIID         string `json:"apiId,omitempty"`
	Stage         string `json:"stage,omitempty"`
	APIMappingKey string `json:"apiMappingKey,omitempty"`
}

UpdateAPIMappingInput is the input for UpdateAPIMapping (PATCH).

type UpdateAuthorizerInput

type UpdateAuthorizerInput struct {
	JwtConfiguration               *JwtConfiguration `json:"jwtConfiguration,omitempty"`
	Name                           string            `json:"name,omitempty"`
	AuthorizerType                 string            `json:"authorizerType,omitempty"`
	AuthorizerURI                  string            `json:"authorizerUri,omitempty"`
	AuthorizerCredentialsArn       string            `json:"authorizerCredentialsArn,omitempty"`
	AuthorizerPayloadFormatVersion string            `json:"authorizerPayloadFormatVersion,omitempty"`
	IdentitySource                 []string          `json:"identitySource,omitempty"`
	AuthorizerResultTTLInSeconds   int32             `json:"authorizerResultTtlInSeconds,omitempty"`
	EnableSimpleResponses          bool              `json:"enableSimpleResponses,omitempty"`
}

UpdateAuthorizerInput is the input for UpdateAuthorizer (PATCH).

type UpdateDeploymentInput

type UpdateDeploymentInput struct {
	Description string `json:"description,omitempty"`
}

UpdateDeploymentInput is the input for UpdateDeployment (PATCH).

type UpdateDomainNameInput

type UpdateDomainNameInput struct {
	MutualTLSAuthentication  *MutualTLSAuthentication  `json:"mutualTlsAuthentication,omitempty"`
	Tags                     map[string]string         `json:"tags,omitempty"`
	RoutingMode              string                    `json:"routingMode,omitempty"`
	DomainNameConfigurations []DomainNameConfiguration `json:"domainNameConfigurations,omitempty"`
}

UpdateDomainNameInput is the input for UpdateDomainName (PATCH).

type UpdateIntegrationInput

type UpdateIntegrationInput struct {
	TLSConfig                   *IntegrationTLSConfig `json:"tlsConfig,omitempty"`
	RequestParameters           map[string]string     `json:"requestParameters,omitempty"`
	RequestTemplates            map[string]string     `json:"requestTemplates,omitempty"`
	IntegrationType             string                `json:"integrationType,omitempty"`
	IntegrationSubtype          string                `json:"integrationSubtype,omitempty"`
	IntegrationMethod           string                `json:"integrationMethod,omitempty"`
	IntegrationURI              string                `json:"integrationUri,omitempty"`
	Description                 string                `json:"description,omitempty"`
	PayloadFormatVersion        string                `json:"payloadFormatVersion,omitempty"`
	ConnectionType              string                `json:"connectionType,omitempty"`
	ConnectionID                string                `json:"connectionId,omitempty"`
	TemplateSelectionExpression string                `json:"templateSelectionExpression,omitempty"`
	PassthroughBehavior         string                `json:"passthroughBehavior,omitempty"`
	CredentialsArn              string                `json:"credentialsArn,omitempty"`
	TimeoutInMillis             int32                 `json:"timeoutInMillis,omitempty"`
}

UpdateIntegrationInput is the input for UpdateIntegration (PATCH).

type UpdateIntegrationResponseInput

type UpdateIntegrationResponseInput struct {
	ResponseParameters          map[string]string `json:"responseParameters,omitempty"`
	ResponseTemplates           map[string]string `json:"responseTemplates,omitempty"`
	IntegrationResponseKey      string            `json:"integrationResponseKey,omitempty"`
	ContentHandlingStrategy     string            `json:"contentHandlingStrategy,omitempty"`
	TemplateSelectionExpression string            `json:"templateSelectionExpression,omitempty"`
}

UpdateIntegrationResponseInput is the input for UpdateIntegrationResponse (PATCH).

type UpdateModelInput

type UpdateModelInput struct {
	Name        string `json:"name,omitempty"`
	Schema      string `json:"schema,omitempty"`
	ContentType string `json:"contentType,omitempty"`
	Description string `json:"description,omitempty"`
}

UpdateModelInput is the input for UpdateModel (PATCH).

type UpdatePortalInput

type UpdatePortalInput struct {
	Tags    map[string]string `json:"tags,omitempty"`
	LogoURI string            `json:"logoUri,omitempty"`
	Status  string            `json:"-"`
}

UpdatePortalInput is the input for UpdatePortal (PATCH). Status is internal-only (set by handlePublishPortal/handleDisablePortal, never by a real client -- the real UpdatePortalInput has no such member, confirmed against api_op_UpdatePortal.go) and must never be JSON-decoded from a request body.

type UpdatePortalProductInput

type UpdatePortalProductInput struct {
	Tags        map[string]string `json:"tags,omitempty"`
	DisplayName string            `json:"displayName,omitempty"`
	Description string            `json:"description,omitempty"`
}

UpdatePortalProductInput is the input for UpdatePortalProduct (PATCH).

type UpdateProductPageInput

type UpdateProductPageInput struct {
	DisplayContent map[string]any `json:"displayContent,omitempty"`
}

UpdateProductPageInput is the input for UpdateProductPage (PATCH).

type UpdateProductRestEndpointPageInput

type UpdateProductRestEndpointPageInput struct {
	DisplayContent map[string]any `json:"displayContent,omitempty"`
}

UpdateProductRestEndpointPageInput is the input for UpdateProductRestEndpointPage (PATCH).

type UpdateRouteInput

type UpdateRouteInput struct {
	RequestModels            map[string]string                 `json:"requestModels,omitempty"`
	RequestParameters        map[string]RouteRequiredParameter `json:"requestParameters,omitempty"`
	RouteKey                 string                            `json:"routeKey,omitempty"`
	Target                   string                            `json:"target,omitempty"`
	AuthorizationType        string                            `json:"authorizationType,omitempty"`
	AuthorizerID             string                            `json:"authorizerId,omitempty"`
	OperationName            string                            `json:"operationName,omitempty"`
	ModelSelectionExpression string                            `json:"modelSelectionExpression,omitempty"`
	APIKeyRequired           *bool                             `json:"apiKeyRequired,omitempty"`
	AuthorizationScopes      []string                          `json:"authorizationScopes,omitempty"`
}

UpdateRouteInput is the input for UpdateRoute (PATCH).

type UpdateRouteResponseInput

type UpdateRouteResponseInput struct {
	ResponseModels           map[string]string `json:"responseModels,omitempty"`
	RouteResponseKey         string            `json:"routeResponseKey,omitempty"`
	ModelSelectionExpression string            `json:"modelSelectionExpression,omitempty"`
}

UpdateRouteResponseInput is the input for UpdateRouteResponse (PATCH).

type UpdateStageInput

type UpdateStageInput struct {
	AccessLogSettings    *AccessLogSettings       `json:"accessLogSettings,omitempty"`
	DefaultRouteSettings *RouteSettings           `json:"defaultRouteSettings,omitempty"`
	RouteSettings        map[string]RouteSettings `json:"routeSettings,omitempty"`
	StageVariables       map[string]string        `json:"stageVariables,omitempty"`
	AutoDeploy           *bool                    `json:"autoDeploy,omitempty"`
	DeploymentID         string                   `json:"deploymentId,omitempty"`
	Description          string                   `json:"description,omitempty"`
	ClientCertificateID  string                   `json:"clientCertificateId,omitempty"`
}

UpdateStageInput is the input for UpdateStage (PATCH).

type UpdateVpcLinkInput

type UpdateVpcLinkInput struct {
	Name string `json:"name,omitempty"`
}

UpdateVpcLinkInput is the input for UpdateVpcLink.

type VpcLink struct {
	CreatedDate      isoTime           `json:"createdDate"`
	Tags             map[string]string `json:"tags,omitempty"`
	VpcLinkID        string            `json:"vpcLinkId"`
	Name             string            `json:"name"`
	VpcLinkStatus    string            `json:"vpcLinkStatus,omitempty"`
	SecurityGroupIDs []string          `json:"securityGroupIds"`
	SubnetIDs        []string          `json:"subnetIds"`
}

VpcLink represents a v2 VPC link.

Jump to

Keyboard shortcuts

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