getOriginRequestPolicyConfig2020_05_31 method
- required String id,
Gets an origin request policy configuration.
To get an origin request policy configuration, you must provide the
policy’s identifier. If the origin request policy is attached to a
distribution’s cache behavior, you can get the policy’s identifier using
ListDistributions
or GetDistribution
. If the
origin request policy is not attached to a cache behavior, you can get the
identifier using ListOriginRequestPolicies
.
May throw AccessDenied. May throw NoSuchOriginRequestPolicy.
Parameter id
:
The unique identifier for the origin request policy. If the origin request
policy is attached to a distribution’s cache behavior, you can get the
policy’s identifier using ListDistributions
or
GetDistribution
. If the origin request policy is not attached
to a cache behavior, you can get the identifier using
ListOriginRequestPolicies
.
Implementation
Future<GetOriginRequestPolicyConfigResult>
getOriginRequestPolicyConfig2020_05_31({
required String id,
}) async {
ArgumentError.checkNotNull(id, 'id');
final $result = await _protocol.sendRaw(
method: 'GET',
requestUri:
'/2020-05-31/origin-request-policy/${Uri.encodeComponent(id)}/config',
exceptionFnMap: _exceptionFns,
);
final $elem = await _s.xmlFromResponse($result);
return GetOriginRequestPolicyConfigResult(
originRequestPolicyConfig: OriginRequestPolicyConfig.fromXml($elem),
eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
);
}