putBearerTokenAuthentication method

Future<void> putBearerTokenAuthentication({
  1. required bool bearerTokenAuthenticationEnabled,
  2. required String logGroupIdentifier,
})

Enables or disables bearer token authentication for the specified log group. When enabled on a log group, bearer token authentication is enabled on operations until it is explicitly disabled.

For information about the parameters that are common to all actions, see Common Parameters.

May throw AccessDeniedException. May throw InvalidOperationException. May throw InvalidParameterException. May throw OperationAbortedException. May throw ResourceNotFoundException. May throw ServiceUnavailableException.

Parameter bearerTokenAuthenticationEnabled : Whether to enable bearer token authentication.

Type: Boolean

Required: Yes

Parameter logGroupIdentifier : The name or ARN of the log group.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 512.

Pattern: [.-_/#A-Za-z0-9]+

Required: Yes

Implementation

Future<void> putBearerTokenAuthentication({
  required bool bearerTokenAuthenticationEnabled,
  required String logGroupIdentifier,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'Logs_20140328.PutBearerTokenAuthentication'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'bearerTokenAuthenticationEnabled': bearerTokenAuthenticationEnabled,
      'logGroupIdentifier': logGroupIdentifier,
    },
  );
}