createServiceLinkedAnalyzer method

Future<CreateServiceLinkedAnalyzerResponse> createServiceLinkedAnalyzer({
  1. required Type type,
  2. List<InlineArchiveRule>? archiveRules,
  3. String? clientToken,
  4. AnalyzerConfiguration? configuration,
})

Creates a service-linked analyzer managed by an Amazon Web Services service. This operation can only be invoked by authorized Amazon Web Services services. Direct customer invocation returns AccessDeniedException.

Service-linked analyzers enable Amazon Web Services services to create and manage analyzers on behalf of customers. The lifecycle of these analyzers is managed by the calling service.

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

Parameter type : The type of analyzer to create. Valid values are ACCOUNT_UNUSED_ACCESS and ORGANIZATION_UNUSED_ACCESS.

Parameter archiveRules : Specifies the archive rules to add for the analyzer. Archive rules automatically archive findings that meet the criteria you define for the rule.

Parameter clientToken : A client token.

Parameter configuration : Specifies the configuration of the analyzer. The specified scope of unused access is used for the configuration.

Implementation

Future<CreateServiceLinkedAnalyzerResponse> createServiceLinkedAnalyzer({
  required Type type,
  List<InlineArchiveRule>? archiveRules,
  String? clientToken,
  AnalyzerConfiguration? configuration,
}) async {
  final $payload = <String, dynamic>{
    'type': type.value,
    if (archiveRules != null) 'archiveRules': archiveRules,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (configuration != null) 'configuration': configuration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/service-linked-analyzer',
    exceptionFnMap: _exceptionFns,
  );
  return CreateServiceLinkedAnalyzerResponse.fromJson(response);
}