updateSubscriber method

Future<UpdateSubscriberResponse> updateSubscriber({
  1. required String subscriberId,
  2. List<LogSourceResource>? sources,
  3. String? subscriberDescription,
  4. AwsIdentity? subscriberIdentity,
  5. String? subscriberName,
})

Updates an existing subscription for the given Amazon Security Lake account ID. You can update a subscriber by changing the sources that the subscriber consumes data from.

May throw AccessDeniedException. May throw BadRequestException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter subscriberId : A value created by Security Lake that uniquely identifies your subscription.

Parameter sources : The supported Amazon Web Services services from which logs and events are collected. For the list of supported Amazon Web Services services, see the Amazon Security Lake User Guide.

Parameter subscriberDescription : The description of the Security Lake account subscriber.

Parameter subscriberIdentity : The Amazon Web Services identity used to access your data.

Parameter subscriberName : The name of the Security Lake account subscriber.

Implementation

Future<UpdateSubscriberResponse> updateSubscriber({
  required String subscriberId,
  List<LogSourceResource>? sources,
  String? subscriberDescription,
  AwsIdentity? subscriberIdentity,
  String? subscriberName,
}) async {
  final $payload = <String, dynamic>{
    if (sources != null) 'sources': sources,
    if (subscriberDescription != null)
      'subscriberDescription': subscriberDescription,
    if (subscriberIdentity != null) 'subscriberIdentity': subscriberIdentity,
    if (subscriberName != null) 'subscriberName': subscriberName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/v1/subscribers/${Uri.encodeComponent(subscriberId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateSubscriberResponse.fromJson(response);
}