Agentless, cloud-native backup for Amazon Web Services (AWS)
Post Reply
asoucase
Influencer
Posts: 13
Liked: never
Joined: Nov 02, 2021 4:22 pm
Contact:

Update tags list in API

Post by asoucase »

Hi,
When requesting the list of EC2 instance tags through the api endpoint /api/v1/cloudInfrastructure/tags, the reply will not contain any recently updated tags.
The user is able, through the UI, to trigger a rescan when adding an EC2 policy in order for the Veeam instance to index updated tags.
I've tried to trigger than same rescan with endpoint /api/v1/virtualMachines/rescan to no avail.

Any suggestion as to how to force the rescan?

Thanks
nielsengelen
Product Manager
Posts: 5796
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Update tags list in API

Post by nielsengelen »

Hi,

I'll verify this quickly on how to do this and will update the topic as soon as I have more details.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
asoucase
Influencer
Posts: 13
Liked: never
Joined: Nov 02, 2021 4:22 pm
Contact:

Re: Update tags list in API

Post by asoucase »

Thanks Niels
asoucase
Influencer
Posts: 13
Liked: never
Joined: Nov 02, 2021 4:22 pm
Contact:

Re: Update tags list in API

Post by asoucase »

Have you found any workaround? Am I doing something wrong?

At the moment, I'm having to manually create a dummy EC2 backup policy through the UI, select a role and region to then force a infra rescan when requesting the list of tags.

I'm creating a terraform provider to configure our Veeam instances with the goal of being able to do so without having to rely on the UI, as to completely automate the process.
And this issue is becoming a significant hindrance.
nielsengelen
Product Manager
Posts: 5796
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Update tags list in API

Post by nielsengelen » 1 person likes this post

I haven't found a workaround yet and we are looking into a solution. I hope to have something later today as it could require a fix in an upcoming release to make it more clear.
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
nielsengelen
Product Manager
Posts: 5796
Liked: 1215 times
Joined: Jul 15, 2013 11:09 am
Full Name: Niels Engelen
Contact:

Re: Update tags list in API

Post by nielsengelen »

You can get updated tags by using /api/v1/accounts/amazon/{IAMRoleId}/rescan with the following JSON payload (replace the regionIds with the region ID).

Code: Select all

{
  "rescanType": "All",
  "regionIds": [
    "445b2c74-c89a-4bc0-aca0-3e4ad1553f01"
  ]
}
We'll look into an enhancement for a future release and will update our documentation with this example.

Can you try it out and let me know if this works for you as expected?
Personal blog: https://foonet.be
GitHub: https://github.com/nielsengelen
asoucase
Influencer
Posts: 13
Liked: never
Joined: Nov 02, 2021 4:22 pm
Contact:

Re: Update tags list in API

Post by asoucase »

Great!
That seems to trigger the rescan before requesting the list of tags.

Many thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest