disableAddOn method

Future<DisableAddOnResult> disableAddOn({
  1. required AddOnType addOnType,
  2. required String resourceName,
})

Disables an add-on for an Amazon Lightsail resource. For more information, see the Amazon Lightsail Developer Guide.

May throw AccessDeniedException. May throw InvalidInputException. May throw NotFoundException. May throw OperationFailureException. May throw RegionSetupInProgressException. May throw ServiceException. May throw UnauthenticatedException.

Parameter addOnType : The add-on type to disable.

Parameter resourceName : The name of the source resource for which to disable the add-on.

Implementation

Future<DisableAddOnResult> disableAddOn({
  required AddOnType addOnType,
  required String resourceName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Lightsail_20161128.DisableAddOn'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'addOnType': addOnType.value,
      'resourceName': resourceName,
    },
  );

  return DisableAddOnResult.fromJson(jsonResponse.body);
}