associateDRTLogBucket method

Future<void> associateDRTLogBucket({
  1. required String logBucket,
})

Authorizes the DDoS Response Team (DRT) to access the specified Amazon S3 bucket containing your AWS WAF logs. You can associate up to 10 Amazon S3 buckets with your subscription.

To use the services of the DRT and make an AssociateDRTLogBucket request, you must be subscribed to the Business Support plan or the Enterprise Support plan.

May throw InternalErrorException. May throw InvalidOperationException. May throw NoAssociatedRoleException. May throw LimitsExceededException. May throw InvalidParameterException. May throw AccessDeniedForDependencyException. May throw OptimisticLockException. May throw ResourceNotFoundException.

Parameter logBucket : The Amazon S3 bucket that contains your AWS WAF logs.

Implementation

Future<void> associateDRTLogBucket({
  required String logBucket,
}) async {
  ArgumentError.checkNotNull(logBucket, 'logBucket');
  _s.validateStringLength(
    'logBucket',
    logBucket,
    3,
    63,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSShield_20160616.AssociateDRTLogBucket'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'LogBucket': logBucket,
    },
  );
}