addDraftAppVersionResourceMappings method

Future<AddDraftAppVersionResourceMappingsResponse> addDraftAppVersionResourceMappings({
  1. required String appArn,
  2. required List<ResourceMapping> resourceMappings,
})

Adds the source of resource-maps to the draft version of an application. During assessment, Resilience Hub will use these resource-maps to resolve the latest physical ID for each resource in the application template. For more information about different types of resources supported by Resilience Hub and how to add them in your application, see Step 2: How is your application managed? in the Resilience Hub User Guide.

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 resourceMappings : Mappings used to map logical resources from the template to physical resources. You can use the mapping type CFN_STACK if the application template uses a logical stack name. Or you can map individual resources by using the mapping type RESOURCE. We recommend using the mapping type CFN_STACK if the application is backed by a CloudFormation stack.

Implementation

Future<AddDraftAppVersionResourceMappingsResponse>
    addDraftAppVersionResourceMappings({
  required String appArn,
  required List<ResourceMapping> resourceMappings,
}) async {
  final $payload = <String, dynamic>{
    'appArn': appArn,
    'resourceMappings': resourceMappings,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/add-draft-app-version-resource-mappings',
    exceptionFnMap: _exceptionFns,
  );
  return AddDraftAppVersionResourceMappingsResponse.fromJson(response);
}