I am getting error while adding auto-import-policy when creating AWS FSx create-data-repository-association

FSX Lustre config is:
Storage type: SSD
Deployment type: Persistent 2
Lustre version: 2.12

Success: The below command is successful
aws --region region_name fsx create-data-repository-association --file-system-id fs-xxxxxxxxxxx --batch-import-meta-data-on-create --file-system-path /ns1/ --data-repository-path s3://s3_bucket_path --s3 AutoImportPolicy={Events=[NEW]},AutoExportPolicy={Events=[NEW]}

Error: throwing error when taking multiple options in the list of the AutoImportPolicy

aws --region region_name fsx create-data-repository-association --file-system-id fs-xxxxxxxxx --batch-import-meta-data-on-create --file-system-path /ns1/ --data-repository-path s3://s3_bucket_path --s3 AutoImportPolicy={Events=[NEW,CHANGED,DELETED]}
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:
  aws help
  aws <command> help
  aws <command> <subcommand> help
Unknown options: AutoImportPolicy=DELETED], AutoImportPolicy=CHANGED

I tried the below options but none of them are successful
--s3 AutoImportPolicy={Events=['NEW','CHANGED','DELETED']}
--s3 AutoImportPolicy={Events=["NEW","CHANGED","DELETED"]}
--s3 AutoImportPolicy={Events=[NEW|CHANGED|DELETED]}
--s3 AutoImportPolicy={Events=[NEW_CHANGED_DELETED]}

but none of the above options worked
Expecting: I am expecting to create the data-repository-association whose AutoImportPolicy should be New,Changed & deleted

1

There are 1 best solutions below

0
On BEST ANSWER

the issue is fixed by using the below command:

aws --region ${AWS_REGION} fsx create-data-repository-association \
--batch-import-meta-data-on-create \
--file-system-id ${fsx_id} \
--file-system-path /ns1/ \
--data-repository-path ${s3_dra} \
--s3 "AutoImportPolicy={Events=[NEW,CHANGED,DELETED]},AutoExportPolicy={Events=[NEW,CHANGED,DELETED]}"