---
title: "POST /locations/global/securityPolicies/{securityPolicy}/addAssociation"
method: POST
path: "/locations/global/securityPolicies/{securityPolicy}/addAssociation"
tags: ["organizationSecurityPolicies"]
---

# POST /locations/global/securityPolicies/{securityPolicy}/addAssociation

`POST /locations/global/securityPolicies/{securityPolicy}/addAssociation`

Inserts an association for the specified security policy.

This has billing implications.  Projects in the hierarchy with effective
hierarchical security policies will be automatically enrolled into Cloud
Armor Enterprise if not already enrolled.

Use this API to modify Cloud Armor policies. Previously, alpha and beta
versions of this API were used to modify firewall policies. This usage is
now disabled for most organizations. Use firewallPolicies.addAssociation
instead.

## Path parameters

- `securityPolicy` string, required

## Query parameters

- `replaceExistingAssociation` boolean
- `requestId` string

## Request body

- SecurityPolicyAssociation
  - `name` string — The name for an association.
  - `attachmentId` string — The resource that the security policy is attached to.
  - `excludedFolders` string[] — A list of folders to exclude from the security policy.
  - `securityPolicyId` string — Output only. [Output Only] The security policy ID of the association.
  - `shortName` string — Output only. [Output Only] The short name of the security policy of the association.
  - `displayName` string — Output only. [Output Only] The display name of the security policy of the association.
  - `excludedProjects` string[] — A list of projects to exclude from the security policy.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/compute.md) · [All operations](https://skmtc.net/google/apis/compute/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/compute/revisions/6120ed8969d4/schema)
