deleteAppVersionResource method
Deletes a resource from the Resilience Hub application.
-
You can only delete a manually added resource. To exclude non-manually
added resources, use the
UpdateAppVersionResourceAPI. - 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
PublishAppVersionAPI.
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);
}