getResponseHeadersPolicyConfig method
- required String id,
Gets a response headers policy configuration.
To get a response headers policy configuration, you must provide the
policy's identifier. If the response headers policy is attached to a
distribution's cache behavior, you can get the policy's identifier using
ListDistributions or GetDistribution. If the
response headers policy is not attached to a cache behavior, you can get
the identifier using ListResponseHeadersPolicies.
May throw AccessDenied.
May throw NoSuchResponseHeadersPolicy.
Parameter id :
The identifier for the response headers policy.
If the response headers policy is attached to a distribution's cache
behavior, you can get the policy's identifier using
ListDistributions or GetDistribution. If the
response headers policy is not attached to a cache behavior, you can get
the identifier using ListResponseHeadersPolicies.
Implementation
Future<GetResponseHeadersPolicyConfigResult> getResponseHeadersPolicyConfig({
required String id,
}) async {
final $result = await _protocol.sendRaw(
method: 'GET',
requestUri:
'/2020-05-31/response-headers-policy/${Uri.encodeComponent(id)}/config',
exceptionFnMap: _exceptionFns,
);
final $elem = await _s.xmlFromResponse($result);
return GetResponseHeadersPolicyConfigResult(
responseHeadersPolicyConfig: ResponseHeadersPolicyConfig.fromXml($elem),
eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
);
}