updateAppVersionResource method

Future<UpdateAppVersionResourceResponse> updateAppVersionResource({
  1. required String appArn,
  2. Map<String, List<String>>? additionalInfo,
  3. List<String>? appComponents,
  4. String? awsAccountId,
  5. String? awsRegion,
  6. bool? excluded,
  7. LogicalResourceId? logicalResourceId,
  8. String? physicalResourceId,
  9. String? resourceName,
  10. String? resourceType,
})

Updates the resource details in the Resilience Hub application.

  • This action has no effect outside Resilience Hub.
  • This API updates the Resilience Hub application draft version. To use this resource for running resiliency assessments, you must publish the Resilience Hub application using the PublishAppVersion API.
  • To update application version with new physicalResourceID, you must call ResolveAppVersionResources API.

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 additionalInfo : Currently, there is no supported additional information for resources.

Parameter appComponents : List of Application Components that this resource belongs to. If an Application Component is not part of the Resilience Hub application, it will be added.

Parameter awsAccountId : Amazon Web Services account that owns the physical resource.

Parameter awsRegion : Amazon Web Services region that owns the physical resource.

Parameter excluded : Indicates if a resource is excluded from an Resilience Hub application.

Parameter logicalResourceId : Logical identifier of the resource.

Parameter physicalResourceId : Physical identifier of the resource.

Parameter resourceName : Name of the resource.

Parameter resourceType : Type of resource.

Implementation

Future<UpdateAppVersionResourceResponse> updateAppVersionResource({
  required String appArn,
  Map<String, List<String>>? additionalInfo,
  List<String>? appComponents,
  String? awsAccountId,
  String? awsRegion,
  bool? excluded,
  LogicalResourceId? logicalResourceId,
  String? physicalResourceId,
  String? resourceName,
  String? resourceType,
}) async {
  final $payload = <String, dynamic>{
    'appArn': appArn,
    if (additionalInfo != null) 'additionalInfo': additionalInfo,
    if (appComponents != null) 'appComponents': appComponents,
    if (awsAccountId != null) 'awsAccountId': awsAccountId,
    if (awsRegion != null) 'awsRegion': awsRegion,
    if (excluded != null) 'excluded': excluded,
    if (logicalResourceId != null) 'logicalResourceId': logicalResourceId,
    if (physicalResourceId != null) 'physicalResourceId': physicalResourceId,
    if (resourceName != null) 'resourceName': resourceName,
    if (resourceType != null) 'resourceType': resourceType,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/update-app-version-resource',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAppVersionResourceResponse.fromJson(response);
}