Custom IP Prefixes - Get
Gets the specified custom IP prefix in a specified resource group.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}?api-version=2025-03-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}?api-version=2025-03-01&$expand={$expand}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
custom
|
path | True |
string |
The name of the custom IP prefix. |
|
resource
|
path | True |
string |
The name of the resource group. |
|
subscription
|
path | True |
string |
The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
|
api-version
|
query | True |
string |
Client API version. |
|
$expand
|
query |
string |
Expands referenced resources. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Request successful. The operation returns the resulting CustomIpPrefix resource. |
|
| Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
Get custom IP prefix
Sample request
GET https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/customIpPrefixes/test-customipprefix?api-version=2025-03-01
Sample response
{
"name": "test-customipprefix",
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/customIpPrefixes/test-customipprefix",
"etag": "W/\"00000000-0000-0000-0000-00000000\"",
"location": "westus",
"properties": {
"provisioningState": "Succeeded",
"resourceGuid": "00000000-0000-0000-0000-00000000",
"cidr": "0.0.0.0/24",
"commissionedState": "Commissioned",
"signedMessage": "signedMessage",
"authorizationMessage": "authorizationMessage",
"noInternetAdvertise": false,
"expressRouteAdvertise": false,
"failedReason": "",
"publicIpPrefixes": [],
"childCustomIpPrefixes": []
},
"type": "Microsoft.Network/customIpPrefixes"
}
Definitions
| Name | Description |
|---|---|
|
Cloud |
An error response from the service. |
|
Cloud |
An error response from the service. |
|
Commissioned |
The commissioned state of the Custom IP Prefix. |
|
Custom |
Custom IP prefix resource. |
|
Custom |
Type of custom IP prefix. Should be Singular, Parent, or Child. |
|
Extended |
ExtendedLocation complex type. |
|
Extended |
The type of the extended location. |
| Geo |
The Geo for CIDR advertising. Should be an Geo code. |
|
Provisioning |
The current provisioning state. |
|
Sub |
Reference to another subresource. |
CloudError
An error response from the service.
| Name | Type | Description |
|---|---|---|
| error |
Cloud error body. |
CloudErrorBody
An error response from the service.
| Name | Type | Description |
|---|---|---|
| code |
string |
An identifier for the error. Codes are invariant and are intended to be consumed programmatically. |
| details |
A list of additional details about the error. |
|
| message |
string |
A message describing the error, intended to be suitable for display in a user interface. |
| target |
string |
The target of the particular error. For example, the name of the property in error. |
CommissionedState
The commissioned state of the Custom IP Prefix.
| Value | Description |
|---|---|
| Provisioning | |
| Provisioned | |
| Commissioning | |
| CommissionedNoInternetAdvertise | |
| Commissioned | |
| Decommissioning | |
| Deprovisioning | |
| Deprovisioned |
CustomIpPrefix
Custom IP prefix resource.
| Name | Type | Description |
|---|---|---|
| etag |
string |
A unique read-only string that changes whenever the resource is updated. |
| extendedLocation |
The extended location of the custom IP prefix. |
|
| id |
string |
Resource ID. |
| location |
string |
Resource location. |
| name |
string |
Resource name. |
| properties.asn |
string |
The ASN for CIDR advertising. Should be an integer as string. |
| properties.authorizationMessage |
string |
Authorization message for WAN validation. |
| properties.childCustomIpPrefixes |
The list of all Children for IPv6 /48 CustomIpPrefix. |
|
| properties.cidr |
string |
The prefix range in CIDR notation. Should include the start address and the prefix length. |
| properties.commissionedState |
The commissioned state of the Custom IP Prefix. |
|
| properties.customIpPrefixParent |
The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix. |
|
| properties.expressRouteAdvertise |
boolean |
Whether to do express route advertise. |
| properties.failedReason |
string |
The reason why resource is in failed state. |
| properties.geo |
The Geo for CIDR advertising. Should be an Geo code. |
|
| properties.noInternetAdvertise |
boolean |
Whether to Advertise the range to Internet. |
| properties.prefixType |
Type of custom IP prefix. Should be Singular, Parent, or Child. |
|
| properties.provisioningState |
The provisioning state of the custom IP prefix resource. |
|
| properties.publicIpPrefixes |
The list of all referenced PublicIpPrefixes. |
|
| properties.resourceGuid |
string |
The resource GUID property of the custom IP prefix resource. |
| properties.signedMessage |
string |
Signed message for WAN validation. |
| tags |
object |
Resource tags. |
| type |
string |
Resource type. |
| zones |
string[] |
A list of availability zones denoting the IP allocated for the resource needs to come from. |
CustomIpPrefixType
Type of custom IP prefix. Should be Singular, Parent, or Child.
| Value | Description |
|---|---|
| Singular | |
| Parent | |
| Child |
ExtendedLocation
ExtendedLocation complex type.
| Name | Type | Description |
|---|---|---|
| name |
string |
The name of the extended location. |
| type |
The type of the extended location. |
ExtendedLocationTypes
The type of the extended location.
| Value | Description |
|---|---|
| EdgeZone |
Geo
The Geo for CIDR advertising. Should be an Geo code.
| Value | Description |
|---|---|
| GLOBAL | |
| AFRI | |
| APAC | |
| EURO | |
| LATAM | |
| NAM | |
| ME | |
| OCEANIA | |
| AQ |
ProvisioningState
The current provisioning state.
| Value | Description |
|---|---|
| Succeeded | |
| Updating | |
| Deleting | |
| Failed |
SubResource
Reference to another subresource.
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource ID. |