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.

    1. Open the navigation menu and click Developer Services. Under Containers & Artifacts, click Service Mesh.
    2. Click Service Meshes.
    3. On the Service Mesh page, from the list of compartments on the left side, select a compartment.
    4. From the list of meshes, click the mesh name for which you want to move an access policy.
    5. On the details page of the mesh, under Resources, click Access Policies.
    6. From the Access Policies table, click the access policy that you want to move.
    7. On the details page of the access policy, click Move resource.
    8. In the Move resource dialog box, select the destination compartment.
    9. Click Move resource.
  • To move an access policy from one compartment to another, use the service-mesh resource with the access-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.