Learn R Programming

paws.management (version 0.1.12)

organizations_delete_policy: Deletes the specified policy from your organization

Description

Deletes the specified policy from your organization. Before you perform this operation, you must first detach the policy from all organizational units (OUs), roots, and accounts.

This operation can be called only from the organization's management account.

Usage

organizations_delete_policy(PolicyId)

Value

An empty list.

Arguments

PolicyId

[required] The unique identifier (ID) of the policy that you want to delete. You can get the ID from the list_policies or list_policies_for_target operations.

The regex pattern for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (_).

Request syntax

svc$delete_policy(
  PolicyId = "string"
)

Examples

Run this code
if (FALSE) {
# The following example shows how to delete a policy from an organization.
# The example assumes that you previously detached the policy from all
# entities:
# 
# 
svc$delete_policy(
  PolicyId = "p-examplepolicyid111"
)
}

Run the code above in your browser using DataLab