---
title: "POST /2015-01-01/packages/associate/{PackageID}/{DomainName}"
method: POST
path: "/2015-01-01/packages/associate/{PackageID}/{DomainName}"
---

# POST /2015-01-01/packages/associate/{PackageID}/{DomainName}

`POST /2015-01-01/packages/associate/{PackageID}/{DomainName}`

Associates a package with an Amazon ES domain.

## Path parameters

- `PackageID` string, required
- `DomainName` string, required — The name of an Elasticsearch domain. Domain names are unique across the domains owned by an account within an AWS region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9, and - (hyphen).

## Response `200`

Success

- AssociatePackageResponse — Container for response returned by <code> <a>AssociatePackage</a> </code> operation.
  - `DomainPackageDetails` object — <code>DomainPackageDetails</code>
    - `PackageID` string — Internal ID of the package.
    - `PackageName` string — User specified name of the package.
    - `PackageType` 'TXT-DICTIONARY' — Currently supports only TXT-DICTIONARY.
    - `LastUpdated` string, date-time — Timestamp of the most-recent update to the association status.
    - `DomainName` string — Name of the domain you've associated a package with.
    - `DomainPackageStatus` 'ASSOCIATING' | 'ASSOCIATION_FAILED' | 'ACTIVE' | 'DISSOCIATING' | 'DISSOCIATION_FAILED' — State of the association. Values are ASSOCIATING/ASSOCIATION_FAILED/ACTIVE/DISSOCIATING/DISSOCIATION_FAILED.
    - `PackageVersion` string
    - `ReferencePath` string — The relative path on Amazon ES nodes, which can be used as synonym_path when the package is synonym file.
    - `ErrorDetails` object — Additional information if the package is in an error state. Null otherwise.
      - `ErrorType` string
      - `ErrorMessage` string

## Other responses

- `480` — BaseException
- `481` — InternalException
- `482` — ResourceNotFoundException
- `483` — AccessDeniedException
- `484` — ValidationException
- `485` — ConflictException

---

[API](https://skmtc.net/aws/apis/es.md) · [All operations](https://skmtc.net/aws/apis/es/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/es/versions/2aa0f7663d92/schema)
