Creating a Gateway
This section describes how to create a gateway. You can create APIs and use them to provide services only after a gateway is created.
Constraints on Creating a Gateway
There are some limitations on creating a gateway. If you cannot create a gateway or a gateway fails to be created, check the following items:
- Gateway quota
By default, your account can be used to create five gateways in a project. To create more dedicated gateways, submit a service ticket to increase the quota.
- Permissions
You must be assigned both the APIG Administrator and VPC Administrator roles or assigned the APIG FullAccess policy to create a gateway.
You can also be granted permissions using custom policies. For details, see APIG Custom Policies.
- Number of available private IP addresses in the subnet
The basic, professional, enterprise, and platinum editions of APIG require 3, 5, 6, and 7 private IP addresses. Check that the subnet you choose has sufficient private IP addresses on the VPC console.
Network Environment
- Workload
Gateways are deployed in VPCs. Cloud resources, such as Elastic Cloud Servers (ECSs), in the same workload can call APIs using the private IP address of the gateway deployed in the workload.
You are advised to deploy your gateways in the same workload as your other services to facilitate network configuration and secure network access.
VPCs (workloads) where gateways have been deployed cannot be changed.
- EIP
To allow public inbound access to the APIs deployed in a gateway, create an Elastic IP (EIP) and bind it to the gateway.
For APIs whose backend services are deployed on a public network, APIG automatically generates an IP address for public outbound access, and you do not need to create an Elastic IP (EIP).
- Security group
Similar to a firewall, a security group controls access to a gateway through a specific port and transmission of communication data from the gateway to a specific destination address. For security purposes, create inbound rules for the security group to allow access only on specific ports.
The security group bound to a gateway must meet the following requirements:
- Inbound access: To allow the APIs in the gateway to be accessed over public networks or from other security groups, configure inbound rules for the security group to allow access on ports 80 (HTTP) and 443 (HTTPS).
- Outbound access: If the backend service of an API is deployed on a public network or in another security group, add outbound rules for the security group to allow access to the backend service address through the API calling port.
- If the frontend and backend services of an API are bound with the same security group and VPC as the gateway, no inbound or outbound rules are needed to allow access through the preceding ports.
Procedure
- Go to the APIG console.
- In the navigation pane, choose Gateways.
- Click Create Gateway. Set the gateway parameters by referring to the following table.
- Click Next.
- Confirm the gateway configurations. The instance is created with the status displayed on the screen.
Follow-Up Operations
After the gateway is created, you can create and manage APIs in this gateway. Go to the Gateway Information page. It shows the gateway details, network configurations, and configuration parameters.
You can modify the gateway name, description, scheduled maintenance time window, security group, and EIP.
Before deleting a gateway, ensure that the deletion will not impact your services.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot