createDataTransformationProfile method
Creates a data transformation profile in DRAFT state. Specify a built-in starter profile, an existing profile version, raw profile content, or a sample data file as the source.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter profileName :
A name for the data transformation profile.
Parameter source :
The source for the initial profile content. Specify a built-in starter
profile, an existing profile version to clone, raw profile content for
CI/CD workflows, or a sample data file in Amazon S3.
Parameter sourceFormat :
The source data format that this profile converts from (Consolidated
Clinical Document Architecture (C-CDA) or Comma-separated values (CSV)).
Parameter clientToken :
A unique, case-sensitive identifier to ensure that the operation completes
no more than one time. If this token matches a previous request, the
service ignores the request but does not return an error.
Parameter kmsKeyId :
The AWS Key Management Service (AWS KMS) key identifier used to encrypt
the profile content at rest.
Parameter profileDescription :
A human-readable description of the profile's purpose.
Parameter tags :
The tags to associate with the profile at creation time.
Implementation
Future<CreateDataTransformationProfileResponse>
createDataTransformationProfile({
required String profileName,
required CreateDataTransformationProfileSource source,
required SourceFormat sourceFormat,
String? clientToken,
String? kmsKeyId,
String? profileDescription,
Map<String, String>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'HealthLake.CreateDataTransformationProfile'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ProfileName': profileName,
'Source': source,
'SourceFormat': sourceFormat.value,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (kmsKeyId != null) 'KmsKeyId': kmsKeyId,
if (profileDescription != null)
'ProfileDescription': profileDescription,
if (tags != null) 'Tags': tags,
},
hostPrefix: 'datatransformation.',
);
return CreateDataTransformationProfileResponse.fromJson(jsonResponse.body);
}