updateTargetAccountConfiguration method

Future<UpdateTargetAccountConfigurationResponse> updateTargetAccountConfiguration({
  1. required String accountId,
  2. required String experimentTemplateId,
  3. String? description,
  4. String? roleArn,
})

Updates the target account configuration for the specified experiment template.

May throw ResourceNotFoundException. May throw ValidationException.

Parameter accountId : The Amazon Web Services account ID of the target account.

Parameter experimentTemplateId : The ID of the experiment template.

Parameter description : The description of the target account.

Parameter roleArn : The Amazon Resource Name (ARN) of an IAM role for the target account.

Implementation

Future<UpdateTargetAccountConfigurationResponse>
    updateTargetAccountConfiguration({
  required String accountId,
  required String experimentTemplateId,
  String? description,
  String? roleArn,
}) async {
  final $payload = <String, dynamic>{
    if (description != null) 'description': description,
    if (roleArn != null) 'roleArn': roleArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/experimentTemplates/${Uri.encodeComponent(experimentTemplateId)}/targetAccountConfigurations/${Uri.encodeComponent(accountId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateTargetAccountConfigurationResponse.fromJson(response);
}