# Public Cloud › Container › Managed Rancher Service API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Public Cloud product's sections: https://developers.eu.ovhcloud.com/reference/public-cloud/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 11 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/public-cloud/container/managed-rancher-service/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/public-cloud/container/managed-rancher-service.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/public-cloud/container/managed-rancher-service.json?format=openapi3

## Operations

- `GET /publicCloud/project/{projectId}/rancher` — List managed Rancher services
- `POST /publicCloud/project/{projectId}/rancher` — Create a new managed Rancher service
- `GET /publicCloud/project/{projectId}/rancher/{rancherId}` — Get a managed Rancher service
- `PUT /publicCloud/project/{projectId}/rancher/{rancherId}` — Update an existing managed Rancher service
- `DELETE /publicCloud/project/{projectId}/rancher/{rancherId}` — Delete a managed Rancher service
- `POST /publicCloud/project/{projectId}/rancher/{rancherId}/adminCredentials` — Reset the admin password
- `GET /publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/plan` — List available and current plans for the given managed Rancher service
- `GET /publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/version` — List available and current versions for the given managed Rancher service
- `GET /publicCloud/project/{projectId}/rancher/{rancherId}/event` — List all events related to the managed Rancher service
- `GET /publicCloud/project/{projectId}/rancher/{rancherId}/task` — List all asynchronous operations related to the managed Rancher service
- `GET /publicCloud/project/{projectId}/rancher/{rancherId}/task/{taskId}` — Get a specific task related to the managed Rancher service

## List managed Rancher services

`GET /v2/publicCloud/project/{projectId}/rancher`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/container/managed-rancher-service/#get-publiccloud-project-projectid-rancher

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:rancher/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.rancher.Rancher[] | successful operation |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the managed Rancher service creation |
| `currentState` | publicCloud.rancher.RancherCurrentState | read-only | Current configuration applied to the managed Rancher service |
| `currentState.bootstrapPassword` | string (password) | read-only | Bootstrap password of the managed Rancher service, returned only on creation |
| `currentState.iamAuthEnabled` | boolean | read-only | Allows Rancher to use identities managed by OVHcloud IAM (Identity and Access Management) to control access |
| `currentState.ipRestrictions` | publicCloud.rancher.IpRestriction[] | read-only | List of allowed CIDR blocks for a managed Rancher service's IP restrictions. When empty, any IP is allowed. |
| `currentState.ipRestrictions[].cidrBlock` | ipBlock | yes | Allowed CIDR block (/subnet is optional, if unspecified then /32 will be used) |
| `currentState.ipRestrictions[].description` | string | yes | Description of the allowed CIDR block |
| `currentState.name` | string | read-only | Name of the managed Rancher service |
| `currentState.networking` | publicCloud.rancher.Networking | read-only | Networking properties of a managed Rancher service |
| `currentState.networking.egressCidrBlocks` | ipBlock[] | read-only | Specifies the CIDR ranges for egress IP addresses used by Rancher. Ensure these ranges are allowed in any IP restrictions for services that Rancher will access. |
| `currentState.plan` | publicCloud.rancher.PlanEnum | read-only | Plan of the managed Rancher service — one of `OVHCLOUD_EDITION`, `STANDARD` |
| `currentState.region` | publicCloud.rancher.RegionEnum | read-only | Region of the managed Rancher service — one of `EU_WEST_GRA`, `EU_WEST_RBX`, `EU_WEST_SBG` |
| `currentState.url` | string | read-only | URL of the managed Rancher service |
| `currentState.usage` | publicCloud.rancher.Usage | read-only | Latest metrics regarding the usage of the managed Rancher service |
| `currentState.usage.datetime` | string (date-time) | read-only | Date of the sample |
| `currentState.usage.orchestratedVcpus` | integer | read-only | Total number of vCPUs orchestrated by the managed Rancher service through the downstream clusters |
| `currentState.version` | string | read-only | Version of the managed Rancher service |
| `currentTasks` | common.CurrentTask[] | read-only | Asynchronous operations ongoing on the managed Rancher service |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the managed Rancher service. A new target specification request will be accepted only in `READY` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.rancher.RancherTargetSpec | read-only | Last target specification of the managed Rancher service |
| `targetSpec.iamAuthEnabled` | boolean |  | Allows Rancher to use identities managed by OVHcloud IAM (Identity and Access Management) to control access |
| `targetSpec.ipRestrictions` | publicCloud.rancher.IpRestriction[] |  | List of allowed CIDR blocks for a managed Rancher service's IP restrictions. When empty, any IP is allowed. |
| `targetSpec.ipRestrictions[].cidrBlock` | ipBlock | yes | Allowed CIDR block (/subnet is optional, if unspecified then /32 will be used) |
| `targetSpec.ipRestrictions[].description` | string | yes | Description of the allowed CIDR block |
| `targetSpec.name` | string | yes | Name of the managed Rancher service |
| `targetSpec.plan` | publicCloud.rancher.PlanEnum | yes | Plan of the managed Rancher service. Available plans for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/plan. — one of `OVHCLOUD_EDITION`, `STANDARD` |
| `targetSpec.version` | string | yes | Version of the managed Rancher service. Available versions for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/version. |
| `updatedAt` | string (date-time) | read-only | Date of the last managed Rancher service update |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "currentState": {
      "bootstrapPassword": "string",
      "iamAuthEnabled": true,
      "ipRestrictions": [
        {
          "cidrBlock": "192.0.2.0/24",
          "description": "string"
        }
      ],
      "name": "string",
      "networking": {
        "egressCidrBlocks": [
          "192.0.2.0/24"
        ]
      },
      "plan": "OVHCLOUD_EDITION",
      "region": "EU_WEST_GRA",
      "url": "string",
      "usage": {
        "datetime": "2024-01-01T12:00:00Z",
        "orchestratedVcpus": 0
      },
      "version": "string"
    },
    "currentTasks": [
      {
        "errors": [
          {
            "message": "string"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
        "link": "string",
        "status": "ERROR",
        "type": "string"
      }
    ],
    "id": "00000000-0000-0000-0000-000000000000",
    "resourceStatus": "CREATING",
    "targetSpec": {
      "iamAuthEnabled": true,
      "ipRestrictions": [
        {
          "cidrBlock": "192.0.2.0/24",
          "description": "string"
        }
      ],
      "name": "string",
      "plan": "OVHCLOUD_EDITION",
      "version": "string"
    },
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/rancher" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/rancher")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/rancher");

print_r($result);
?>
```

## Create a new managed Rancher service

`POST /v2/publicCloud/project/{projectId}/rancher`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/container/managed-rancher-service/#post-publiccloud-project-projectid-rancher

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:rancher/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.rancher.RancherCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | publicCloud.rancher.RancherCreationTargetSpec | yes | Target specification for the managed Rancher service |
| `targetSpec.iamAuthEnabled` | boolean |  | Allows Rancher to use identities managed by OVHcloud IAM (Identity and Access Management) to control access |
| `targetSpec.name` | string | yes | Name of the managed Rancher service |
| `targetSpec.plan` | publicCloud.rancher.PlanEnum | yes | Plan of the managed Rancher service. Available plans for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/plan. — one of `OVHCLOUD_EDITION`, `STANDARD` |
| `targetSpec.version` | string |  | Version of the managed Rancher service. Available versions for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/version. Defaults to the latest version. |

```json
{
  "targetSpec": {
    "iamAuthEnabled": true,
    "name": "string",
    "plan": "OVHCLOUD_EDITION",
    "version": "string"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.rancher.Rancher | successful operation |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the managed Rancher service creation |
| `currentState` | publicCloud.rancher.RancherCurrentState | read-only | Current configuration applied to the managed Rancher service |
| `currentState.bootstrapPassword` | string (password) | read-only | Bootstrap password of the managed Rancher service, returned only on creation |
| `currentState.iamAuthEnabled` | boolean | read-only | Allows Rancher to use identities managed by OVHcloud IAM (Identity and Access Management) to control access |
| `currentState.ipRestrictions` | publicCloud.rancher.IpRestriction[] | read-only | List of allowed CIDR blocks for a managed Rancher service's IP restrictions. When empty, any IP is allowed. |
| `currentState.ipRestrictions[].cidrBlock` | ipBlock | yes | Allowed CIDR block (/subnet is optional, if unspecified then /32 will be used) |
| `currentState.ipRestrictions[].description` | string | yes | Description of the allowed CIDR block |
| `currentState.name` | string | read-only | Name of the managed Rancher service |
| `currentState.networking` | publicCloud.rancher.Networking | read-only | Networking properties of a managed Rancher service |
| `currentState.networking.egressCidrBlocks` | ipBlock[] | read-only | Specifies the CIDR ranges for egress IP addresses used by Rancher. Ensure these ranges are allowed in any IP restrictions for services that Rancher will access. |
| `currentState.plan` | publicCloud.rancher.PlanEnum | read-only | Plan of the managed Rancher service — one of `OVHCLOUD_EDITION`, `STANDARD` |
| `currentState.region` | publicCloud.rancher.RegionEnum | read-only | Region of the managed Rancher service — one of `EU_WEST_GRA`, `EU_WEST_RBX`, `EU_WEST_SBG` |
| `currentState.url` | string | read-only | URL of the managed Rancher service |
| `currentState.usage` | publicCloud.rancher.Usage | read-only | Latest metrics regarding the usage of the managed Rancher service |
| `currentState.usage.datetime` | string (date-time) | read-only | Date of the sample |
| `currentState.usage.orchestratedVcpus` | integer | read-only | Total number of vCPUs orchestrated by the managed Rancher service through the downstream clusters |
| `currentState.version` | string | read-only | Version of the managed Rancher service |
| `currentTasks` | common.CurrentTask[] | read-only | Asynchronous operations ongoing on the managed Rancher service |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the managed Rancher service. A new target specification request will be accepted only in `READY` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.rancher.RancherTargetSpec | read-only | Last target specification of the managed Rancher service |
| `targetSpec.iamAuthEnabled` | boolean |  | Allows Rancher to use identities managed by OVHcloud IAM (Identity and Access Management) to control access |
| `targetSpec.ipRestrictions` | publicCloud.rancher.IpRestriction[] |  | List of allowed CIDR blocks for a managed Rancher service's IP restrictions. When empty, any IP is allowed. |
| `targetSpec.ipRestrictions[].cidrBlock` | ipBlock | yes | Allowed CIDR block (/subnet is optional, if unspecified then /32 will be used) |
| `targetSpec.ipRestrictions[].description` | string | yes | Description of the allowed CIDR block |
| `targetSpec.name` | string | yes | Name of the managed Rancher service |
| `targetSpec.plan` | publicCloud.rancher.PlanEnum | yes | Plan of the managed Rancher service. Available plans for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/plan. — one of `OVHCLOUD_EDITION`, `STANDARD` |
| `targetSpec.version` | string | yes | Version of the managed Rancher service. Available versions for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/version. |
| `updatedAt` | string (date-time) | read-only | Date of the last managed Rancher service update |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "bootstrapPassword": "string",
    "iamAuthEnabled": true,
    "ipRestrictions": [
      {
        "cidrBlock": "192.0.2.0/24",
        "description": "string"
      }
    ],
    "name": "string",
    "networking": {
      "egressCidrBlocks": [
        "192.0.2.0/24"
      ]
    },
    "plan": "OVHCLOUD_EDITION",
    "region": "EU_WEST_GRA",
    "url": "string",
    "usage": {
      "datetime": "2024-01-01T12:00:00Z",
      "orchestratedVcpus": 0
    },
    "version": "string"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "iamAuthEnabled": true,
    "ipRestrictions": [
      {
        "cidrBlock": "192.0.2.0/24",
        "description": "string"
      }
    ],
    "name": "string",
    "plan": "OVHCLOUD_EDITION",
    "version": "string"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/rancher" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.rancher.RancherCreation
result = client.post("/v2/publicCloud/project/{projectId}/rancher",
	targetSpec = None, # Target specification for the managed Rancher service (type: publicCloud.rancher.RancherCreationTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.rancher.RancherCreation
$result = $ovh->post("/v2/publicCloud/project/{projectId}/rancher", array(
	targetSpec => null, // Target specification for the managed Rancher service (type: publicCloud.rancher.RancherCreationTargetSpec)
));

print_r($result);
?>
```

## Get a managed Rancher service

`GET /v2/publicCloud/project/{projectId}/rancher/{rancherId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/container/managed-rancher-service/#get-publiccloud-project-projectid-rancher-rancherid

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:rancher/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `rancherId` | path | string (uuid) | yes | Rancher ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.rancher.Rancher | successful operation |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the managed Rancher service creation |
| `currentState` | publicCloud.rancher.RancherCurrentState | read-only | Current configuration applied to the managed Rancher service |
| `currentState.bootstrapPassword` | string (password) | read-only | Bootstrap password of the managed Rancher service, returned only on creation |
| `currentState.iamAuthEnabled` | boolean | read-only | Allows Rancher to use identities managed by OVHcloud IAM (Identity and Access Management) to control access |
| `currentState.ipRestrictions` | publicCloud.rancher.IpRestriction[] | read-only | List of allowed CIDR blocks for a managed Rancher service's IP restrictions. When empty, any IP is allowed. |
| `currentState.ipRestrictions[].cidrBlock` | ipBlock | yes | Allowed CIDR block (/subnet is optional, if unspecified then /32 will be used) |
| `currentState.ipRestrictions[].description` | string | yes | Description of the allowed CIDR block |
| `currentState.name` | string | read-only | Name of the managed Rancher service |
| `currentState.networking` | publicCloud.rancher.Networking | read-only | Networking properties of a managed Rancher service |
| `currentState.networking.egressCidrBlocks` | ipBlock[] | read-only | Specifies the CIDR ranges for egress IP addresses used by Rancher. Ensure these ranges are allowed in any IP restrictions for services that Rancher will access. |
| `currentState.plan` | publicCloud.rancher.PlanEnum | read-only | Plan of the managed Rancher service — one of `OVHCLOUD_EDITION`, `STANDARD` |
| `currentState.region` | publicCloud.rancher.RegionEnum | read-only | Region of the managed Rancher service — one of `EU_WEST_GRA`, `EU_WEST_RBX`, `EU_WEST_SBG` |
| `currentState.url` | string | read-only | URL of the managed Rancher service |
| `currentState.usage` | publicCloud.rancher.Usage | read-only | Latest metrics regarding the usage of the managed Rancher service |
| `currentState.usage.datetime` | string (date-time) | read-only | Date of the sample |
| `currentState.usage.orchestratedVcpus` | integer | read-only | Total number of vCPUs orchestrated by the managed Rancher service through the downstream clusters |
| `currentState.version` | string | read-only | Version of the managed Rancher service |
| `currentTasks` | common.CurrentTask[] | read-only | Asynchronous operations ongoing on the managed Rancher service |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the managed Rancher service. A new target specification request will be accepted only in `READY` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.rancher.RancherTargetSpec | read-only | Last target specification of the managed Rancher service |
| `targetSpec.iamAuthEnabled` | boolean |  | Allows Rancher to use identities managed by OVHcloud IAM (Identity and Access Management) to control access |
| `targetSpec.ipRestrictions` | publicCloud.rancher.IpRestriction[] |  | List of allowed CIDR blocks for a managed Rancher service's IP restrictions. When empty, any IP is allowed. |
| `targetSpec.ipRestrictions[].cidrBlock` | ipBlock | yes | Allowed CIDR block (/subnet is optional, if unspecified then /32 will be used) |
| `targetSpec.ipRestrictions[].description` | string | yes | Description of the allowed CIDR block |
| `targetSpec.name` | string | yes | Name of the managed Rancher service |
| `targetSpec.plan` | publicCloud.rancher.PlanEnum | yes | Plan of the managed Rancher service. Available plans for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/plan. — one of `OVHCLOUD_EDITION`, `STANDARD` |
| `targetSpec.version` | string | yes | Version of the managed Rancher service. Available versions for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/version. |
| `updatedAt` | string (date-time) | read-only | Date of the last managed Rancher service update |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "bootstrapPassword": "string",
    "iamAuthEnabled": true,
    "ipRestrictions": [
      {
        "cidrBlock": "192.0.2.0/24",
        "description": "string"
      }
    ],
    "name": "string",
    "networking": {
      "egressCidrBlocks": [
        "192.0.2.0/24"
      ]
    },
    "plan": "OVHCLOUD_EDITION",
    "region": "EU_WEST_GRA",
    "url": "string",
    "usage": {
      "datetime": "2024-01-01T12:00:00Z",
      "orchestratedVcpus": 0
    },
    "version": "string"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "iamAuthEnabled": true,
    "ipRestrictions": [
      {
        "cidrBlock": "192.0.2.0/24",
        "description": "string"
      }
    ],
    "name": "string",
    "plan": "OVHCLOUD_EDITION",
    "version": "string"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/rancher/{rancherId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/rancher/{rancherId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/rancher/{rancherId}");

print_r($result);
?>
```

## Update an existing managed Rancher service

`PUT /v2/publicCloud/project/{projectId}/rancher/{rancherId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/container/managed-rancher-service/#put-publiccloud-project-projectid-rancher-rancherid

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:rancher/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `rancherId` | path | string (uuid) | yes | Rancher ID |

### Request body (required)

Type: `publicCloud.rancher.RancherUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | publicCloud.rancher.RancherTargetSpec | yes | New target specification for the managed Rancher service |
| `targetSpec.iamAuthEnabled` | boolean |  | Allows Rancher to use identities managed by OVHcloud IAM (Identity and Access Management) to control access |
| `targetSpec.ipRestrictions` | publicCloud.rancher.IpRestriction[] |  | List of allowed CIDR blocks for a managed Rancher service's IP restrictions. When empty, any IP is allowed. |
| `targetSpec.ipRestrictions[].cidrBlock` | ipBlock | yes | Allowed CIDR block (/subnet is optional, if unspecified then /32 will be used) |
| `targetSpec.ipRestrictions[].description` | string | yes | Description of the allowed CIDR block |
| `targetSpec.name` | string | yes | Name of the managed Rancher service |
| `targetSpec.plan` | publicCloud.rancher.PlanEnum | yes | Plan of the managed Rancher service. Available plans for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/plan. — one of `OVHCLOUD_EDITION`, `STANDARD` |
| `targetSpec.version` | string | yes | Version of the managed Rancher service. Available versions for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/version. |

```json
{
  "targetSpec": {
    "iamAuthEnabled": true,
    "ipRestrictions": [
      {
        "cidrBlock": "192.0.2.0/24",
        "description": "string"
      }
    ],
    "name": "string",
    "plan": "OVHCLOUD_EDITION",
    "version": "string"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.rancher.Rancher | successful operation |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the managed Rancher service creation |
| `currentState` | publicCloud.rancher.RancherCurrentState | read-only | Current configuration applied to the managed Rancher service |
| `currentState.bootstrapPassword` | string (password) | read-only | Bootstrap password of the managed Rancher service, returned only on creation |
| `currentState.iamAuthEnabled` | boolean | read-only | Allows Rancher to use identities managed by OVHcloud IAM (Identity and Access Management) to control access |
| `currentState.ipRestrictions` | publicCloud.rancher.IpRestriction[] | read-only | List of allowed CIDR blocks for a managed Rancher service's IP restrictions. When empty, any IP is allowed. |
| `currentState.ipRestrictions[].cidrBlock` | ipBlock | yes | Allowed CIDR block (/subnet is optional, if unspecified then /32 will be used) |
| `currentState.ipRestrictions[].description` | string | yes | Description of the allowed CIDR block |
| `currentState.name` | string | read-only | Name of the managed Rancher service |
| `currentState.networking` | publicCloud.rancher.Networking | read-only | Networking properties of a managed Rancher service |
| `currentState.networking.egressCidrBlocks` | ipBlock[] | read-only | Specifies the CIDR ranges for egress IP addresses used by Rancher. Ensure these ranges are allowed in any IP restrictions for services that Rancher will access. |
| `currentState.plan` | publicCloud.rancher.PlanEnum | read-only | Plan of the managed Rancher service — one of `OVHCLOUD_EDITION`, `STANDARD` |
| `currentState.region` | publicCloud.rancher.RegionEnum | read-only | Region of the managed Rancher service — one of `EU_WEST_GRA`, `EU_WEST_RBX`, `EU_WEST_SBG` |
| `currentState.url` | string | read-only | URL of the managed Rancher service |
| `currentState.usage` | publicCloud.rancher.Usage | read-only | Latest metrics regarding the usage of the managed Rancher service |
| `currentState.usage.datetime` | string (date-time) | read-only | Date of the sample |
| `currentState.usage.orchestratedVcpus` | integer | read-only | Total number of vCPUs orchestrated by the managed Rancher service through the downstream clusters |
| `currentState.version` | string | read-only | Version of the managed Rancher service |
| `currentTasks` | common.CurrentTask[] | read-only | Asynchronous operations ongoing on the managed Rancher service |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the managed Rancher service. A new target specification request will be accepted only in `READY` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.rancher.RancherTargetSpec | read-only | Last target specification of the managed Rancher service |
| `targetSpec.iamAuthEnabled` | boolean |  | Allows Rancher to use identities managed by OVHcloud IAM (Identity and Access Management) to control access |
| `targetSpec.ipRestrictions` | publicCloud.rancher.IpRestriction[] |  | List of allowed CIDR blocks for a managed Rancher service's IP restrictions. When empty, any IP is allowed. |
| `targetSpec.ipRestrictions[].cidrBlock` | ipBlock | yes | Allowed CIDR block (/subnet is optional, if unspecified then /32 will be used) |
| `targetSpec.ipRestrictions[].description` | string | yes | Description of the allowed CIDR block |
| `targetSpec.name` | string | yes | Name of the managed Rancher service |
| `targetSpec.plan` | publicCloud.rancher.PlanEnum | yes | Plan of the managed Rancher service. Available plans for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/plan. — one of `OVHCLOUD_EDITION`, `STANDARD` |
| `targetSpec.version` | string | yes | Version of the managed Rancher service. Available versions for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/version. |
| `updatedAt` | string (date-time) | read-only | Date of the last managed Rancher service update |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "bootstrapPassword": "string",
    "iamAuthEnabled": true,
    "ipRestrictions": [
      {
        "cidrBlock": "192.0.2.0/24",
        "description": "string"
      }
    ],
    "name": "string",
    "networking": {
      "egressCidrBlocks": [
        "192.0.2.0/24"
      ]
    },
    "plan": "OVHCLOUD_EDITION",
    "region": "EU_WEST_GRA",
    "url": "string",
    "usage": {
      "datetime": "2024-01-01T12:00:00Z",
      "orchestratedVcpus": 0
    },
    "version": "string"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "iamAuthEnabled": true,
    "ipRestrictions": [
      {
        "cidrBlock": "192.0.2.0/24",
        "description": "string"
      }
    ],
    "name": "string",
    "plan": "OVHCLOUD_EDITION",
    "version": "string"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/rancher/{rancherId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: publicCloud.rancher.RancherUpdate
result = client.put("/v2/publicCloud/project/{projectId}/rancher/{rancherId}",
	targetSpec = None, # New target specification for the managed Rancher service (type: publicCloud.rancher.RancherTargetSpec)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: publicCloud.rancher.RancherUpdate
$result = $ovh->put("/v2/publicCloud/project/{projectId}/rancher/{rancherId}", array(
	targetSpec => null, // New target specification for the managed Rancher service (type: publicCloud.rancher.RancherTargetSpec)
));

print_r($result);
?>
```

## Delete a managed Rancher service

`DELETE /v2/publicCloud/project/{projectId}/rancher/{rancherId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/container/managed-rancher-service/#delete-publiccloud-project-projectid-rancher-rancherid

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:rancher/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `rancherId` | path | string (uuid) | yes | Rancher ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.rancher.Rancher | successful operation |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Date of the managed Rancher service creation |
| `currentState` | publicCloud.rancher.RancherCurrentState | read-only | Current configuration applied to the managed Rancher service |
| `currentState.bootstrapPassword` | string (password) | read-only | Bootstrap password of the managed Rancher service, returned only on creation |
| `currentState.iamAuthEnabled` | boolean | read-only | Allows Rancher to use identities managed by OVHcloud IAM (Identity and Access Management) to control access |
| `currentState.ipRestrictions` | publicCloud.rancher.IpRestriction[] | read-only | List of allowed CIDR blocks for a managed Rancher service's IP restrictions. When empty, any IP is allowed. |
| `currentState.ipRestrictions[].cidrBlock` | ipBlock | yes | Allowed CIDR block (/subnet is optional, if unspecified then /32 will be used) |
| `currentState.ipRestrictions[].description` | string | yes | Description of the allowed CIDR block |
| `currentState.name` | string | read-only | Name of the managed Rancher service |
| `currentState.networking` | publicCloud.rancher.Networking | read-only | Networking properties of a managed Rancher service |
| `currentState.networking.egressCidrBlocks` | ipBlock[] | read-only | Specifies the CIDR ranges for egress IP addresses used by Rancher. Ensure these ranges are allowed in any IP restrictions for services that Rancher will access. |
| `currentState.plan` | publicCloud.rancher.PlanEnum | read-only | Plan of the managed Rancher service — one of `OVHCLOUD_EDITION`, `STANDARD` |
| `currentState.region` | publicCloud.rancher.RegionEnum | read-only | Region of the managed Rancher service — one of `EU_WEST_GRA`, `EU_WEST_RBX`, `EU_WEST_SBG` |
| `currentState.url` | string | read-only | URL of the managed Rancher service |
| `currentState.usage` | publicCloud.rancher.Usage | read-only | Latest metrics regarding the usage of the managed Rancher service |
| `currentState.usage.datetime` | string (date-time) | read-only | Date of the sample |
| `currentState.usage.orchestratedVcpus` | integer | read-only | Total number of vCPUs orchestrated by the managed Rancher service through the downstream clusters |
| `currentState.version` | string | read-only | Version of the managed Rancher service |
| `currentTasks` | common.CurrentTask[] | read-only | Asynchronous operations ongoing on the managed Rancher service |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Reflects the readiness of the managed Rancher service. A new target specification request will be accepted only in `READY` status. — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.rancher.RancherTargetSpec | read-only | Last target specification of the managed Rancher service |
| `targetSpec.iamAuthEnabled` | boolean |  | Allows Rancher to use identities managed by OVHcloud IAM (Identity and Access Management) to control access |
| `targetSpec.ipRestrictions` | publicCloud.rancher.IpRestriction[] |  | List of allowed CIDR blocks for a managed Rancher service's IP restrictions. When empty, any IP is allowed. |
| `targetSpec.ipRestrictions[].cidrBlock` | ipBlock | yes | Allowed CIDR block (/subnet is optional, if unspecified then /32 will be used) |
| `targetSpec.ipRestrictions[].description` | string | yes | Description of the allowed CIDR block |
| `targetSpec.name` | string | yes | Name of the managed Rancher service |
| `targetSpec.plan` | publicCloud.rancher.PlanEnum | yes | Plan of the managed Rancher service. Available plans for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/plan. — one of `OVHCLOUD_EDITION`, `STANDARD` |
| `targetSpec.version` | string | yes | Version of the managed Rancher service. Available versions for an existing managed Rancher can be retrieved using GET /rancher/rancherID/capabilities/version. |
| `updatedAt` | string (date-time) | read-only | Date of the last managed Rancher service update |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "bootstrapPassword": "string",
    "iamAuthEnabled": true,
    "ipRestrictions": [
      {
        "cidrBlock": "192.0.2.0/24",
        "description": "string"
      }
    ],
    "name": "string",
    "networking": {
      "egressCidrBlocks": [
        "192.0.2.0/24"
      ]
    },
    "plan": "OVHCLOUD_EDITION",
    "region": "EU_WEST_GRA",
    "url": "string",
    "usage": {
      "datetime": "2024-01-01T12:00:00Z",
      "orchestratedVcpus": 0
    },
    "version": "string"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "iamAuthEnabled": true,
    "ipRestrictions": [
      {
        "cidrBlock": "192.0.2.0/24",
        "description": "string"
      }
    ],
    "name": "string",
    "plan": "OVHCLOUD_EDITION",
    "version": "string"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/rancher/{rancherId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/v2/publicCloud/project/{projectId}/rancher/{rancherId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/v2/publicCloud/project/{projectId}/rancher/{rancherId}");

print_r($result);
?>
```

## Reset the admin password

`POST /v2/publicCloud/project/{projectId}/rancher/{rancherId}/adminCredentials`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/container/managed-rancher-service/#post-publiccloud-project-projectid-rancher-rancherid-admincredentials

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:rancher/adminCredentials/reset`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `rancherId` | path | string (uuid) | yes | Rancher ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.rancher.Credentials | successful operation |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `password` | string (password) | read-only | Password of the user |
| `username` | string | read-only | Name of the user |

```json
{
  "password": "string",
  "username": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/rancher/{rancherId}/adminCredentials" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/v2/publicCloud/project/{projectId}/rancher/{rancherId}/adminCredentials")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/v2/publicCloud/project/{projectId}/rancher/{rancherId}/adminCredentials");

print_r($result);
?>
```

## List available and current plans for the given managed Rancher service

`GET /v2/publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/plan`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/container/managed-rancher-service/#get-publiccloud-project-projectid-rancher-rancherid-capabilities-plan

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:rancher/capabilities/plan/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |
| `rancherId` | path | string (uuid) | yes | Rancher ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.rancher.PlanCapability[] | successful operation |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `cause` | publicCloud.rancher.PlanUnavailabilityCauseEnum | read-only | Cause for an unavailability — one of `CANNOT_DOWNGRADE_USING_HIGHER_FEATURES`, `CANNOT_SWITCH_PLAN_FOR_ALPHA`, `NOT_IMPLEMENTED` |
| `message` | string | read-only | Human-readable description of the unavailability cause |
| `name` | publicCloud.rancher.PlanEnum | read-only | Name of the plan — one of `OVHCLOUD_EDITION`, `STANDARD` |
| `status` | publicCloud.rancher.PlanCapabilityStatusEnum | read-only | Status of the plan — one of `AVAILABLE`, `CURRENT`, `UNAVAILABLE` |

```json
[
  {
    "cause": "CANNOT_DOWNGRADE_USING_HIGHER_FEATURES",
    "message": "string",
    "name": "OVHCLOUD_EDITION",
    "status": "AVAILABLE"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/plan" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/plan")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/plan");

print_r($result);
?>
```

## List available and current versions for the given managed Rancher service

`GET /v2/publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/version`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/container/managed-rancher-service/#get-publiccloud-project-projectid-rancher-rancherid-capabilities-version

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:rancher/capabilities/version/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |
| `rancherId` | path | string (uuid) | yes | Rancher ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.rancher.VersionCapability[] | successful operation |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `cause` | publicCloud.rancher.VersionUnavailabilityCauseEnum | read-only | Cause for an unavailability — one of `CANNOT_UPGRADE_MULTIPLE_VERSIONS`, `DEPRECATED`, `DISABLED`, `END_OF_LIFE`, `END_OF_SALE`, `END_OF_SUPPORT` |
| `changelogUrl` | string | read-only | Changelog URL of the version |
| `message` | string | read-only | Human-readable description of the unavailability cause |
| `name` | string | read-only | Name of the version |
| `status` | publicCloud.rancher.VersionCapabilityStatusEnum | read-only | Status of the version — one of `AVAILABLE`, `UNAVAILABLE` |

```json
[
  {
    "cause": "CANNOT_UPGRADE_MULTIPLE_VERSIONS",
    "changelogUrl": "string",
    "message": "string",
    "name": "string",
    "status": "AVAILABLE"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/version" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/version")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/rancher/{rancherId}/capabilities/version");

print_r($result);
?>
```

## List all events related to the managed Rancher service

`GET /v2/publicCloud/project/{projectId}/rancher/{rancherId}/event`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/container/managed-rancher-service/#get-publiccloud-project-projectid-rancher-rancherid-event

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:rancher/event/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |
| `rancherId` | path | string (uuid) | yes | Rancher ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.Event[] | successful operation |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the event |
| `kind` | string | read-only | Nature of the event |
| `link` | string | read-only | Link to the event related resource |
| `message` | string | read-only | Description of what happened on the event |
| `type` | common.EventTypeEnum | read-only | Type of the event — one of `TARGET_SPEC_UPDATE`, `TASK_ERROR`, `TASK_START`, `TASK_SUCCESS` |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "kind": "string",
    "link": "string",
    "message": "string",
    "type": "TARGET_SPEC_UPDATE"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/rancher/{rancherId}/event" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/rancher/{rancherId}/event")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/rancher/{rancherId}/event");

print_r($result);
?>
```

## List all asynchronous operations related to the managed Rancher service

`GET /v2/publicCloud/project/{projectId}/rancher/{rancherId}/task`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/container/managed-rancher-service/#get-publiccloud-project-projectid-rancher-rancherid-task

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:rancher/task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |
| `rancherId` | path | string (uuid) | yes | Rancher ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.Task[] | successful operation |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the task |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `finishedAt` | string (date-time) | read-only | Ending date of the task |
| `id` | string (uuid) | read-only | Unique identifier of the task |
| `link` | string | read-only | Link to the related resource |
| `message` | string | read-only | Description of the task |
| `progress` | common.TaskProgress[] | read-only | Progress steps of the asynchronous operation |
| `progress[].name` | string | read-only | Progress step name |
| `progress[].status` | common.TaskStatusEnum | read-only | Current status of the progress step — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `startedAt` | string (date-time) | read-only | Starting date of the task |
| `status` | common.TaskStatusEnum | read-only | Current global status of the task — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the task |
| `updatedAt` | string (date-time) | read-only | Last update of the task |

```json
[
  {
    "createdAt": "2024-01-01T12:00:00Z",
    "errors": [
      {
        "message": "string"
      }
    ],
    "finishedAt": "2024-01-01T12:00:00Z",
    "id": "00000000-0000-0000-0000-000000000000",
    "link": "string",
    "message": "string",
    "progress": [
      {
        "name": "string",
        "status": "DONE"
      }
    ],
    "startedAt": "2024-01-01T12:00:00Z",
    "status": "DONE",
    "type": "string",
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/rancher/{rancherId}/task" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/rancher/{rancherId}/task")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/rancher/{rancherId}/task");

print_r($result);
?>
```

## Get a specific task related to the managed Rancher service

`GET /v2/publicCloud/project/{projectId}/rancher/{rancherId}/task/{taskId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/container/managed-rancher-service/#get-publiccloud-project-projectid-rancher-rancherid-task-taskid

**Status:** Stable production version  
**IAM actions:** `publicCloudProject:apiovh:rancher/task/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `projectId` | path | string | yes | Project ID |
| `rancherId` | path | string (uuid) | yes | Rancher ID |
| `taskId` | path | string (uuid) | yes | Task ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | common.Task | successful operation |
| 500 | object | Error 500 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `createdAt` | string (date-time) | read-only | Creation date of the task |
| `errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `errors[].message` | string | read-only | Error description |
| `finishedAt` | string (date-time) | read-only | Ending date of the task |
| `id` | string (uuid) | read-only | Unique identifier of the task |
| `link` | string | read-only | Link to the related resource |
| `message` | string | read-only | Description of the task |
| `progress` | common.TaskProgress[] | read-only | Progress steps of the asynchronous operation |
| `progress[].name` | string | read-only | Progress step name |
| `progress[].status` | common.TaskStatusEnum | read-only | Current status of the progress step — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `startedAt` | string (date-time) | read-only | Starting date of the task |
| `status` | common.TaskStatusEnum | read-only | Current global status of the task — one of `DONE`, `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `type` | string | read-only | Type of the task |
| `updatedAt` | string (date-time) | read-only | Last update of the task |

```json
{
  "createdAt": "2024-01-01T12:00:00Z",
  "errors": [
    {
      "message": "string"
    }
  ],
  "finishedAt": "2024-01-01T12:00:00Z",
  "id": "00000000-0000-0000-0000-000000000000",
  "link": "string",
  "message": "string",
  "progress": [
    {
      "name": "string",
      "status": "DONE"
    }
  ],
  "startedAt": "2024-01-01T12:00:00Z",
  "status": "DONE",
  "type": "string",
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/rancher/{rancherId}/task/{taskId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/v2/publicCloud/project/{projectId}/rancher/{rancherId}/task/{taskId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/v2/publicCloud/project/{projectId}/rancher/{rancherId}/task/{taskId}");

print_r($result);
?>
```
