createDiscoverer method

Future<CreateDiscovererResponse> createDiscoverer({
  1. required String sourceArn,
  2. bool? crossAccount,
  3. String? description,
  4. Map<String, String>? tags,
})

Creates a discoverer.

May throw BadRequestException. May throw ConflictException. May throw ForbiddenException. May throw InternalServerErrorException. May throw ServiceUnavailableException. May throw UnauthorizedException.

Parameter sourceArn : The ARN of the event bus.

Parameter crossAccount : Support discovery of schemas in events sent to the bus from another account. (default: true).

Parameter description : A description for the discoverer.

Parameter tags : Tags associated with the resource.

Implementation

Future<CreateDiscovererResponse> createDiscoverer({
  required String sourceArn,
  bool? crossAccount,
  String? description,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'SourceArn': sourceArn,
    if (crossAccount != null) 'CrossAccount': crossAccount,
    if (description != null) 'Description': description,
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/v1/discoverers',
    exceptionFnMap: _exceptionFns,
  );
  return CreateDiscovererResponse.fromJson(response);
}