Updating an Internet Gateway

Update an internet gateway (IGW) in a Virtual Cloud Network (VCN) in Networking.

You can't change the display name or disable or enable an internet gateway by using the Console, but you can do both using the CLI or API. If the gateway is disabled, that means no traffic flows to or from the internet even when a route rule allows that traffic.

You can associate a route table with the internet gateway, move it to a different compartment, terminate it, and also change its tags. After a route table is associated with a gateway, the gateway must always have a route table associated with it.

  • To associate a route table to an internet gateway:
    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 Internet Gateways section.
      • Under Resources, select Internet Gateway.
    3. Select the the Actions menu (three dots) for the internet gateway, and then select Associate Route Table.
    4. Select a different route table, changing the compartment as needed to find the one that you want. Then, select Associate Route Table.
    You can also use the the Actions menu (three dots) to move the internet gateway to a different compartment, delete it, or change its tags.
  • Use the network internet-gateway update command and required parameters to change the display name of the specified internet gateway:

    oci network internet-gateway update --ig-id ig-ocid --display-name new-name ... [OPTIONS]

    Use the network internet-gateway update command and required parameters to enable or disable the specified internet gateway:

    oci network internet-gateway update --ig-id ig-ocid --is-enabled [true | false] ... [OPTIONS]

    Use the network internet-gateway update command and required parameters to associate a route table to the specified internet gateway:

    oci network internet-gateway update --ig-id ig-ocid --route-table-id route-table-ocid ... [OPTIONS]

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

  • Run the UpdateInternetGateway operation to update the specified internet gateway.

    For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.