Class ServiceCatalogDeployer
- All Implemented Interfaces:
AutoCloseable
deploy:catalog path (backing
the SC_PROVISION capability). Deliberately simpler than AwsDirectDeployer: no
CDK synthesis, no template of any kind travels through this class — the product's publisher
already registered a provisioning artifact (a CloudFormation template) with Service Catalog,
so this only ever calls ProvisionProduct/TerminateProvisionedProduct with
parameters, then polls DescribeRecord until Service Catalog's own provisioning engine
(which itself just runs a CloudFormation stack update behind the scenes, on a launch-
constraint role that is not Manager's) reaches a terminal state — same "poll until
terminal" shape AwsDirectDeployer's change-set wait already uses, just against a
different AWS API with no built-in SDK waiter to reuse.
Idempotency is native here, unlike the CFN path: ProvisionProductRequest
.provisionToken()/TerminateProvisionedProductRequest.terminateToken() are real AWS API
idempotency tokens — passing the same token for a retried call returns the same record instead
of provisioning twice. Callers should still pass a real token (this class doesn't generate one
itself) so that guarantee actually applies.
update only supports explicit new parameter values, not Service Catalog's
UpdateProvisioningParameter.usePreviousValue — see UpdateProvisionedProductInput's
javadoc for what that means for parameters an update call omits.
Targets real AWS by default, but redirects to a local emulator when this Manager instance
is itself running inside one — same LOCALSTACK_ENDPOINT/AWS_ENDPOINT_URL
detection AwsDirectDeployer uses, mirrored here for the same reason: this class
originally always used the default credential chain with no endpoint override, which would have
hit the exact same "calls real AWS from inside LocalStack" bug AwsDirectDeployer was
caught doing, the moment Service Catalog is ever exposed by a local emulator this deploys
against (it isn't yet on this repo's LocalStack setup — see the plan's 2026-08-11 note — so this
specific redirect is currently unexercised, but is not silently wrong the day that changes).
-
Constructor Summary
ConstructorsConstructorDescriptionServiceCatalogDeployer(String region) DefaultstargettoDeploymentTarget.AWS— this constructor predates a target parameter existing at all, and every caller today is a real-AWS Service Catalog operation; prefer the 2-arg overload for any new caller so the target is explicit rather than assumed.ServiceCatalogDeployer(String region, DeploymentTarget target) Real AWS by default; redirects to a local emulator instead whentargetresolves to one viaManagerEndpointSupport.resolveLocalEmulatorEndpoint(DeploymentTarget)— see class javadoc. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()provision(ProvisionProductInput input, String idempotencyToken) CallsProvisionProductand polls until the record reachesSUCCEEDEDorFAILED.CallsTerminateProvisionedProductand polls until the record reachesSUCCEEDEDorFAILED.update(UpdateProvisionedProductInput input, String idempotencyToken) CallsUpdateProvisionedProductand polls until the record reachesSUCCEEDEDorFAILED.
-
Constructor Details
-
ServiceCatalogDeployer
DefaultstargettoDeploymentTarget.AWS— this constructor predates a target parameter existing at all, and every caller today is a real-AWS Service Catalog operation; prefer the 2-arg overload for any new caller so the target is explicit rather than assumed. -
ServiceCatalogDeployer
Real AWS by default; redirects to a local emulator instead whentargetresolves to one viaManagerEndpointSupport.resolveLocalEmulatorEndpoint(DeploymentTarget)— see class javadoc.targetmust be the caller's own already-known, validated target (never re-derived from env vars here — see that method's own javadoc for why).
-
-
Method Details
-
provision
public ProvisionProductResult provision(ProvisionProductInput input, String idempotencyToken) throws IOException CallsProvisionProductand polls until the record reachesSUCCEEDEDorFAILED.- Parameters:
idempotencyToken- passed asprovisionToken— see class javadoc- Throws:
IOException- if the record reachesFAILED, or polling times out after 30 minutes
-
terminate
public ProvisionProductResult terminate(String provisionedProductId, String idempotencyToken) throws IOException CallsTerminateProvisionedProductand polls until the record reachesSUCCEEDEDorFAILED.- Parameters:
idempotencyToken- passed asterminateToken— see class javadoc- Throws:
IOException
-
update
public ProvisionProductResult update(UpdateProvisionedProductInput input, String idempotencyToken) throws IOException CallsUpdateProvisionedProductand polls until the record reachesSUCCEEDEDorFAILED. Only explicit new parameter values are supported — seeUpdateProvisionedProductInput's javadoc.- Parameters:
idempotencyToken- passed asupdateToken— see class javadoc- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-