I am trying automate the export job. But cannot think of a way of automating the list items. I can store all the ARNs in a bash array Is it possible to pass all the arn’s using a file ? It will help in automating ?
Really appreciate if anyone can share if they have already done this.
Thanks !!
Hi @larry
Yes, it is possible to pass a file containing the ARN list to the StartAssetBundleExportJob API instead of hardcoding the ARNs. Here is an example of how you can do this:
Create a text file called arns.txt with each ARN on a separate line, e.g.:
arn:aws:quicksight:us-east-1:123456789012:dashboard/d-01234567890
arn:aws:quicksight:us-east-1:123456789012:analysis/a-01234567890
Read the file into a bash array:
readarray -t arns < arns.txt
Pass the array to the API call using --resource-arns “$arns”:
aws quicksight start-asset-bundle-export-job --aws-account-id 123456789012 --asset-bundle-export-job-id myexportjob --resource-arns “$arns” --export-format CLOUDFORMATION_JSON
This allows you to manage the ARNs in a separate file instead of hardcoding them. Hope this helps!