public class CreateFlowLogsRequest extends AmazonWebServiceRequest implements java.io.Serializable
CreateFlowLogs operation
.
Creates one or more flow logs to capture IP traffic for a specific network interface, subnet, or VPC. Flow logs are delivered to a specified log group in Amazon CloudWatch Logs. If you specify a VPC or subnet in the request, a log stream is created in CloudWatch Logs for each network interface in the subnet or VPC. Log streams can include information about accepted and rejected traffic to a network interface. You can view the data in your log streams using Amazon CloudWatch Logs.
In your request, you must also specify an IAM role that has permission to publish logs to CloudWatch Logs.
Constructor and Description |
---|
CreateFlowLogsRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getClientToken()
Unique, case-sensitive identifier you provide to ensure the
idempotency of the request.
|
java.lang.String |
getDeliverLogsPermissionArn()
The ARN for the IAM role that's used to post flow logs to a CloudWatch
Logs log group.
|
java.lang.String |
getLogGroupName()
The name of the CloudWatch log group.
|
java.util.List<java.lang.String> |
getResourceIds()
One or more subnet, network interface, or VPC IDs.
|
java.lang.String |
getResourceType()
The type of resource on which to create the flow log.
|
java.lang.String |
getTrafficType()
The type of traffic to log.
|
int |
hashCode() |
void |
setClientToken(java.lang.String clientToken)
Unique, case-sensitive identifier you provide to ensure the
idempotency of the request.
|
void |
setDeliverLogsPermissionArn(java.lang.String deliverLogsPermissionArn)
The ARN for the IAM role that's used to post flow logs to a CloudWatch
Logs log group.
|
void |
setLogGroupName(java.lang.String logGroupName)
The name of the CloudWatch log group.
|
void |
setResourceIds(java.util.Collection<java.lang.String> resourceIds)
One or more subnet, network interface, or VPC IDs.
|
void |
setResourceType(FlowLogsResourceType resourceType)
The type of resource on which to create the flow log.
|
void |
setResourceType(java.lang.String resourceType)
The type of resource on which to create the flow log.
|
void |
setTrafficType(java.lang.String trafficType)
The type of traffic to log.
|
void |
setTrafficType(TrafficType trafficType)
The type of traffic to log.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
CreateFlowLogsRequest |
withClientToken(java.lang.String clientToken)
Unique, case-sensitive identifier you provide to ensure the
idempotency of the request.
|
CreateFlowLogsRequest |
withDeliverLogsPermissionArn(java.lang.String deliverLogsPermissionArn)
The ARN for the IAM role that's used to post flow logs to a CloudWatch
Logs log group.
|
CreateFlowLogsRequest |
withLogGroupName(java.lang.String logGroupName)
The name of the CloudWatch log group.
|
CreateFlowLogsRequest |
withResourceIds(java.util.Collection<java.lang.String> resourceIds)
One or more subnet, network interface, or VPC IDs.
|
CreateFlowLogsRequest |
withResourceIds(java.lang.String... resourceIds)
One or more subnet, network interface, or VPC IDs.
|
CreateFlowLogsRequest |
withResourceType(FlowLogsResourceType resourceType)
The type of resource on which to create the flow log.
|
CreateFlowLogsRequest |
withResourceType(java.lang.String resourceType)
The type of resource on which to create the flow log.
|
CreateFlowLogsRequest |
withTrafficType(java.lang.String trafficType)
The type of traffic to log.
|
CreateFlowLogsRequest |
withTrafficType(TrafficType trafficType)
The type of traffic to log.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.util.List<java.lang.String> getResourceIds()
Constraints: Maximum of 1000 resources
Constraints: Maximum of 1000 resources
public void setResourceIds(java.util.Collection<java.lang.String> resourceIds)
Constraints: Maximum of 1000 resources
resourceIds
- One or more subnet, network interface, or VPC IDs. Constraints: Maximum of 1000 resources
public CreateFlowLogsRequest withResourceIds(java.lang.String... resourceIds)
Constraints: Maximum of 1000 resources
Returns a reference to this object so that method calls can be chained together.
resourceIds
- One or more subnet, network interface, or VPC IDs. Constraints: Maximum of 1000 resources
public CreateFlowLogsRequest withResourceIds(java.util.Collection<java.lang.String> resourceIds)
Constraints: Maximum of 1000 resources
Returns a reference to this object so that method calls can be chained together.
resourceIds
- One or more subnet, network interface, or VPC IDs. Constraints: Maximum of 1000 resources
public java.lang.String getResourceType()
Constraints:
Allowed Values: VPC, Subnet, NetworkInterface
FlowLogsResourceType
public void setResourceType(java.lang.String resourceType)
Constraints:
Allowed Values: VPC, Subnet, NetworkInterface
resourceType
- The type of resource on which to create the flow log.FlowLogsResourceType
public CreateFlowLogsRequest withResourceType(java.lang.String resourceType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: VPC, Subnet, NetworkInterface
resourceType
- The type of resource on which to create the flow log.FlowLogsResourceType
public void setResourceType(FlowLogsResourceType resourceType)
Constraints:
Allowed Values: VPC, Subnet, NetworkInterface
resourceType
- The type of resource on which to create the flow log.FlowLogsResourceType
public CreateFlowLogsRequest withResourceType(FlowLogsResourceType resourceType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: VPC, Subnet, NetworkInterface
resourceType
- The type of resource on which to create the flow log.FlowLogsResourceType
public java.lang.String getTrafficType()
Constraints:
Allowed Values: ACCEPT, REJECT, ALL
TrafficType
public void setTrafficType(java.lang.String trafficType)
Constraints:
Allowed Values: ACCEPT, REJECT, ALL
trafficType
- The type of traffic to log.TrafficType
public CreateFlowLogsRequest withTrafficType(java.lang.String trafficType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: ACCEPT, REJECT, ALL
trafficType
- The type of traffic to log.TrafficType
public void setTrafficType(TrafficType trafficType)
Constraints:
Allowed Values: ACCEPT, REJECT, ALL
trafficType
- The type of traffic to log.TrafficType
public CreateFlowLogsRequest withTrafficType(TrafficType trafficType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: ACCEPT, REJECT, ALL
trafficType
- The type of traffic to log.TrafficType
public java.lang.String getLogGroupName()
public void setLogGroupName(java.lang.String logGroupName)
logGroupName
- The name of the CloudWatch log group.public CreateFlowLogsRequest withLogGroupName(java.lang.String logGroupName)
Returns a reference to this object so that method calls can be chained together.
logGroupName
- The name of the CloudWatch log group.public java.lang.String getDeliverLogsPermissionArn()
public void setDeliverLogsPermissionArn(java.lang.String deliverLogsPermissionArn)
deliverLogsPermissionArn
- The ARN for the IAM role that's used to post flow logs to a CloudWatch
Logs log group.public CreateFlowLogsRequest withDeliverLogsPermissionArn(java.lang.String deliverLogsPermissionArn)
Returns a reference to this object so that method calls can be chained together.
deliverLogsPermissionArn
- The ARN for the IAM role that's used to post flow logs to a CloudWatch
Logs log group.public java.lang.String getClientToken()
public void setClientToken(java.lang.String clientToken)
clientToken
- Unique, case-sensitive identifier you provide to ensure the
idempotency of the request. For more information, see How
to Ensure Idempotency.public CreateFlowLogsRequest withClientToken(java.lang.String clientToken)
Returns a reference to this object so that method calls can be chained together.
clientToken
- Unique, case-sensitive identifier you provide to ensure the
idempotency of the request. For more information, see How
to Ensure Idempotency.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.