getCachePolicyConfig2020_05_31 method

Future<GetCachePolicyConfigResult> getCachePolicyConfig2020_05_31({
  1. required String id,
})

Gets a cache policy configuration.

To get a cache policy configuration, 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.

May throw AccessDenied. May throw NoSuchCachePolicy.

Parameter id : The unique identifier for the cache policy. 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.

Implementation

Future<GetCachePolicyConfigResult> getCachePolicyConfig2020_05_31({
  required String id,
}) async {
  ArgumentError.checkNotNull(id, 'id');
  final $result = await _protocol.sendRaw(
    method: 'GET',
    requestUri: '/2020-05-31/cache-policy/${Uri.encodeComponent(id)}/config',
    exceptionFnMap: _exceptionFns,
  );
  final $elem = await _s.xmlFromResponse($result);
  return GetCachePolicyConfigResult(
    cachePolicyConfig: CachePolicyConfig.fromXml($elem),
    eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
  );
}