PrimaryTaskSet
The PrimaryTaskSet resource allows you to manage AWS ECS PrimaryTaskSets for your containerized applications. This resource is essential for managing the task sets that are running under an Amazon ECS service.
Minimal Example
Section titled “Minimal Example”Create a basic PrimaryTaskSet with required properties.
import AWS from "alchemy/aws/control";
const primaryTaskSet = await AWS.ECS.PrimaryTaskSet("myPrimaryTaskSet", { TaskSetId: "my-task-set-id", Cluster: "my-cluster-name", Service: "my-service-name", adopt: true // Allows adoption of existing resource});
Advanced Configuration
Section titled “Advanced Configuration”Configure a PrimaryTaskSet with additional optional properties.
const advancedTaskSet = await AWS.ECS.PrimaryTaskSet("advancedTaskSet", { TaskSetId: "advanced-task-set-id", Cluster: "production-cluster", Service: "production-service", adopt: true // Adopt existing resource});
Updating a PrimaryTaskSet
Section titled “Updating a PrimaryTaskSet”Demonstrate updating an existing PrimaryTaskSet with new properties.
const updatedTaskSet = await AWS.ECS.PrimaryTaskSet("updatedTaskSet", { TaskSetId: "my-task-set-id", Cluster: "my-cluster-name", Service: "my-service-name", adopt: false // Do not adopt existing resource});
Complete TaskSet Management
Section titled “Complete TaskSet Management”Show how to create and manage a PrimaryTaskSet with realistic values and configurations.
const completeTaskSet = await AWS.ECS.PrimaryTaskSet("completeTaskSet", { TaskSetId: "complete-task-set-id", Cluster: "production-cluster", Service: "web-service", adopt: true // Allows adoption of existing resource});