putThirdPartyServiceLinkedConfigurationRecorder method

Future<PutThirdPartyServiceLinkedConfigurationRecorderResponse> putThirdPartyServiceLinkedConfigurationRecorder({
  1. required String connectorArn,
  2. required ScopeConfiguration scopeConfiguration,
  3. required String servicePrincipal,
  4. List<Tag>? tags,
})

Creates or updates a service-linked configuration recorder that is linked to a third-party cloud service provider based on the ConnectorArn you specify.

The configuration recorder's name, recordingGroup, recordingMode, and recordingScope is set by the service that is linked to the configuration recorder.

If a service-linked configuration recorder already exists for the specified service principal and connector, calling this operation again updates the ScopeConfiguration.

Customers cannot call this operation directly. Only the linked Amazon Web Services service can create or update the service-linked configuration recorder.

Use TagResource and UntagResource to update tags after creation.

May throw ConflictException. May throw InsufficientPermissionsException. May throw ValidationException.

Parameter connectorArn : The Amazon Resource Name (ARN) of the connector that specifies the connection between the third-party cloud service provider and Config. The specified connector must exist.

Parameter scopeConfiguration : Specifies the scope of resources to record from the third-party cloud service provider.

Parameter servicePrincipal : The service principal of the Amazon Web Services service for the service-linked configuration recorder that you want to create.

Parameter tags : The tags for a service-linked configuration recorder. Each tag consists of a key and an optional value, both of which you define.

Implementation

Future<PutThirdPartyServiceLinkedConfigurationRecorderResponse>
    putThirdPartyServiceLinkedConfigurationRecorder({
  required String connectorArn,
  required ScopeConfiguration scopeConfiguration,
  required String servicePrincipal,
  List<Tag>? tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'StarlingDoveService.PutThirdPartyServiceLinkedConfigurationRecorder'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ConnectorArn': connectorArn,
      'ScopeConfiguration': scopeConfiguration,
      'ServicePrincipal': servicePrincipal,
      if (tags != null) 'Tags': tags,
    },
  );

  return PutThirdPartyServiceLinkedConfigurationRecorderResponse.fromJson(
      jsonResponse.body);
}