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

Gets a cache policy, including the following metadata:

To get a cache policy, you must provide the policy's identifier. If the cache policy is attached to a distribution's cache behavior, you can get the policy's identifier using ListDistributions or GetDistribution. If the cache policy is not attached to a cache behavior, you can get the identifier using ListCachePolicies.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CloudFrontClient, GetCachePolicyCommand } from "@aws-sdk/client-cloudfront"; // ES Modules import * // const { CloudFrontClient, GetCachePolicyCommand } = require("@aws-sdk/client-cloudfront"); // CommonJS import * const client = new CloudFrontClient(config); * const input = { // GetCachePolicyRequest * Id: "STRING_VALUE", // required * }; * const command = new GetCachePolicyCommand(input); * const response = await client.send(command); * // { // GetCachePolicyResult * // CachePolicy: { // CachePolicy * // Id: "STRING_VALUE", // required * // LastModifiedTime: new Date("TIMESTAMP"), // required * // CachePolicyConfig: { // CachePolicyConfig * // Comment: "STRING_VALUE", * // Name: "STRING_VALUE", // required * // DefaultTTL: Number("long"), * // MaxTTL: Number("long"), * // MinTTL: Number("long"), // required * // ParametersInCacheKeyAndForwardedToOrigin: { // ParametersInCacheKeyAndForwardedToOrigin * // EnableAcceptEncodingGzip: true || false, // required * // EnableAcceptEncodingBrotli: true || false, * // HeadersConfig: { // CachePolicyHeadersConfig * // HeaderBehavior: "none" || "whitelist", // required * // Headers: { // Headers * // Quantity: Number("int"), // required * // Items: [ // HeaderList * // "STRING_VALUE", * // ], * // }, * // }, * // CookiesConfig: { // CachePolicyCookiesConfig * // CookieBehavior: "none" || "whitelist" || "allExcept" || "all", // required * // Cookies: { // CookieNames * // Quantity: Number("int"), // required * // Items: [ // CookieNameList * // "STRING_VALUE", * // ], * // }, * // }, * // QueryStringsConfig: { // CachePolicyQueryStringsConfig * // QueryStringBehavior: "none" || "whitelist" || "allExcept" || "all", // required * // QueryStrings: { // QueryStringNames * // Quantity: Number("int"), // required * // Items: [ // QueryStringNamesList * // "STRING_VALUE", * // ], * // }, * // }, * // }, * // }, * // }, * // ETag: "STRING_VALUE", * // }; * * ``` * * @param GetCachePolicyCommandInput - {@link GetCachePolicyCommandInput} * @returns {@link GetCachePolicyCommandOutput} * @see {@link GetCachePolicyCommandInput} for command's `input` shape. * @see {@link GetCachePolicyCommandOutput} for command's `response` shape. * @see {@link CloudFrontClientResolvedConfig | config} for CloudFrontClient's `config` shape. * * @throws {@link AccessDenied} (client fault) *

Access denied.

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

The cache policy does not exist.

* * @throws {@link CloudFrontServiceException} *

Base exception class for all service exceptions from CloudFront service.

* * * @public */ export declare class GetCachePolicyCommand extends GetCachePolicyCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: GetCachePolicyRequest; output: GetCachePolicyResult; }; sdk: { input: GetCachePolicyCommandInput; output: GetCachePolicyCommandOutput; }; }; }