importApp method
Imports a V1 app into the V2 resource model, creating a service with the same name.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter associatedSystems :
The systems to associate with the imported service.
Parameter skipManuallyAddedResources :
Whether to skip manually added resources during import.
Implementation
Future<ImportAppResponse> importApp({
required String v1AppArn,
List<AssociatedSystem>? associatedSystems,
String? clientToken,
String? kmsKeyId,
String? policyArn,
bool? skipManuallyAddedResources,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'v1AppArn': v1AppArn,
if (associatedSystems != null) 'associatedSystems': associatedSystems,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (kmsKeyId != null) 'kmsKeyId': kmsKeyId,
if (policyArn != null) 'policyArn': policyArn,
if (skipManuallyAddedResources != null)
'skipManuallyAddedResources': skipManuallyAddedResources,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v2/import-app',
exceptionFnMap: _exceptionFns,
);
return ImportAppResponse.fromJson(response);
}