deleteAppVersionResource method

Future<DeleteAppVersionResourceResponse> deleteAppVersionResource({
  1. required String appArn,
  2. String? awsAccountId,
  3. String? awsRegion,
  4. String? clientToken,
  5. LogicalResourceId? logicalResourceId,
  6. String? physicalResourceId,
  7. String? resourceName,
})

Deletes a resource from the Resilience Hub application.

  • You can only delete a manually added resource. To exclude non-manually added resources, use the UpdateAppVersionResource API.
  • 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.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. 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 awsAccountId : Amazon Web Services account that owns the physical resource.

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

Parameter clientToken : Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters. You should not reuse the same client token for other API requests.

Parameter logicalResourceId : Logical identifier of the resource.

Parameter physicalResourceId : Physical identifier of the resource.

Parameter resourceName : Name of the resource.

Implementation

Future<DeleteAppVersionResourceResponse> deleteAppVersionResource({
  required String appArn,
  String? awsAccountId,
  String? awsRegion,
  String? clientToken,
  LogicalResourceId? logicalResourceId,
  String? physicalResourceId,
  String? resourceName,
}) async {
  final $payload = <String, dynamic>{
    'appArn': appArn,
    if (awsAccountId != null) 'awsAccountId': awsAccountId,
    if (awsRegion != null) 'awsRegion': awsRegion,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (logicalResourceId != null) 'logicalResourceId': logicalResourceId,
    if (physicalResourceId != null) 'physicalResourceId': physicalResourceId,
    if (resourceName != null) 'resourceName': resourceName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/delete-app-version-resource',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteAppVersionResourceResponse.fromJson(response);
}