Moving a Service Gateway to a Different Compartment

Move a service gateway into a different compartment within the same tenancy.

For information about moving resources between compartments, see Moving Resources to a Different Compartment.

When you move a service gateway to a new compartment, policies set for that new compartment apply immediately.

The service gateway moves to the new compartment immediately. Depending on your permissions, you can select the compartment in the left side menu to view the service gateway.

For more information about using compartments and policies to control access to this cloud network, see Access Control. For general information about compartments, see Managing Compartments.

    1. On the Virtual Cloud Networks list page, select the VCN that contains the gateway that you want to work with. If you need help finding the list page or the VCN, see Listing VCNs.
    2. On the details page, perform one of the following actions depending on the option that you see:
      • On the Gateways tab, go to the Service Gateways section.
      • Under Resources, select Service Gateways.
    3. Select the the Actions menu Actions Menu for the gateway, and then select Move Resource.
    4. In the Move resource panel, select the destination compartment from the list.
    5. Select Move resource.
  • Use the network service-gateway change-compartment command and required parameters to move a service gateway into a different compartment:

    oci network service-gateway change-compartment --service-gateway-id sgw-ocid ... [OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the ChangeServiceGatewayCompartment operation to move a service gateway into a different compartment.