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
Successful response
Name | Datatype | Description |
---|---|---|
id | string (uint64) | [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 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?) |
collectorIlb | object | The 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) |
creationTimestamp | string | [Output Only] Creation timestamp in RFC3339 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. |
filter | object | Filter for mirrored traffic. If unspecified, all IPv4 traffic is mirrored. (id: PacketMirroringFilter) |
kind | string | [Output Only] Type of the resource. Always compute#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] Server-defined URL for the resource. |
Successful response
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] 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 than maxResults, 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. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string (uint64) | [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 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?) |
collectorIlb | object | The 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) |
creationTimestamp | string | [Output Only] Creation timestamp in RFC3339 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. |
filter | object | Filter for mirrored traffic. If unspecified, all IPv4 traffic is mirrored. (id: PacketMirroringFilter) |
kind | string | [Output Only] Type of the resource. Always compute#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] 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 | filter , maxResults , orderBy , pageToken , returnPartialSuccess | Retrieves a list of PacketMirroring resources available to the specified project and region. |
aggregated_list | select | project | filter , includeAllScopes , maxResults , orderBy , pageToken , returnPartialSuccess , serviceProjectNumber | 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 supports PATCH semantics and uses JSON 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 filter = '{{ filter }}'
AND maxResults = '{{ maxResults }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}';
Retrieves an aggregated list of packetMirrorings. To prevent failure, Google recommends that you set the returnPartialSuccess
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 includeAllScopes = '{{ includeAllScopes }}'
AND maxResults = '{{ maxResults }}'
AND orderBy = '{{ orderBy }}'
AND pageToken = '{{ pageToken }}'
AND returnPartialSuccess = '{{ returnPartialSuccess }}'
AND serviceProjectNumber = '{{ serviceProjectNumber }}';
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__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
;
# Description fields are for documentation purposes
- name: packet_mirrorings
props:
- name: project
value: string
description: Required parameter for the packet_mirrorings resource.
- name: region
value: string
description: Required parameter for the packet_mirrorings resource.
- name: kind
value: string
description: >
[Output Only] Type of the resource. Always compute#packetMirroring for packet mirrorings.
default: compute#packetMirroring
- name: id
value: string
description: >
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
- name: creationTimestamp
value: string
description: >
[Output Only] Creation timestamp in RFC3339 text format.
- name: selfLink
value: string
description: >
[Output Only] Server-defined URL for the resource.
- name: name
value: string
description: >
Name 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.
- name: description
value: string
description: >
An optional description of this resource. Provide this property when you create the resource.
- name: region
value: string
description: >
[Output Only] URI of the region where the packetMirroring resides.
- name: network
value: object
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.
- name: priority
value: integer
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: collectorIlb
value: object
description: >
The 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.
- name: mirroredResources
value: object
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.
- name: filter
value: object
description: >
Filter for mirrored traffic. If unspecified, all IPv4 traffic is mirrored.
- name: enable
value: string
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: requestId
value: string
UPDATE
examples
- patch
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
- 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 }}';