getAutomatedReasoningPolicyBuildWorkflowResultAssets method

Future<GetAutomatedReasoningPolicyBuildWorkflowResultAssetsResponse> getAutomatedReasoningPolicyBuildWorkflowResultAssets({
  1. required AutomatedReasoningPolicyBuildResultAssetType assetType,
  2. required String buildWorkflowId,
  3. required String policyArn,
  4. String? assetId,
})

Retrieves the resulting assets from a completed Automated Reasoning policy build workflow, including build logs, quality reports, and generated policy artifacts.

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

Parameter assetType : The type of asset to retrieve (e.g., BUILD_LOG, QUALITY_REPORT, POLICY_DEFINITION, GENERATED_TEST_CASES, POLICY_SCENARIOS, FIDELITY_REPORT, ASSET_MANIFEST, SOURCE_DOCUMENT).

Parameter buildWorkflowId : The unique identifier of the build workflow whose result assets you want to retrieve.

Parameter policyArn : The Amazon Resource Name (ARN) of the Automated Reasoning policy whose build workflow assets you want to retrieve.

Parameter assetId : The unique identifier of the specific asset to retrieve when multiple assets of the same type exist. This is required when retrieving SOURCE_DOCUMENT assets, as multiple source documents may have been used in the workflow. The asset ID can be obtained from the asset manifest.

Implementation

Future<GetAutomatedReasoningPolicyBuildWorkflowResultAssetsResponse>
    getAutomatedReasoningPolicyBuildWorkflowResultAssets({
  required AutomatedReasoningPolicyBuildResultAssetType assetType,
  required String buildWorkflowId,
  required String policyArn,
  String? assetId,
}) async {
  final $query = <String, List<String>>{
    'assetType': [assetType.value],
    if (assetId != null) 'assetId': [assetId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/automated-reasoning-policies/${Uri.encodeComponent(policyArn)}/build-workflows/${Uri.encodeComponent(buildWorkflowId)}/result-assets',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetAutomatedReasoningPolicyBuildWorkflowResultAssetsResponse
      .fromJson(response);
}