[Yandex Cloud documentation](../../../index.md) > [Yandex Identity and Access Management](../../index.md) > [Step-by-step guides](../index.md) > Access policies > Delete policy

# Deleting an access policy

{% note info %}

This feature is in the [Preview](../../../overview/concepts/launch-stages.md) stage. To get access, contact [tech support](https://center.yandex.cloud/support) or your account manager.

{% endnote %}

[Access policies](../../concepts/access-control/access-policies.md) are a Yandex Identity and Access Management mechanism that allows you to manage permissions for specific operations with [Yandex Cloud resources](../../../overview/roles-and-resources.md). Access policies are based on [templates](../../concepts/access-control/access-policies.md#supported-policies) and complement the [role](../../concepts/access-control/roles.md) system for more flexible [access management](../../concepts/access-control/index.md).

You can delete an access policy created for a [folder](#folder), [cloud](#cloud), or [organization](#organization).

{% note info %}

To manage access policies, a user must have one of the following roles:

* [`resource-manager.admin`](../../../resource-manager/security/index.md#resource-manager-admin) or [`admin`](../../roles-reference.md#admin) for the [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder) or [cloud](../../../resource-manager/concepts/resources-hierarchy.md#cloud) to manage access policies at the folder or cloud level, respectively.
* [`organization-manager.admin`](../../../organization/security/index.md#organization-manager-admin) or [`admin`](../../roles-reference.md#admin) for the [organization](../../../organization/concepts/organization.md) to manage access policies at the organization level.

{% endnote %}

## Deleting an access policy created for a folder {#folder}

To delete an access policy created for a [folder](../../../resource-manager/concepts/resources-hierarchy.md#folder):

{% list tabs group=instructions %}

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  1. [Get](../../../resource-manager/operations/folder/manage-access-policies.md#view-assigned) a list of IDs of access policy templates assigned for the folder.
  1. Run this command:

      ```bash
      yc resource-manager folder unbind-access-policy \
        --name <folder_name> \
        --access-policy-template-id=<policy_template_ID>
      ```

      Where:

      * `--name`: Name of the folder that you want to delete the policy for. Instead of the folder name, you can provide its [ID](../../../resource-manager/operations/folder/get-id.md) in the `--id` parameter.
      * `--access-policy-template-id`: ID of the access policy template you want to delete for the specified folder.
  1. [Make sure](../../../resource-manager/operations/folder/manage-access-policies.md#view-assigned) the policy was deleted.

- API {#api}

  Use the [unbindAccessPolicy](../../../resource-manager/api-ref/Folder/unbindAccessPolicy.md) REST API method for the [Folder](../../../resource-manager/api-ref/Folder/index.md) resource or the [FolderService/UnbindAccessPolicy](../../../resource-manager/api-ref/grpc/Folder/unbindAccessPolicy.md) gRPC API call.

{% endlist %}

The specified access policy will no longer apply to resources in the specified folder.

## Deleting an access policy created for a cloud {#cloud}

To delete an access policy created for a [cloud](../../../resource-manager/concepts/resources-hierarchy.md#cloud):

{% list tabs group=instructions %}

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  1. [Get](../../../resource-manager/operations/cloud/manage-access-policies.md#view-assigned) a list of IDs of access policy templates assigned for the cloud.
  1. Run this command:

      ```bash
      yc resource-manager cloud unbind-access-policy \
        --name <cloud_name> \
        --access-policy-template-id=<policy_template_ID>
      ```

      Where:

      * `--name`: Name of the cloud that you want to delete the policy for. Instead of the cloud name, you can provide its [ID](../../../resource-manager/operations/cloud/get-id.md) in the `--id` parameter.
      * `--access-policy-template-id`: ID of the access policy template you want to delete from the specified cloud.
  1. [Make sure](../../../resource-manager/operations/cloud/manage-access-policies.md#view-assigned) the policy was deleted.

- API {#api}

  Use the [unbindAccessPolicy](../../../resource-manager/api-ref/Cloud/unbindAccessPolicy.md) REST API method for the [Cloud](../../../resource-manager/api-ref/Cloud/index.md) resource or the [CloudService/UnbindAccessPolicy](../../../resource-manager/api-ref/grpc/Cloud/unbindAccessPolicy.md) gRPC API call.

{% endlist %}

The specified access policy will no longer apply to resources within all folders in the given cloud.

## Deleting an access policy created for an organization {#organization}

To delete an access policy created for an [organization](../../../organization/concepts/organization.md), follow these steps:

{% list tabs group=instructions %}

- CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  1. [Get](../../../organization/operations/manage-access-policies.md#view-assigned) a list of IDs of access policy templates assigned for the organization.
  1. Run this command:

      ```bash
      yc organization-manager organization unbind-access-policy \
        --name <organization_name> \
        --access-policy-template-id=<policy_template_ID>
      ```

      Where:

      * `--name`: Name of the organization to delete the policy for. Instead of the organization name, you can provide its [ID](../../../organization/operations/organization-get-id.md) in the `--id` parameter.
      * `--access-policy-template-id`: ID of the access policy template you want to delete from the specified organization.
  1. [Make sure](../../../organization/operations/manage-access-policies.md#view-assigned) the policy was deleted.

- API {#api}

  Use the [unbindAccessPolicy](../../../organization/api-ref/Organization/unbindAccessPolicy.md) REST API method for the [Organization](../../../organization/api-ref/Organization/index.md) resource or the [OrganizationService/UnbindAccessPolicy](../../../organization/api-ref/grpc/Organization/unbindAccessPolicy.md) gRPC API call.

{% endlist %}

The access policy will no longer apply to resources within all clouds in the specified organization.

#### Useful links {#see-also}

* [Access policies](../../concepts/access-control/access-policies.md)
* [Getting a list of supported access policy templates](list.md)
* [Creating an access policy for a resource](assign.md)
* [Viewing access policies created for a resource](view-assigned.md)