Moving an Access Policy Between Compartments
Move an access policy from one compartment to another in Service Mesh.
After you move an access policy to a new compartment, inherent policies apply immediately and affect access to the access policy through the Console. For more information, see Managing Compartments.
- Open the navigation menu and click Developer Services. Under Containers & Artifacts, click Service Mesh.
- Click Service Meshes.
- On the Service Mesh page, from the list of compartments on the left side, select a compartment.
- From the list of meshes, click the mesh name for which you want to move an access policy.
- On the details page of the mesh, under Resources, click Access Policies.
- From the Access Policies table, click the access policy that you want to move.
- On the details page of the access policy, click Move resource.
- In the Move resource dialog box, select the destination compartment.
- Click Move resource.
To move an access policy from one compartment to another, use the
service-mesh
resource with theaccess-policy
option. Provide the compartment ID for the target compartment for the access policy.oci service-mesh access-policy change-compartment --access-policy-id <access-policy-id> --compartment-id <compartment-id>
Example:
oci service-mesh access-policy change-compartment --access-policy-id ocid.accesspolicy.oc1.iad.aaaa.... --compartment-id ocid.compartment.oc1.iad.aaaa....
To see what operations are available for
access-policy change-compartment
use:oci service-mesh access-policy change-compartment -h
Use the ChangeAccessPolicyCompartment operation to move an access policy.