/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.CreateTrafficMirrorSessionRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateTrafficMirrorSessionRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
DryRunSupportedRequest
* The ID of the source network interface.
*
* The ID of the Traffic Mirror target.
*
* The ID of the Traffic Mirror filter.
*
* The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this
* parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in
* bytes) that you want to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the
* filter criteria are copied to the target.
*
* If you do not want to mirror the entire packet, use the
* The session number determines the order in which sessions are evaluated when an interface is used by multiple
* sessions. The first session with a matching filter is the one that mirrors the packets.
*
* Valid values are 1-32766.
*
* The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a
* The description of the Traffic Mirror session.
*
* The tags to assign to a Traffic Mirror session.
*
* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more
* information, see How to ensure
* idempotency.
*
* The ID of the source network interface.
*
* The ID of the source network interface.
*
* The ID of the source network interface.
*
* The ID of the Traffic Mirror target.
*
* The ID of the Traffic Mirror target.
*
* The ID of the Traffic Mirror target.
*
* The ID of the Traffic Mirror filter.
*
* The ID of the Traffic Mirror filter.
*
* The ID of the Traffic Mirror filter.
*
* The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this
* parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in
* bytes) that you want to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the
* filter criteria are copied to the target.
*
* If you do not want to mirror the entire packet, use the PacketLength
parameter to specify the number
* of bytes in each packet to mirror.
* VirtualNetworkId
,
* an account-wide unique id is chosen at random.
* PacketLength
parameter to specify the number
* of bytes in each packet to mirror.
*
* If you do not want to mirror the entire packet, use the PacketLength
parameter to specify the
* number of bytes in each packet to mirror.
*/
public void setPacketLength(Integer packetLength) {
this.packetLength = packetLength;
}
/**
*
* The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this * parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in * bytes) that you want to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the * filter criteria are copied to the target. *
*
* If you do not want to mirror the entire packet, use the PacketLength
parameter to specify the number
* of bytes in each packet to mirror.
*
* If you do not want to mirror the entire packet, use the PacketLength
parameter to specify
* the number of bytes in each packet to mirror.
*/
public Integer getPacketLength() {
return this.packetLength;
}
/**
*
* The number of bytes in each packet to mirror. These are bytes after the VXLAN header. Do not specify this * parameter when you want to mirror the entire packet. To mirror a subset of the packet, set this to the length (in * bytes) that you want to mirror. For example, if you set this value to 100, then the first 100 bytes that meet the * filter criteria are copied to the target. *
*
* If you do not want to mirror the entire packet, use the PacketLength
parameter to specify the number
* of bytes in each packet to mirror.
*
* If you do not want to mirror the entire packet, use the PacketLength
parameter to specify the
* number of bytes in each packet to mirror.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTrafficMirrorSessionRequest withPacketLength(Integer packetLength) {
setPacketLength(packetLength);
return this;
}
/**
*
* The session number determines the order in which sessions are evaluated when an interface is used by multiple * sessions. The first session with a matching filter is the one that mirrors the packets. *
** Valid values are 1-32766. *
* * @param sessionNumber * The session number determines the order in which sessions are evaluated when an interface is used by * multiple sessions. The first session with a matching filter is the one that mirrors the packets. ** Valid values are 1-32766. */ public void setSessionNumber(Integer sessionNumber) { this.sessionNumber = sessionNumber; } /** *
* The session number determines the order in which sessions are evaluated when an interface is used by multiple * sessions. The first session with a matching filter is the one that mirrors the packets. *
** Valid values are 1-32766. *
* * @return The session number determines the order in which sessions are evaluated when an interface is used by * multiple sessions. The first session with a matching filter is the one that mirrors the packets. ** Valid values are 1-32766. */ public Integer getSessionNumber() { return this.sessionNumber; } /** *
* The session number determines the order in which sessions are evaluated when an interface is used by multiple * sessions. The first session with a matching filter is the one that mirrors the packets. *
** Valid values are 1-32766. *
* * @param sessionNumber * The session number determines the order in which sessions are evaluated when an interface is used by * multiple sessions. The first session with a matching filter is the one that mirrors the packets. ** Valid values are 1-32766. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTrafficMirrorSessionRequest withSessionNumber(Integer sessionNumber) { setSessionNumber(sessionNumber); return this; } /** *
* The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a VirtualNetworkId
,
* an account-wide unique id is chosen at random.
*
VirtualNetworkId
, an account-wide unique id is chosen at random.
*/
public void setVirtualNetworkId(Integer virtualNetworkId) {
this.virtualNetworkId = virtualNetworkId;
}
/**
*
* The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a VirtualNetworkId
,
* an account-wide unique id is chosen at random.
*
VirtualNetworkId
, an account-wide unique id is chosen at random.
*/
public Integer getVirtualNetworkId() {
return this.virtualNetworkId;
}
/**
*
* The VXLAN ID for the Traffic Mirror session. For more information about the VXLAN protocol, see RFC 7348. If you do not specify a VirtualNetworkId
,
* an account-wide unique id is chosen at random.
*
VirtualNetworkId
, an account-wide unique id is chosen at random.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateTrafficMirrorSessionRequest withVirtualNetworkId(Integer virtualNetworkId) {
setVirtualNetworkId(virtualNetworkId);
return this;
}
/**
* * The description of the Traffic Mirror session. *
* * @param description * The description of the Traffic Mirror session. */ public void setDescription(String description) { this.description = description; } /** ** The description of the Traffic Mirror session. *
* * @return The description of the Traffic Mirror session. */ public String getDescription() { return this.description; } /** ** The description of the Traffic Mirror session. *
* * @param description * The description of the Traffic Mirror session. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTrafficMirrorSessionRequest withDescription(String description) { setDescription(description); return this; } /** ** The tags to assign to a Traffic Mirror session. *
* * @return The tags to assign to a Traffic Mirror session. */ public java.util.List* The tags to assign to a Traffic Mirror session. *
* * @param tagSpecifications * The tags to assign to a Traffic Mirror session. */ public void setTagSpecifications(java.util.Collection* The tags to assign to a Traffic Mirror session. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagSpecifications(java.util.Collection)} or {@link #withTagSpecifications(java.util.Collection)} if * you want to override the existing values. *
* * @param tagSpecifications * The tags to assign to a Traffic Mirror session. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTrafficMirrorSessionRequest withTagSpecifications(TagSpecification... tagSpecifications) { if (this.tagSpecifications == null) { setTagSpecifications(new com.amazonaws.internal.SdkInternalList* The tags to assign to a Traffic Mirror session. *
* * @param tagSpecifications * The tags to assign to a Traffic Mirror session. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTrafficMirrorSessionRequest withTagSpecifications(java.util.Collection* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. *
* * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. */ public String getClientToken() { return this.clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How to ensure * idempotency. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateTrafficMirrorSessionRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** * This method is intended for internal use only. Returns the marshaled request configured with additional * parameters to enable operation dry-run. */ @Override public Request