deleteComponent method

Future<void> deleteComponent({
  1. required String componentName,
  2. required String resourceGroupName,
})

Ungroups a custom component. When you ungroup custom components, all applicable monitors that are set up for the component are removed and the instances revert to their standalone status.

May throw ResourceNotFoundException. May throw ValidationException. May throw InternalServerException.

Parameter componentName : The name of the component.

Parameter resourceGroupName : The name of the resource group.

Implementation

Future<void> deleteComponent({
  required String componentName,
  required String resourceGroupName,
}) async {
  ArgumentError.checkNotNull(componentName, 'componentName');
  _s.validateStringLength(
    'componentName',
    componentName,
    1,
    128,
    isRequired: true,
  );
  ArgumentError.checkNotNull(resourceGroupName, 'resourceGroupName');
  _s.validateStringLength(
    'resourceGroupName',
    resourceGroupName,
    1,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'EC2WindowsBarleyService.DeleteComponent'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ComponentName': componentName,
      'ResourceGroupName': resourceGroupName,
    },
  );
}