---
title: "Import Fargate To New Ocean Cluster"
method: POST
path: "/ocean/aws/ecs/cluster/fargate/import"
tags: ["Ocean ECS"]
---

# Import Fargate To New Ocean Cluster

`POST /ocean/aws/ecs/cluster/fargate/import`

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](https://spec.dev.spot.io/#operation/oceanEcsCreate/) 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:

* [Amazon Resource Names (ARNs) and identifiers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids)
* [Migrating your Amazon ECS deployment to the new ARN and resource identifier format](https://aws.amazon.com/blogs/compute/migrating-your-amazon-ecs-deployment-to-the-new-arn-and-resource-id-format-2/)

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

* Permission: Account Editor (See [User Roles](https://docs.flexera.com/spot/administration/users/)) or
* Action: ocean:importOceanFromFargate (See [Access Policies](https://docs.flexera.com/spot/administration/access-policies/))

## Parameters

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

## Request body

- object
  - `oceanClusterName` string, required — Name of the cluster in new Ocean object.
  - `ecsClusterName` string, required — Name of the cluster in ECS.
  - `region` string, required — Name of the AWS region the ECS cluster is in.
  - `services` array[], required — Name of the ECS Fargate service to be imported.
    - string[]
  - `keyPair` string — Specify a key pair to attach to the services.
  - `tags` object[] — Set tags for the service. Items should be unique.
    - `tagKey` string — The tag's key.
    - `tagValue` string — The tag's name.

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/spot/apis/spot-by-flexera-api.md) · [All operations](https://skmtc.net/spot/apis/spot-by-flexera-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spot/spot-by-flexera-api/revisions/72813baf8d47/schema)
