Clone a policy as a shared policy

Clones the staging, production, and last modified versions of a non-shared (API v2) or shared policy into a new shared policy. You can also specify any additional versions that you want to clone into the new shared policy. The policy ID is required. If you don't already have the policy ID, use List shared policies or List policies and note the id or policyId value. When cloning a non-shared policy to a shared policy, a group ID (groupId) is required. Policies created using API v2 don't require a groupId, so the non-shared policy that you're cloning might not have this data member. If the policy you're cloning doesn’t have a groupId, assign one while performing this operation. To check if the non-shared policy has a groupId, see List policies.

Path Params
integer
required

Identifies the shared policy.

Query Params
string

For customers who manage more than one account, this runs the operation from another account. The Identity and Access Management API provides a list of available account switch keys.

Body Params
additionalVersions
array of integers

Any additional versions that you want to clone into the new shared policy.

additionalVersions
integer
required

Identifies the group where you want to create the shared policy. See About group IDs.

string
required

The name of the new shared policy.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
URL
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json