latestOpenAPI 3.0.02026-08-2045003.8 MB

72813baf8d47

Ocean ECS

Import Fargate To New Ocean Cluster

This API copies the configuration from a Fargate service into the corresponding fields of an Ocean object. (This process is commonly referred to as importing.) The API returns an Ocean object that is suitable for use in the Create API to create a new Ocean cluster based on your Fargate configuration. If you are migrating a Fargate service that has tags, you must run the Opt In procedure on your Amazon account or IAM role. This is required in order to obtain the necessary Amazon Resource Name (ARN) and resource identifier format for your ECS tasks, container instances, and services. For more information about the required ARN and the Opt In procedure, see the following pages:

The API requires one of the following permissions to be defined in Spot -

post/ocean/aws/ecs/cluster/fargate/import

Parameters

#/paths/~1azure~1costs/get/parameters/0 — unresolved $ref

Request body

oceanClusterNamestring required

Name of the cluster in new Ocean object.

ecsClusterNamestring required

Name of the cluster in ECS.

regionstring required

Name of the AWS region the ECS cluster is in.

keyPairstring

Specify a key pair to attach to the services.

Example request

{
  "oceanClusterName": "fargate-import-ocean",
  "ecsClusterName": "fargateTestCluster",
  "region": "us-west-1",
  "services": [
    [
      "service_2"
    ]
  ],
  "keyPair": "spot-prod",
  "tags": [
    {
      "tagKey": "env",
      "tagValue": "prod"
    }
  ]
}