updateConnector method

Future<UpdateConnectorResponse> updateConnector({
  1. required String connectorId,
  2. String? description,
  3. CspmProviderUpdateConfiguration? provider,
})

Updates a CSPM connector's configuration, such as the scope or regions for the connected cloud provider.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw InvalidAccessException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter connectorId : The unique identifier of the connector to update.

Parameter description : The updated description of the connector.

Parameter provider : The updated cloud provider configuration for the connector.

Implementation

Future<UpdateConnectorResponse> updateConnector({
  required String connectorId,
  String? description,
  CspmProviderUpdateConfiguration? provider,
}) async {
  final $payload = <String, dynamic>{
    if (description != null) 'Description': description,
    if (provider != null) 'Provider': provider,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/connectors/${connectorId.split('/').map(Uri.encodeComponent).join('/')}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateConnectorResponse.fromJson(response);
}