deleteDeployment method

Future<void> deleteDeployment({
  1. required String deploymentId,
  2. required String restApiId,
})

Deletes a Deployment resource. Deleting a deployment will only succeed if there are no Stage resources associated with it.

May throw UnauthorizedException. May throw NotFoundException. May throw BadRequestException. May throw TooManyRequestsException.

Parameter deploymentId : Required The identifier of the Deployment resource to delete.

Parameter restApiId : Required The string identifier of the associated RestApi.

Implementation

Future<void> deleteDeployment({
  required String deploymentId,
  required String restApiId,
}) async {
  ArgumentError.checkNotNull(deploymentId, 'deploymentId');
  ArgumentError.checkNotNull(restApiId, 'restApiId');
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/restapis/${Uri.encodeComponent(restApiId)}/deployments/${Uri.encodeComponent(deploymentId)}',
    exceptionFnMap: _exceptionFns,
  );
}