createEventLogConfiguration method
Set the event log configuration for the account, resource type, or specific resource.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter eventLogLevel :
The logging level for the event log configuration.
Parameter resourceType :
The type of resource for the event log configuration.
Parameter clientToken :
An idempotency token. If you retry a request that completed successfully
initially using the same client token and parameters, then the retry
attempt will succeed without performing any further actions.
Parameter resourceId :
The identifier of the resource for the event log configuration.
Implementation
Future<CreateEventLogConfigurationResponse> createEventLogConfiguration({
required LogLevel eventLogLevel,
required String resourceType,
String? clientToken,
String? resourceId,
}) async {
final $payload = <String, dynamic>{
'EventLogLevel': eventLogLevel.value,
'ResourceType': resourceType,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (resourceId != null) 'ResourceId': resourceId,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/event-log-configurations',
exceptionFnMap: _exceptionFns,
);
return CreateEventLogConfigurationResponse.fromJson(response);
}