com.amazonaws.services.fsx.model.WindowsAuditLogConfiguration Maven / Gradle / Ivy
Show all versions of aws-java-sdk-fsx Show documentation
/*
* Copyright 2019-2024 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.fsx.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The configuration that Amazon FSx for Windows File Server uses to audit and log user accesses of files, folders, and
* file shares on the Amazon FSx for Windows File Server file system. For more information, see File access auditing.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class WindowsAuditLogConfiguration implements Serializable, Cloneable, StructuredPojo {
/**
*
* Sets which attempt type is logged by Amazon FSx for file and folder accesses.
*
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access files or folders are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access files or folders are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access files or folders are
* logged.
*
*
* -
*
* DISABLED
- access auditing of files and folders is turned off.
*
*
*
*/
private String fileAccessAuditLogLevel;
/**
*
* Sets which attempt type is logged by Amazon FSx for file share accesses.
*
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access file shares are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access file shares are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access file shares are logged.
*
*
* -
*
* DISABLED
- access auditing of file shares is turned off.
*
*
*
*/
private String fileShareAccessAuditLogLevel;
/**
*
* The Amazon Resource Name (ARN) for the destination of the audit logs. The destination can be any Amazon
* CloudWatch Logs log group ARN or Amazon Kinesis Data Firehose delivery stream ARN.
*
*
* The name of the Amazon CloudWatch Logs log group must begin with the /aws/fsx
prefix. The name of
* the Amazon Kinesis Data Firehose delivery stream must begin with the aws-fsx
prefix.
*
*
* The destination ARN (either CloudWatch Logs log group or Kinesis Data Firehose delivery stream) must be in the
* same Amazon Web Services partition, Amazon Web Services Region, and Amazon Web Services account as your Amazon
* FSx file system.
*
*/
private String auditLogDestination;
/**
*
* Sets which attempt type is logged by Amazon FSx for file and folder accesses.
*
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access files or folders are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access files or folders are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access files or folders are
* logged.
*
*
* -
*
* DISABLED
- access auditing of files and folders is turned off.
*
*
*
*
* @param fileAccessAuditLogLevel
* Sets which attempt type is logged by Amazon FSx for file and folder accesses.
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access files or folders are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access files or folders are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access files or folders
* are logged.
*
*
* -
*
* DISABLED
- access auditing of files and folders is turned off.
*
*
* @see WindowsAccessAuditLogLevel
*/
public void setFileAccessAuditLogLevel(String fileAccessAuditLogLevel) {
this.fileAccessAuditLogLevel = fileAccessAuditLogLevel;
}
/**
*
* Sets which attempt type is logged by Amazon FSx for file and folder accesses.
*
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access files or folders are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access files or folders are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access files or folders are
* logged.
*
*
* -
*
* DISABLED
- access auditing of files and folders is turned off.
*
*
*
*
* @return Sets which attempt type is logged by Amazon FSx for file and folder accesses.
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access files or folders are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access files or folders are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access files or
* folders are logged.
*
*
* -
*
* DISABLED
- access auditing of files and folders is turned off.
*
*
* @see WindowsAccessAuditLogLevel
*/
public String getFileAccessAuditLogLevel() {
return this.fileAccessAuditLogLevel;
}
/**
*
* Sets which attempt type is logged by Amazon FSx for file and folder accesses.
*
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access files or folders are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access files or folders are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access files or folders are
* logged.
*
*
* -
*
* DISABLED
- access auditing of files and folders is turned off.
*
*
*
*
* @param fileAccessAuditLogLevel
* Sets which attempt type is logged by Amazon FSx for file and folder accesses.
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access files or folders are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access files or folders are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access files or folders
* are logged.
*
*
* -
*
* DISABLED
- access auditing of files and folders is turned off.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see WindowsAccessAuditLogLevel
*/
public WindowsAuditLogConfiguration withFileAccessAuditLogLevel(String fileAccessAuditLogLevel) {
setFileAccessAuditLogLevel(fileAccessAuditLogLevel);
return this;
}
/**
*
* Sets which attempt type is logged by Amazon FSx for file and folder accesses.
*
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access files or folders are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access files or folders are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access files or folders are
* logged.
*
*
* -
*
* DISABLED
- access auditing of files and folders is turned off.
*
*
*
*
* @param fileAccessAuditLogLevel
* Sets which attempt type is logged by Amazon FSx for file and folder accesses.
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access files or folders are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access files or folders are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access files or folders
* are logged.
*
*
* -
*
* DISABLED
- access auditing of files and folders is turned off.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see WindowsAccessAuditLogLevel
*/
public WindowsAuditLogConfiguration withFileAccessAuditLogLevel(WindowsAccessAuditLogLevel fileAccessAuditLogLevel) {
this.fileAccessAuditLogLevel = fileAccessAuditLogLevel.toString();
return this;
}
/**
*
* Sets which attempt type is logged by Amazon FSx for file share accesses.
*
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access file shares are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access file shares are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access file shares are logged.
*
*
* -
*
* DISABLED
- access auditing of file shares is turned off.
*
*
*
*
* @param fileShareAccessAuditLogLevel
* Sets which attempt type is logged by Amazon FSx for file share accesses.
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access file shares are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access file shares are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access file shares are
* logged.
*
*
* -
*
* DISABLED
- access auditing of file shares is turned off.
*
*
* @see WindowsAccessAuditLogLevel
*/
public void setFileShareAccessAuditLogLevel(String fileShareAccessAuditLogLevel) {
this.fileShareAccessAuditLogLevel = fileShareAccessAuditLogLevel;
}
/**
*
* Sets which attempt type is logged by Amazon FSx for file share accesses.
*
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access file shares are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access file shares are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access file shares are logged.
*
*
* -
*
* DISABLED
- access auditing of file shares is turned off.
*
*
*
*
* @return Sets which attempt type is logged by Amazon FSx for file share accesses.
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access file shares are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access file shares are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access file shares are
* logged.
*
*
* -
*
* DISABLED
- access auditing of file shares is turned off.
*
*
* @see WindowsAccessAuditLogLevel
*/
public String getFileShareAccessAuditLogLevel() {
return this.fileShareAccessAuditLogLevel;
}
/**
*
* Sets which attempt type is logged by Amazon FSx for file share accesses.
*
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access file shares are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access file shares are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access file shares are logged.
*
*
* -
*
* DISABLED
- access auditing of file shares is turned off.
*
*
*
*
* @param fileShareAccessAuditLogLevel
* Sets which attempt type is logged by Amazon FSx for file share accesses.
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access file shares are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access file shares are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access file shares are
* logged.
*
*
* -
*
* DISABLED
- access auditing of file shares is turned off.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see WindowsAccessAuditLogLevel
*/
public WindowsAuditLogConfiguration withFileShareAccessAuditLogLevel(String fileShareAccessAuditLogLevel) {
setFileShareAccessAuditLogLevel(fileShareAccessAuditLogLevel);
return this;
}
/**
*
* Sets which attempt type is logged by Amazon FSx for file share accesses.
*
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access file shares are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access file shares are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access file shares are logged.
*
*
* -
*
* DISABLED
- access auditing of file shares is turned off.
*
*
*
*
* @param fileShareAccessAuditLogLevel
* Sets which attempt type is logged by Amazon FSx for file share accesses.
*
* -
*
* SUCCESS_ONLY
- only successful attempts to access file shares are logged.
*
*
* -
*
* FAILURE_ONLY
- only failed attempts to access file shares are logged.
*
*
* -
*
* SUCCESS_AND_FAILURE
- both successful attempts and failed attempts to access file shares are
* logged.
*
*
* -
*
* DISABLED
- access auditing of file shares is turned off.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see WindowsAccessAuditLogLevel
*/
public WindowsAuditLogConfiguration withFileShareAccessAuditLogLevel(WindowsAccessAuditLogLevel fileShareAccessAuditLogLevel) {
this.fileShareAccessAuditLogLevel = fileShareAccessAuditLogLevel.toString();
return this;
}
/**
*
* The Amazon Resource Name (ARN) for the destination of the audit logs. The destination can be any Amazon
* CloudWatch Logs log group ARN or Amazon Kinesis Data Firehose delivery stream ARN.
*
*
* The name of the Amazon CloudWatch Logs log group must begin with the /aws/fsx
prefix. The name of
* the Amazon Kinesis Data Firehose delivery stream must begin with the aws-fsx
prefix.
*
*
* The destination ARN (either CloudWatch Logs log group or Kinesis Data Firehose delivery stream) must be in the
* same Amazon Web Services partition, Amazon Web Services Region, and Amazon Web Services account as your Amazon
* FSx file system.
*
*
* @param auditLogDestination
* The Amazon Resource Name (ARN) for the destination of the audit logs. The destination can be any Amazon
* CloudWatch Logs log group ARN or Amazon Kinesis Data Firehose delivery stream ARN.
*
* The name of the Amazon CloudWatch Logs log group must begin with the /aws/fsx
prefix. The
* name of the Amazon Kinesis Data Firehose delivery stream must begin with the aws-fsx
prefix.
*
*
* The destination ARN (either CloudWatch Logs log group or Kinesis Data Firehose delivery stream) must be in
* the same Amazon Web Services partition, Amazon Web Services Region, and Amazon Web Services account as
* your Amazon FSx file system.
*/
public void setAuditLogDestination(String auditLogDestination) {
this.auditLogDestination = auditLogDestination;
}
/**
*
* The Amazon Resource Name (ARN) for the destination of the audit logs. The destination can be any Amazon
* CloudWatch Logs log group ARN or Amazon Kinesis Data Firehose delivery stream ARN.
*
*
* The name of the Amazon CloudWatch Logs log group must begin with the /aws/fsx
prefix. The name of
* the Amazon Kinesis Data Firehose delivery stream must begin with the aws-fsx
prefix.
*
*
* The destination ARN (either CloudWatch Logs log group or Kinesis Data Firehose delivery stream) must be in the
* same Amazon Web Services partition, Amazon Web Services Region, and Amazon Web Services account as your Amazon
* FSx file system.
*
*
* @return The Amazon Resource Name (ARN) for the destination of the audit logs. The destination can be any Amazon
* CloudWatch Logs log group ARN or Amazon Kinesis Data Firehose delivery stream ARN.
*
* The name of the Amazon CloudWatch Logs log group must begin with the /aws/fsx
prefix. The
* name of the Amazon Kinesis Data Firehose delivery stream must begin with the aws-fsx
prefix.
*
*
* The destination ARN (either CloudWatch Logs log group or Kinesis Data Firehose delivery stream) must be
* in the same Amazon Web Services partition, Amazon Web Services Region, and Amazon Web Services account as
* your Amazon FSx file system.
*/
public String getAuditLogDestination() {
return this.auditLogDestination;
}
/**
*
* The Amazon Resource Name (ARN) for the destination of the audit logs. The destination can be any Amazon
* CloudWatch Logs log group ARN or Amazon Kinesis Data Firehose delivery stream ARN.
*
*
* The name of the Amazon CloudWatch Logs log group must begin with the /aws/fsx
prefix. The name of
* the Amazon Kinesis Data Firehose delivery stream must begin with the aws-fsx
prefix.
*
*
* The destination ARN (either CloudWatch Logs log group or Kinesis Data Firehose delivery stream) must be in the
* same Amazon Web Services partition, Amazon Web Services Region, and Amazon Web Services account as your Amazon
* FSx file system.
*
*
* @param auditLogDestination
* The Amazon Resource Name (ARN) for the destination of the audit logs. The destination can be any Amazon
* CloudWatch Logs log group ARN or Amazon Kinesis Data Firehose delivery stream ARN.
*
* The name of the Amazon CloudWatch Logs log group must begin with the /aws/fsx
prefix. The
* name of the Amazon Kinesis Data Firehose delivery stream must begin with the aws-fsx
prefix.
*
*
* The destination ARN (either CloudWatch Logs log group or Kinesis Data Firehose delivery stream) must be in
* the same Amazon Web Services partition, Amazon Web Services Region, and Amazon Web Services account as
* your Amazon FSx file system.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WindowsAuditLogConfiguration withAuditLogDestination(String auditLogDestination) {
setAuditLogDestination(auditLogDestination);
return this;
}
/**
* 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 (getFileAccessAuditLogLevel() != null)
sb.append("FileAccessAuditLogLevel: ").append(getFileAccessAuditLogLevel()).append(",");
if (getFileShareAccessAuditLogLevel() != null)
sb.append("FileShareAccessAuditLogLevel: ").append(getFileShareAccessAuditLogLevel()).append(",");
if (getAuditLogDestination() != null)
sb.append("AuditLogDestination: ").append(getAuditLogDestination());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof WindowsAuditLogConfiguration == false)
return false;
WindowsAuditLogConfiguration other = (WindowsAuditLogConfiguration) obj;
if (other.getFileAccessAuditLogLevel() == null ^ this.getFileAccessAuditLogLevel() == null)
return false;
if (other.getFileAccessAuditLogLevel() != null && other.getFileAccessAuditLogLevel().equals(this.getFileAccessAuditLogLevel()) == false)
return false;
if (other.getFileShareAccessAuditLogLevel() == null ^ this.getFileShareAccessAuditLogLevel() == null)
return false;
if (other.getFileShareAccessAuditLogLevel() != null && other.getFileShareAccessAuditLogLevel().equals(this.getFileShareAccessAuditLogLevel()) == false)
return false;
if (other.getAuditLogDestination() == null ^ this.getAuditLogDestination() == null)
return false;
if (other.getAuditLogDestination() != null && other.getAuditLogDestination().equals(this.getAuditLogDestination()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFileAccessAuditLogLevel() == null) ? 0 : getFileAccessAuditLogLevel().hashCode());
hashCode = prime * hashCode + ((getFileShareAccessAuditLogLevel() == null) ? 0 : getFileShareAccessAuditLogLevel().hashCode());
hashCode = prime * hashCode + ((getAuditLogDestination() == null) ? 0 : getAuditLogDestination().hashCode());
return hashCode;
}
@Override
public WindowsAuditLogConfiguration clone() {
try {
return (WindowsAuditLogConfiguration) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.fsx.model.transform.WindowsAuditLogConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}