Updated on 2025-11-06 GMT+08:00

NAT Gateway

IAM provides system-defined identity policies to define common actions supported by cloud services. You can also create custom identity policies using the actions supported by cloud services for more refined access control.

In addition to IAM, the Organizations service also provides Service Control Policies (SCPs) to set access control policies.

SCPs do not actually grant any permissions to an entity. They only set the permissions boundary for the entity. When SCPs are attached to an organizational unit (OU) or a member account, the SCPs do not directly grant permissions to that OU or member account. Instead, the SCPs only determine what permissions are available for that member account or those member accounts under that OU. The granted permissions can be applied only if they are allowed by the SCPs.

To learn more about how IAM is different from Organizations for access control, see How IAM Is Different from Organizations for Access Control?.

This section describes the elements used by IAM custom identity policies and Organizations SCPs. The elements include actions, resources, and conditions.

Actions

Actions are specific operations that are allowed or denied in an identity policy.

  • The Access Level column describes how the action is classified (List, Read, or Write). This classification helps you understand the level of access that an action grants when you use it in an identity policy.
  • The Resource Type column indicates whether the action supports resource-level permissions.
    • You can use a wildcard (*) to indicate all resource types. If this column is empty (-), the action does not support resource-level permissions and you must specify all resources ("*") in your identity policy statements.
    • If this column includes a resource type, you must specify the URN in the Resource element of your identity policy statements.
    • Required resources are marked with asterisks (*) in the table. If you specify a resource in a statement using this action, then it must be of this type.

    For details about the resource types defined by NAT, see Resources.

  • The Condition Key column contains keys that you can specify in the Condition element of an identity policy statement.
    • If the Resource Type column has values for an action, the condition key takes effect only for the listed resource types.
    • If the Resource Type column is empty (-) for an action, the condition key takes effect for all resources that action supports.
    • If the Condition Key column is empty (-) for an action, the action does not support any condition keys.

    For details about the condition keys defined by NAT, see Conditions.

  • The Alias column lists the policy actions that are configured in identity policies. With these actions, you can use APIs for policy-based authorization. For details, see Policies and Identity Policies.

The following table lists the actions that you can define in identity policy statements for NAT.

Table 1 Actions supported by NAT

Action

Description

Access Level

Resource Type (*: required)

Condition Key

Alias

nat:privateNatGateways:list

Grants permission to query private NAT gateways.

List

privateGateway *

g:EnterpriseProjectId

-

nat:privateNatGateways:create

Grants permission to create a private NAT gateway.

Write

privateGateway *

-

-

subnet *

-

-

nat:privateNatGateways:delete

Grants permission to delete a specified private NAT gateway.

Write

privateGateway *

-

nat:privateNatGateways:get

Grants permission to query a specified private NAT gateway.

Read

privateGateway *

-

nat:privateNatGateways:update

Grants permission to update a specified private NAT gateway.

Write

privateGateway *

-

nat:privateNatDnatRules:list

Grants permission to query DNAT rules of private NAT gateways.

List

privateDnatRule *

g:EnterpriseProjectId

-

nat:privateNatDnatRules:create

Grants permission to create a DNAT rule for a private NAT gateway.

Write

privateGateway *

g:ResourceTag/<tag-key>

-

privateDnatRule *

-

privateTransitIp *

g:ResourceTag/<tag-key>

port

-

-

g:EnterpriseProjectId

nat:privateNatDnatRules:delete

Grants permission to delete a specified DNAT rule of a private NAT gateway.

Write

privateGateway *

-

privateDnatRule *

g:EnterpriseProjectId

nat:privateNatDnatRules:get

Grants permission to query a specified DNAT rule of a private NAT gateway.

Read

privateGateway *

-

privateDnatRule *

g:EnterpriseProjectId

nat:privateNatDnatRules:update

Grants permission to update a specified DNAT rule of a private NAT gateway.

Write

privateGateway *

g:ResourceTag/<tag-key>

-

privateDnatRule *

-

privateTransitIp

g:ResourceTag/<tag-key>

port

-

-

g:EnterpriseProjectId

nat:privateNatSnatRules:list

Grants permission to query SNAT rules of private NAT gateways.

List

privateSnatRule *

g:EnterpriseProjectId

-

nat:privateNatSnatRules:create

Grants permission to create an SNAT rule for a private NAT gateway.

Write

privateGateway *

g:ResourceTag/<tag-key>

-

privateSnatRule *

-

privateTransitIp *

g:ResourceTag/<tag-key>

subnet

-

-

g:EnterpriseProjectId

nat:privateNatSnatRules:delete

Grants permission to delete a specified SNAT rule of a private NAT gateway.

Write

privateGateway *

-

privateSnatRule *

g:EnterpriseProjectId

nat:privateNatSnatRules:get

Grants permission to query a specified SNAT rule of a private NAT gateway.

Read

privateGateway *

-

privateSnatRule *

g:EnterpriseProjectId

nat:privateNatSnatRules:update

Grants permission to update a specified SNAT rule of a private NAT gateway.

Write

privateGateway *

g:ResourceTag/<tag-key>

-

privateSnatRule *

-

privateTransitIp

g:ResourceTag/<tag-key>

-

g:EnterpriseProjectId

nat:privateNatTransitIps:list

Grants permission to query private NAT transit IP addresses.

List

privateTransitIp *

g:EnterpriseProjectId

nat:transitIps:list

nat:privateNatTransitIps:create

Grants permission to create a private NAT transit IP address.

Write

privateTransitIp *

-

nat:transitIps:create

subnet

g:ResourceTag/<tag-key>

-

nat:privateNatTransitIps:delete

Grants permission to delete a specified private NAT transit IP address.

Write

privateTransitIp *

nat:transitIps:delete

nat:privateNatTransitIps:get

Grants permission to query a specified private NAT transit IP address.

Read

privateTransitIp *

nat:transitIps:get

nat:transitSubnets:list

Grants permission to query transit subnets.

List

transitSubnet *

-

-

nat:transitSubnets:create

Grants permission to create a transit subnet.

Write

transitSubnet *

-

-

subnet *

-

-

nat:transitSubnets:delete

Grants permission to delete a specified transit subnet.

Write

transitSubnet *

g:ResourceTag/<tag-key>

-

nat:transitSubnets:get

Grants permission to query a specified transit subnet.

Read

transitSubnet *

g:ResourceTag/<tag-key>

-

nat:transitSubnets:update

Grants permission to update a specified transit subnet.

Write

transitSubnet *

g:ResourceTag/<tag-key>

-

nat:privateNatGateways:createTags

Grants permission to create tags for a specified private NAT gateway.

Tagging

privateGateway *

nat:privateNatGatewayTags:create

-

nat:privateNatGateways:deleteTags

Grants permission to delete tags of a specified private NAT gateway.

Tagging

privateGateway *

nat:privateNatGatewayTags:delete

-

nat:privateNatGateways:listTags

Grants permission to query tags of private NAT gateways.

List

privateGateway

nat:privateNatGatewayTags:list

nat:privateNatTransitIps:createTags

Grants permission to create tags for a specified private NAT transit IP address.

Tagging

privateTransitIp *

nat:transitIpTags:create

-

nat:privateNatTransitIps:deleteTags

Grants permission to delete tags of a specified private NAT transit IP address.

Tagging

privateTransitIp *

nat:transitIpTags:delete

-

nat:privateNatTransitIps:listTags

Grants permission to query tags of private NAT transit IP addresses.

List

privateTransitIp

nat:transitIpTags:list

nat:transitSubnets:createTags

Grants permission to create tags for a specified transit subnet.

Tagging

transitSubnet *

g:ResourceTag/<tag-key>

nat:transitSubnetTags:create

-

nat:transitSubnets:deleteTags

Grants permission to delete tags of a specified transit subnet.

Tagging

transitSubnet *

g:ResourceTag/<tag-key>

nat:transitSubnetTags:delete

-

nat:transitSubnets:listTags

Grants permission to query tags of transit subnets.

List

transitSubnet

g:ResourceTag/<tag-key>

nat:transitSubnetTags:list

nat:natGateways:list

Grants permission to query public NAT gateways.

List

gateway *

g:EnterpriseProjectId

-

nat:natGateways:create

Grants permission to create a public NAT gateway.

Write

gateway *

-

-

vpc *

-

subnet *

-

-

nat:natGateways:delete

Grants permission to delete a specified public NAT gateway.

Write

gateway *

-

nat:natGateways:get

Grants permission to query a specified public NAT gateway.

Read

gateway *

-

nat:natGateways:update

Grants permission to update a specified public NAT gateway.

Write

gateway *

-

nat:dnatRules:list

Grants permission to query DNAT rules of public NAT gateways.

List

dnatRule *

g:EnterpriseProjectId

-

nat:dnatRules:create

Grants permission to create a DNAT rule for a public NAT gateway.

Write

gateway *

g:ResourceTag/<tag-key>

-

dnatRule *

-

publicip

-

globalEip

-

port

-

-

g:EnterpriseProjectId

nat:dnatRules:get

Grants permission to query a specified DNAT rule of a public NAT gateway.

Read

gateway *

-

dnatRule *

g:EnterpriseProjectId

nat:dnatRules:update

Grants permission to update a specified DNAT rule of a public NAT gateway.

Write

gateway *

g:ResourceTag/<tag-key>

-

dnatRule *

-

publicip

-

globalEip

-

port

-

-

g:EnterpriseProjectId

nat:dnatRules:delete

Grants permission to delete a specified DNAT rule of a private NAT gateway.

Write

gateway *

-

dnatRule *

g:EnterpriseProjectId

nat:snatRules:list

Grants permission to query SNAT rules of public NAT gateways.

List

snatRule *

g:EnterpriseProjectId

-

nat:snatRules:create

Grants permission to create a SNAT rule for a public NAT gateway.

Write

gateway *

g:ResourceTag/<tag-key>

-

snatRule *

-

publicip

-

globalEip

-

subnet

-

-

g:EnterpriseProjectId

nat:snatRules:get

Grants permission to query a specified SNAT rule of a public NAT gateway.

Read

gateway *

-

snatRule *

g:EnterpriseProjectId

nat:snatRules:update

Grants permission to update a specified SNAT rule of a public NAT gateway.

Write

gateway *

g:ResourceTag/<tag-key>

-

snatRule *

-

publicip

-

globalEip

-

-

g:EnterpriseProjectId

nat:snatRules:delete

Grants permission to delete a specified SNAT rule of a private NAT gateway.

Write

gateway *

-

snatRule *

g:EnterpriseProjectId

nat:natGateways:createTags

Grants permission to create tags for a specified public NAT gateway.

Tagging

gateway *

nat:natGatewayTags:create

-

nat:natGateways:deleteTags

Grants permission to delete tags of a specified public NAT gateway.

Tagging

gateway *

nat:natGatewayTags:delete

-

nat:natGateways:listTags

Grants permission to query tags of public NAT gateways.

List

gateway

nat:natGatewayTags:get

Each API of NAT usually supports one or more actions. Table 2 lists the supported actions and dependencies.

Table 2 Actions and dependencies supported by NAT APIs

API

Action

Dependencies

GET /v3/{project_id}/private-nat/gateways

nat:privateNatGateways:list

-

POST /v3/{project_id}/private-nat/gateways

nat:privateNatGateways:create

-

DELETE /v3/{project_id}/private-nat/gateways/{gateway_id}

nat:privateNatGateways:delete

-

GET /v3/{project_id}/private-nat/gateways/{gateway_id}

nat:privateNatGateways:get

-

PUT /v3/{project_id}/private-nat/gateways/{gateway_id}

nat:privateNatGateways:update

-

GET /v3/{project_id}/private-nat/dnat-rules

nat:privateNatDnatRules:list

-

POST /v3/{project_id}/private-nat/dnat-rules

nat:privateNatDnatRules:create

-

DELETE /v3/{project_id}/private-nat/dnat-rules/{dnat_rule_id}

nat:privateNatDnatRules:delete

-

GET /v3/{project_id}/private-nat/dnat-rules/{dnat_rule_id}

nat:privateNatDnatRules:get

-

PUT /v3/{project_id}/private-nat/dnat-rules/{dnat_rule_id}

nat:privateNatDnatRules:update

-

GET /v3/{project_id}/private-nat/snat-rules

nat:privateNatSnatRules:list

-

POST /v3/{project_id}/private-nat/snat-rules

nat:privateNatSnatRules:create

-

DELETE /v3/{project_id}/private-nat/snat-rules/{snat_rule_id}

nat:privateNatSnatRules:delete

-

GET /v3/{project_id}/private-nat/snat-rules/{snat_rule_id}

nat:privateNatSnatRules:get

-

PUT /v3/{project_id}/private-nat/snat-rules/{snat_rule_id}

nat:privateNatSnatRules:update

-

GET /v3/{project_id}/private-nat/transit-ips

nat:privateNatTransitIps:list

-

POST /v3/{project_id}/private-nat/transit-ips

nat:privateNatTransitIps:create

-

DELETE /v3/{project_id}/private-nat/transit-ips/{transit_ip_id}

nat:privateNatTransitIps:delete

-

GET /v3/{project_id}/private-nat/transit-ips/{transit_ip_id}

nat:privateNatTransitIps:get

-

POST /v3/{project_id}/private-nat-gateways/resource_instances/action

nat:privateNatGateways:listTags

-

POST /v3/{project_id}/private-nat-gateways/{resource_id}/tags/action

nat:privateNatGateways:createTags

nat:privateNatGateways:deleteTags

POST /v3/{project_id}/private-nat-gateways/{resource_id}/tags

nat:privateNatGateways:createTags

-

GET /v3/{project_id}/private-nat-gateways/{resource_id}/tags

nat:privateNatGateways:listTags

-

DELETE /v3/{project_id}/private-nat-gateways/{resource_id}/tags/{key}

nat:privateNatGateways:deleteTags

-

GET /v3/{project_id}/private-nat-gateways/tags

nat:privateNatGateways:listTags

-

POST /v3/{project_id}/transit-ips/resource_instances/action

nat:privateNatTransitIps:listTags

-

POST /v3/{project_id}/transit-ips/{resource_id}/tags/action

nat:privateNatTransitIps:createTags

nat:privateNatTransitIps:deleteTags

POST /v3/{project_id}/transit-ips/{resource_id}/tags

nat:privateNatTransitIps:createTags

-

GET /v3/{project_id}/transit-ips/{resource_id}/tags

nat:privateNatTransitIps:listTags

-

DELETE /v3/{project_id}/transit-ips/{resource_id}/tags/{key}

nat:privateNatTransitIps:deleteTags

-

GET /v3/{project_id}/transit-ips/tags

nat:privateNatTransitIps:listTags

-

POST /v3/{project_id}/private-nat/transit-subnets

nat:transitSubnets:create

-

DELETE /v3/{project_id}/private-nat/transit-subnets/{transit_subnet_id}

nat:transitSubnets:delete

-

GET /v3/{project_id}/private-nat/transit-subnets/{transit_subnet_id}

nat:transitSubnets:get

-

PUT /v3/{project_id}/private-nat/transit-subnets/{transit_subnet_id}

nat:transitSubnets:update

-

POST /v3/{project_id}/transit-subnets/resource_instances/action

nat:transitSubnets:listTags

-

POST /v3/{project_id}/transit-subnets/{resource_id}/tags/action

nat:transitSubnets:createTags

nat:transitSubnets:deleteTags

POST /v3/{project_id}/transit-subnets/{resource_id}/tags

nat:transitSubnets:createTags

-

GET /v3/{project_id}/transit-subnets/{resource_id}/tags

nat:transitSubnets:listTags

-

DELETE /v3/{project_id}/transit-subnets/{resource_id}/tags/{key}

nat:transitSubnets:deleteTags

-

GET /v3/{project_id}/transit-subnets/tags

nat:transitSubnets:listTags

-

GET /v2/{project_id}/nat_gateways

nat:natGateways:list

-

POST /v2/{project_id}/nat_gateways

nat:natGateways:create

-

DELETE /v2/{project_id}/nat_gateways/{nat_gateway_id}

nat:natGateways:delete

-

GET /v2/{project_id}/nat_gateways/{nat_gateway_id}

nat:natGateways:get

-

PUT /v2/{project_id}/nat_gateways/{nat_gateway_id}

nat:natGateways:update

-

GET /v2/{project_id}/dnat_rules

nat:dnatRules:list

-

POST /v2/{project_id}/dnat_rules

nat:dnatRules:create

eip:publicIps:associateInstance

GET /v2/{project_id}/dnat_rules/{dnat_rule_id}

nat:dnatRules:get

-

PUT /v2/{project_id}/dnat_rules/{dnat_rule_id}

nat:dnatRules:update

  • eip:publicIps:associateInstance
  • eip:publicIps:disassociateInstance

POST /v2/{project_id}/dnat_rules/batch

nat:dnatRules:create

eip:publicIps:associateInstance

DELETE /v2/{project_id}/nat_gateways/{nat_gateway_id}/dnat_rules/{dnat_rule_id}

nat:dnatRules:delete

eip:publicIps:disassociateInstance

GET /v2/{project_id}/snat_rules

nat:snatRules:list

-

POST /v2/{project_id}/snat_rules

nat:snatRules:create

eip:publicIps:associateInstance

GET /v2/{project_id}/snat_rules/{snat_rule_id}

nat:snatRules:get

-

PUT /v2/{project_id}/snat_rules/{snat_rule_id}

nat:snatRules:update

  • eip:publicIps:associateInstance
  • eip:publicIps:disassociateInstance

DELETE /v2/{project_id}/nat_gateways/{nat_gateway_id}/snat_rules/{snat_rule_id}

nat:snatRules:delete

eip:publicIps:disassociateInstance

POST /v3/{project_id}/nat_gateways/resource_instances/action

nat:natGateways:listTags

-

POST /v3/{project_id}/nat_gateways/{nat_gateway_id}/tags/action

nat:natGateways:createTags

nat:natGateways:deleteTags

POST /v3/{project_id}/nat_gateways/{nat_gateway_id}/tags

nat:natGateways:createTags

-

GET /v3/{project_id}/nat_gateways/{nat_gateway_id}/tags

nat:natGateways:listTags

-

DELETE /v3/{project_id}/nat_gateways/{nat_gateway_id}/tags/{key}

nat:natGateways:deleteTags

-

GET /v3/{project_id}/nat_gateways/tags

nat:natGateways:listTags

-

Resources

A resource type indicates the resources that an identity policy applies to. If you specify a resource type for any action in Table 3, the resource URN must be specified in the identity policy statements using that action, and the identity policy applies only to resources of this type. If no resource type is specified, the Resource element is marked with an asterisk (*) and the identity policy applies to all resources. You can also set condition keys in an identity policy to define resource types.

The following table lists the resource types that you can define in identity policy statements for NAT.

Table 3 Resource types supported by NAT

Resource Type

URN

snatRule

nat:<region>:<account-id>:snatRule:<snat-rule-id>

privateSnatRule

nat:<region>:<account-id>:privateSnatRule:<private-snat-rule-id>

port

vpc:<region>:<account-id>:port:<port-id>

privateGateway

nat:<region>:<account-id>:privateGateway:<private-gateway-id>

vpc

vpc:<region>:<account-id>:vpc:<vpc-id>

publicip

vpc:<region>:<account-id>:publicip:<publicip-id>

gateway

nat:<region>:<account-id>:gateway:<gateway-id>

privateTransitIp

nat:<region>:<account-id>:privateTransitIp:<private-transit-ip-id>

dnatRule

nat:<region>:<account-id>:dnatRule:<dnat-rule-id>

globalEip

eip:<region>:<account-id>:globalEip:<geip-id>

privateDnatRule

nat:<region>:<account-id>:privateDnatRule:<private-dnat-rule-id>

subnet

vpc:<region>:<account-id>:subnet:<subnet-id>

transitSubnet

nat:<region>:<account-id>:transitSubnet:<transit-subnet-id>

Conditions

NAT does not support service-specific condition keys in identity policies.It can only use global condition keys applicable to all services. For details, see Global Condition Keys.