|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; |
| 3 | +import { getSerdePlugin } from "@smithy/middleware-serde"; |
| 4 | +import { Command as $Command } from "@smithy/smithy-client"; |
| 5 | +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; |
| 6 | + |
| 7 | +import { ConnectCasesClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConnectCasesClient"; |
| 8 | +import { commonParams } from "../endpoint/EndpointParameters"; |
| 9 | +import { DeleteFieldRequest, DeleteFieldResponse } from "../models/models_0"; |
| 10 | +import { de_DeleteFieldCommand, se_DeleteFieldCommand } from "../protocols/Aws_restJson1"; |
| 11 | + |
| 12 | +/** |
| 13 | + * @public |
| 14 | + */ |
| 15 | +export { __MetadataBearer, $Command }; |
| 16 | +/** |
| 17 | + * @public |
| 18 | + * |
| 19 | + * The input for {@link DeleteFieldCommand}. |
| 20 | + */ |
| 21 | +export interface DeleteFieldCommandInput extends DeleteFieldRequest {} |
| 22 | +/** |
| 23 | + * @public |
| 24 | + * |
| 25 | + * The output of {@link DeleteFieldCommand}. |
| 26 | + */ |
| 27 | +export interface DeleteFieldCommandOutput extends DeleteFieldResponse, __MetadataBearer {} |
| 28 | + |
| 29 | +/** |
| 30 | + * <p>Deletes a field from a cases template. You can delete up to 100 fields per domain.</p> |
| 31 | + * <p>After a field is deleted:</p> |
| 32 | + * <ul> |
| 33 | + * <li> |
| 34 | + * <p>You can still retrieve the field by calling <code>BatchGetField</code>.</p> |
| 35 | + * </li> |
| 36 | + * <li> |
| 37 | + * <p>You cannot update a deleted field by calling <code>UpdateField</code>; it throws a |
| 38 | + * <code>ValidationException</code>.</p> |
| 39 | + * </li> |
| 40 | + * <li> |
| 41 | + * <p>Deleted fields are not included in the <code>ListFields</code> response.</p> |
| 42 | + * </li> |
| 43 | + * <li> |
| 44 | + * <p>Calling <code>CreateCase</code> with a deleted field throws a <code>ValidationException</code> denoting |
| 45 | + * which field IDs in the request have been deleted.</p> |
| 46 | + * </li> |
| 47 | + * <li> |
| 48 | + * <p>Calling <code>GetCase</code> with a deleted field ID returns the deleted field's value if one |
| 49 | + * exists.</p> |
| 50 | + * </li> |
| 51 | + * <li> |
| 52 | + * <p>Calling <code>UpdateCase</code> with a deleted field ID throws a <code>ValidationException</code> if the |
| 53 | + * case does not already contain a value for the deleted field. Otherwise it succeeds, |
| 54 | + * allowing you to update or remove (using <code>emptyValue: \{\}</code>) the field's value from the |
| 55 | + * case.</p> |
| 56 | + * </li> |
| 57 | + * <li> |
| 58 | + * <p> |
| 59 | + * <code>GetTemplate</code> does not return field IDs for deleted fields.</p> |
| 60 | + * </li> |
| 61 | + * <li> |
| 62 | + * <p> |
| 63 | + * <code>GetLayout</code> does not return field IDs for deleted fields.</p> |
| 64 | + * </li> |
| 65 | + * <li> |
| 66 | + * <p>Calling <code>SearchCases</code> with the deleted field ID as a filter returns any cases that |
| 67 | + * have a value for the deleted field that matches the filter criteria.</p> |
| 68 | + * </li> |
| 69 | + * <li> |
| 70 | + * <p>Calling <code>SearchCases</code> with a <code>searchTerm</code> value that matches a deleted field's value on a |
| 71 | + * case returns the case in the response.</p> |
| 72 | + * </li> |
| 73 | + * <li> |
| 74 | + * <p>Calling <code>BatchPutFieldOptions</code> with a deleted field ID throw a <code>ValidationException</code>.</p> |
| 75 | + * </li> |
| 76 | + * <li> |
| 77 | + * <p>Calling <code>GetCaseEventConfiguration</code> does not return field IDs for deleted fields.</p> |
| 78 | + * </li> |
| 79 | + * </ul> |
| 80 | + * @example |
| 81 | + * Use a bare-bones client and the command you need to make an API call. |
| 82 | + * ```javascript |
| 83 | + * import { ConnectCasesClient, DeleteFieldCommand } from "@aws-sdk/client-connectcases"; // ES Modules import |
| 84 | + * // const { ConnectCasesClient, DeleteFieldCommand } = require("@aws-sdk/client-connectcases"); // CommonJS import |
| 85 | + * const client = new ConnectCasesClient(config); |
| 86 | + * const input = { // DeleteFieldRequest |
| 87 | + * domainId: "STRING_VALUE", // required |
| 88 | + * fieldId: "STRING_VALUE", // required |
| 89 | + * }; |
| 90 | + * const command = new DeleteFieldCommand(input); |
| 91 | + * const response = await client.send(command); |
| 92 | + * // {}; |
| 93 | + * |
| 94 | + * ``` |
| 95 | + * |
| 96 | + * @param DeleteFieldCommandInput - {@link DeleteFieldCommandInput} |
| 97 | + * @returns {@link DeleteFieldCommandOutput} |
| 98 | + * @see {@link DeleteFieldCommandInput} for command's `input` shape. |
| 99 | + * @see {@link DeleteFieldCommandOutput} for command's `response` shape. |
| 100 | + * @see {@link ConnectCasesClientResolvedConfig | config} for ConnectCasesClient's `config` shape. |
| 101 | + * |
| 102 | + * @throws {@link AccessDeniedException} (client fault) |
| 103 | + * <p>You do not have sufficient access to perform this action.</p> |
| 104 | + * |
| 105 | + * @throws {@link ConflictException} (client fault) |
| 106 | + * <p>The requested operation would cause a conflict with the current state of a service |
| 107 | + * resource associated with the request. Resolve the conflict before retrying this request. See |
| 108 | + * the accompanying error message for details.</p> |
| 109 | + * |
| 110 | + * @throws {@link InternalServerException} (server fault) |
| 111 | + * <p>We couldn't process your request because of an issue with the server. Try again |
| 112 | + * later.</p> |
| 113 | + * |
| 114 | + * @throws {@link ResourceNotFoundException} (client fault) |
| 115 | + * <p>We couldn't find the requested resource. Check that your resources exists and were created |
| 116 | + * in the same Amazon Web Services Region as your request, and try your request again.</p> |
| 117 | + * |
| 118 | + * @throws {@link ServiceQuotaExceededException} (client fault) |
| 119 | + * <p>The service quota has been exceeded. For a list of service quotas, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-service-limits.html">Amazon Connect Service Quotas</a> in the <i>Amazon Connect |
| 120 | + * Administrator Guide</i>.</p> |
| 121 | + * |
| 122 | + * @throws {@link ThrottlingException} (client fault) |
| 123 | + * <p>The rate has been exceeded for this API. Please try again after a few minutes.</p> |
| 124 | + * |
| 125 | + * @throws {@link ValidationException} (client fault) |
| 126 | + * <p>The request isn't valid. Check the syntax and try again.</p> |
| 127 | + * |
| 128 | + * @throws {@link ConnectCasesServiceException} |
| 129 | + * <p>Base exception class for all service exceptions from ConnectCases service.</p> |
| 130 | + * |
| 131 | + * @public |
| 132 | + */ |
| 133 | +export class DeleteFieldCommand extends $Command |
| 134 | + .classBuilder< |
| 135 | + DeleteFieldCommandInput, |
| 136 | + DeleteFieldCommandOutput, |
| 137 | + ConnectCasesClientResolvedConfig, |
| 138 | + ServiceInputTypes, |
| 139 | + ServiceOutputTypes |
| 140 | + >() |
| 141 | + .ep({ |
| 142 | + ...commonParams, |
| 143 | + }) |
| 144 | + .m(function (this: any, Command: any, cs: any, config: ConnectCasesClientResolvedConfig, o: any) { |
| 145 | + return [ |
| 146 | + getSerdePlugin(config, this.serialize, this.deserialize), |
| 147 | + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), |
| 148 | + ]; |
| 149 | + }) |
| 150 | + .s("AmazonConnectCases", "DeleteField", {}) |
| 151 | + .n("ConnectCasesClient", "DeleteFieldCommand") |
| 152 | + .f(void 0, void 0) |
| 153 | + .ser(se_DeleteFieldCommand) |
| 154 | + .de(de_DeleteFieldCommand) |
| 155 | + .build() {} |
0 commit comments