createUserAccessLoggingSettings method

Future<CreateUserAccessLoggingSettingsResponse> createUserAccessLoggingSettings({
  1. required String kinesisStreamArn,
  2. String? clientToken,
  3. List<Tag>? tags,
})

Creates a user access logging settings resource that can be associated with a web portal.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter kinesisStreamArn : The ARN of the Kinesis stream.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, subsequent retries with the same client token returns the result from the original successful request.

If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.

Parameter tags : The tags to add to the user settings resource. A tag is a key-value pair.

Implementation

Future<CreateUserAccessLoggingSettingsResponse>
    createUserAccessLoggingSettings({
  required String kinesisStreamArn,
  String? clientToken,
  List<Tag>? tags,
}) async {
  final $payload = <String, dynamic>{
    'kinesisStreamArn': kinesisStreamArn,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (tags != null) 'tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/userAccessLoggingSettings',
    exceptionFnMap: _exceptionFns,
  );
  return CreateUserAccessLoggingSettingsResponse.fromJson(response);
}