Create or update the inference region policy Generally available

PUT /_inference/_region_policy

The region policy restricts inference to a set of allowed geographic areas or cloud service provider regions.

Required authorization

  • Cluster privileges: manage_inference

Query parameters

  • force boolean

    If true, the region policy is applied even if it would deny access to inference endpoints that are currently in use by ingest pipeline or indices.

application/json

Body Required

  • region_policy object Required

    The region policy configuration.

    Hide region_policy attributes Show region_policy attributes object
    • allowed_geos array[string]

      The list of allowed geographic areas. Mutually exclusive with allowed_regions.

    • allowed_regions array[object]

      The list of allowed cloud service provider regions. Mutually exclusive with allowed_geos.

      Hide allowed_regions attributes Show allowed_regions attributes object

      A cloud service provider region.

      • csp string Required

        The cloud service provider, for example aws, gcp, or azure.

      • region string Required

        The region of the cloud service provider, for example us-east-1.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • region_policy object Required

      The region policy configuration. Specify exactly one of allowed_geos or allowed_regions.

      Hide region_policy attributes Show region_policy attributes object
      • allowed_geos array[string]

        The list of allowed geographic areas. Mutually exclusive with allowed_regions.

      • allowed_regions array[object]

        The list of allowed cloud service provider regions. Mutually exclusive with allowed_geos.

        Hide allowed_regions attributes Show allowed_regions attributes object

        A cloud service provider region.

        • csp string Required

          The cloud service provider, for example aws, gcp, or azure.

        • region string Required

          The region of the cloud service provider, for example us-east-1.

    • created_at string | number Required

      The date and time the region policy was created.

      One of:

      Time unit for milliseconds

    • created_by string

      The user who created the region policy.

    • updated_at string | number

      The date and time the region policy was last updated.

      One of:

      Time unit for milliseconds

    • updated_by string

      The user who last updated the region policy.

PUT /_inference/_region_policy
PUT _inference/_region_policy
{
    "region_policy": {
        "allowed_regions": [
            { "csp": "aws", "region": "us-east-1" },
            { "csp": "aws", "region": "eu-west-1" }
        ]
    }
}
resp = client.inference.put_region_policy(
    region_policy={
        "allowed_regions": [
            {
                "csp": "aws",
                "region": "us-east-1"
            },
            {
                "csp": "aws",
                "region": "eu-west-1"
            }
        ]
    },
)
const response = await client.inference.putRegionPolicy({
  region_policy: {
    allowed_regions: [
      {
        csp: "aws",
        region: "us-east-1",
      },
      {
        csp: "aws",
        region: "eu-west-1",
      },
    ],
  },
});
response = client.inference.put_region_policy(
  body: {
    "region_policy": {
      "allowed_regions": [
        {
          "csp": "aws",
          "region": "us-east-1"
        },
        {
          "csp": "aws",
          "region": "eu-west-1"
        }
      ]
    }
  }
)
$resp = $client->inference()->putRegionPolicy([
    "body" => [
        "region_policy" => [
            "allowed_regions" => array(
                [
                    "csp" => "aws",
                    "region" => "us-east-1",
                ],
                [
                    "csp" => "aws",
                    "region" => "eu-west-1",
                ],
            ),
        ],
    ],
]);
curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type: application/json" -d '{"region_policy":{"allowed_regions":[{"csp":"aws","region":"us-east-1"},{"csp":"aws","region":"eu-west-1"}]}}' "$ELASTICSEARCH_URL/_inference/_region_policy"
Request examples
Run `PUT _inference/_region_policy` to restrict inference to a specific set of cloud service provider regions.
{
    "region_policy": {
        "allowed_regions": [
            { "csp": "aws", "region": "us-east-1" },
            { "csp": "aws", "region": "eu-west-1" }
        ]
    }
}
Run `PUT _inference/_region_policy` to restrict inference to a specific set of geographic areas.
{
    "region_policy": {
        "allowed_geos": ["us", "eu"]
    }
}
Response examples (200)
A successful response when creating a region policy that allows specific cloud service provider regions.
{
  "region_policy": {
    "allowed_regions": [
      { "csp": "aws", "region": "us-east-1" },
      { "csp": "aws", "region": "eu-west-1" }
    ]
  },
  "created_at": "2026-07-13T12:00:00.000Z",
  "created_by": "inference_user"
}