createSubscriber method
Creates a subscriber for accounts that are already enabled in Amazon Security Lake. You can create a subscriber with access to data in the current Amazon Web Services Region.
May throw AccessDeniedException.
May throw BadRequestException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter sources :
The supported Amazon Web Services services from which logs and events are
collected. Security Lake supports log and event collection for natively
supported Amazon Web Services services.
Parameter subscriberIdentity :
The Amazon Web Services identity used to access your data.
Parameter subscriberName :
The name of your Security Lake subscriber account.
Parameter accessTypes :
The Amazon S3 or Lake Formation access type.
Parameter subscriberDescription :
The description for your subscriber account in Security Lake.
Parameter tags :
An array of objects, one for each tag to associate with the subscriber.
For each tag, you must specify both a tag key and a tag value. A tag value
cannot be null, but it can be an empty string.
Implementation
Future<CreateSubscriberResponse> createSubscriber({
required List<LogSourceResource> sources,
required AwsIdentity subscriberIdentity,
required String subscriberName,
List<AccessType>? accessTypes,
String? subscriberDescription,
List<Tag>? tags,
}) async {
final $payload = <String, dynamic>{
'sources': sources,
'subscriberIdentity': subscriberIdentity,
'subscriberName': subscriberName,
if (accessTypes != null)
'accessTypes': accessTypes.map((e) => e.value).toList(),
if (subscriberDescription != null)
'subscriberDescription': subscriberDescription,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/subscribers',
exceptionFnMap: _exceptionFns,
);
return CreateSubscriberResponse.fromJson(response);
}