Integrating Ingest Pipeline with the Indicies

Hi Everyone,

I have created one ingest pipeline now I want to attach this pipeline with the index having the format "cwl-2021.02.02 " where indices from every date are created like "cwl-2021.02.03" and so on...

So I tried
PUT cwl-*
"settings" : {
"index" : {
"default_pipeline" : "pipeline"

But there is an invalid index name exception, so can anyone let me know how we can integrate the ingest pipeline with this dynamic index format.