Tagging a Service Gateway

Add tags to a service gateway.

Using tags enables you to define keys and values and associate them with resources. You can apply tags to a service gateway to help you organize resources according to your business needs. Apply tags at the time you create a service gateway, or update the service gateway with tags later. For more information, see Resource Tags.

Note

If you are not sure whether to apply tags, ask your administrator for guidance.

    This task can't be performed using the Console.

    1. In the Console, confirm you're viewing the compartment that contains the VCN with the SGW you're interested in. For information about compartments and access control, see Access Control.
    2. Open the navigation menu, click Networking, and then click Virtual cloud networks.
    3. Click the name of the VCN that has the SGW you're interested in.
    4. On the left side of the page, click Service Gateways.
    5. For the service gateway you're interested in, click the Actions menu (Actions Menu), and then clickView Tags. From there you can view the existing tags, edit them, and apply new ones.
  • Use the network service-gateway create command and parameters shown to add tags when you create a service gateway:

    oci network service-gateway create --compartment-id compartment_id [. . .] [--defined-tags | --freeform-tags] tags [OPTIONS]

    Use the network service-gateway update command and parameters shown to add tags to an existing service gateway:

    oci network service-gateway update --service-gateway-id sgw-ocid [. . .] [--defined-tags | --freeform-tags] tags [OPTIONS] 

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

  • Run the CreateServiceGateway operation to add tags when you create a service gateway, and use the definedTags attribute.

    Run the UpdateServiceGateway operation to add tags when you update a service gateway, and use the definedTags or freeformTags attributes.