com.amazonaws.services.fsx.model.WindowsAuditLogCreateConfiguration 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 Windows file access auditing configuration used when creating or updating an Amazon FSx for Windows File Server
* file system.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class WindowsAuditLogCreateConfiguration 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) that specifies 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, with the following requirements:
*
*
* -
*
* The destination ARN that you provide (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.
*
*
* -
*
* 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.
*
*
* -
*
* If you do not provide a destination in AuditLogDestination
, Amazon FSx will create and use a log
* stream in the CloudWatch Logs /aws/fsx/windows
log group.
*
*
* -
*
* If AuditLogDestination
is provided and the resource does not exist, the request will fail with a
* BadRequest
error.
*
*
* -
*
* If FileAccessAuditLogLevel
and FileShareAccessAuditLogLevel
are both set to
* DISABLED
, you cannot specify a destination in AuditLogDestination
.
*
*
*
*/
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 WindowsAuditLogCreateConfiguration 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 WindowsAuditLogCreateConfiguration 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 WindowsAuditLogCreateConfiguration 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 WindowsAuditLogCreateConfiguration withFileShareAccessAuditLogLevel(WindowsAccessAuditLogLevel fileShareAccessAuditLogLevel) {
this.fileShareAccessAuditLogLevel = fileShareAccessAuditLogLevel.toString();
return this;
}
/**
*
* The Amazon Resource Name (ARN) that specifies 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, with the following requirements:
*
*
* -
*
* The destination ARN that you provide (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.
*
*
* -
*
* 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.
*
*
* -
*
* If you do not provide a destination in AuditLogDestination
, Amazon FSx will create and use a log
* stream in the CloudWatch Logs /aws/fsx/windows
log group.
*
*
* -
*
* If AuditLogDestination
is provided and the resource does not exist, the request will fail with a
* BadRequest
error.
*
*
* -
*
* If FileAccessAuditLogLevel
and FileShareAccessAuditLogLevel
are both set to
* DISABLED
, you cannot specify a destination in AuditLogDestination
.
*
*
*
*
* @param auditLogDestination
* The Amazon Resource Name (ARN) that specifies 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, with the following requirements:
*
*
* -
*
* The destination ARN that you provide (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.
*
*
* -
*
* 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.
*
*
* -
*
* If you do not provide a destination in AuditLogDestination
, Amazon FSx will create and use a
* log stream in the CloudWatch Logs /aws/fsx/windows
log group.
*
*
* -
*
* If AuditLogDestination
is provided and the resource does not exist, the request will fail
* with a BadRequest
error.
*
*
* -
*
* If FileAccessAuditLogLevel
and FileShareAccessAuditLogLevel
are both set to
* DISABLED
, you cannot specify a destination in AuditLogDestination
.
*
*
*/
public void setAuditLogDestination(String auditLogDestination) {
this.auditLogDestination = auditLogDestination;
}
/**
*
* The Amazon Resource Name (ARN) that specifies 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, with the following requirements:
*
*
* -
*
* The destination ARN that you provide (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.
*
*
* -
*
* 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.
*
*
* -
*
* If you do not provide a destination in AuditLogDestination
, Amazon FSx will create and use a log
* stream in the CloudWatch Logs /aws/fsx/windows
log group.
*
*
* -
*
* If AuditLogDestination
is provided and the resource does not exist, the request will fail with a
* BadRequest
error.
*
*
* -
*
* If FileAccessAuditLogLevel
and FileShareAccessAuditLogLevel
are both set to
* DISABLED
, you cannot specify a destination in AuditLogDestination
.
*
*
*
*
* @return The Amazon Resource Name (ARN) that specifies 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, with the following requirements:
*
*
* -
*
* The destination ARN that you provide (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.
*
*
* -
*
* 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.
*
*
* -
*
* If you do not provide a destination in AuditLogDestination
, Amazon FSx will create and use a
* log stream in the CloudWatch Logs /aws/fsx/windows
log group.
*
*
* -
*
* If AuditLogDestination
is provided and the resource does not exist, the request will fail
* with a BadRequest
error.
*
*
* -
*
* If FileAccessAuditLogLevel
and FileShareAccessAuditLogLevel
are both set to
* DISABLED
, you cannot specify a destination in AuditLogDestination
.
*
*
*/
public String getAuditLogDestination() {
return this.auditLogDestination;
}
/**
*
* The Amazon Resource Name (ARN) that specifies 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, with the following requirements:
*
*
* -
*
* The destination ARN that you provide (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.
*
*
* -
*
* 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.
*
*
* -
*
* If you do not provide a destination in AuditLogDestination
, Amazon FSx will create and use a log
* stream in the CloudWatch Logs /aws/fsx/windows
log group.
*
*
* -
*
* If AuditLogDestination
is provided and the resource does not exist, the request will fail with a
* BadRequest
error.
*
*
* -
*
* If FileAccessAuditLogLevel
and FileShareAccessAuditLogLevel
are both set to
* DISABLED
, you cannot specify a destination in AuditLogDestination
.
*
*
*
*
* @param auditLogDestination
* The Amazon Resource Name (ARN) that specifies 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, with the following requirements:
*
*
* -
*
* The destination ARN that you provide (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.
*
*
* -
*
* 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.
*
*
* -
*
* If you do not provide a destination in AuditLogDestination
, Amazon FSx will create and use a
* log stream in the CloudWatch Logs /aws/fsx/windows
log group.
*
*
* -
*
* If AuditLogDestination
is provided and the resource does not exist, the request will fail
* with a BadRequest
error.
*
*
* -
*
* If FileAccessAuditLogLevel
and FileShareAccessAuditLogLevel
are both set to
* DISABLED
, you cannot specify a destination in AuditLogDestination
.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WindowsAuditLogCreateConfiguration 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 WindowsAuditLogCreateConfiguration == false)
return false;
WindowsAuditLogCreateConfiguration other = (WindowsAuditLogCreateConfiguration) 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 WindowsAuditLogCreateConfiguration clone() {
try {
return (WindowsAuditLogCreateConfiguration) 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.WindowsAuditLogCreateConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}