updateOrganizationRecommendationLifecycle method
Update the lifecycle of a Recommendation within an Organization. This API only supports prioritized recommendations and updates global priority recommendations, eliminating the need to call the API in each AWS Region.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter lifecycleStage :
The new lifecycle stage
Parameter organizationRecommendationIdentifier :
The Recommendation identifier for AWS Trusted Advisor Priority
recommendations
Parameter updateReason :
Reason for the lifecycle stage change
Parameter updateReasonCode :
Reason code for the lifecycle state change
Implementation
Future<void> updateOrganizationRecommendationLifecycle({
required UpdateRecommendationLifecycleStage lifecycleStage,
required String organizationRecommendationIdentifier,
String? updateReason,
UpdateRecommendationLifecycleStageReasonCode? updateReasonCode,
}) async {
final $payload = <String, dynamic>{
'lifecycleStage': lifecycleStage.value,
if (updateReason != null) 'updateReason': updateReason,
if (updateReasonCode != null) 'updateReasonCode': updateReasonCode.value,
};
await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/v1/organization-recommendations/${Uri.encodeComponent(organizationRecommendationIdentifier)}/lifecycle',
exceptionFnMap: _exceptionFns,
);
}