startAssessmentFrameworkShare method

Future<StartAssessmentFrameworkShareResponse> startAssessmentFrameworkShare({
  1. required String destinationAccount,
  2. required String destinationRegion,
  3. required String frameworkId,
  4. String? comment,
})

Creates a share request for a custom framework in Audit Manager.

The share request specifies a recipient and notifies them that a custom framework is available. Recipients have 120 days to accept or decline the request. If no action is taken, the share request expires.

When you create a share request, Audit Manager stores a snapshot of your custom framework in the US East (N. Virginia) Amazon Web Services Region. Audit Manager also stores a backup of the same snapshot in the US West (Oregon) Amazon Web Services Region.

Audit Manager deletes the snapshot and the backup snapshot when one of the following events occurs:

  • The sender revokes the share request.
  • The recipient declines the share request.
  • The recipient encounters an error and doesn't successfully accept the share request.
  • The share request expires before the recipient responds to the request.
When a sender resends a share request, the snapshot is replaced with an updated version that corresponds with the latest version of the custom framework.

When a recipient accepts a share request, the snapshot is replicated into their Amazon Web Services account under the Amazon Web Services Region that was specified in the share request.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter destinationAccount : The Amazon Web Services account of the recipient.

Parameter destinationRegion : The Amazon Web Services Region of the recipient.

Parameter frameworkId : The unique identifier for the custom framework to be shared.

Parameter comment : An optional comment from the sender about the share request.

Implementation

Future<StartAssessmentFrameworkShareResponse> startAssessmentFrameworkShare({
  required String destinationAccount,
  required String destinationRegion,
  required String frameworkId,
  String? comment,
}) async {
  final $payload = <String, dynamic>{
    'destinationAccount': destinationAccount,
    'destinationRegion': destinationRegion,
    if (comment != null) 'comment': comment,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/assessmentFrameworks/${Uri.encodeComponent(frameworkId)}/shareRequests',
    exceptionFnMap: _exceptionFns,
  );
  return StartAssessmentFrameworkShareResponse.fromJson(response);
}