Skip to main content

packet_mirrorings

Creates, updates, deletes, gets or lists a packet_mirrorings resource.

Overview

Namepacket_mirrorings
TypeResource
Idgoogle.compute.packet_mirrorings

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
idstring (uint64)[Output Only] The unique identifier for the resource. This identifier is defined by the server.
namestringName of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. 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?)
collectorIlbobjectThe Forwarding Rule resource of type loadBalancingScheme=INTERNAL that will be used as collector for mirrored traffic. The specified forwarding rule must have isMirroringCollector set to true. (id: PacketMirroringForwardingRuleInfo)
creationTimestampstring[Output Only] Creation timestamp in RFC3339 text format.
descriptionstringAn optional description of this resource. Provide this property when you create the resource.
enablestringIndicates 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.
filterobjectFilter for mirrored traffic. If unspecified, all IPv4 traffic is mirrored. (id: PacketMirroringFilter)
kindstring[Output Only] Type of the resource. Always compute#packetMirroring for packet mirrorings. (default: compute#packetMirroring)
mirroredResourcesobjectPacketMirroring 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)
networkobjectSpecifies 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)
priorityinteger (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.
regionstring[Output Only] URI of the region where the packetMirroring resides.
selfLinkstring[Output Only] Server-defined URL for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject, region, packetMirroringReturns the specified PacketMirroring resource.
listselectproject, regionfilter, maxResults, orderBy, pageToken, returnPartialSuccessRetrieves a list of PacketMirroring resources available to the specified project and region.
aggregated_listselectprojectfilter, includeAllScopes, maxResults, orderBy, pageToken, returnPartialSuccess, serviceProjectNumberRetrieves an aggregated list of packetMirrorings. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.
insertinsertproject, regionrequestIdCreates a PacketMirroring resource in the specified project and region using the data included in the request.
patchupdateproject, region, packetMirroringrequestIdPatches the specified PacketMirroring resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.
deletedeleteproject, region, packetMirroringrequestIdDeletes 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.

NameDatatypeDescription
packetMirroringstring
projectstring
regionstring
filterstring
includeAllScopesboolean
maxResultsinteger (uint32)
orderBystring
pageTokenstring
requestIdstring
returnPartialSuccessboolean
serviceProjectNumberstring (int64)

SELECT examples

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;

INSERT examples

Creates a PacketMirroring resource in the specified project and region using the data included in the request.

INSERT INTO google.compute.packet_mirrorings (
data__kind,
data__id,
data__creationTimestamp,
data__selfLink,
data__name,
data__description,
data__region,
data__network,
data__priority,
data__collectorIlb,
data__mirroredResources,
data__filter,
data__enable,
project,
region,
requestId
)
SELECT
'{{ kind }}',
'{{ id }}',
'{{ creationTimestamp }}',
'{{ selfLink }}',
'{{ name }}',
'{{ description }}',
'{{ region }}',
'{{ network }}',
{{ priority }},
'{{ collectorIlb }}',
'{{ mirroredResources }}',
'{{ filter }}',
'{{ enable }}',
'{{ project }}',
'{{ region }}',
'{{ requestId }}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone
;

UPDATE examples

Patches the specified PacketMirroring resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

UPDATE google.compute.packet_mirrorings
SET
data__kind = '{{ kind }}',
data__id = '{{ id }}',
data__creationTimestamp = '{{ creationTimestamp }}',
data__selfLink = '{{ selfLink }}',
data__name = '{{ name }}',
data__description = '{{ description }}',
data__region = '{{ region }}',
data__network = '{{ network }}',
data__priority = {{ priority }},
data__collectorIlb = '{{ collectorIlb }}',
data__mirroredResources = '{{ mirroredResources }}',
data__filter = '{{ filter }}',
data__enable = '{{ enable }}'
WHERE
project = '{{ project }}' --required
AND region = '{{ region }}' --required
AND packetMirroring = '{{ packetMirroring }}' --required
AND requestId = '{{ requestId}}'
RETURNING
id,
name,
clientOperationId,
creationTimestamp,
description,
endTime,
error,
httpErrorMessage,
httpErrorStatusCode,
insertTime,
instancesBulkInsertOperationMetadata,
kind,
operationGroupId,
operationType,
progress,
region,
selfLink,
setCommonInstanceMetadataOperationMetadata,
startTime,
status,
statusMessage,
targetId,
targetLink,
user,
warnings,
zone;

DELETE examples

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 }}';