I'm using the Amazon SDK to determine information about instances in a Fleet. When creating a DescribeFleetsRequest, I am supposed to pass in a list of Fleet IDs. But I cannot find any reference to a Fleet ID in my AWS console. Where would I get this information from? Here's my code, with the ???? representing what I cannot find in the AWS Console.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Amazon;
using Amazon.EC2;
using Amazon.EC2.Model;
namespace AppStreamTester
{
class Program
{
static void Main(string[] args)
{
var accessKeyId = "yyyyyyyy";
var secretAccessKey = "xxxxxxx";
var regionEndpoint = RegionEndpoint.USEast1; // Replace with the region endpoint you want to use
var ec2Client = new AmazonEC2Client(accessKeyId, secretAccessKey, regionEndpoint);
var request = new DescribeFleetsRequest
{
FleetIds = new List<string> { "????????" } //what do I use here?
};
var response = ec2Client.DescribeFleetsAsync(request);
foreach (var fleetData in response.Result.Fleets)
{
Console.WriteLine($"Fleet ID: {fleetData.FleetId}");
Console.WriteLine($"Fleet State: {fleetData.ActivityStatus}");
Console.WriteLine($"Number of Instances: {fleetData.Instances.Count}");
}
}
}
}
(Fleet Name does not work, I've already tried.)
EDIT: it looks like FleetID is no longer part of an AWS AppStream Fleet object. When asked, ChatGPT was insisting FleetID was an important identifier, but its training data is over a year old.