All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ec2.model.CreateFlowLogsRequest Maven / Gradle / Ivy

/*
 * Copyright 2017-2022 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.CreateFlowLogsRequestMarshaller;

/**
 * 
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateFlowLogsRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest {

    /**
     * 

* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more * information, see How * to ensure idempotency. *

*/ private String clientToken; /** *

* The ARN of the IAM role that allows Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your * account. *

*

* This parameter is required if the destination type is cloud-watch-logs and unsupported otherwise. *

*/ private String deliverLogsPermissionArn; /** *

* The ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts. *

*/ private String deliverCrossAccountRole; /** *

* The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs. *

*

* This parameter is valid only if the destination type is cloud-watch-logs. *

*/ private String logGroupName; /** *

* The IDs of the resources to monitor. For example, if the resource type is VPC, specify the IDs of * the VPCs. *

*

* Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource types. *

*/ private com.amazonaws.internal.SdkInternalList resourceIds; /** *

* The type of resource to monitor. *

*/ private String resourceType; /** *

* The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not * supported for transit gateway resource types. It is required for the other resource types. *

*/ private String trafficType; /** *

* The type of destination for the flow log data. *

*

* Default: cloud-watch-logs *

*/ private String logDestinationType; /** *

* The destination for the flow log data. The meaning of this parameter depends on the destination type. *

*
    *
  • *

    * If the destination type is cloud-watch-logs, specify the ARN of a CloudWatch Logs log group. For * example: *

    *

    * arn:aws:logs:region:account_id:log-group:my_group *

    *

    * Alternatively, use the LogGroupName parameter. *

    *
  • *
  • *

    * If the destination type is s3, specify the ARN of an S3 bucket. For example: *

    *

    * arn:aws:s3:::my_bucket/my_subfolder/ *

    *

    * The subfolder is optional. Note that you can't use AWSLogs as a subfolder name. *

    *
  • *
  • *

    * If the destination type is kinesis-data-firehose, specify the ARN of a Kinesis Data Firehose * delivery stream. For example: *

    *

    * arn:aws:firehose:region:account_id:deliverystream:my_stream *

    *
  • *
*/ private String logDestination; /** *

* The fields to include in the flow log record. List the fields in the order in which they should appear. If you * omit this parameter, the flow log is created using the default format. If you specify this parameter, you must * include at least one field. For more information about the available fields, see Flow log records in * the Amazon VPC User Guide or Transit Gateway Flow Log * records in the Amazon Web Services Transit Gateway Guide. *

*

* Specify the fields using the ${field-id} format, separated by spaces. For the CLI, surround this * parameter value with single quotes on Linux or double quotes on Windows. *

*/ private String logFormat; /** *

* The tags to apply to the flow logs. *

*/ private com.amazonaws.internal.SdkInternalList tagSpecifications; /** *

* The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. * The possible values are 60 seconds (1 minute) or 600 seconds (10 minutes). This parameter must be 60 seconds for * transit gateway resource types. *

*

* When a network interface is attached to a Nitro-based * instance, the aggregation interval is always 60 seconds or less, regardless of the value that you specify. *

*

* Default: 600 *

*/ private Integer maxAggregationInterval; /** *

* The destination options. *

*/ private DestinationOptionsRequest destinationOptions; /** *

* 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 CreateFlowLogsRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* The ARN of the IAM role that allows Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your * account. *

*

* This parameter is required if the destination type is cloud-watch-logs and unsupported otherwise. *

* * @param deliverLogsPermissionArn * The ARN of the IAM role that allows Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your * account.

*

* This parameter is required if the destination type is cloud-watch-logs and unsupported * otherwise. */ public void setDeliverLogsPermissionArn(String deliverLogsPermissionArn) { this.deliverLogsPermissionArn = deliverLogsPermissionArn; } /** *

* The ARN of the IAM role that allows Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your * account. *

*

* This parameter is required if the destination type is cloud-watch-logs and unsupported otherwise. *

* * @return The ARN of the IAM role that allows Amazon EC2 to publish flow logs to a CloudWatch Logs log group in * your account.

*

* This parameter is required if the destination type is cloud-watch-logs and unsupported * otherwise. */ public String getDeliverLogsPermissionArn() { return this.deliverLogsPermissionArn; } /** *

* The ARN of the IAM role that allows Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your * account. *

*

* This parameter is required if the destination type is cloud-watch-logs and unsupported otherwise. *

* * @param deliverLogsPermissionArn * The ARN of the IAM role that allows Amazon EC2 to publish flow logs to a CloudWatch Logs log group in your * account.

*

* This parameter is required if the destination type is cloud-watch-logs and unsupported * otherwise. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withDeliverLogsPermissionArn(String deliverLogsPermissionArn) { setDeliverLogsPermissionArn(deliverLogsPermissionArn); return this; } /** *

* The ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts. *

* * @param deliverCrossAccountRole * The ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts. */ public void setDeliverCrossAccountRole(String deliverCrossAccountRole) { this.deliverCrossAccountRole = deliverCrossAccountRole; } /** *

* The ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts. *

* * @return The ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts. */ public String getDeliverCrossAccountRole() { return this.deliverCrossAccountRole; } /** *

* The ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts. *

* * @param deliverCrossAccountRole * The ARN of the IAM role that allows Amazon EC2 to publish flow logs across accounts. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withDeliverCrossAccountRole(String deliverCrossAccountRole) { setDeliverCrossAccountRole(deliverCrossAccountRole); return this; } /** *

* The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs. *

*

* This parameter is valid only if the destination type is cloud-watch-logs. *

* * @param logGroupName * The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.

*

* This parameter is valid only if the destination type is cloud-watch-logs. */ public void setLogGroupName(String logGroupName) { this.logGroupName = logGroupName; } /** *

* The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs. *

*

* This parameter is valid only if the destination type is cloud-watch-logs. *

* * @return The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.

*

* This parameter is valid only if the destination type is cloud-watch-logs. */ public String getLogGroupName() { return this.logGroupName; } /** *

* The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs. *

*

* This parameter is valid only if the destination type is cloud-watch-logs. *

* * @param logGroupName * The name of a new or existing CloudWatch Logs log group where Amazon EC2 publishes your flow logs.

*

* This parameter is valid only if the destination type is cloud-watch-logs. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withLogGroupName(String logGroupName) { setLogGroupName(logGroupName); return this; } /** *

* The IDs of the resources to monitor. For example, if the resource type is VPC, specify the IDs of * the VPCs. *

*

* Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource types. *

* * @return The IDs of the resources to monitor. For example, if the resource type is VPC, specify the * IDs of the VPCs.

*

* Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource * types. */ public java.util.List getResourceIds() { if (resourceIds == null) { resourceIds = new com.amazonaws.internal.SdkInternalList(); } return resourceIds; } /** *

* The IDs of the resources to monitor. For example, if the resource type is VPC, specify the IDs of * the VPCs. *

*

* Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource types. *

* * @param resourceIds * The IDs of the resources to monitor. For example, if the resource type is VPC, specify the * IDs of the VPCs.

*

* Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource * types. */ public void setResourceIds(java.util.Collection resourceIds) { if (resourceIds == null) { this.resourceIds = null; return; } this.resourceIds = new com.amazonaws.internal.SdkInternalList(resourceIds); } /** *

* The IDs of the resources to monitor. For example, if the resource type is VPC, specify the IDs of * the VPCs. *

*

* Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource types. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setResourceIds(java.util.Collection)} or {@link #withResourceIds(java.util.Collection)} if you want to * override the existing values. *

* * @param resourceIds * The IDs of the resources to monitor. For example, if the resource type is VPC, specify the * IDs of the VPCs.

*

* Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource * types. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withResourceIds(String... resourceIds) { if (this.resourceIds == null) { setResourceIds(new com.amazonaws.internal.SdkInternalList(resourceIds.length)); } for (String ele : resourceIds) { this.resourceIds.add(ele); } return this; } /** *

* The IDs of the resources to monitor. For example, if the resource type is VPC, specify the IDs of * the VPCs. *

*

* Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource types. *

* * @param resourceIds * The IDs of the resources to monitor. For example, if the resource type is VPC, specify the * IDs of the VPCs.

*

* Constraints: Maximum of 25 for transit gateway resource types. Maximum of 1000 for the other resource * types. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withResourceIds(java.util.Collection resourceIds) { setResourceIds(resourceIds); return this; } /** *

* The type of resource to monitor. *

* * @param resourceType * The type of resource to monitor. * @see FlowLogsResourceType */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** *

* The type of resource to monitor. *

* * @return The type of resource to monitor. * @see FlowLogsResourceType */ public String getResourceType() { return this.resourceType; } /** *

* The type of resource to monitor. *

* * @param resourceType * The type of resource to monitor. * @return Returns a reference to this object so that method calls can be chained together. * @see FlowLogsResourceType */ public CreateFlowLogsRequest withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** *

* The type of resource to monitor. *

* * @param resourceType * The type of resource to monitor. * @see FlowLogsResourceType */ public void setResourceType(FlowLogsResourceType resourceType) { withResourceType(resourceType); } /** *

* The type of resource to monitor. *

* * @param resourceType * The type of resource to monitor. * @return Returns a reference to this object so that method calls can be chained together. * @see FlowLogsResourceType */ public CreateFlowLogsRequest withResourceType(FlowLogsResourceType resourceType) { this.resourceType = resourceType.toString(); return this; } /** *

* The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not * supported for transit gateway resource types. It is required for the other resource types. *

* * @param trafficType * The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not * supported for transit gateway resource types. It is required for the other resource types. * @see TrafficType */ public void setTrafficType(String trafficType) { this.trafficType = trafficType; } /** *

* The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not * supported for transit gateway resource types. It is required for the other resource types. *

* * @return The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is * not supported for transit gateway resource types. It is required for the other resource types. * @see TrafficType */ public String getTrafficType() { return this.trafficType; } /** *

* The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not * supported for transit gateway resource types. It is required for the other resource types. *

* * @param trafficType * The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not * supported for transit gateway resource types. It is required for the other resource types. * @return Returns a reference to this object so that method calls can be chained together. * @see TrafficType */ public CreateFlowLogsRequest withTrafficType(String trafficType) { setTrafficType(trafficType); return this; } /** *

* The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not * supported for transit gateway resource types. It is required for the other resource types. *

* * @param trafficType * The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not * supported for transit gateway resource types. It is required for the other resource types. * @see TrafficType */ public void setTrafficType(TrafficType trafficType) { withTrafficType(trafficType); } /** *

* The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not * supported for transit gateway resource types. It is required for the other resource types. *

* * @param trafficType * The type of traffic to monitor (accepted traffic, rejected traffic, or all traffic). This parameter is not * supported for transit gateway resource types. It is required for the other resource types. * @return Returns a reference to this object so that method calls can be chained together. * @see TrafficType */ public CreateFlowLogsRequest withTrafficType(TrafficType trafficType) { this.trafficType = trafficType.toString(); return this; } /** *

* The type of destination for the flow log data. *

*

* Default: cloud-watch-logs *

* * @param logDestinationType * The type of destination for the flow log data.

*

* Default: cloud-watch-logs * @see LogDestinationType */ public void setLogDestinationType(String logDestinationType) { this.logDestinationType = logDestinationType; } /** *

* The type of destination for the flow log data. *

*

* Default: cloud-watch-logs *

* * @return The type of destination for the flow log data.

*

* Default: cloud-watch-logs * @see LogDestinationType */ public String getLogDestinationType() { return this.logDestinationType; } /** *

* The type of destination for the flow log data. *

*

* Default: cloud-watch-logs *

* * @param logDestinationType * The type of destination for the flow log data.

*

* Default: cloud-watch-logs * @return Returns a reference to this object so that method calls can be chained together. * @see LogDestinationType */ public CreateFlowLogsRequest withLogDestinationType(String logDestinationType) { setLogDestinationType(logDestinationType); return this; } /** *

* The type of destination for the flow log data. *

*

* Default: cloud-watch-logs *

* * @param logDestinationType * The type of destination for the flow log data.

*

* Default: cloud-watch-logs * @see LogDestinationType */ public void setLogDestinationType(LogDestinationType logDestinationType) { withLogDestinationType(logDestinationType); } /** *

* The type of destination for the flow log data. *

*

* Default: cloud-watch-logs *

* * @param logDestinationType * The type of destination for the flow log data.

*

* Default: cloud-watch-logs * @return Returns a reference to this object so that method calls can be chained together. * @see LogDestinationType */ public CreateFlowLogsRequest withLogDestinationType(LogDestinationType logDestinationType) { this.logDestinationType = logDestinationType.toString(); return this; } /** *

* The destination for the flow log data. The meaning of this parameter depends on the destination type. *

*
    *
  • *

    * If the destination type is cloud-watch-logs, specify the ARN of a CloudWatch Logs log group. For * example: *

    *

    * arn:aws:logs:region:account_id:log-group:my_group *

    *

    * Alternatively, use the LogGroupName parameter. *

    *
  • *
  • *

    * If the destination type is s3, specify the ARN of an S3 bucket. For example: *

    *

    * arn:aws:s3:::my_bucket/my_subfolder/ *

    *

    * The subfolder is optional. Note that you can't use AWSLogs as a subfolder name. *

    *
  • *
  • *

    * If the destination type is kinesis-data-firehose, specify the ARN of a Kinesis Data Firehose * delivery stream. For example: *

    *

    * arn:aws:firehose:region:account_id:deliverystream:my_stream *

    *
  • *
* * @param logDestination * The destination for the flow log data. The meaning of this parameter depends on the destination type.

*
    *
  • *

    * If the destination type is cloud-watch-logs, specify the ARN of a CloudWatch Logs log group. * For example: *

    *

    * arn:aws:logs:region:account_id:log-group:my_group *

    *

    * Alternatively, use the LogGroupName parameter. *

    *
  • *
  • *

    * If the destination type is s3, specify the ARN of an S3 bucket. For example: *

    *

    * arn:aws:s3:::my_bucket/my_subfolder/ *

    *

    * The subfolder is optional. Note that you can't use AWSLogs as a subfolder name. *

    *
  • *
  • *

    * If the destination type is kinesis-data-firehose, specify the ARN of a Kinesis Data Firehose * delivery stream. For example: *

    *

    * arn:aws:firehose:region:account_id:deliverystream:my_stream *

    *
  • */ public void setLogDestination(String logDestination) { this.logDestination = logDestination; } /** *

    * The destination for the flow log data. The meaning of this parameter depends on the destination type. *

    *
      *
    • *

      * If the destination type is cloud-watch-logs, specify the ARN of a CloudWatch Logs log group. For * example: *

      *

      * arn:aws:logs:region:account_id:log-group:my_group *

      *

      * Alternatively, use the LogGroupName parameter. *

      *
    • *
    • *

      * If the destination type is s3, specify the ARN of an S3 bucket. For example: *

      *

      * arn:aws:s3:::my_bucket/my_subfolder/ *

      *

      * The subfolder is optional. Note that you can't use AWSLogs as a subfolder name. *

      *
    • *
    • *

      * If the destination type is kinesis-data-firehose, specify the ARN of a Kinesis Data Firehose * delivery stream. For example: *

      *

      * arn:aws:firehose:region:account_id:deliverystream:my_stream *

      *
    • *
    * * @return The destination for the flow log data. The meaning of this parameter depends on the destination type.

    *
      *
    • *

      * If the destination type is cloud-watch-logs, specify the ARN of a CloudWatch Logs log group. * For example: *

      *

      * arn:aws:logs:region:account_id:log-group:my_group *

      *

      * Alternatively, use the LogGroupName parameter. *

      *
    • *
    • *

      * If the destination type is s3, specify the ARN of an S3 bucket. For example: *

      *

      * arn:aws:s3:::my_bucket/my_subfolder/ *

      *

      * The subfolder is optional. Note that you can't use AWSLogs as a subfolder name. *

      *
    • *
    • *

      * If the destination type is kinesis-data-firehose, specify the ARN of a Kinesis Data Firehose * delivery stream. For example: *

      *

      * arn:aws:firehose:region:account_id:deliverystream:my_stream *

      *
    • */ public String getLogDestination() { return this.logDestination; } /** *

      * The destination for the flow log data. The meaning of this parameter depends on the destination type. *

      *
        *
      • *

        * If the destination type is cloud-watch-logs, specify the ARN of a CloudWatch Logs log group. For * example: *

        *

        * arn:aws:logs:region:account_id:log-group:my_group *

        *

        * Alternatively, use the LogGroupName parameter. *

        *
      • *
      • *

        * If the destination type is s3, specify the ARN of an S3 bucket. For example: *

        *

        * arn:aws:s3:::my_bucket/my_subfolder/ *

        *

        * The subfolder is optional. Note that you can't use AWSLogs as a subfolder name. *

        *
      • *
      • *

        * If the destination type is kinesis-data-firehose, specify the ARN of a Kinesis Data Firehose * delivery stream. For example: *

        *

        * arn:aws:firehose:region:account_id:deliverystream:my_stream *

        *
      • *
      * * @param logDestination * The destination for the flow log data. The meaning of this parameter depends on the destination type.

      *
        *
      • *

        * If the destination type is cloud-watch-logs, specify the ARN of a CloudWatch Logs log group. * For example: *

        *

        * arn:aws:logs:region:account_id:log-group:my_group *

        *

        * Alternatively, use the LogGroupName parameter. *

        *
      • *
      • *

        * If the destination type is s3, specify the ARN of an S3 bucket. For example: *

        *

        * arn:aws:s3:::my_bucket/my_subfolder/ *

        *

        * The subfolder is optional. Note that you can't use AWSLogs as a subfolder name. *

        *
      • *
      • *

        * If the destination type is kinesis-data-firehose, specify the ARN of a Kinesis Data Firehose * delivery stream. For example: *

        *

        * arn:aws:firehose:region:account_id:deliverystream:my_stream *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withLogDestination(String logDestination) { setLogDestination(logDestination); return this; } /** *

        * The fields to include in the flow log record. List the fields in the order in which they should appear. If you * omit this parameter, the flow log is created using the default format. If you specify this parameter, you must * include at least one field. For more information about the available fields, see Flow log records in * the Amazon VPC User Guide or Transit Gateway Flow Log * records in the Amazon Web Services Transit Gateway Guide. *

        *

        * Specify the fields using the ${field-id} format, separated by spaces. For the CLI, surround this * parameter value with single quotes on Linux or double quotes on Windows. *

        * * @param logFormat * The fields to include in the flow log record. List the fields in the order in which they should appear. If * you omit this parameter, the flow log is created using the default format. If you specify this parameter, * you must include at least one field. For more information about the available fields, see Flow log * records in the Amazon VPC User Guide or Transit Gateway Flow * Log records in the Amazon Web Services Transit Gateway Guide.

        *

        * Specify the fields using the ${field-id} format, separated by spaces. For the CLI, surround * this parameter value with single quotes on Linux or double quotes on Windows. */ public void setLogFormat(String logFormat) { this.logFormat = logFormat; } /** *

        * The fields to include in the flow log record. List the fields in the order in which they should appear. If you * omit this parameter, the flow log is created using the default format. If you specify this parameter, you must * include at least one field. For more information about the available fields, see Flow log records in * the Amazon VPC User Guide or Transit Gateway Flow Log * records in the Amazon Web Services Transit Gateway Guide. *

        *

        * Specify the fields using the ${field-id} format, separated by spaces. For the CLI, surround this * parameter value with single quotes on Linux or double quotes on Windows. *

        * * @return The fields to include in the flow log record. List the fields in the order in which they should appear. * If you omit this parameter, the flow log is created using the default format. If you specify this * parameter, you must include at least one field. For more information about the available fields, see Flow log * records in the Amazon VPC User Guide or Transit Gateway * Flow Log records in the Amazon Web Services Transit Gateway Guide.

        *

        * Specify the fields using the ${field-id} format, separated by spaces. For the CLI, surround * this parameter value with single quotes on Linux or double quotes on Windows. */ public String getLogFormat() { return this.logFormat; } /** *

        * The fields to include in the flow log record. List the fields in the order in which they should appear. If you * omit this parameter, the flow log is created using the default format. If you specify this parameter, you must * include at least one field. For more information about the available fields, see Flow log records in * the Amazon VPC User Guide or Transit Gateway Flow Log * records in the Amazon Web Services Transit Gateway Guide. *

        *

        * Specify the fields using the ${field-id} format, separated by spaces. For the CLI, surround this * parameter value with single quotes on Linux or double quotes on Windows. *

        * * @param logFormat * The fields to include in the flow log record. List the fields in the order in which they should appear. If * you omit this parameter, the flow log is created using the default format. If you specify this parameter, * you must include at least one field. For more information about the available fields, see Flow log * records in the Amazon VPC User Guide or Transit Gateway Flow * Log records in the Amazon Web Services Transit Gateway Guide.

        *

        * Specify the fields using the ${field-id} format, separated by spaces. For the CLI, surround * this parameter value with single quotes on Linux or double quotes on Windows. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withLogFormat(String logFormat) { setLogFormat(logFormat); return this; } /** *

        * The tags to apply to the flow logs. *

        * * @return The tags to apply to the flow logs. */ public java.util.List getTagSpecifications() { if (tagSpecifications == null) { tagSpecifications = new com.amazonaws.internal.SdkInternalList(); } return tagSpecifications; } /** *

        * The tags to apply to the flow logs. *

        * * @param tagSpecifications * The tags to apply to the flow logs. */ public void setTagSpecifications(java.util.Collection tagSpecifications) { if (tagSpecifications == null) { this.tagSpecifications = null; return; } this.tagSpecifications = new com.amazonaws.internal.SdkInternalList(tagSpecifications); } /** *

        * The tags to apply to the flow logs. *

        *

        * 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 apply to the flow logs. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withTagSpecifications(TagSpecification... tagSpecifications) { if (this.tagSpecifications == null) { setTagSpecifications(new com.amazonaws.internal.SdkInternalList(tagSpecifications.length)); } for (TagSpecification ele : tagSpecifications) { this.tagSpecifications.add(ele); } return this; } /** *

        * The tags to apply to the flow logs. *

        * * @param tagSpecifications * The tags to apply to the flow logs. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withTagSpecifications(java.util.Collection tagSpecifications) { setTagSpecifications(tagSpecifications); return this; } /** *

        * The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. * The possible values are 60 seconds (1 minute) or 600 seconds (10 minutes). This parameter must be 60 seconds for * transit gateway resource types. *

        *

        * When a network interface is attached to a Nitro-based * instance, the aggregation interval is always 60 seconds or less, regardless of the value that you specify. *

        *

        * Default: 600 *

        * * @param maxAggregationInterval * The maximum interval of time during which a flow of packets is captured and aggregated into a flow log * record. The possible values are 60 seconds (1 minute) or 600 seconds (10 minutes). This parameter must be * 60 seconds for transit gateway resource types.

        *

        * When a network interface is attached to a Nitro-based instance, the aggregation interval is always 60 seconds or less, regardless of the value * that you specify. *

        *

        * Default: 600 */ public void setMaxAggregationInterval(Integer maxAggregationInterval) { this.maxAggregationInterval = maxAggregationInterval; } /** *

        * The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. * The possible values are 60 seconds (1 minute) or 600 seconds (10 minutes). This parameter must be 60 seconds for * transit gateway resource types. *

        *

        * When a network interface is attached to a Nitro-based * instance, the aggregation interval is always 60 seconds or less, regardless of the value that you specify. *

        *

        * Default: 600 *

        * * @return The maximum interval of time during which a flow of packets is captured and aggregated into a flow log * record. The possible values are 60 seconds (1 minute) or 600 seconds (10 minutes). This parameter must be * 60 seconds for transit gateway resource types.

        *

        * When a network interface is attached to a Nitro-based instance, the aggregation interval is always 60 seconds or less, regardless of the value * that you specify. *

        *

        * Default: 600 */ public Integer getMaxAggregationInterval() { return this.maxAggregationInterval; } /** *

        * The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. * The possible values are 60 seconds (1 minute) or 600 seconds (10 minutes). This parameter must be 60 seconds for * transit gateway resource types. *

        *

        * When a network interface is attached to a Nitro-based * instance, the aggregation interval is always 60 seconds or less, regardless of the value that you specify. *

        *

        * Default: 600 *

        * * @param maxAggregationInterval * The maximum interval of time during which a flow of packets is captured and aggregated into a flow log * record. The possible values are 60 seconds (1 minute) or 600 seconds (10 minutes). This parameter must be * 60 seconds for transit gateway resource types.

        *

        * When a network interface is attached to a Nitro-based instance, the aggregation interval is always 60 seconds or less, regardless of the value * that you specify. *

        *

        * Default: 600 * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withMaxAggregationInterval(Integer maxAggregationInterval) { setMaxAggregationInterval(maxAggregationInterval); return this; } /** *

        * The destination options. *

        * * @param destinationOptions * The destination options. */ public void setDestinationOptions(DestinationOptionsRequest destinationOptions) { this.destinationOptions = destinationOptions; } /** *

        * The destination options. *

        * * @return The destination options. */ public DestinationOptionsRequest getDestinationOptions() { return this.destinationOptions; } /** *

        * The destination options. *

        * * @param destinationOptions * The destination options. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateFlowLogsRequest withDestinationOptions(DestinationOptionsRequest destinationOptions) { setDestinationOptions(destinationOptions); 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 getDryRunRequest() { Request request = new CreateFlowLogsRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getDeliverLogsPermissionArn() != null) sb.append("DeliverLogsPermissionArn: ").append(getDeliverLogsPermissionArn()).append(","); if (getDeliverCrossAccountRole() != null) sb.append("DeliverCrossAccountRole: ").append(getDeliverCrossAccountRole()).append(","); if (getLogGroupName() != null) sb.append("LogGroupName: ").append(getLogGroupName()).append(","); if (getResourceIds() != null) sb.append("ResourceIds: ").append(getResourceIds()).append(","); if (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getTrafficType() != null) sb.append("TrafficType: ").append(getTrafficType()).append(","); if (getLogDestinationType() != null) sb.append("LogDestinationType: ").append(getLogDestinationType()).append(","); if (getLogDestination() != null) sb.append("LogDestination: ").append(getLogDestination()).append(","); if (getLogFormat() != null) sb.append("LogFormat: ").append(getLogFormat()).append(","); if (getTagSpecifications() != null) sb.append("TagSpecifications: ").append(getTagSpecifications()).append(","); if (getMaxAggregationInterval() != null) sb.append("MaxAggregationInterval: ").append(getMaxAggregationInterval()).append(","); if (getDestinationOptions() != null) sb.append("DestinationOptions: ").append(getDestinationOptions()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateFlowLogsRequest == false) return false; CreateFlowLogsRequest other = (CreateFlowLogsRequest) obj; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getDeliverLogsPermissionArn() == null ^ this.getDeliverLogsPermissionArn() == null) return false; if (other.getDeliverLogsPermissionArn() != null && other.getDeliverLogsPermissionArn().equals(this.getDeliverLogsPermissionArn()) == false) return false; if (other.getDeliverCrossAccountRole() == null ^ this.getDeliverCrossAccountRole() == null) return false; if (other.getDeliverCrossAccountRole() != null && other.getDeliverCrossAccountRole().equals(this.getDeliverCrossAccountRole()) == false) return false; if (other.getLogGroupName() == null ^ this.getLogGroupName() == null) return false; if (other.getLogGroupName() != null && other.getLogGroupName().equals(this.getLogGroupName()) == false) return false; if (other.getResourceIds() == null ^ this.getResourceIds() == null) return false; if (other.getResourceIds() != null && other.getResourceIds().equals(this.getResourceIds()) == false) return false; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getTrafficType() == null ^ this.getTrafficType() == null) return false; if (other.getTrafficType() != null && other.getTrafficType().equals(this.getTrafficType()) == false) return false; if (other.getLogDestinationType() == null ^ this.getLogDestinationType() == null) return false; if (other.getLogDestinationType() != null && other.getLogDestinationType().equals(this.getLogDestinationType()) == false) return false; if (other.getLogDestination() == null ^ this.getLogDestination() == null) return false; if (other.getLogDestination() != null && other.getLogDestination().equals(this.getLogDestination()) == false) return false; if (other.getLogFormat() == null ^ this.getLogFormat() == null) return false; if (other.getLogFormat() != null && other.getLogFormat().equals(this.getLogFormat()) == false) return false; if (other.getTagSpecifications() == null ^ this.getTagSpecifications() == null) return false; if (other.getTagSpecifications() != null && other.getTagSpecifications().equals(this.getTagSpecifications()) == false) return false; if (other.getMaxAggregationInterval() == null ^ this.getMaxAggregationInterval() == null) return false; if (other.getMaxAggregationInterval() != null && other.getMaxAggregationInterval().equals(this.getMaxAggregationInterval()) == false) return false; if (other.getDestinationOptions() == null ^ this.getDestinationOptions() == null) return false; if (other.getDestinationOptions() != null && other.getDestinationOptions().equals(this.getDestinationOptions()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getDeliverLogsPermissionArn() == null) ? 0 : getDeliverLogsPermissionArn().hashCode()); hashCode = prime * hashCode + ((getDeliverCrossAccountRole() == null) ? 0 : getDeliverCrossAccountRole().hashCode()); hashCode = prime * hashCode + ((getLogGroupName() == null) ? 0 : getLogGroupName().hashCode()); hashCode = prime * hashCode + ((getResourceIds() == null) ? 0 : getResourceIds().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getTrafficType() == null) ? 0 : getTrafficType().hashCode()); hashCode = prime * hashCode + ((getLogDestinationType() == null) ? 0 : getLogDestinationType().hashCode()); hashCode = prime * hashCode + ((getLogDestination() == null) ? 0 : getLogDestination().hashCode()); hashCode = prime * hashCode + ((getLogFormat() == null) ? 0 : getLogFormat().hashCode()); hashCode = prime * hashCode + ((getTagSpecifications() == null) ? 0 : getTagSpecifications().hashCode()); hashCode = prime * hashCode + ((getMaxAggregationInterval() == null) ? 0 : getMaxAggregationInterval().hashCode()); hashCode = prime * hashCode + ((getDestinationOptions() == null) ? 0 : getDestinationOptions().hashCode()); return hashCode; } @Override public CreateFlowLogsRequest clone() { return (CreateFlowLogsRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy