import { Command as $Command } from "@smithy/smithy-client"; import { MetadataBearer as __MetadataBearer } from "@smithy/types"; import { CloudFrontClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudFrontClient"; import { DeleteFunctionRequest } from "../models/models_1"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link DeleteFunctionCommand}. */ export interface DeleteFunctionCommandInput extends DeleteFunctionRequest { } /** * @public * * The output of {@link DeleteFunctionCommand}. */ export interface DeleteFunctionCommandOutput extends __MetadataBearer { } declare const DeleteFunctionCommand_base: { new (input: DeleteFunctionCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: DeleteFunctionCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Deletes a CloudFront function.

You cannot delete a function if it's associated with a cache behavior. First, update your distributions to remove the function association from all cache behaviors, then delete the function.

To delete a function, you must provide the function's name and version (ETag value). To get these values, you can use ListFunctions and DescribeFunction.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CloudFrontClient, DeleteFunctionCommand } from "@aws-sdk/client-cloudfront"; // ES Modules import * // const { CloudFrontClient, DeleteFunctionCommand } = require("@aws-sdk/client-cloudfront"); // CommonJS import * const client = new CloudFrontClient(config); * const input = { // DeleteFunctionRequest * Name: "STRING_VALUE", // required * IfMatch: "STRING_VALUE", // required * }; * const command = new DeleteFunctionCommand(input); * const response = await client.send(command); * // {}; * * ``` * * @param DeleteFunctionCommandInput - {@link DeleteFunctionCommandInput} * @returns {@link DeleteFunctionCommandOutput} * @see {@link DeleteFunctionCommandInput} for command's `input` shape. * @see {@link DeleteFunctionCommandOutput} for command's `response` shape. * @see {@link CloudFrontClientResolvedConfig | config} for CloudFrontClient's `config` shape. * * @throws {@link FunctionInUse} (client fault) *

Cannot delete the function because it's attached to one or more cache behaviors.

* * @throws {@link InvalidIfMatchVersion} (client fault) *

The If-Match version is missing or not valid.

* * @throws {@link NoSuchFunctionExists} (client fault) *

The function does not exist.

* * @throws {@link PreconditionFailed} (client fault) *

The precondition in one or more of the request fields evaluated to false.

* * @throws {@link UnsupportedOperation} (client fault) *

This operation is not supported in this Amazon Web Services Region.

* * @throws {@link CloudFrontServiceException} *

Base exception class for all service exceptions from CloudFront service.

* * * @public */ export declare class DeleteFunctionCommand extends DeleteFunctionCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: DeleteFunctionRequest; output: {}; }; sdk: { input: DeleteFunctionCommandInput; output: DeleteFunctionCommandOutput; }; }; }