create_subnet
Create a new subnet in a VPC on Naver Cloud Platform by specifying name, CIDR range, zone, ACL, and type.
Instructions
새로운 서브넷을 생성합니다
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subnetName | Yes | 서브넷 이름 | |
| vpcNo | Yes | VPC 번호 | |
| subnet | Yes | 서브넷 CIDR (예: 10.0.1.0/24) | |
| zoneCode | Yes | 존 코드 (예: KR-1) | |
| networkAclNo | Yes | Network ACL 번호 | |
| subnetTypeCode | Yes | 서브넷 타입 코드 (PUBLIC/PRIVATE) |
Implementation Reference
- src/index.ts:161-170 (handler)The core handler function in NCPClient that executes the subnet creation by making a GET request to the NCP /createSubnet API endpoint.
async createSubnet(params: { subnetName: string; vpcNo: string; subnet: string; zoneCode: string; networkAclNo: string; subnetTypeCode: string; }) { return await this.request("GET", "/vserver/v2", "/createSubnet", params); } - src/index.ts:645-656 (handler)The dispatcher case in the main CallToolRequest handler that routes 'create_subnet' calls to the NCPClient.createSubnet method with properly typed arguments.
case "create_subnet": { const typedArgs = args as { subnetName: string; vpcNo: string; subnet: string; zoneCode: string; networkAclNo: string; subnetTypeCode: string; }; result = await ncpClient.createSubnet(typedArgs); break; } - src/index.ts:410-421 (schema)Input schema definition for the create_subnet tool, specifying parameters, types, descriptions, and required fields.
inputSchema: { type: "object", properties: { subnetName: { type: "string", description: "서브넷 이름" }, vpcNo: { type: "string", description: "VPC 번호" }, subnet: { type: "string", description: "서브넷 CIDR (예: 10.0.1.0/24)" }, zoneCode: { type: "string", description: "존 코드 (예: KR-1)" }, networkAclNo: { type: "string", description: "Network ACL 번호" }, subnetTypeCode: { type: "string", description: "서브넷 타입 코드 (PUBLIC/PRIVATE)" }, }, required: ["subnetName", "vpcNo", "subnet", "zoneCode", "networkAclNo", "subnetTypeCode"], }, - src/index.ts:407-422 (registration)Registration of the create_subnet tool in the list_tools response, including name, description, and input schema.
{ name: "create_subnet", description: "새로운 서브넷을 생성합니다", inputSchema: { type: "object", properties: { subnetName: { type: "string", description: "서브넷 이름" }, vpcNo: { type: "string", description: "VPC 번호" }, subnet: { type: "string", description: "서브넷 CIDR (예: 10.0.1.0/24)" }, zoneCode: { type: "string", description: "존 코드 (예: KR-1)" }, networkAclNo: { type: "string", description: "Network ACL 번호" }, subnetTypeCode: { type: "string", description: "서브넷 타입 코드 (PUBLIC/PRIVATE)" }, }, required: ["subnetName", "vpcNo", "subnet", "zoneCode", "networkAclNo", "subnetTypeCode"], }, },