Class ConflictException
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<ConflictException.Builder,ConflictException>
The request conflicts with the current state of the resource.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ConflictException.Builderbuilder()reason()Machine-readable cause, for clients that branch on it.The affected resource identifier.The affected resource type.static Class<? extends ConflictException.Builder> Create aAwsServiceException.Builderinitialized with the properties of thisAwsServiceException.Methods inherited from class software.amazon.awssdk.awscore.exception.AwsServiceException
awsErrorDetails, getMessage, isClockSkewException, isThrottlingExceptionMethods inherited from class software.amazon.awssdk.core.exception.SdkServiceException
extendedRequestId, isRetryableException, requestId, statusCodeMethods inherited from class software.amazon.awssdk.core.exception.SdkException
create, numAttempts, rawMessage, retryableMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFieldsMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
toBuilder
Description copied from class:AwsServiceExceptionCreate aAwsServiceException.Builderinitialized with the properties of thisAwsServiceException.- Specified by:
toBuilderin interfaceToCopyableBuilder<ConflictException.Builder,ConflictException> - Overrides:
toBuilderin classPartnerCentralMarketingException- Returns:
- A new builder initialized with this config's properties.
-
builder
-
serializableBuilderClass
-
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:
- 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.
-
resourceType
-
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:
- 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.
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-