---
type: api
title: Update a managed integration
description: Update a managed integration by ID. Uses full-replace semantics: the policy is rebuilt entirely from the request body, so any omitted optional field (for example, `description`, `vars`, `global_data_tags`, `cloud_connector`) is cleared or reset to its default. The integration package name is immutable and the runtime-managed `cluster_id` is preserved from the existing policy.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-put-fleet-managed-integrations-policyid
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-put-fleet-managed-integrations-policyid
products:
  - Kibana
---

# Update a managed integration

Availability: 9.5+

- Server: `https://{kibana_url}`

## Paths

- `PUT` `/api/fleet/managed_integrations/{policyId}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v0/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v0/authentication#basicauth)

#### Path Parameters

- `policyId` (string · max: 256)
  The ID of the managed integration to update.

## Description

Update a managed integration by ID. Uses full-replace semantics: the policy is rebuilt entirely from the request body, so any omitted optional field (for example, `description`, `vars`, `global_data_tags`, `cloud_connector`) is cleared or reset to its default. The integration package name is immutable and the runtime-managed `cluster_id` is preserved from the existing policy.

## Request Body

`application/json`

- `additional_datastreams_permissions` ([] string · max: 100) — optional — nullable
  Additional data stream permissions that will be added to the agent policy.
- `cloud_connector` (object) — optional — nullable
  - `cloud_connector_id` (string · max: 256) — optional
    ID of an existing cloud connector to reuse. If not provided, a new connector is created. Requires `enabled: true` and cannot be combined with `name`.
  - `enabled` (boolean · default: false) — optional
    Set to `true` to attach a cloud connector to this policy. Must be `true` to set any of `cloud_connector_id`, `name`, or `target_csp`.
  - `name` (string · min: 1 · max: 255) — optional
    Name for a new cloud connector. If not provided, a name is generated automatically from the credentials. Requires `enabled: true` and only applies when creating a new connector (cannot be combined with `cloud_connector_id`).
  - `target_csp` (enum) — optional
    Target cloud service provider. If not provided, the provider is detected automatically from the inputs. Requires `enabled: true`.
    Values: `aws`, `azure`, `gcp`
- `create_dataset_templates` (boolean) — optional
  When true, install dedicated index templates for streams with a custom data_stream.dataset. Defaults to true for input packages, false for integration packages.
- `description` (string · max: 2048) — optional
  Policy description.
- `force` (boolean) — optional
  Force package policy creation even if the package is not verified, or if the agent policy is managed.
- `global_data_tags` ([] object · max: 100) — optional
  - `name` (string · max: 1024) — required
    Name of the custom field. The name cannot contain spaces.
  - `value` (union string | number) — required
    Value of the custom field.
- `id` (string · max: 255) — optional
  Policy unique identifier.
- `inputs` (map string to object) — optional
  Package policy inputs. Refer to the integration documentation to know which inputs are available.
  Map values (object)
  - `condition` (string · max: 10000) — optional — nullable
    Agent condition expression to evaluate whether to apply this input.
  - `deprecated` ({}) — optional
    - `description` (string · max: 4096) — required
    - `replaced_by` (map string to string) — optional
    - `since` (string · max: 50) — optional
  - `enabled` (boolean) — optional
    Enable or disable that input. Defaults to `true` (enabled).
  - `streams` (map string to object) — optional
    Input streams. Refer to the integration documentation to know which streams are available.
    Map values (object)
    - `condition` (string · max: 10000) — optional — nullable
      Agent condition expression to evaluate whether to apply this stream.
    - `deprecated` ({}) — optional
      - `description` (string · max: 4096) — required
      - `replaced_by` (map string to string) — optional
      - `since` (string · max: 50) — optional
    - `enabled` (boolean) — optional
      Enable or disable that stream. Defaults to `true` (enabled).
    - `var_group_selections` (map string to string) — optional
      Variable group selections. Maps var_group name to the selected option name within that group.
    - `vars` (map string to anyOf) — optional
      Input/stream level variable. Refer to the integration documentation for more information.
  - `vars` (map string to anyOf) — optional
    Input/stream level variable. Refer to the integration documentation for more information.
- `name` (string · max: 255) — required
  Unique name for the policy.
- `namespace` (string · max: 100) — optional
  Policy namespace. When not specified, it inherits the agent policy namespace.
- `package` ({}) — required
  - `experimental_data_stream_features` ([] object · max: 100) — optional
    - `data_stream` (string · max: 1024) — required
    - `features` (object) — required
      - `doc_value_only_numeric` (boolean) — optional
      - `doc_value_only_other` (boolean) — optional
      - `synthetic_source` (boolean) — optional
      - `tsdb` (boolean) — optional
  - `fips_compatible` (boolean) — optional
  - `name` (string · max: 255) — required
    Package name
  - `requires_root` (boolean) — optional
  - `title` (string · max: 255) — optional
  - `version` (string · max: 50) — required
    Package version
- `policy_template` (string · max: 256) — optional
  The policy template to use for the managed integration. If not provided, the default policy template is used.
- `var_group_selections` (map string to string) — optional
  Variable group selections. Maps var_group name to the selected option name within that group.
- `vars` (map string to anyOf) — optional
  Input/stream level variable. Refer to the integration documentation for more information.

## Responses

#### `200`

Indicates a successful response

`application/json`

- `item` ({})
  - `additional_datastreams_permissions` ([] string · max: 1000)
    Additional data stream permissions granted to the managed integration.
  - `cloud_connector` ({})
    - `cloud_connector_id` (string · max: 255)
      The ID of the cloud connector.
    - `enabled` (boolean)
      Whether the cloud connector is active for this policy.
  - `created_at` (string · max: 64)
    Creation timestamp (ISO 8601).
  - `created_by` (string · max: 1024)
    User who created the policy.
  - `description` (string · max: 2048)
    Managed integration description.
  - `global_data_tags` ([] object · max: 100)
    Custom data tags applied to all data produced by this policy.
    - `name` (string · max: 1024)
      The name of the custom field.
    - `value` (union string | number)
      The value of the custom field.
  - `id` (string · max: 255)
    Managed integration unique identifier.
  - `inputs` (map string to object)
    Package policy inputs. Refer to the integration documentation to know which inputs are available.
    Map values (object)
    - `condition` (string · max: 10000) — nullable
      Agent condition expression to evaluate whether to apply this input.
    - `deprecated` ({})
      - `description` (string · max: 4096)
      - `replaced_by` (map string to string)
      - `since` (string · max: 50)
    - `enabled` (boolean)
      Enable or disable that input. Defaults to `true` (enabled).
    - `streams` (map string to object)
      Input streams. Refer to the integration documentation to know which streams are available.
      Map values (object)
      - `condition` (string · max: 10000) — nullable
        Agent condition expression to evaluate whether to apply this stream.
      - `deprecated` ({})
        - `description` (string · max: 4096)
        - `replaced_by` (map string to string)
        - `since` (string · max: 50)
      - `enabled` (boolean)
        Enable or disable that stream. Defaults to `true` (enabled).
      - `var_group_selections` (map string to string)
        Variable group selections. Maps var_group name to the selected option name within that group.
      - `vars` (map string to anyOf)
        Input/stream level variable. Refer to the integration documentation for more information.
    - `vars` (map string to anyOf)
      Input/stream level variable. Refer to the integration documentation for more information.
  - `name` (string · max: 255)
    Managed integration name.
  - `namespace` (string · max: 100)
    Policy namespace. Defaults to the agent policy namespace.
  - `package` ({})
    - `name` (string · max: 255)
      Integration package name.
    - `title` (string · max: 255)
      Integration package display title.
    - `version` (string · max: 50)
      Integration package version.
  - `updated_at` (string · max: 64)
    Last update timestamp (ISO 8601).
  - `updated_by` (string · max: 1024)
    User who last updated the policy.
  - `var_group_selections` (map string to string)
    Variable group selections. Maps var_group name to the selected option name within that group.
  - `vars` (map string to anyOf)
    Input/stream level variable. Refer to the integration documentation for more information.
#### `400`

Bad Request

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
#### `404`

Not Found

`application/json`

- `message` (string)
#### `409`

Conflict — for example, the requested name is already used by another integration policy.

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
## Code Examples

#### Console

```console
PUT /api/fleet/managed_integrations/{policyId}
{
  "cloud_connector": {
    "enabled": true,
    "target_csp": "aws"
  },
  "description": "CSPM integration for AWS with cloud connector",
  "inputs": {
    "cspm-cloudbeat/cis_aws": {
      "enabled": true,
      "streams": {
        "cloud_security_posture.findings": {
          "enabled": true,
          "vars": {
            "aws.account_type": "organization-account",
            "aws.credentials.type": "cloud_connector",
            "aws.supports_cloud_connectors": true,
            "external_id": {
              "id": "ABCDEFGHIJKLMNOPQRST",
              "isSecretRef": true
            },
            "role_arn": "arn:aws:iam::123456789012:role/TestRole"
          }
        }
      },
      "vars": {
        "cloud_formation_template": "https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml"
      }
    },
    "cspm-cloudbeat/cis_azure": {
      "enabled": false
    },
    "cspm-cloudbeat/cis_gcp": {
      "enabled": false
    }
  },
  "name": "cspm-aws-policy",
  "namespace": "default",
  "package": {
    "name": "cloud_security_posture",
    "version": "3.1.1"
  },
  "vars": {
    "deployment": "aws",
    "posture": "cspm"
  }
}
```

#### curl

```curl
curl -X PUT "https://{kibana_url}/api/fleet/managed_integrations/{policyId}" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -d '{
  "cloud_connector": {
    "enabled": true,
    "target_csp": "aws"
  },
  "description": "CSPM integration for AWS with cloud connector",
  "inputs": {
    "cspm-cloudbeat/cis_aws": {
      "enabled": true,
      "streams": {
        "cloud_security_posture.findings": {
          "enabled": true,
          "vars": {
            "aws.account_type": "organization-account",
            "aws.credentials.type": "cloud_connector",
            "aws.supports_cloud_connectors": true,
            "external_id": {
              "id": "ABCDEFGHIJKLMNOPQRST",
              "isSecretRef": true
            },
            "role_arn": "arn:aws:iam::123456789012:role/TestRole"
          }
        }
      },
      "vars": {
        "cloud_formation_template": "https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml"
      }
    },
    "cspm-cloudbeat/cis_azure": {
      "enabled": false
    },
    "cspm-cloudbeat/cis_gcp": {
      "enabled": false
    }
  },
  "name": "cspm-aws-policy",
  "namespace": "default",
  "package": {
    "name": "cloud_security_posture",
    "version": "3.1.1"
  },
  "vars": {
    "deployment": "aws",
    "posture": "cspm"
  }
}'
```

## Response Examples

#### Update managed integration response

Example response for updating a managed integration

```json
{
  "item": {
    "created_at": "2025-11-06T18:27:43.541Z",
    "created_by": "test_user",
    "description": "updated description",
    "id": "d52a7812-5736-4fdc-aed8-72152afa1ffa",
    "inputs": {
      "ESS Billing-cel": {
        "enabled": true,
        "streams": {
          "ess_billing.billing": {
            "enabled": true,
            "vars": {
              "hide_sensitive": true,
              "http_client_timeout": "30s",
              "lookbehind": 180,
              "tags": [
                "forwarded",
                "billing"
              ]
            }
          },
          "ess_billing.credits": {
            "enabled": true
          }
        },
        "vars": {
          "api_key": {
            "id": "QY1sWpoBbWcMW-edr0Ee",
            "isSecretRef": true
          },
          "organization_id": "1234",
          "url": "https://billing.elastic-cloud.com"
        }
      }
    },
    "name": "ess_billing-1",
    "namespace": "default",
    "package": {
      "name": "ess_billing",
      "title": "Elasticsearch Service Billing",
      "version": "1.6.0"
    },
    "updated_at": "2025-11-07T09:14:02.118Z",
    "updated_by": "test_user"
  }
}
```

#### Update managed integration with awscloud connector response

Example response after attaching an AWS cloud connector on update

```json
{
  "item": {
    "cloud_connector": {
      "cloud_connector_id": "aws-connector-67890",
      "enabled": true
    },
    "created_at": "2025-11-06T18:27:43.541Z",
    "created_by": "test_user",
    "description": "CSPM integration for AWS with cloud connector",
    "id": "aws-policy-12345",
    "inputs": {
      "cspm-cloudbeat/cis_aws": {
        "enabled": true,
        "streams": {
          "cloud_security_posture.findings": {
            "enabled": true,
            "vars": {
              "aws.account_type": "organization-account",
              "aws.credentials.type": "cloud_connector",
              "external_id": {
                "id": "secret-external-id-123",
                "isSecretRef": true
              },
              "role_arn": "arn:aws:iam::123456789012:role/TestRole"
            }
          }
        },
        "vars": {
          "cloud_formation_template": "https://console.aws.amazon.com/cloudformation/home#/stacks/quickcreate?templateURL=https://elastic-cspm-cft.s3.eu-central-1.amazonaws.com/cloudformation-cspm-ACCOUNT_TYPE-9.2.0.yml"
        }
      },
      "cspm-cloudbeat/cis_azure": {
        "enabled": false
      },
      "cspm-cloudbeat/cis_gcp": {
        "enabled": false
      }
    },
    "name": "cspm-aws-policy",
    "namespace": "default",
    "package": {
      "name": "cloud_security_posture",
      "title": "Cloud Security Posture Management",
      "version": "3.1.1"
    },
    "updated_at": "2025-11-07T09:14:02.118Z",
    "updated_by": "test_user",
    "vars": {
      "deployment": "aws",
      "posture": "cspm"
    }
  }
}
```

#### Generic error response

Example of a generic error response

```json
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}
```

#### Package name change error response

The integration package name cannot be changed on update

```json
{
  "error": "Bad Request",
  "message": "Cannot change the integration package of an agentless policy (from \u0022ess_billing\u0022 to \u0022cloud_security_posture\u0022).",
  "statusCode": 400
}
```

#### Not found error response

Example of a not found error response

```json
{
  "message": "Agentless policy d52a7812-5736-4fdc-aed8-72152afa1ffa not found"
}
```

#### Conflict error response

Example of a name-conflict error response

```json
{
  "error": "Conflict",
  "message": "An integration policy with the name my-agentless-policy already exists. Please rename it or choose a different name.",
  "statusCode": 409
}
```

