deleteContinuousDeploymentPolicy method

Future<void> deleteContinuousDeploymentPolicy({
  1. required String id,
  2. String? ifMatch,
})

Deletes a continuous deployment policy.

You cannot delete a continuous deployment policy that's attached to a primary distribution. First update your distribution to remove the continuous deployment policy, then you can delete the policy.

May throw AccessDenied. May throw ContinuousDeploymentPolicyInUse. May throw InvalidArgument. May throw InvalidIfMatchVersion. May throw NoSuchContinuousDeploymentPolicy. May throw PreconditionFailed.

Parameter id : The identifier of the continuous deployment policy that you are deleting.

Parameter ifMatch : The current version (ETag value) of the continuous deployment policy that you are deleting.

Implementation

Future<void> deleteContinuousDeploymentPolicy({
  required String id,
  String? ifMatch,
}) async {
  final headers = <String, String>{
    if (ifMatch != null) 'If-Match': ifMatch.toString(),
  };
  await _protocol.send(
    method: 'DELETE',
    requestUri:
        '/2020-05-31/continuous-deployment-policy/${Uri.encodeComponent(id)}',
    headers: headers,
    exceptionFnMap: _exceptionFns,
  );
}