deleteVpcOrigin method
Delete an Amazon CloudFront VPC origin.
May throw AccessDenied.
May throw CannotDeleteEntityWhileInUse.
May throw EntityNotFound.
May throw IllegalDelete.
May throw InvalidArgument.
May throw InvalidIfMatchVersion.
May throw PreconditionFailed.
May throw UnsupportedOperation.
Parameter id :
The VPC origin ID.
Parameter ifMatch :
The version identifier of the VPC origin to delete. This is the
ETag value returned in the response to GetVpcOrigin.
Implementation
Future<DeleteVpcOriginResult> deleteVpcOrigin({
required String id,
required String ifMatch,
}) async {
final headers = <String, String>{
'If-Match': ifMatch.toString(),
};
final $result = await _protocol.sendRaw(
method: 'DELETE',
requestUri: '/2020-05-31/vpc-origin/${Uri.encodeComponent(id)}',
headers: headers,
exceptionFnMap: _exceptionFns,
);
final $elem = await _s.xmlFromResponse($result);
return DeleteVpcOriginResult(
vpcOrigin: VpcOrigin.fromXml($elem),
eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
);
}