Spaces method and path for this operation:
Refer to Spaces for more information.
Deprecated. Use PUT /api/fleet/managed_integrations/{policyId} instead. 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.
Body
-
Additional data stream permissions that will be added to the agent policy.
Not more than
100elements. Maximum length of each is256. -
Additional properties are NOT allowed.
-
When true, install dedicated index templates for streams with a custom data_stream.dataset. Defaults to true for input packages, false for integration packages.
-
Policy description.
Maximum length is
2048. -
Force package policy creation even if the package is not verified, or if the agent policy is managed.
-
Policy unique identifier.
Maximum length is
255. -
Package policy inputs. Refer to the integration documentation to know which inputs are available.
-
Unique name for the policy.
Maximum length is
255. -
Policy namespace. When not specified, it inherits the agent policy namespace.
Maximum length is
100. -
Additional properties are NOT allowed.
-
The policy template to use for the managed integration. If not provided, the default policy template is used.
Maximum length is
256. -
Variable group selections. Maps var_group name to the selected option name within that group.
-
Input/stream level variable. Refer to the integration documentation for more information.
curl \
--request PUT 'https://localhost:5601/api/fleet/agentless_policies/{policyId}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '"{\n \"cloud_connector\": {\n \"enabled\": true,\n \"target_csp\": \"aws\"\n },\n \"description\": \"CSPM integration for AWS with cloud connector\",\n \"inputs\": {\n \"cspm-cloudbeat/cis_aws\": {\n \"enabled\": true,\n \"streams\": {\n \"cloud_security_posture.findings\": {\n \"enabled\": true,\n \"vars\": {\n \"aws.account_type\": \"organization-account\",\n \"aws.credentials.type\": \"cloud_connector\",\n \"aws.supports_cloud_connectors\": true,\n \"external_id\": {\n \"id\": \"ABCDEFGHIJKLMNOPQRST\",\n \"isSecretRef\": true\n },\n \"role_arn\": \"arn:aws:iam::123456789012:role/TestRole\"\n }\n }\n },\n \"vars\": {\n \"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\"\n }\n },\n \"cspm-cloudbeat/cis_azure\": {\n \"enabled\": false\n },\n \"cspm-cloudbeat/cis_gcp\": {\n \"enabled\": false\n }\n },\n \"name\": \"cspm-aws-policy\",\n \"namespace\": \"default\",\n \"package\": {\n \"name\": \"cloud_security_posture\",\n \"version\": \"3.1.1\"\n },\n \"vars\": {\n \"deployment\": \"aws\",\n \"posture\": \"cspm\"\n }\n}"'
{
"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"
}
}
{
"inputs": {
"ESS Billing-cel": {
"enabled": true,
"streams": {
"ess_billing.billing": {
"enabled": true
},
"ess_billing.credits": {
"enabled": true
}
},
"vars": {
"api_key": "<REPLACE_WITH_YOUR_API_KEY>",
"organization_id": "1234"
}
}
},
"name": "ess_billing-1",
"namespace": "default",
"package": {
"name": "ess_billing",
"version": "1.6.0"
}
}
{
"description": "updated description",
"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": "<REPLACE_WITH_YOUR_API_KEY>",
"organization_id": "1234"
}
}
},
"name": "ess_billing-1",
"namespace": "default",
"package": {
"name": "ess_billing",
"version": "1.6.0"
}
}
{
"cloud_connector": {
"cloud_connector_id": "existing-aws-connector-id",
"enabled": true,
"target_csp": "aws"
},
"description": "CSPM integration for AWS reusing existing 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"
}
}
{
"description": "bumped to a newer package version",
"inputs": {
"ESS Billing-cel": {
"enabled": true,
"streams": {
"ess_billing.billing": {
"enabled": true
},
"ess_billing.credits": {
"enabled": false
}
},
"vars": {
"api_key": "<REPLACE_WITH_YOUR_API_KEY>",
"organization_id": "1234"
}
}
},
"name": "ess_billing-1",
"namespace": "default",
"package": {
"name": "ess_billing",
"version": "1.7.0"
}
}
{
"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"
}
}
{
"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"
}
}
}
{
"error": "Bad Request",
"message": "An error message describing what went wrong",
"statusCode": 400
}
{
"error": "Bad Request",
"message": "Cannot change the integration package of an agentless policy (from \"ess_billing\" to \"cloud_security_posture\").",
"statusCode": 400
}
{
"message": "Agentless policy d52a7812-5736-4fdc-aed8-72152afa1ffa not found"
}
{
"error": "Conflict",
"message": "An integration policy with the name my-agentless-policy already exists. Please rename it or choose a different name.",
"statusCode": 409
}