startAssetBundleExportJob method

Future<StartAssetBundleExportJobResponse> startAssetBundleExportJob({
  1. required String assetBundleExportJobId,
  2. required String awsAccountId,
  3. required AssetBundleExportFormat exportFormat,
  4. required List<String> resourceArns,
  5. AssetBundleCloudFormationOverridePropertyConfiguration? cloudFormationOverridePropertyConfiguration,
  6. bool? includeAllDependencies,
  7. IncludeFolderMembers? includeFolderMembers,
  8. bool? includeFolderMemberships,
  9. bool? includePermissions,
  10. bool? includeTags,
  11. AssetBundleExportJobValidationStrategy? validationStrategy,
})

Starts an Asset Bundle export job.

An Asset Bundle export job exports specified Amazon Quick Sight assets. You can also choose to export any asset dependencies in the same job. Export jobs run asynchronously and can be polled with a DescribeAssetBundleExportJob API call. When a job is successfully completed, a download URL that contains the exported assets is returned. The URL is valid for 5 minutes and can be refreshed with a DescribeAssetBundleExportJob API call. Each Amazon Quick Sight account can run up to 5 export jobs concurrently.

The API caller must have the necessary permissions in their IAM role to access each resource before the resources can be exported.

May throw AccessDeniedException. May throw ConflictException. May throw InvalidParameterValueException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw UnsupportedUserEditionException.

Parameter assetBundleExportJobId : The ID of the job. This ID is unique while the job is running. After the job is completed, you can reuse this ID for another job.

Parameter awsAccountId : The ID of the Amazon Web Services account to export assets from.

Parameter exportFormat : The export data format.

Parameter resourceArns : An array of resource ARNs to export. The following resources are supported.

  • Analysis
  • Dashboard
  • DataSet
  • DataSource
  • RefreshSchedule
  • Theme
  • VPCConnection
The API caller must have the necessary permissions in their IAM role to access each resource before the resources can be exported.

Parameter cloudFormationOverridePropertyConfiguration : An optional collection of structures that generate CloudFormation parameters to override the existing resource property values when the resource is exported to a new CloudFormation template.

Use this field if the ExportFormat field of a StartAssetBundleExportJobRequest API call is set to CLOUDFORMATION_JSON.

Parameter includeAllDependencies : A Boolean that determines whether all dependencies of each resource ARN are recursively exported with the job. For example, say you provided a Dashboard ARN to the ResourceArns parameter. If you set IncludeAllDependencies to TRUE, any theme, dataset, and data source resource that is a dependency of the dashboard is also exported.

Parameter includeFolderMembers : A setting that indicates whether you want to include folder assets. You can also use this setting to recusrsively include all subfolders of an exported folder.

Parameter includeFolderMemberships : A Boolean that determines if the exported asset carries over information about the folders that the asset is a member of.

Parameter includePermissions : A Boolean that determines whether all permissions for each resource ARN are exported with the job. If you set IncludePermissions to TRUE, any permissions associated with each resource are exported.

Parameter includeTags : A Boolean that determines whether all tags for each resource ARN are exported with the job. If you set IncludeTags to TRUE, any tags associated with each resource are exported.

Parameter validationStrategy : An optional parameter that determines which validation strategy to use for the export job. If StrictModeForAllResources is set to TRUE, strict validation for every error is enforced. If it is set to FALSE, validation is skipped for specific UI errors that are shown as warnings. The default value for StrictModeForAllResources is FALSE.

Implementation

Future<StartAssetBundleExportJobResponse> startAssetBundleExportJob({
  required String assetBundleExportJobId,
  required String awsAccountId,
  required AssetBundleExportFormat exportFormat,
  required List<String> resourceArns,
  AssetBundleCloudFormationOverridePropertyConfiguration?
      cloudFormationOverridePropertyConfiguration,
  bool? includeAllDependencies,
  IncludeFolderMembers? includeFolderMembers,
  bool? includeFolderMemberships,
  bool? includePermissions,
  bool? includeTags,
  AssetBundleExportJobValidationStrategy? validationStrategy,
}) async {
  final $payload = <String, dynamic>{
    'AssetBundleExportJobId': assetBundleExportJobId,
    'ExportFormat': exportFormat.value,
    'ResourceArns': resourceArns,
    if (cloudFormationOverridePropertyConfiguration != null)
      'CloudFormationOverridePropertyConfiguration':
          cloudFormationOverridePropertyConfiguration,
    if (includeAllDependencies != null)
      'IncludeAllDependencies': includeAllDependencies,
    if (includeFolderMembers != null)
      'IncludeFolderMembers': includeFolderMembers.value,
    if (includeFolderMemberships != null)
      'IncludeFolderMemberships': includeFolderMemberships,
    if (includePermissions != null) 'IncludePermissions': includePermissions,
    if (includeTags != null) 'IncludeTags': includeTags,
    if (validationStrategy != null) 'ValidationStrategy': validationStrategy,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/accounts/${Uri.encodeComponent(awsAccountId)}/asset-bundle-export-jobs/export',
    exceptionFnMap: _exceptionFns,
  );
  return StartAssetBundleExportJobResponse.fromJson(response);
}