* feat: emulate AWS Service Catalog * docs: register Service Catalog service * feat(servicecatalog): full API parity for 55 operations Closes the entire botocore servicecatalog gap surface found by a full-manifest scan (56 ops; 55 landed, DescribeServiceAction escalated because no store exists for it and a single write op may not invent one). Each operation is dispatch-reachable, covered by a wire-level test asserting response values (not just status codes), and falsifiability-checked at method granularity. Tests are one class per operation family so falsification isolates per operation. Nine previously-unshipped bugs surfaced and fixed along the way, recorded as issues 0017-0025: wrong field names in describeConstraint, three incompatible service-action association keys across the single-op and batch-op pairs, a Type discriminator collision leaking phantom entries into ListServiceActions, the provisioned-product-plan family having no persistence at all, five cases of an operation returning a generated id (RecordId, CopyProductToken, plan ids) that nothing ever persisted, a hardcoded-empty ListConstraintsForPortfolio, and TerminateProvisionedProduct reporting the wrong RecordType. Limitations documented in docs/services/service-catalog.md. * chore: drop local-only bug-ledger files before upstream issues/0017-0025 are this fork's internal tracking, not something upstream has a convention for. * fix(config): restore EmrServerless config body lost in rebase The rebase onto upstream/main collided where both upstream and this branch declare a new service config interface sharing a trailing body; the EmrServerless interface was left open, so the file did not parse. * docs: state a single correct service count Collapse the duplicated claim left by the docs merge to one number matching the 74 services this branch registers. * fix(servicecatalog): adapt to upstream's Organizations model (OrganizationAccount, 5-arg createAccount) * docs(servicecatalog): register the generated action table * docs(servicecatalog): correct action descriptions after audit * docs(servicecatalog): name the real Control Tower catalog triggers * fix(servicecatalog): reject missing identifiers instead of failing with 500 Store lookups passed the request's identifier straight through to the backing map, so an operation called without its id parameter died on a null key and surfaced as InternalFailure. Guard the lookup helpers and name the missing parameter in an InvalidParametersException. * fix(servicecatalog): report a plan's own identifiers in its plan details DescribeProvisionedProductPlan and ListProvisionedProductPlans reused the plan's own id and provisioned-product name for ProvisionProductId and PlanName, so callers could never recover the product a plan targets or the plan's name. Read the distinct fields the plan already stores. * fix(servicecatalog): require ProvisionProduct to name a real product ProvisionProduct ignored ProductId and ProductName, so every request took the Control Tower Account Factory path: an unrecognised product id still created an Organizations member account and recorded it under the seeded Account Factory identifiers. Resolve the target product and its provisioning artifact first, reject what the catalog does not hold, and touch Organizations only when the request really names Account Factory. Other stored products now provision a plain record. Product and artifact resolution is shared with DescribeProvisioningParameters, which already validated a request the same way. * docs: state one service count and ProvisionProduct's validated behaviour docs/index.md still claimed 74 services while docs/services/index.md, the canonical matrix, listed 77. The Service Catalog page also described ProvisionProduct taking the Account Factory path for every request, which stopped being true once it started resolving the product it was given. * fix(servicecatalog): resolve ProductId by product id only requireProduct also matches provisioning-artifact ids, so ProvisionProduct with ProductId set to the Account Factory artifact id resolved the owning product and created an Organizations account. resolveProduct now does a strict id lookup; artifact ids in ProductId get ResourceNotFoundException. * fix(servicecatalog): enforce the modeled enums and AccountId format on stored values Five request members were read and stored, or used as a filter, without the constraint botocore pins on them: - Create/Update/DeletePortfolioShare built the share's store key from AccountId and OrganizationNode.Type unchecked, so a short account id or a node type outside OrganizationNodeType became a share DescribePortfolioShares reported back verbatim. - CreateProvisionedProductPlan accepted any PlanType and then described the plan as CLOUDFORMATION, the only member ProvisionedProductPlanType has. - CreateServiceAction stored any DefinitionType, likewise a one-member enum. - DescribePortfolioShares and ListOrganizationPortfolioAccess filtered on an unvalidated type, turning a typo into an empty result rather than an error. * fix(servicecatalog): enforce the PrincipalType enum on principal association The model pins PrincipalType to IAM or IAM_PATTERN; the value was stored verbatim. Found by the botocore-grounded review pipeline on its first sweep — the hand audit of the same service missed it. * fix(servicecatalog): reject an ambiguous ProductName on ProvisionProduct Product names are not unique keys, so first-match could resolve a user-created product carrying the Account Factory name — or vice versa — and either skip or wrongly enter the Organizations account workflow. More than one match now raises the modeled DuplicateResourceException. * fix(servicecatalog): keep a missing AccountEmail inside the Service Catalog model ProvisionProduct passed AccountEmail straight to Organizations, so omitting it surfaced Organizations' InvalidInputException — a shape absent from Service Catalog's model — to a servicecatalog client, which cannot deserialize it into a typed exception. Validate it on the Account Factory path and raise the service's own InvalidParametersException, matching how the createAccount failure a few lines below is already translated. A plain stored product needs no email, so the guard sits inside accountFactoryAccountId rather than at the top of provisionProduct; a test pins that provisioning a non-Account-Factory product without AccountEmail still succeeds. * fix(servicecatalog): refuse to delete a portfolio or product that is in use DeletePortfolio and DeleteProduct deleted the resource and then cascaded, removing every association naming the portfolio and every share keyed to it. AWS refuses the call instead — a portfolio with associated products, users, constraints, or shared accounts, and a product associated with a portfolio, are both ResourceInUseException — so what AWS makes a recoverable no-op was here unrecoverable data loss reported as 200. The scans that drove the cascade now detect the in-use condition. Every row AWS lists for a portfolio carries PortfolioId, so one scan covers products, principals and constraints alike; the portfolio cascade is gone because it is now unreachable. Tag-option associations key off ResourceId, are absent from AWS's list, and were never cleaned by the old cascade either, so nothing is orphaned that was not orphaned before. For a product only the portfolio association blocks, so its remaining associations are still cleaned up on delete.
19 KiB
AWS Service Catalog
Protocol: AWS JSON 1.1
Signing name: servicecatalog
Floci persists portfolios, products and provisioning-artifact metadata, TagOptions, resource associations, provisioned products, and organization/account portfolio shares. Portfolio-share operations complete immediately while preserving the AWS status-token workflow.
Supported Actions
| Action | Description |
|---|---|
CreatePortfolio |
Create a portfolio to organise products. |
UpdatePortfolio |
Update a portfolio's display name, description, or provider. |
DescribePortfolio |
Return a portfolio's details. |
ListPortfolios |
List all portfolios in the account. |
DeletePortfolio |
Delete a portfolio. |
CreateProduct |
Create a product with its initial provisioning artifact. |
UpdateProduct |
Update a product's metadata. |
DescribeProductAsAdmin |
Return a product's details and provisioning artifacts from the admin view. |
SearchProductsAsAdmin |
List every product in the account from the admin view. |
SearchProducts |
Search the products available to the caller. |
ListProvisioningArtifacts |
List the provisioning artifacts (versions) of a product. |
ProvisionProduct |
Provision a product the catalog holds; the Control Tower Account Factory product creates a real Organizations member account and moves it to the requested OU, any other product persists a provisioned-product record only. |
SearchProvisionedProducts |
Search provisioned products; only status: and physicalid: search terms are honoured and results are not paginated. |
DeleteProduct |
Delete a product. |
CreateTagOption |
Create a TagOption key/value pair. |
UpdateTagOption |
Update a TagOption's value or active flag. |
DescribeTagOption |
Return a TagOption's details. |
ListTagOptions |
List all TagOptions. |
DeleteTagOption |
Delete a TagOption. |
AssociateProductWithPortfolio |
Associate a product with a portfolio. |
DisassociateProductFromPortfolio |
Remove a product from a portfolio; the delete is unconditional, so unknown ids still succeed. |
AssociateTagOptionWithResource |
Attach a TagOption to a portfolio or product. |
DisassociateTagOptionFromResource |
Detach a TagOption from a resource; the delete is unconditional, so unknown ids still succeed. |
UpdatePortfolioShare |
Create or overwrite a portfolio share with a fresh token; identical to CreatePortfolioShare and no existing share is required. |
CreatePortfolioShare |
Share a portfolio with an account or organization node; completes immediately. |
DescribePortfolioShareStatus |
Report the status of a share operation by its token; always terminal. |
DescribeProduct |
Return a product's consumer view; omits Budgets and LaunchPaths, and a Name given instead of Id is still resolved as an id. |
DescribePortfolioShares |
List a portfolio's shares; every share reports Accepted: true and no pagination token is emitted. |
ListPortfoliosForProduct |
List the portfolios a product is associated with. |
CopyProduct |
Copy a product's metadata synchronously; the returned copy token is already terminal. |
DescribeProvisioningArtifact |
Return a provisioning artifact's details; omits the template Info map. |
AcceptPortfolioShare |
Validate the shared portfolio exists; acceptance state is not persisted. |
DeletePortfolioShare |
Delete the share row keyed by portfolio and resolved principal. |
RejectPortfolioShare |
Validate the portfolio exists; rejection is a no-op beyond validation. |
AssociateBudgetWithResource |
Record a budget-name association with a resource; no Budgets service integration exists. |
AssociatePrincipalWithPortfolio |
Record an IAM principal association on a portfolio; the association is metadata only and grants no access. |
AssociateServiceActionWithProvisioningArtifact |
Store a service-action/provisioning-artifact association; no list operation ever reads it back. |
BatchAssociateServiceActionWithProvisioningArtifact |
Store several service-action associations in one call, reporting per-entry failures; no list operation ever reads them back. |
BatchDisassociateServiceActionFromProvisioningArtifact |
Remove multiple service-action associations in one call. |
CreateConstraint |
Create a constraint on a product/portfolio pair; Parameters is echoed back in the response but never persisted. |
CreateProvisionedProductPlan |
Create a provisioned product plan record; no ResourceChanges preview is computed. |
CreateServiceAction |
Create a self-service action definition. |
DeleteConstraint |
Delete a constraint. |
DeleteProvisionedProductPlan |
Delete a provisioned product plan. |
DeleteProvisioningArtifact |
Delete a provisioning artifact from a product. |
DeleteServiceAction |
Delete a service action. |
DescribeConstraint |
Return a constraint's details; ConstraintParameters is never returned. |
DescribeProductView |
Return a product's consumer view; product-view ids are not modelled, so Id must be a product or provisioning-artifact id. |
DescribeProvisionedProduct |
Return a provisioned product's details. |
DescribeProvisionedProductPlan |
Return a provisioned product plan's identity fields; no Status or ResourceChanges is reported. |
DescribeProvisioningParameters |
Return the provisioning parameters recorded on the product at creation; the response is empty if none were supplied. |
DescribeRecord |
Look up a record by id; ProvisionProduct and ExecuteProvisionedProductPlan return a RecordId they never persist, so those are not found. |
DescribeServiceActionExecutionParameters |
Return a service action's execution parameters; always an empty list. |
DisableAWSOrganizationsAccess |
Accept the disable request without persisting any state. |
DisassociateBudgetFromResource |
Remove a budget-name association from a resource. |
DisassociatePrincipalFromPortfolio |
Revoke a principal's access to a portfolio. |
DisassociateServiceActionFromProvisioningArtifact |
Remove a service action's association with a provisioning artifact. |
EnableAWSOrganizationsAccess |
Accept the enable request without persisting any state. |
ExecuteProvisionedProductPlan |
Mark a plan executed with a SUCCEEDED record; no provisioned product is created and the record is not persisted. |
ExecuteProvisionedProductServiceAction |
Persist a SUCCEEDED execution record against a provisioned product; the ServiceActionId is required but never resolved and no action runs. |
GetAWSOrganizationsAccessStatus |
Report the Organizations access status; always ENABLED. |
GetProvisionedProductOutputs |
Return a provisioned product's stack outputs; always an empty list. |
ImportAsProvisionedProduct |
Register the given PhysicalId as an AVAILABLE provisioned product and persist an IMPORT record; no CloudFormation stack is looked up. |
ListAcceptedPortfolioShares |
List portfolios; returns every portfolio, not just accepted shares. |
ListBudgetsForResource |
List the budget names associated with a resource. |
ListConstraintsForPortfolio |
List the constraints for a portfolio, optionally filtered by product. |
ListLaunchPaths |
Synthesise one launch path per portfolio the product is associated with, keyed by the portfolio's own id. |
ListOrganizationPortfolioAccess |
List the organization nodes a portfolio is shared with. |
ListPortfolioAccess |
List the account IDs a portfolio is shared with; OrganizationParentId is accepted but ignored. |
ListPrincipalsForPortfolio |
List the principals associated with a portfolio. |
ListProvisionedProductPlans |
List provisioned product plans with offset-based pagination; PageSize is capped at 20. |
ListProvisioningArtifactsForServiceAction |
List provisioning artifacts for a service action; always an empty list. |
ListRecordHistory |
Synthesise one SUCCEEDED record per stored provisioned product; the entries carry no RecordId and the real record store is not consulted. |
ListResourcesForTagOption |
List the resources a TagOption is attached to. |
ListServiceActions |
List every service action in the account, without context scoping. |
ListServiceActionsForProvisioningArtifact |
List service actions for a provisioning artifact; always an empty list. |
ListStackInstancesForProvisionedProduct |
Return one synthetic stack instance derived from the provisioned product; always exactly one, always CURRENT. |
NotifyProvisionProductEngineWorkflowResult |
Validate the workflow-result fields and return empty; nothing is recorded. |
NotifyTerminateProvisionedProductEngineWorkflowResult |
Validate the workflow-result fields and return empty; nothing is recorded. |
NotifyUpdateProvisionedProductEngineWorkflowResult |
Validate the workflow-result fields and return empty; nothing is recorded. |
ScanProvisionedProducts |
List all provisioned products with page-token pagination. |
UpdateConstraint |
Update a constraint's parameters or description. |
UpdateProvisionedProduct |
Validate the provisioned product exists and persist a SUCCEEDED record; no field on the product itself changes. |
UpdateProvisionedProductProperties |
Replace a provisioned product's properties wholesale and persist a record; property keys are not validated. |
UpdateServiceAction |
Update a service action's definition. |
CreateProvisioningArtifact |
Add a new provisioning artifact (version) to a product. |
DescribeCopyProductStatus |
Report a product-copy status; always SUCCEEDED immediately. |
TerminateProvisionedProduct |
Mark a provisioned product TERMINATED and persist a record; the row is kept and any account it created is left in the organization. |
UpdateProvisioningArtifact |
Rename a provisioning artifact; only Name is applied and the artifact is always reported Active. |
Floci lazily creates the managed AWS Control Tower Account Factory Portfolio and its
Account Factory product the first time ListPortfolios, ListAcceptedPortfolioShares,
SearchProducts or ProvisionProduct is called. SearchProductsAsAdmin does not trigger
this, so the Account Factory product is absent from the admin view until one of those
operations has run.
ProvisionProduct resolves the product named by ProductId or ProductName and rejects one the catalog does not hold with ResourceNotFoundException; a request naming neither is rejected with InvalidParametersException. A supplied ProvisioningArtifactId or ProvisioningArtifactName must belong to that product, and when neither is supplied the product's first artifact is used.
When the resolved product is the Account Factory product, ProvisionProduct creates a real Organizations member account through the Organizations service — reusing an existing account when AccountEmail already matches one — moves it under the OU named by the ManagedOrganizationalUnit provisioning parameter, and persists an AVAILABLE provisioned product of type CONTROL_TOWER_ACCOUNT. Organizational-unit display labels such as Infrastructure (ou-...) are resolved to their underlying OU IDs. Any other product persists an AVAILABLE provisioned product of type CFN_STACK and never touches Organizations.
Limitations
ProvisionProductprovisions nothing outside the Account Factory path. A product created withCreateProductgets anAVAILABLECFN_STACKprovisioned product record and nothing else: no CloudFormation template is rendered, no stack exists, and the record carries noPhysicalId. Provisioning parameters are not applied or stored, and provisioning is idempotent onProvisionedProductName— a repeat call returns the existing provisioned product unchanged, whichever product it names.TerminateProvisionedProductdoes not release anything. It flips the provisioned product'sStatustoTERMINATEDand persists a record, but the provisioned product row is kept (so it still appears inScanProvisionedProductsandSearchProvisionedProducts) and an Organizations account created for it is left in place.RetainPhysicalResourcesandIgnoreErrorshave no effect.- The three
Notify*EngineWorkflowResultoperations record nothing. Each validates its fields —Statusmust beSUCCEEDEDorFAILED— and returns an empty response. No workflow token, record, or status is stored, so a notified result is not observable afterwards through any operation. ListStackInstancesForProvisionedProductreturns one synthetic instance. No stack set or stack instances are modelled; the single entry is derived from the provisioned product itself —Accountfrom itsPhysicalId,Regionparsed out of its ARN, andStackInstanceStatusalwaysCURRENT.- Constraint parameters are never persisted.
CreateConstraintrequiresParametersand echoes it back in its own response, but only the constraint's ids, type, owner and description are stored —DescribeConstraintandListConstraintsForPortfolionever returnConstraintParameters.UpdateConstraintdoes storeParameters, but nothing reads them back either. - Service-action associations are write-only.
AssociateServiceActionWithProvisioningArtifactand its batch form validate the product and artifact and store an association (rejecting duplicates withDuplicateResourceException), and the disassociate operations remove it, but no operation reads it back — bothListServiceActionsForProvisioningArtifactandListProvisioningArtifactsForServiceActionalways return empty (see below). CopyProductcompletes synchronously. Real AWS returns aCopyProductTokenfor an asynchronous copy whose progress is polled withDescribeCopyProductStatus. Floci creates the copied product before returning, so the token it hands back is already terminal —DescribeCopyProductStatusimmediately reportsSUCCEEDED. A caller that treats the token as pending work will not see any intermediate state.DescribeServiceActionExecutionParametersalways returns an empty parameter list. No parameter schema is modelled for service action definitions.ListAcceptedPortfolioSharesreturns every portfolio, not just accepted shares. Consistent withAcceptPortfolioSharenot tracking acceptance as distinct state (see above): there is no way to distinguish a portfolio the caller owns from one shared and accepted from elsewhere.UpdateProvisionedProductdoes not apply any request fields. It validates the provisioned product exists and persists aSUCCEEDEDrecord (matching this codebase's validate-and-echo convention for unimplementable state transitions), but no field on the provisioned product itself changes — a real re-provisioning artifact/parameter change is not modelled.CopyProductcopies product metadata only, including provisioning-artifact ids and names.SourceProvisioningArtifactIdentifiersandCopyOptionsin the request are not honoured — every artifact is carried over and noCopyOptionis applied.DescribePortfolioSharesreports every share asAccepted: true. Shares complete immediately, so there is no pending or declined state to report, andShareTagOptionsandSharePrincipalsare alwaysfalsebecause neither is modelled.AcceptPortfolioShareandRejectPortfolioSharevalidate the portfolio exists and return successfully, but neither persists any state. Acceptance is unconditional in this emulator — every share already reads back asAccepted: true(see above) — so reject is likewise a no-op beyond validation. There is no way to observe a rejected share through any other operation.DeletePortfolioShareremoves the share row keyed byPortfolioId+ the resolved principal (ACCOUNT:<AccountId>or<OrganizationNode.Type>:<OrganizationNode.Value>), the same keyCreatePortfolioShare/UpdatePortfolioSharewrite. It does not acceptPortfolioShareTokenas an alternate lookup key, matching the request shape AWS documents for this operation.DescribePortfolioSharesdoes not paginate. All shares for a portfolio are returned in one response and noNextPageTokenis emitted, rather than advertising a token the emulator would not honour.DescribeProductomitsBudgetsandLaunchPaths. Neither budgets nor launch paths are modelled, so the fields are absent rather than returned empty.DescribeProvisioningArtifactomitsInfo. The CloudFormation template URL map is not stored, andVerbosein the request has no effect.EnableAWSOrganizationsAccess/DisableAWSOrganizationsAccessdo not persist any state.GetAWSOrganizationsAccessStatusalways reportsENABLEDregardless of which was last called.- Budget associations are name-only.
AssociateBudgetWithResourcerecords the pairing of aBudgetNamestring with a resource; no Budgets service integration exists, so any name is accepted and no actual budget or cost data is checked or returned. ListServiceActionsreturns every service action in the account. There is no portfolio, product, or provisioning-artifact scoping — real AWS only lists actions associated with a given context.DefinitionTypeis always reported asSSM_AUTOMATION, matching AWS's only currently defined value for that enum.ListProvisioningArtifactsForServiceActionalways returns an empty list. It validates thatServiceActionIdwas supplied and returns no views, even when associations for that service action were stored (see above).ExecuteProvisionedProductPlancompletes synchronously and does not create an actual provisioned product. It validates the plan exists and returns aSUCCEEDEDrecord, but noProvisionedProductentry is created as a side effect —DescribeProvisionedProductwill not find anything from an executed plan.GetProvisionedProductOutputsalways returns an emptyOutputslist. No CloudFormation stack outputs are modelled or persisted for any provisioned product.- Two operations return a
RecordIdthey never persist.ImportAsProvisionedProduct,ExecuteProvisionedProductServiceAction,UpdateProvisionedProduct,UpdateProvisionedProductPropertiesandTerminateProvisionedProductall store a record thatDescribeRecordcan later find.ProvisionProductandExecuteProvisionedProductPlanmint aRecordIdfor their response only, so looking either one up afterwards raisesResourceNotFoundException. ListRecordHistorydoes not read the record store. It synthesises oneSUCCEEDEDentry per stored provisioned product, so the entries carry noRecordIdand cannot be fed back intoDescribeRecord, and records from operations that persisted one never appear. Request filters and pagination are ignored.ListServiceActionsForProvisioningArtifactalways returns an empty list. It validates that the product and provisioning artifact exist and then returns no summaries, even when associations for that artifact were stored (the inverse case,ListProvisioningArtifactsForServiceAction, behaves the same way).
Configuration
| Variable | Default | Description |
|---|---|---|
FLOCI_SERVICES_SERVICECATALOG_ENABLED |
true |
Enable or disable AWS Service Catalog |