importResourcesToDraftAppVersion method
Imports resources to Resilience Hub application draft version from different input sources. For more information about the input sources supported by Resilience Hub, see Discover the structure and describe your Resilience Hub application.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter appArn :
Amazon Resource Name (ARN) of the Resilience Hub application. The format
for this ARN is:
arn:partition:resiliencehub:region:account:app/app-id.
For more information about ARNs, see
Amazon Resource Names (ARNs) in the Amazon Web Services General
Reference guide.
Parameter eksSources :
The input sources of the Amazon Elastic Kubernetes Service resources you
need to import.
Parameter importStrategy :
The import strategy you would like to set to import resources into
Resilience Hub application.
Parameter sourceArns :
The Amazon Resource Names (ARNs) for the resources.
Parameter terraformSources :
A list of terraform file s3 URLs you need to import.
Implementation
Future<ImportResourcesToDraftAppVersionResponse>
importResourcesToDraftAppVersion({
required String appArn,
List<EksSource>? eksSources,
ResourceImportStrategyType? importStrategy,
List<String>? sourceArns,
List<TerraformSource>? terraformSources,
}) async {
final $payload = <String, dynamic>{
'appArn': appArn,
if (eksSources != null) 'eksSources': eksSources,
if (importStrategy != null) 'importStrategy': importStrategy.value,
if (sourceArns != null) 'sourceArns': sourceArns,
if (terraformSources != null) 'terraformSources': terraformSources,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/import-resources-to-draft-app-version',
exceptionFnMap: _exceptionFns,
);
return ImportResourcesToDraftAppVersionResponse.fromJson(response);
}