public_delegated_prefixes
Creates, updates, deletes, gets or lists a public_delegated_prefixes resource.
Overview
| Name | public_delegated_prefixes |
| Type | Resource |
| Id | google.compute.public_delegated_prefixes |
Fields
The following fields are returned by SELECT queries:
- get
- list
- aggregated_list
| Name | Datatype | Description |
|---|---|---|
id | string (uint64) | Output only. [Output Only] The unique identifier for the resource type. The server generates this identifier. |
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. (pattern: [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?) |
allocatablePrefixLength | integer (int32) | 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. |
byoipApiVersion | string | Output only. [Output Only] The version of BYOIP API. (V1, V2) |
creationTimestamp | string | Output only. [Output Only] Creation timestamp inRFC3339 text format. |
description | string | An optional description of this resource. Provide this property when you create the resource. |
enableEnhancedIpv4Allocation | boolean | Output only. [Output Only] Whether this PDP supports enhanced IPv4 allocations. Applicable for IPv4 PDPs only. |
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. |
ipCidrRange | string | The IP address range, in CIDR format, represented by this public delegated prefix. |
ipv6AccessType | string | Output only. [Output Only] The internet access type for IPv6 Public Delegated Prefixes. Inherited from parent prefix. (EXTERNAL, INTERNAL) |
isLiveMigration | boolean | If true, the prefix will be live migrated. |
kind | string | Output only. [Output Only] Type of the resource. Alwayscompute#publicDelegatedPrefix for public delegated prefixes. (default: compute#publicDelegatedPrefix) |
mode | string | The public delegated prefix mode for IPv6 only. (DELEGATION, EXTERNAL_IPV6_FORWARDING_RULE_CREATION, EXTERNAL_IPV6_SUBNETWORK_CREATION, INTERNAL_IPV6_SUBNETWORK_CREATION) |
parentPrefix | string | The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix. |
publicDelegatedSubPrefixs | array | The list of sub public delegated prefixes that exist for this public delegated prefix. |
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. |
selfLink | string | Output only. [Output Only] Server-defined URL for the resource. |
status | string | [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. (ACTIVE, ANNOUNCED, ANNOUNCED_TO_GOOGLE, ANNOUNCED_TO_INTERNET, DELETING, INITIALIZING, READY_TO_ANNOUNCE) |
| Name | Datatype | Description |
|---|---|---|
id | string | [Output Only] Unique identifier for the resource; defined by the server. |
items | array | A list of PublicDelegatedPrefix resources. |
kind | string | Output only. [Output Only] Type of the resource. Alwayscompute#publicDelegatedPrefixList for public delegated prefixes. (default: compute#publicDelegatedPrefixList) |
nextPageToken | string | [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger thanmaxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results. |
selfLink | string | [Output Only] Server-defined URL for this resource. |
warning | object | [Output Only] Informational warning message. |
| Name | Datatype | Description |
|---|---|---|
id | string (uint64) | Output only. [Output Only] The unique identifier for the resource type. The server generates this identifier. |
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. (pattern: [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?) |
allocatablePrefixLength | integer (int32) | 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. |
byoipApiVersion | string | Output only. [Output Only] The version of BYOIP API. (V1, V2) |
creationTimestamp | string | Output only. [Output Only] Creation timestamp inRFC3339 text format. |
description | string | An optional description of this resource. Provide this property when you create the resource. |
enableEnhancedIpv4Allocation | boolean | Output only. [Output Only] Whether this PDP supports enhanced IPv4 allocations. Applicable for IPv4 PDPs only. |
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. |
ipCidrRange | string | The IP address range, in CIDR format, represented by this public delegated prefix. |
ipv6AccessType | string | Output only. [Output Only] The internet access type for IPv6 Public Delegated Prefixes. Inherited from parent prefix. (EXTERNAL, INTERNAL) |
isLiveMigration | boolean | If true, the prefix will be live migrated. |
kind | string | Output only. [Output Only] Type of the resource. Alwayscompute#publicDelegatedPrefix for public delegated prefixes. (default: compute#publicDelegatedPrefix) |
mode | string | The public delegated prefix mode for IPv6 only. (DELEGATION, EXTERNAL_IPV6_FORWARDING_RULE_CREATION, EXTERNAL_IPV6_SUBNETWORK_CREATION, INTERNAL_IPV6_SUBNETWORK_CREATION) |
parentPrefix | string | The URL of parent prefix. Either PublicAdvertisedPrefix or PublicDelegatedPrefix. |
publicDelegatedSubPrefixs | array | The list of sub public delegated prefixes that exist for this public delegated prefix. |
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. |
selfLink | string | Output only. [Output Only] Server-defined URL for the resource. |
status | string | [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. (ACTIVE, ANNOUNCED, ANNOUNCED_TO_GOOGLE, ANNOUNCED_TO_INTERNET, DELETING, INITIALIZING, READY_TO_ANNOUNCE) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | project, publicDelegatedPrefix | Returns the specified global PublicDelegatedPrefix resource. | |
list | select | project | returnPartialSuccess, orderBy, maxResults, pageToken, filter | Lists the global PublicDelegatedPrefixes for a project. |
aggregated_list | select | project | maxResults, pageToken, filter, serviceProjectNumber, includeAllScopes, orderBy, returnPartialSuccess | Lists all PublicDelegatedPrefix resources owned by the specific project across all scopes. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true. |
insert | insert | project | requestId | Creates a global PublicDelegatedPrefix in the specified project using the parameters that are included in the request. |
patch | update | project, publicDelegatedPrefix | requestId | Patches the specified global PublicDelegatedPrefix resource with the data included in the request. This method supportsPATCH semantics and usesJSON merge patch format and processing rules. |
delete | delete | project, publicDelegatedPrefix | requestId | Deletes the specified global PublicDelegatedPrefix. |
withdraw | exec | project, region, publicDelegatedPrefix | requestId | Withdraws the specified PublicDelegatedPrefix in the given region. |
announce | exec | project, region, publicDelegatedPrefix | requestId | Announces the specified PublicDelegatedPrefix in the given region. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
project | string | |
publicDelegatedPrefix | string | |
region | string | |
filter | string | |
includeAllScopes | boolean | |
maxResults | integer (uint32) | |
orderBy | string | |
pageToken | string | |
requestId | string | |
returnPartialSuccess | boolean | |
serviceProjectNumber | string (int64) |
SELECT examples
- get
- list
- aggregated_list
Returns the specified global PublicDelegatedPrefix resource.
SELECT
id,
name,
allocatablePrefixLength,
byoipApiVersion,
creationTimestamp,
description,
enableEnhancedIpv4Allocation,
fingerprint,
ipCidrRange,
ipv6AccessType,
isLiveMigration,
kind,
mode,
parentPrefix,
publicDelegatedSubPrefixs,
region,
selfLink,
status
FROM google.compute.public_delegated_prefixes
WHERE project = '{{ project }}' -- required
AND publicDelegatedPrefix = '{{ publicDelegatedPrefix }}' -- required
;
Lists the global PublicDelegatedPrefixes for a project.
SELECT
id,
items,
kind,
nextPageToken,
selfLink,
warning
FROM google.compute.public_delegated_prefixes
WHERE project = '{{ project }}' -- required
AND returnPartialSuccess = '{{ returnPartialSuccess }}'
AND orderBy = '{{ orderBy }}'
AND maxResults = '{{ maxResults }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
;
Lists all PublicDelegatedPrefix resources owned by the specific project
across all scopes.
To prevent failure, Google recommends that you set thereturnPartialSuccess parameter to true.
SELECT
id,
name,
allocatablePrefixLength,
byoipApiVersion,
creationTimestamp,
description,
enableEnhancedIpv4Allocation,
fingerprint,
ipCidrRange,
ipv6AccessType,
isLiveMigration,
kind,
mode,
parentPrefix,
publicDelegatedSubPrefixs,
region,
selfLink,
status
FROM google.compute.public_delegated_prefixes
WHERE project = '{{ project }}' -- required
AND maxResults = '{{ maxResults }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND serviceProjectNumber = '{{ serviceProjectNumber }}'
AND includeAllScopes = '{{ includeAllScopes }}'
AND orderBy = '{{ orderBy }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}'
;
INSERT examples
- insert
- Manifest
Creates a global PublicDelegatedPrefix in the specified project using the
parameters that are included in the request.
INSERT INTO google.compute.public_delegated_prefixes (
data__isLiveMigration,
data__fingerprint,
data__ipCidrRange,
data__name,
data__parentPrefix,
data__status,
data__allocatablePrefixLength,
data__description,
data__publicDelegatedSubPrefixs,
data__mode,
project,
requestId
)
SELECT
{{ isLiveMigration }},
'{{ fingerprint }}',
'{{ ipCidrRange }}',
'{{ name }}',
'{{ parentPrefix }}',
'{{ status }}',
{{ allocatablePrefixLength }},
'{{ description }}',
'{{ publicDelegatedSubPrefixs }}',
'{{ mode }}',
'{{ project }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone
;
# Description fields are for documentation purposes
- name: public_delegated_prefixes
props:
- name: project
value: "{{ project }}"
description: Required parameter for the public_delegated_prefixes resource.
- name: isLiveMigration
value: {{ isLiveMigration }}
description: |
If true, the prefix will be live migrated.
- name: fingerprint
value: "{{ fingerprint }}"
description: |
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.
- name: ipCidrRange
value: "{{ ipCidrRange }}"
description: |
The IP address range, in CIDR format, represented by this public
delegated prefix.
- name: name
value: "{{ name }}"
description: |
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.
- name: parentPrefix
value: "{{ parentPrefix }}"
description: |
The URL of parent prefix. Either PublicAdvertisedPrefix or
PublicDelegatedPrefix.
- name: status
value: "{{ status }}"
description: |
[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.
valid_values: ['ACTIVE', 'ANNOUNCED', 'ANNOUNCED_TO_GOOGLE', 'ANNOUNCED_TO_INTERNET', 'DELETING', 'INITIALIZING', 'READY_TO_ANNOUNCE']
- name: allocatablePrefixLength
value: {{ allocatablePrefixLength }}
description: |
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.
- name: description
value: "{{ description }}"
description: |
An optional description of this resource. Provide this property when you
create the resource.
- name: publicDelegatedSubPrefixs
description: |
The list of sub public delegated prefixes that exist for this public
delegated prefix.
value:
- region: "{{ region }}"
enableEnhancedIpv4Allocation: {{ enableEnhancedIpv4Allocation }}
name: "{{ name }}"
isAddress: {{ isAddress }}
status: "{{ status }}"
allocatablePrefixLength: {{ allocatablePrefixLength }}
ipv6AccessType: "{{ ipv6AccessType }}"
ipCidrRange: "{{ ipCidrRange }}"
mode: "{{ mode }}"
delegateeProject: "{{ delegateeProject }}"
description: "{{ description }}"
- name: mode
value: "{{ mode }}"
description: |
The public delegated prefix mode for IPv6 only.
valid_values: ['DELEGATION', 'EXTERNAL_IPV6_FORWARDING_RULE_CREATION', 'EXTERNAL_IPV6_SUBNETWORK_CREATION', 'INTERNAL_IPV6_SUBNETWORK_CREATION']
- name: requestId
value: "{{ requestId }}"
UPDATE examples
- patch
Patches the specified global PublicDelegatedPrefix resource with the data
included in the request. This method supportsPATCH
semantics and usesJSON merge
patch format and processing rules.
UPDATE google.compute.public_delegated_prefixes
SET
data__isLiveMigration = {{ isLiveMigration }},
data__fingerprint = '{{ fingerprint }}',
data__ipCidrRange = '{{ ipCidrRange }}',
data__name = '{{ name }}',
data__parentPrefix = '{{ parentPrefix }}',
data__status = '{{ status }}',
data__allocatablePrefixLength = {{ allocatablePrefixLength }},
data__description = '{{ description }}',
data__publicDelegatedSubPrefixs = '{{ publicDelegatedSubPrefixs }}',
data__mode = '{{ mode }}'
WHERE
project = '{{ project }}' --required
AND publicDelegatedPrefix = '{{ publicDelegatedPrefix }}' --required
AND requestId = '{{ requestId}}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
getVersionOperationMetadata,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone;
DELETE examples
- delete
Deletes the specified global PublicDelegatedPrefix.
DELETE FROM google.compute.public_delegated_prefixes
WHERE project = '{{ project }}' --required
AND publicDelegatedPrefix = '{{ publicDelegatedPrefix }}' --required
AND requestId = '{{ requestId }}'
;
Lifecycle Methods
- withdraw
- announce
Withdraws the specified PublicDelegatedPrefix in the given region.
EXEC google.compute.public_delegated_prefixes.withdraw
@project='{{ project }}' --required,
@region='{{ region }}' --required,
@publicDelegatedPrefix='{{ publicDelegatedPrefix }}' --required,
@requestId='{{ requestId }}'
;
Announces the specified PublicDelegatedPrefix in the given region.
EXEC google.compute.public_delegated_prefixes.announce
@project='{{ project }}' --required,
@region='{{ region }}' --required,
@publicDelegatedPrefix='{{ publicDelegatedPrefix }}' --required,
@requestId='{{ requestId }}'
;