Skip to content

Display Resource Tags on Device Farm Desktop Session

0

It's not easy to connect a session to a test. I've added resource tags, but they aren't displayed. Please display resource tags when you click on a device farm desktop session or describe another solution that is supported.

asked 2 months ago14 views
1 Answer
0

I apologize, but there isn't a direct way to display resource tags when clicking on a Device Farm desktop session in the AWS console. However, there are alternative methods to retrieve and view the tags associated with Device Farm resources, including desktop sessions.

To view the tags for a Device Farm desktop session, you can use the AWS CLI or one of the AWS SDKs to call the ListTagsForResource API. This API allows you to retrieve the tags associated with various Device Farm resources, including sessions (devicefarm:testgrid-session).

Here's an approach you can use:

  1. Obtain the Amazon Resource Name (ARN) of the desktop session you're interested in.

  2. Use the ListTagsForResource API to retrieve the tags for that session. You'll need to provide the session's ARN as the ResourceARN parameter.

  3. The API will return a list of tags associated with the session in the form of key-value pairs.

If you need to look up sessions based on specific tags, you can use the GetResources operation from the AWS Resource Groups Tagging API. This allows you to filter Device Farm resources, including desktop sessions, based on tag values and resource types.

For example, you could use the following Python code to look up Device Farm desktop browser testing sessions with a specific tag:

import boto3
client = boto3.client('resourcegroupstaggingapi')
sessions = client.get_resources(
    ResourceTypeFilters=['devicefarm:testgrid-session'],
    TagFilters=[
        {"Key":"your_tag_key","Values":["your_tag_value"]}
    ]
)

This approach allows you to programmatically retrieve and work with the tags associated with your Device Farm desktop sessions, even though they're not directly visible in the console interface.
Sources
ListTagsForResource - AWS Device Farm Documentation
Tagging AWS Device Farm resources - Device Farm desktop browser testing
Tagging AWS Device Farm resources - AWS Device Farm

answered 2 months ago
  • I want to use the console, not an api/cli solution.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.