/*
* Copyright 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.
*/
/*
* Do not modify this file. This file is generated from the datasync-2018-11-09.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.DataSync.Model
{
///
/// Container for the parameters to the CreateLocationObjectStorage operation.
/// Creates an endpoint for an object storage system that DataSync can access for a transfer.
/// For more information, see Creating
/// a location for object storage.
///
public partial class CreateLocationObjectStorageRequest : AmazonDataSyncRequest
{
private string _accessKey;
private List _agentArns = new List();
private string _bucketName;
private string _secretKey;
private MemoryStream _serverCertificate;
private string _serverHostname;
private int? _serverPort;
private ObjectStorageServerProtocol _serverProtocol;
private string _subdirectory;
private List _tags = new List();
///
/// Gets and sets the property AccessKey.
///
/// Specifies the access key (for example, a user name) if credentials are required to
/// authenticate with the object storage server.
///
///
[AWSProperty(Min=1, Max=200)]
public string AccessKey
{
get { return this._accessKey; }
set { this._accessKey = value; }
}
// Check to see if AccessKey property is set
internal bool IsSetAccessKey()
{
return this._accessKey != null;
}
///
/// Gets and sets the property AgentArns.
///
/// Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can securely
/// connect with your location.
///
///
[AWSProperty(Required=true, Min=1, Max=4)]
public List AgentArns
{
get { return this._agentArns; }
set { this._agentArns = value; }
}
// Check to see if AgentArns property is set
internal bool IsSetAgentArns()
{
return this._agentArns != null && this._agentArns.Count > 0;
}
///
/// Gets and sets the property BucketName.
///
/// Specifies the name of the object storage bucket involved in the transfer.
///
///
[AWSProperty(Required=true, Min=3, Max=63)]
public string BucketName
{
get { return this._bucketName; }
set { this._bucketName = value; }
}
// Check to see if BucketName property is set
internal bool IsSetBucketName()
{
return this._bucketName != null;
}
///
/// Gets and sets the property SecretKey.
///
/// Specifies the secret key (for example, a password) if credentials are required to
/// authenticate with the object storage server.
///
///
[AWSProperty(Sensitive=true, Min=1, Max=200)]
public string SecretKey
{
get { return this._secretKey; }
set { this._secretKey = value; }
}
// Check to see if SecretKey property is set
internal bool IsSetSecretKey()
{
return this._secretKey != null;
}
///
/// Gets and sets the property ServerCertificate.
///
/// Specifies a file with the certificates that are used to sign the object storage server's
/// certificate (for example, file:///home/user/.ssh/storage_sys_certificate.pem
).
/// The file you specify must include the following:
///
/// -
///
/// The certificate of the signing certificate authority (CA)
///
///
-
///
/// Any intermediate certificates
///
///
-
///
/// base64 encoding
///
///
-
///
/// A
.pem
extension
///
///
///
/// The file can be up to 32768 bytes (before base64 encoding).
///
///
///
/// To use this parameter, configure ServerProtocol
to HTTPS
.
///
///
[AWSProperty(Max=32768)]
public MemoryStream ServerCertificate
{
get { return this._serverCertificate; }
set { this._serverCertificate = value; }
}
// Check to see if ServerCertificate property is set
internal bool IsSetServerCertificate()
{
return this._serverCertificate != null;
}
///
/// Gets and sets the property ServerHostname.
///
/// Specifies the domain name or IP address of the object storage server. A DataSync agent
/// uses this hostname to mount the object storage server in a network.
///
///
[AWSProperty(Required=true, Max=255)]
public string ServerHostname
{
get { return this._serverHostname; }
set { this._serverHostname = value; }
}
// Check to see if ServerHostname property is set
internal bool IsSetServerHostname()
{
return this._serverHostname != null;
}
///
/// Gets and sets the property ServerPort.
///
/// Specifies the port that your object storage server accepts inbound network traffic
/// on (for example, port 443).
///
///
[AWSProperty(Min=1, Max=65536)]
public int ServerPort
{
get { return this._serverPort.GetValueOrDefault(); }
set { this._serverPort = value; }
}
// Check to see if ServerPort property is set
internal bool IsSetServerPort()
{
return this._serverPort.HasValue;
}
///
/// Gets and sets the property ServerProtocol.
///
/// Specifies the protocol that your object storage server uses to communicate.
///
///
public ObjectStorageServerProtocol ServerProtocol
{
get { return this._serverProtocol; }
set { this._serverProtocol = value; }
}
// Check to see if ServerProtocol property is set
internal bool IsSetServerProtocol()
{
return this._serverProtocol != null;
}
///
/// Gets and sets the property Subdirectory.
///
/// Specifies the object prefix for your object storage server. If this is a source location,
/// DataSync only copies objects with this prefix. If this is a destination location,
/// DataSync writes all objects with this prefix.
///
///
[AWSProperty(Max=4096)]
public string Subdirectory
{
get { return this._subdirectory; }
set { this._subdirectory = value; }
}
// Check to see if Subdirectory property is set
internal bool IsSetSubdirectory()
{
return this._subdirectory != null;
}
///
/// Gets and sets the property Tags.
///
/// Specifies the key-value pair that represents a tag that you want to add to the resource.
/// Tags can help you manage, filter, and search for your resources. We recommend creating
/// a name tag for your location.
///
///
[AWSProperty(Min=0, Max=50)]
public List Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
}
}