Interface ConflictException.Builder
- All Superinterfaces:
AwsServiceException.Builder,Buildable,CopyableBuilder<ConflictException.Builder,,ConflictException> PartnerCentralMarketingException.Builder,SdkBuilder<ConflictException.Builder,,ConflictException> SdkException.Builder,SdkPojo,SdkServiceException.Builder
- Enclosing class:
ConflictException
-
Method Summary
Modifier and TypeMethodDescriptionawsErrorDetails(AwsErrorDetails awsErrorDetails) Specifies the additional awsErrorDetails from the service response.Specifies the exception that caused this exception to occur.Specifies the details of this exception.numAttempts(Integer numAttempts) Machine-readable cause, for clients that branch on it.Specifies the requestId returned by the called service.resourceId(String resourceId) The affected resource identifier.resourceType(String resourceType) The affected resource type.statusCode(int statusCode) Specifies the status code returned by the service.writableStackTrace(Boolean writableStackTrace) Specifies whether the stack trace in this exception can be written.Methods inherited from interface software.amazon.awssdk.awscore.exception.AwsServiceException.Builder
awsErrorDetails, build, clockSkew, clockSkew, extendedRequestIdMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.exception.SdkException.Builder
cause, message, numAttempts, writableStackTraceMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFieldsMethods inherited from interface software.amazon.awssdk.core.exception.SdkServiceException.Builder
extendedRequestId, requestId, statusCode
-
Method Details
-
resourceId
The affected resource identifier. For a uniqueness conflict this is the identifier of the existing resource, so the caller can act on it without a separate lookup.
- Parameters:
resourceId- The affected resource identifier. For a uniqueness conflict this is the identifier of the existing resource, so the caller can act on it without a separate lookup.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
resourceType
The affected resource type.
- Parameters:
resourceType- The affected resource type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
reason
Machine-readable cause, for clients that branch on it.
An open set of
SCREAMING_SNAKE_CASEtokens, deliberately typed as a string rather than an enum.ConflictExceptionis shared by every resource in this service, so an enum here would accumulate values that are meaningful for one resource and inapplicable to the rest — the cohesiveness problem the Backward Compatibility standard describes under "Sharing enums" — and each new value would force an SDK regeneration on callers who can never encounter it. Clients MUST treat an unrecognised value as an unspecified conflict and fall back toMessage.Values in use today:
From the campaign asset activation path. Every one of these is decided before the operation returns, so a caller that receives one knows nothing was started.
These two are thrown by
DeactivateCampaignAsset, which refuses one asset outright.StartCampaignAssetActivationTaskreports the same two causes per asset as a FAILED task entry instead of throwing, because one bad identifier must not refuse the twenty-four good ones beside it — so the spellings are deliberately identical toCampaignAssetStateReason's, letting a client match one string whichever way the refusal arrived. The two types evolve independently on purpose: this is an open string shared by every resource, that is a closed enum owned by one operation.ASSET_START_IN_PROGRESS— the asset is already being started, or another caller changed it during this request. Retryable once the outcome is visible.PREREQUISITE_ASSET_NOT_ACTIVE— this asset embeds output from another asset that is not live.ResourceIdcarries that asset's identifier.
From the prerequisite edges between a campaign's assets — an email that embeds its landing page's URL. Both refuse the whole request and write nothing.
PREREQUISITE_ASSET_MISSING— fromBatchCreateCampaignAsset: an entry's blueprint embeds another blueprint's output, and that blueprint is neither named in the same request nor already an asset on the campaign. Retry with it in the request.ResourceIdcarries the missing blueprint's identifier.ASSET_HAS_DEPENDENTS— fromDeleteCampaignAsset: another asset on the campaign embeds this asset's output, so deleting it would leave that asset unactivatable. Delete the dependents first. The message names them.
CAMPAIGN_COMPLETED— the campaign is complete (the UTC date is after itsEndOn), so it and its assets are read-only. RefusesUpdateCampaign,BatchCreateCampaignAsset,UpdateCampaignAsset,DeleteCampaignAssetandStartCampaignAssetActivationTask; neverDeactivateCampaignAsset. Not retryable, and not fixable —EndOncannot be moved once it has passed, so nothing the caller does will make the write succeed.ResourceIdcarries the campaign identifier.⚠️ This is the one conflict reason whose condition never clears, which sits awkwardly with
ConflictExceptionpromising a state that may change. It is a conflict rather than a validation failure because the request is well formed and would have succeeded a moment earlier — the resource's state is what refuses it, which is what this exception is for. ContrastASSET_NOT_STARTABLE, which moved toValidationExceptionprecisely because it is a property of the asset's type rather than of its state.⚠️
COMPLETEDalso exists as aCampaignAssetExportTaskStatusvalue, on a different axis. That one means an export archive finished assembling. The two are unrelated and must not be unified.CAMPAIGN_HAS_ACTIVE_ASSETS— fromDeleteCampaign: at least one of the campaign's assets is live, and deleting the campaign would orphan what the delivery platform still serves or sends. Deactivate those assets withDeactivateCampaignAsset, then retry. The message names them.ResourceIdcarries the campaign identifier.CAMPAIGN_ACTIVATION_IN_PROGRESS— fromStartCampaignAssetActivationTaskandDeleteCampaign, refusing the whole request: one activation task runs on a campaign at a time.ResourceIdcarries the holding task's id, so a caller can pollGetCampaignAssetActivationTaskrather than guess. Retryable once that task reaches a terminal status.SERVICE_LINKED_ROLE_DELETION_IN_PROGRESS— fromStartCampaignAssetActivationTask, refusing the whole request: this service's service-linked role is being deleted, so no asset may go live. Not a lease conflict:ResourceIdis unset and there is no task to poll. Retryable after a short wait; if the role was deleted, the next activation recreates it.LAYOUT_LOCKED_AFTER_ACTIVATION— fromUpdateCampaignAsset, refusing aLayoutchange on a multi-layout asset that has activated successfully at least once (DG-044). The published object is that layout's, so switching would leave the asset describing a layout that is not the one live. Not fixable: the asset keeps its layout for life. A failed activation does not lock it. Re-sending the layout already selected is not a change and is accepted.ResourceIdcarries the asset identifier.ASSET_START_IN_PROGRESS— also fromUpdateCampaignAsset, refusing any edit to an asset the campaign's running activation task has accepted and not yet finished: the run publishes the content it read, so an edit accepted mid-run would either be published unvalidated or never published. Nothing is written. Retryable once the asset's outcome on the task (GetCampaignAssetActivationTask) is terminal; the asset's siblings may still be running.ResourceIdcarries the asset identifier.ASSET_ALREADY_ACTIVE— fromUpdateCampaignAsset, refusing any change to a live email or social post, content or schedule. Deactivate it first; the next activation sends everything current. Landing pages and documents are edited live and converge by re-activation.ResourceIdcarries the asset identifier.ASSET_NOT_DEACTIVATABLE— fromDeactivateCampaignAsset, for an asset that can't be stopped: a document, banner or landing page until the campaign has completed, when it becomes removable. Until then, update it and activate it again.ResourceIdcarries the asset identifier.ASSET_HAS_LOCKED_SENDS— fromDeactivateCampaignAsset, within an hour of the asset's send (a social post's publish), when it can no longer be withdrawn.ASSET_ALREADY_DELIVERED— the same, once that time has passed: a sent email or a published post cannot be recalled. Neither is retryable.Three values were removed with the campaign lifecycle and the singular activate, and none should be re-added here:
CAMPAIGN_NOT_STARTED— a campaign has no state to be started out of.ASSET_NOT_STARTABLE— moved toValidationException, with no reason. The value's own documentation said it was "not retryable and not fixable: it is a property of the asset's type", andConflictExceptionpromises a state that may change. The gate itself stays — deleting it lets a download-only asset into a task with no dispatch arm, which would succeed and do nothing.ASSET_START_UNCONFIRMED— described a state that no longer occurs. DG cannot be more idempotent than a platform whose social create has no idempotency key, so an ambiguous hand-over is now an ordinary failure carryingINTERNAL_ERROR. Holding the asset in a distinct state bought a guarantee that was never real, and had no exit.
- Parameters:
reason- Machine-readable cause, for clients that branch on it.An open set of
SCREAMING_SNAKE_CASEtokens, deliberately typed as a string rather than an enum.ConflictExceptionis shared by every resource in this service, so an enum here would accumulate values that are meaningful for one resource and inapplicable to the rest — the cohesiveness problem the Backward Compatibility standard describes under "Sharing enums" — and each new value would force an SDK regeneration on callers who can never encounter it. Clients MUST treat an unrecognised value as an unspecified conflict and fall back toMessage.Values in use today:
From the campaign asset activation path. Every one of these is decided before the operation returns, so a caller that receives one knows nothing was started.
These two are thrown by
DeactivateCampaignAsset, which refuses one asset outright.StartCampaignAssetActivationTaskreports the same two causes per asset as a FAILED task entry instead of throwing, because one bad identifier must not refuse the twenty-four good ones beside it — so the spellings are deliberately identical toCampaignAssetStateReason's, letting a client match one string whichever way the refusal arrived. The two types evolve independently on purpose: this is an open string shared by every resource, that is a closed enum owned by one operation.ASSET_START_IN_PROGRESS— the asset is already being started, or another caller changed it during this request. Retryable once the outcome is visible.PREREQUISITE_ASSET_NOT_ACTIVE— this asset embeds output from another asset that is not live.ResourceIdcarries that asset's identifier.
From the prerequisite edges between a campaign's assets — an email that embeds its landing page's URL. Both refuse the whole request and write nothing.
PREREQUISITE_ASSET_MISSING— fromBatchCreateCampaignAsset: an entry's blueprint embeds another blueprint's output, and that blueprint is neither named in the same request nor already an asset on the campaign. Retry with it in the request.ResourceIdcarries the missing blueprint's identifier.ASSET_HAS_DEPENDENTS— fromDeleteCampaignAsset: another asset on the campaign embeds this asset's output, so deleting it would leave that asset unactivatable. Delete the dependents first. The message names them.
CAMPAIGN_COMPLETED— the campaign is complete (the UTC date is after itsEndOn), so it and its assets are read-only. RefusesUpdateCampaign,BatchCreateCampaignAsset,UpdateCampaignAsset,DeleteCampaignAssetandStartCampaignAssetActivationTask; neverDeactivateCampaignAsset. Not retryable, and not fixable —EndOncannot be moved once it has passed, so nothing the caller does will make the write succeed.ResourceIdcarries the campaign identifier.⚠️ This is the one conflict reason whose condition never clears, which sits awkwardly with
ConflictExceptionpromising a state that may change. It is a conflict rather than a validation failure because the request is well formed and would have succeeded a moment earlier — the resource's state is what refuses it, which is what this exception is for. ContrastASSET_NOT_STARTABLE, which moved toValidationExceptionprecisely because it is a property of the asset's type rather than of its state.⚠️
COMPLETEDalso exists as aCampaignAssetExportTaskStatusvalue, on a different axis. That one means an export archive finished assembling. The two are unrelated and must not be unified.CAMPAIGN_HAS_ACTIVE_ASSETS— fromDeleteCampaign: at least one of the campaign's assets is live, and deleting the campaign would orphan what the delivery platform still serves or sends. Deactivate those assets withDeactivateCampaignAsset, then retry. The message names them.ResourceIdcarries the campaign identifier.CAMPAIGN_ACTIVATION_IN_PROGRESS— fromStartCampaignAssetActivationTaskandDeleteCampaign, refusing the whole request: one activation task runs on a campaign at a time.ResourceIdcarries the holding task's id, so a caller can pollGetCampaignAssetActivationTaskrather than guess. Retryable once that task reaches a terminal status.SERVICE_LINKED_ROLE_DELETION_IN_PROGRESS— fromStartCampaignAssetActivationTask, refusing the whole request: this service's service-linked role is being deleted, so no asset may go live. Not a lease conflict:ResourceIdis unset and there is no task to poll. Retryable after a short wait; if the role was deleted, the next activation recreates it.LAYOUT_LOCKED_AFTER_ACTIVATION— fromUpdateCampaignAsset, refusing aLayoutchange on a multi-layout asset that has activated successfully at least once (DG-044). The published object is that layout's, so switching would leave the asset describing a layout that is not the one live. Not fixable: the asset keeps its layout for life. A failed activation does not lock it. Re-sending the layout already selected is not a change and is accepted.ResourceIdcarries the asset identifier.ASSET_START_IN_PROGRESS— also fromUpdateCampaignAsset, refusing any edit to an asset the campaign's running activation task has accepted and not yet finished: the run publishes the content it read, so an edit accepted mid-run would either be published unvalidated or never published. Nothing is written. Retryable once the asset's outcome on the task (GetCampaignAssetActivationTask) is terminal; the asset's siblings may still be running.ResourceIdcarries the asset identifier.ASSET_ALREADY_ACTIVE— fromUpdateCampaignAsset, refusing any change to a live email or social post, content or schedule. Deactivate it first; the next activation sends everything current. Landing pages and documents are edited live and converge by re-activation.ResourceIdcarries the asset identifier.ASSET_NOT_DEACTIVATABLE— fromDeactivateCampaignAsset, for an asset that can't be stopped: a document, banner or landing page until the campaign has completed, when it becomes removable. Until then, update it and activate it again.ResourceIdcarries the asset identifier.ASSET_HAS_LOCKED_SENDS— fromDeactivateCampaignAsset, within an hour of the asset's send (a social post's publish), when it can no longer be withdrawn.ASSET_ALREADY_DELIVERED— the same, once that time has passed: a sent email or a published post cannot be recalled. Neither is retryable.Three values were removed with the campaign lifecycle and the singular activate, and none should be re-added here:
CAMPAIGN_NOT_STARTED— a campaign has no state to be started out of.ASSET_NOT_STARTABLE— moved toValidationException, with no reason. The value's own documentation said it was "not retryable and not fixable: it is a property of the asset's type", andConflictExceptionpromises a state that may change. The gate itself stays — deleting it lets a download-only asset into a task with no dispatch arm, which would succeed and do nothing.ASSET_START_UNCONFIRMED— described a state that no longer occurs. DG cannot be more idempotent than a platform whose social create has no idempotency key, so an ambiguous hand-over is now an ordinary failure carryingINTERNAL_ERROR. Holding the asset in a distinct state bought a guarantee that was never real, and had no exit.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
awsErrorDetails
Description copied from interface:AwsServiceException.BuilderSpecifies the additional awsErrorDetails from the service response.- Specified by:
awsErrorDetailsin interfaceAwsServiceException.Builder- Specified by:
awsErrorDetailsin interfacePartnerCentralMarketingException.Builder- Parameters:
awsErrorDetails- Object containing additional details from the response.- Returns:
- This object for method chaining.
-
message
Description copied from interface:SdkException.BuilderSpecifies the details of this exception.- Specified by:
messagein interfaceAwsServiceException.Builder- Specified by:
messagein interfacePartnerCentralMarketingException.Builder- Specified by:
messagein interfaceSdkException.Builder- Specified by:
messagein interfaceSdkServiceException.Builder- Parameters:
message- The details of this exception.- Returns:
- This method for object chaining
-
requestId
Description copied from interface:SdkServiceException.BuilderSpecifies the requestId returned by the called service.- Specified by:
requestIdin interfaceAwsServiceException.Builder- Specified by:
requestIdin interfacePartnerCentralMarketingException.Builder- Specified by:
requestIdin interfaceSdkServiceException.Builder- Parameters:
requestId- A string that identifies the request made to a service.- Returns:
- This object for method chaining.
-
statusCode
Description copied from interface:SdkServiceException.BuilderSpecifies the status code returned by the service.- Specified by:
statusCodein interfaceAwsServiceException.Builder- Specified by:
statusCodein interfacePartnerCentralMarketingException.Builder- Specified by:
statusCodein interfaceSdkServiceException.Builder- Parameters:
statusCode- an int containing the status code returned by the service.- Returns:
- This method for object chaining.
-
cause
Description copied from interface:SdkException.BuilderSpecifies the exception that caused this exception to occur.- Specified by:
causein interfaceAwsServiceException.Builder- Specified by:
causein interfacePartnerCentralMarketingException.Builder- Specified by:
causein interfaceSdkException.Builder- Specified by:
causein interfaceSdkServiceException.Builder- Parameters:
cause- The exception that caused this exception to occur.- Returns:
- This object for method chaining.
-
writableStackTrace
Description copied from interface:SdkException.BuilderSpecifies whether the stack trace in this exception can be written.- Specified by:
writableStackTracein interfacePartnerCentralMarketingException.Builder- Specified by:
writableStackTracein interfaceSdkException.Builder- Specified by:
writableStackTracein interfaceSdkServiceException.Builder- Parameters:
writableStackTrace- Whether the stack trace can be written.- Returns:
- This method for object chaining
-
numAttempts
- Specified by:
numAttemptsin interfaceAwsServiceException.Builder- Specified by:
numAttemptsin interfacePartnerCentralMarketingException.Builder- Specified by:
numAttemptsin interfaceSdkException.Builder- Specified by:
numAttemptsin interfaceSdkServiceException.Builder- Parameters:
numAttempts- The attempt count- Returns:
- This method for object chaining
-