packet_mirrorings
Creates, updates, deletes, gets or lists a packet_mirrorings resource.
Overview
| Name | packet_mirrorings |
| Type | Resource |
| Id | google.compute.packet_mirrorings |
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. This identifier is defined by the server. |
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])?) |
collectorIlb | object | The Forwarding Rule resource of typeloadBalancingScheme=INTERNAL that will be used as collector for mirrored traffic. The specified forwarding rule must have isMirroringCollector set to true. (id: PacketMirroringForwardingRuleInfo) |
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. |
enable | string | Indicates whether or not this packet mirroring takes effect. If set to FALSE, this packet mirroring policy will not be enforced on the network. The default is TRUE. (FALSE, TRUE) |
filter | object | Filter for mirrored traffic. If unspecified, all IPv4 traffic is mirrored. (id: PacketMirroringFilter) |
kind | string | Output only. [Output Only] Type of the resource. Alwayscompute#packetMirroring for packet mirrorings. (default: compute#packetMirroring) |
mirroredResources | object | PacketMirroring mirroredResourceInfos. MirroredResourceInfo specifies a set of mirrored VM instances, subnetworks and/or tags for which traffic from/to all VM instances will be mirrored. (id: PacketMirroringMirroredResourceInfo) |
network | object | Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. (id: PacketMirroringNetworkInfo) |
priority | integer (uint32) | The priority of applying this configuration. Priority is used to break ties in cases where there is more than one matching rule. In the case of two rules that apply for a given Instance, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535. |
region | string | [Output Only] URI of the region where the packetMirroring resides. |
selfLink | string | Output only. [Output Only] Server-defined URL for the resource. |
| Name | Datatype | Description |
|---|---|---|
id | string | [Output Only] Unique identifier for the resource; defined by the server. |
items | array | A list of PacketMirroring resources. |
kind | string | Output only. [Output Only] Type of resource. Always compute#packetMirroring for packetMirrorings. (default: compute#packetMirroringList) |
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. [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. This identifier is defined by the server. |
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])?) |
collectorIlb | object | The Forwarding Rule resource of typeloadBalancingScheme=INTERNAL that will be used as collector for mirrored traffic. The specified forwarding rule must have isMirroringCollector set to true. (id: PacketMirroringForwardingRuleInfo) |
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. |
enable | string | Indicates whether or not this packet mirroring takes effect. If set to FALSE, this packet mirroring policy will not be enforced on the network. The default is TRUE. (FALSE, TRUE) |
filter | object | Filter for mirrored traffic. If unspecified, all IPv4 traffic is mirrored. (id: PacketMirroringFilter) |
kind | string | Output only. [Output Only] Type of the resource. Alwayscompute#packetMirroring for packet mirrorings. (default: compute#packetMirroring) |
mirroredResources | object | PacketMirroring mirroredResourceInfos. MirroredResourceInfo specifies a set of mirrored VM instances, subnetworks and/or tags for which traffic from/to all VM instances will be mirrored. (id: PacketMirroringMirroredResourceInfo) |
network | object | Specifies the mirrored VPC network. Only packets in this network will be mirrored. All mirrored VMs should have a NIC in the given network. All mirrored subnetworks should belong to the given network. (id: PacketMirroringNetworkInfo) |
priority | integer (uint32) | The priority of applying this configuration. Priority is used to break ties in cases where there is more than one matching rule. In the case of two rules that apply for a given Instance, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535. |
region | string | [Output Only] URI of the region where the packetMirroring resides. |
selfLink | string | Output only. [Output Only] Server-defined URL for the resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | project, region, packetMirroring | Returns the specified PacketMirroring resource. | |
list | select | project, region | orderBy, maxResults, pageToken, filter, returnPartialSuccess | Retrieves a list of PacketMirroring resources available to the specified project and region. |
aggregated_list | select | project | filter, serviceProjectNumber, maxResults, pageToken, includeAllScopes, orderBy, returnPartialSuccess | Retrieves an aggregated list of packetMirrorings. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true. |
insert | insert | project, region | requestId | Creates a PacketMirroring resource in the specified project and region using the data included in the request. |
patch | update | project, region, packetMirroring | requestId | Patches the specified PacketMirroring resource with the data included in the request. This method supportsPATCH semantics and usesJSON merge patch format and processing rules. |
delete | delete | project, region, packetMirroring | requestId | Deletes the specified PacketMirroring resource. |
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 |
|---|---|---|
packetMirroring | string | |
project | 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 PacketMirroring resource.
SELECT
id,
name,
collectorIlb,
creationTimestamp,
description,
enable,
filter,
kind,
mirroredResources,
network,
priority,
region,
selfLink
FROM google.compute.packet_mirrorings
WHERE project = '{{ project }}' -- required
AND region = '{{ region }}' -- required
AND packetMirroring = '{{ packetMirroring }}' -- required
;
Retrieves a list of PacketMirroring resources available to the specified
project and region.
SELECT
id,
items,
kind,
nextPageToken,
selfLink,
warning
FROM google.compute.packet_mirrorings
WHERE project = '{{ project }}' -- required
AND region = '{{ region }}' -- required
AND orderBy = '{{ orderBy }}'
AND maxResults = '{{ maxResults }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}'
;
Retrieves an aggregated list of packetMirrorings.
To prevent failure, Google recommends that you set thereturnPartialSuccess parameter to true.
SELECT
id,
name,
collectorIlb,
creationTimestamp,
description,
enable,
filter,
kind,
mirroredResources,
network,
priority,
region,
selfLink
FROM google.compute.packet_mirrorings
WHERE project = '{{ project }}' -- required
AND filter = '{{ filter }}'
AND serviceProjectNumber = '{{ serviceProjectNumber }}'
AND maxResults = '{{ maxResults }}'
AND pageToken = '{{ pageToken }}'
AND includeAllScopes = '{{ includeAllScopes }}'
AND orderBy = '{{ orderBy }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}'
;
INSERT examples
- insert
- Manifest
Creates a PacketMirroring resource in the specified project and region
using the data included in the request.
INSERT INTO google.compute.packet_mirrorings (
data__description,
data__mirroredResources,
data__name,
data__priority,
data__network,
data__enable,
data__collectorIlb,
data__filter,
data__region,
project,
region,
requestId
)
SELECT
'{{ description }}',
'{{ mirroredResources }}',
'{{ name }}',
{{ priority }},
'{{ network }}',
'{{ enable }}',
'{{ collectorIlb }}',
'{{ filter }}',
'{{ region }}',
'{{ project }}',
'{{ region }}',
'{{ 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: packet_mirrorings
props:
- name: project
value: "{{ project }}"
description: Required parameter for the packet_mirrorings resource.
- name: region
value: "{{ region }}"
description: Required parameter for the packet_mirrorings resource.
- name: description
value: "{{ description }}"
description: |
An optional description of this resource. Provide this property when you
create the resource.
- name: mirroredResources
description: |
PacketMirroring mirroredResourceInfos.
MirroredResourceInfo specifies a set of mirrored VM instances, subnetworks
and/or tags for which traffic from/to all VM instances will be mirrored.
value:
instances:
- url: "{{ url }}"
canonicalUrl: "{{ canonicalUrl }}"
subnetworks:
- url: "{{ url }}"
canonicalUrl: "{{ canonicalUrl }}"
tags:
- "{{ tags }}"
- 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: priority
value: {{ priority }}
description: |
The priority of applying this configuration. Priority is used to break ties
in cases where there is more than one matching rule. In the case of two
rules that apply for a given Instance, the one with the lowest-numbered
priority value wins.
Default value is 1000. Valid range is 0 through 65535.
- name: network
description: |
Specifies the mirrored VPC network. Only packets in this network will be
mirrored. All mirrored VMs should have a NIC in the given network.
All mirrored subnetworks should belong to the given network.
value:
url: "{{ url }}"
canonicalUrl: "{{ canonicalUrl }}"
- name: enable
value: "{{ enable }}"
description: |
Indicates whether or not this packet mirroring takes effect.
If set to FALSE, this packet mirroring policy will not be enforced on the
network.
The default is TRUE.
valid_values: ['FALSE', 'TRUE']
- name: collectorIlb
description: |
The Forwarding Rule resource of typeloadBalancingScheme=INTERNAL that will be used as collector
for mirrored traffic.
The specified forwarding rule must have isMirroringCollector
set to true.
value:
url: "{{ url }}"
canonicalUrl: "{{ canonicalUrl }}"
- name: filter
description: |
Filter for mirrored traffic. If unspecified, all IPv4 traffic is mirrored.
value:
cidrRanges:
- "{{ cidrRanges }}"
direction: "{{ direction }}"
IPProtocols:
- "{{ IPProtocols }}"
- name: region
value: "{{ region }}"
description: |
[Output Only] URI of the region where the packetMirroring resides.
- name: requestId
value: "{{ requestId }}"
UPDATE examples
- patch
Patches the specified PacketMirroring resource with the data included in
the request. This method supportsPATCH
semantics and usesJSON merge
patch format and processing rules.
UPDATE google.compute.packet_mirrorings
SET
data__description = '{{ description }}',
data__mirroredResources = '{{ mirroredResources }}',
data__name = '{{ name }}',
data__priority = {{ priority }},
data__network = '{{ network }}',
data__enable = '{{ enable }}',
data__collectorIlb = '{{ collectorIlb }}',
data__filter = '{{ filter }}',
data__region = '{{ region }}'
WHERE
project = '{{ project }}' --required
AND region = '{{ region }}' --required
AND packetMirroring = '{{ packetMirroring }}' --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 PacketMirroring resource.
DELETE FROM google.compute.packet_mirrorings
WHERE project = '{{ project }}' --required
AND region = '{{ region }}' --required
AND packetMirroring = '{{ packetMirroring }}' --required
AND requestId = '{{ requestId }}'
;