---
title: "POST /servicenetworkserviceassociations"
method: POST
path: "/servicenetworkserviceassociations"
---

# POST /servicenetworkserviceassociations

`POST /servicenetworkserviceassociations`

Associates the specified service with the specified service network. For more information, see [Manage service associations](https://docs.aws.amazon.com/vpc-lattice/latest/ug/service-network-associations.html#service-network-service-associations) in the _Amazon VPC Lattice User Guide_.

You can't use this operation if the service and service network are already associated or if there is a disassociation or deletion in progress. If the association fails, you can retry the operation by deleting the association and recreating it.

You cannot associate a service and service network that are shared with a caller. The caller must own either the service or the service network.

As a result of this operation, the association is created in the service network account and the association owner account.

## Request body

- object
  - `clientToken` string — A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token and parameters, the retry succeeds without performing any actions. If the parameters aren't identical, the retry fails.
  - `serviceIdentifier` string, required — The ID or ARN of the service.
  - `serviceNetworkIdentifier` string, required — The ID or ARN of the service network. You must use an ARN if the resources are in different accounts.
  - `tags` object — The tags for the association.

## Response `200`

Success

- CreateServiceNetworkServiceAssociationResponse
  - `id` string — The ID of the association.
  - `status` 'CREATE_IN_PROGRESS' | 'ACTIVE' | 'DELETE_IN_PROGRESS' | 'CREATE_FAILED' | 'DELETE_FAILED' — The association status.
  - `arn` string — The Amazon Resource Name (ARN) of the association.
  - `createdBy` string — The account that created the association.
  - `customDomainName` string — The custom domain name of the service.
  - `dnsEntry` object — The DNS name of the service.
    - `domainName` string — The domain name of the service.
    - `hostedZoneId` string — The ID of the hosted zone.

## Other responses

- `480` — ValidationException
- `481` — AccessDeniedException
- `482` — ConflictException
- `483` — ResourceNotFoundException
- `484` — ThrottlingException
- `485` — ServiceQuotaExceededException
- `486` — InternalServerException

---

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