---
title: "POST /projects/{project}/regions/{region}/publicDelegatedPrefixes"
method: POST
path: "/projects/{project}/regions/{region}/publicDelegatedPrefixes"
tags: ["publicDelegatedPrefixes"]
---

# POST /projects/{project}/regions/{region}/publicDelegatedPrefixes

`POST /projects/{project}/regions/{region}/publicDelegatedPrefixes`

Creates a PublicDelegatedPrefix in the specified project in the given
region using the parameters that are included in the request.

## Path parameters

- `project` string, required
- `region` string, required

## Query parameters

- `requestId` string

## Request body

- PublicDelegatedPrefix — A PublicDelegatedPrefix resource represents an IP block within a PublicAdvertisedPrefix that is configured within a single cloud scope (global or region). IPs in the block can be allocated to resources within that scope. Public delegated prefixes may be further broken up into smaller IP blocks in the same scope as the parent block.
  - `selfLink` string — Output only. [Output Only] Server-defined URL for the resource.
  - `parentPrefix` string — The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix.
  - `byoipApiVersion` 'V1' | 'V2' — Output only. [Output Only] The version of BYOIP API.
  - `id` string, uint64 — Output only. [Output Only] The unique identifier for the resource type. The server generates this identifier.
  - `ipCidrRange` string — The IP address range, in CIDR format, represented by this public delegated prefix.
  - `allocatablePrefixLength` integer — The allocatable prefix length supported by this public delegated prefix. This field is optional and cannot be set for prefixes in DELEGATION mode. It cannot be set for IPv4 prefixes either, and it always defaults to 32.
  - `status` 'ACTIVE' | 'ANNOUNCED' | 'ANNOUNCED_TO_GOOGLE' | 'ANNOUNCED_TO_INTERNET' | 'DELETING' | 'INITIALIZING' | 'READY_TO_ANNOUNCE' — [Output Only] The status of the public delegated prefix, which can be one of following values: - `INITIALIZING` The public delegated prefix is being initialized and addresses cannot be created yet. - `READY_TO_ANNOUNCE` The public delegated prefix is a live migration prefix and is active. - `ANNOUNCED` The public delegated prefix is announced and ready to use. - `DELETING` The public delegated prefix is being deprovsioned. - `ACTIVE` The public delegated prefix is ready to use.
  - `publicDelegatedSubPrefixs` PublicDelegatedPrefixPublicDelegatedSubPrefix[] — The list of sub public delegated prefixes that exist for this public delegated prefix.
    - `ipCidrRange` string — The IP address range, in CIDR format, represented by this sub public delegated prefix.
    - `isAddress` boolean — Whether the sub prefix is delegated to create Address resources in the delegatee project.
    - `allocatablePrefixLength` integer — The allocatable prefix length supported by this PublicDelegatedSubPrefix.
    - `mode` 'DELEGATION' | 'EXTERNAL_IPV6_FORWARDING_RULE_CREATION' | 'EXTERNAL_IPV6_SUBNETWORK_CREATION' | 'INTERNAL_IPV6_SUBNETWORK_CREATION' — The PublicDelegatedSubPrefix mode for IPv6 only.
    - `status` 'ACTIVE' | 'INACTIVE' — Output only. [Output Only] The status of the sub public delegated prefix.
    - `description` string — An optional description of this resource. Provide this property when you create the resource.
    - `region` string — Output only. [Output Only] The region of the sub public delegated prefix if it is regional. If absent, the sub prefix is global.
    - `ipv6AccessType` 'EXTERNAL' | 'INTERNAL' — Output only. [Output Only] The internet access type for IPv6 Public Delegated Sub Prefixes. Inherited from parent prefix.
    - `enableEnhancedIpv4Allocation` boolean — Output only. [Output Only] Whether this PDP supports enhanced IPv4 allocations. Applicable for IPv4 PDPs only.
    - `name` string — The name of the sub public delegated prefix.
    - `delegateeProject` string — Name of the project scoping this PublicDelegatedSubPrefix.
  - `ipv6AccessType` 'EXTERNAL' | 'INTERNAL' — Output only. [Output Only] The internet access type for IPv6 Public Delegated Prefixes. Inherited from parent prefix.
  - `enableEnhancedIpv4Allocation` boolean — Output only. [Output Only] Whether this PDP supports enhanced IPv4 allocations. Applicable for IPv4 PDPs only.
  - `name` string — Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
  - `kind` string — Output only. [Output Only] Type of the resource. Alwayscompute#publicDelegatedPrefix for public delegated prefixes.
  - `creationTimestamp` string — Output only. [Output Only] Creation timestamp inRFC3339 text format.
  - `isLiveMigration` boolean — If true, the prefix will be live migrated.
  - `description` string — An optional description of this resource. Provide this property when you create the resource.
  - `region` string — Output only. [Output Only] URL of the region where the public delegated prefix resides. This field applies only to the region resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
  - `fingerprint` string, byte — Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a new PublicDelegatedPrefix. An up-to-date fingerprint must be provided in order to update thePublicDelegatedPrefix, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve a PublicDelegatedPrefix.
  - `mode` 'DELEGATION' | 'EXTERNAL_IPV6_FORWARDING_RULE_CREATION' | 'EXTERNAL_IPV6_SUBNETWORK_CREATION' | 'INTERNAL_IPV6_SUBNETWORK_CREATION' — The public delegated prefix mode for IPv6 only.

## Response `200`

Successful response

---

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