Method: services.searchRange

Service producers can use this method to find a currently unused range within consumer allocated ranges. This returned range is not reserved, and not guaranteed to remain unused. It will validate previously provided allocated ranges, find non-conflicting sub-range of requested size (expressed in number of leading bits of ipv4 network mask, as in CIDR range notation). Operation<response: Range>

HTTP request

POST https://servicenetworking.googleapis.com/v1/{parent=services/*}:searchRange

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. This is in a form services/{service}. {service} the name of the private access management service, for example 'service-peering.example.com'.

Authorization requires the following Google IAM permission on the specified resource parent:

  • servicenetworking.services.get

Request body

The request body contains data with the following structure:

JSON representation
{
  "network": string,
  "ipPrefixLength": number
}
Fields
network

string

Network name in the consumer project. This network must have been already peered with a shared VPC network using connections.create method. Must be in a form 'projects/{project}/global/networks/{network}'. {project} is a project number, as in '12345' {network} is network name.

ipPrefixLength

number

Required. The prefix length of the IP range. Use usual CIDR range notation. For example, '30' to find unused x.x.x.x/30 CIDR range. Actual range will be determined using allocated range for the consumer peered network and returned in the result.

Response body

If successful, the response body contains an instance of Operation.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/service.management
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

Try it!

หน้านี้มีประโยชน์ไหม โปรดแสดงความคิดเห็น