---
title: "POST /v1/{+parent}/internalRanges"
method: POST
path: "/v1/{+parent}/internalRanges"
tags: ["projects"]
---

# POST /v1/{+parent}/internalRanges

`POST /v1/{+parent}/internalRanges`

Creates a new internal range in a given project and location.

## Path parameters

- `parent` string, required

## Query parameters

- `internalRangeId` string
- `requestId` string

## Request body

- InternalRange — The internal range resource for IPAM operations within a VPC network. Used to represent a private address range along with behavioral characteristics of that range (its usage and peering behavior). Networking resources can link to this range if they are created as belonging to it.
  - `targetCidrRange` string[] — Optional. Can be set to narrow down or pick a different address space while searching for a free range. If not set, defaults to the ["10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"] address space (for auto-mode networks, the "10.0.0.0/9" range is used instead of "10.0.0.0/8"). This can be used to target the search in other rfc-1918 address spaces like "172.16.0.0/12" and "192.168.0.0/16" or non-rfc-1918 address spaces used in the VPC.
  - `createTime` string, google-datetime — Output only. Time when the internal range was created.
  - `overlaps` string[] — Optional. Types of resources that are allowed to overlap with the current internal range.
  - `description` string — Optional. A description of this resource.
  - `prefixLength` integer — Optional. An alternate to ip_cidr_range. Can be set when trying to create an IPv4 reservation that automatically finds a free range of the given size. If both ip_cidr_range and prefix_length are set, there is an error if the range sizes do not match. Can also be used during updates to change the range size. NOTE: For IPv6 this field only works if ip_cidr_range is set as well, and both fields must match. In other words, with IPv6 this field only works as a redundant parameter.
  - `peering` 'PEERING_UNSPECIFIED' | 'FOR_SELF' | 'FOR_PEER' | 'NOT_SHARED' — Optional. The type of peering set for this internal range.
  - `migration` Migration — Specification for migration with source and target resource names.
    - `source` string — Immutable. Resource path as an URI of the source resource, for example a subnet. The project for the source resource should match the project for the InternalRange. An example: /projects/{project}/regions/{region}/subnetworks/{subnet}
    - `target` string — Immutable. Resource path of the target resource. The target project can be different, as in the cases when migrating to peer networks. For example: /projects/{project}/regions/{region}/subnetworks/{subnet}
  - `excludeCidrRanges` string[] — Optional. ExcludeCidrRanges flag. Specifies a set of CIDR blocks that allows exclusion of particular CIDR ranges from the auto-allocation process, without having to reserve these blocks
  - `labels` object — User-defined labels.
  - `usage` 'USAGE_UNSPECIFIED' | 'FOR_VPC' | 'EXTERNAL_TO_VPC' | 'FOR_MIGRATION' — Optional. The type of usage set for this InternalRange.
  - `updateTime` string, google-datetime — Output only. Time when the internal range was updated.
  - `name` string — Identifier. The name of an internal range. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names
  - `network` string — Immutable. The URL or resource ID of the network in which to reserve the internal range. The network cannot be deleted if there are any reserved internal ranges referring to it. Legacy networks are not supported. For example: https://www.googleapis.com/compute/v1/projects/{project}/locations/global/networks/{network} projects/{project}/locations/global/networks/{network} {network}
  - `allocationOptions` AllocationOptions — Range auto-allocation options, to be optionally used when CIDR block is not explicitly set.
    - `allocationStrategy` 'ALLOCATION_STRATEGY_UNSPECIFIED' | 'RANDOM' | 'FIRST_AVAILABLE' | 'RANDOM_FIRST_N_AVAILABLE' | 'FIRST_SMALLEST_FITTING' — Optional. Allocation strategy Not setting this field when the allocation is requested means an implementation defined strategy is used.
    - `firstAvailableRangesLookupSize` integer — Optional. This field must be set only when allocation_strategy is set to RANDOM_FIRST_N_AVAILABLE. The value should be the maximum expected parallelism of range creation requests issued to the same space of peered netwroks.
  - `users` string[] — Output only. The list of resources that refer to this internal range. Resources that use the internal range for their range allocation are referred to as users of the range. Other resources mark themselves as users while doing so by creating a reference to this internal range. Having a user, based on this reference, prevents deletion of the internal range referred to. Can be empty.
  - `ipCidrRange` string — Optional. The IP range that this internal range defines. NOTE: IPv6 ranges are limited to usage=EXTERNAL_TO_VPC and peering=FOR_SELF. NOTE: For IPv6 Ranges this field is compulsory, i.e. the address range must be specified explicitly.
  - `immutable` boolean — Optional. Immutable ranges cannot have their fields modified, except for labels and description.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/networkconnectivity.md) · [All operations](https://skmtc.net/google/apis/networkconnectivity/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/networkconnectivity/versions/778637dee420/schema)
