/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace DataSync { namespace Model { /** *

CreateLocationObjectStorageRequest

See Also:

AWS * API Reference

*/ class CreateLocationObjectStorageRequest : public DataSyncRequest { public: AWS_DATASYNC_API CreateLocationObjectStorageRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateLocationObjectStorage"; } AWS_DATASYNC_API Aws::String SerializePayload() const override; AWS_DATASYNC_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

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.

*/ inline const Aws::String& GetServerHostname() const{ return m_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.

*/ inline bool ServerHostnameHasBeenSet() const { return m_serverHostnameHasBeenSet; } /** *

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.

*/ inline void SetServerHostname(const Aws::String& value) { m_serverHostnameHasBeenSet = true; m_serverHostname = value; } /** *

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.

*/ inline void SetServerHostname(Aws::String&& value) { m_serverHostnameHasBeenSet = true; m_serverHostname = std::move(value); } /** *

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.

*/ inline void SetServerHostname(const char* value) { m_serverHostnameHasBeenSet = true; m_serverHostname.assign(value); } /** *

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.

*/ inline CreateLocationObjectStorageRequest& WithServerHostname(const Aws::String& value) { SetServerHostname(value); return *this;} /** *

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.

*/ inline CreateLocationObjectStorageRequest& WithServerHostname(Aws::String&& value) { SetServerHostname(std::move(value)); return *this;} /** *

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.

*/ inline CreateLocationObjectStorageRequest& WithServerHostname(const char* value) { SetServerHostname(value); return *this;} /** *

Specifies the port that your object storage server accepts inbound network * traffic on (for example, port 443).

*/ inline int GetServerPort() const{ return m_serverPort; } /** *

Specifies the port that your object storage server accepts inbound network * traffic on (for example, port 443).

*/ inline bool ServerPortHasBeenSet() const { return m_serverPortHasBeenSet; } /** *

Specifies the port that your object storage server accepts inbound network * traffic on (for example, port 443).

*/ inline void SetServerPort(int value) { m_serverPortHasBeenSet = true; m_serverPort = value; } /** *

Specifies the port that your object storage server accepts inbound network * traffic on (for example, port 443).

*/ inline CreateLocationObjectStorageRequest& WithServerPort(int value) { SetServerPort(value); return *this;} /** *

Specifies the protocol that your object storage server uses to * communicate.

*/ inline const ObjectStorageServerProtocol& GetServerProtocol() const{ return m_serverProtocol; } /** *

Specifies the protocol that your object storage server uses to * communicate.

*/ inline bool ServerProtocolHasBeenSet() const { return m_serverProtocolHasBeenSet; } /** *

Specifies the protocol that your object storage server uses to * communicate.

*/ inline void SetServerProtocol(const ObjectStorageServerProtocol& value) { m_serverProtocolHasBeenSet = true; m_serverProtocol = value; } /** *

Specifies the protocol that your object storage server uses to * communicate.

*/ inline void SetServerProtocol(ObjectStorageServerProtocol&& value) { m_serverProtocolHasBeenSet = true; m_serverProtocol = std::move(value); } /** *

Specifies the protocol that your object storage server uses to * communicate.

*/ inline CreateLocationObjectStorageRequest& WithServerProtocol(const ObjectStorageServerProtocol& value) { SetServerProtocol(value); return *this;} /** *

Specifies the protocol that your object storage server uses to * communicate.

*/ inline CreateLocationObjectStorageRequest& WithServerProtocol(ObjectStorageServerProtocol&& value) { SetServerProtocol(std::move(value)); return *this;} /** *

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.

*/ inline const Aws::String& GetSubdirectory() const{ return m_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.

*/ inline bool SubdirectoryHasBeenSet() const { return m_subdirectoryHasBeenSet; } /** *

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.

*/ inline void SetSubdirectory(const Aws::String& value) { m_subdirectoryHasBeenSet = true; m_subdirectory = value; } /** *

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.

*/ inline void SetSubdirectory(Aws::String&& value) { m_subdirectoryHasBeenSet = true; m_subdirectory = std::move(value); } /** *

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.

*/ inline void SetSubdirectory(const char* value) { m_subdirectoryHasBeenSet = true; m_subdirectory.assign(value); } /** *

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.

*/ inline CreateLocationObjectStorageRequest& WithSubdirectory(const Aws::String& value) { SetSubdirectory(value); return *this;} /** *

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.

*/ inline CreateLocationObjectStorageRequest& WithSubdirectory(Aws::String&& value) { SetSubdirectory(std::move(value)); return *this;} /** *

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.

*/ inline CreateLocationObjectStorageRequest& WithSubdirectory(const char* value) { SetSubdirectory(value); return *this;} /** *

Specifies the name of the object storage bucket involved in the transfer.

*/ inline const Aws::String& GetBucketName() const{ return m_bucketName; } /** *

Specifies the name of the object storage bucket involved in the transfer.

*/ inline bool BucketNameHasBeenSet() const { return m_bucketNameHasBeenSet; } /** *

Specifies the name of the object storage bucket involved in the transfer.

*/ inline void SetBucketName(const Aws::String& value) { m_bucketNameHasBeenSet = true; m_bucketName = value; } /** *

Specifies the name of the object storage bucket involved in the transfer.

*/ inline void SetBucketName(Aws::String&& value) { m_bucketNameHasBeenSet = true; m_bucketName = std::move(value); } /** *

Specifies the name of the object storage bucket involved in the transfer.

*/ inline void SetBucketName(const char* value) { m_bucketNameHasBeenSet = true; m_bucketName.assign(value); } /** *

Specifies the name of the object storage bucket involved in the transfer.

*/ inline CreateLocationObjectStorageRequest& WithBucketName(const Aws::String& value) { SetBucketName(value); return *this;} /** *

Specifies the name of the object storage bucket involved in the transfer.

*/ inline CreateLocationObjectStorageRequest& WithBucketName(Aws::String&& value) { SetBucketName(std::move(value)); return *this;} /** *

Specifies the name of the object storage bucket involved in the transfer.

*/ inline CreateLocationObjectStorageRequest& WithBucketName(const char* value) { SetBucketName(value); return *this;} /** *

Specifies the access key (for example, a user name) if credentials are * required to authenticate with the object storage server.

*/ inline const Aws::String& GetAccessKey() const{ return m_accessKey; } /** *

Specifies the access key (for example, a user name) if credentials are * required to authenticate with the object storage server.

*/ inline bool AccessKeyHasBeenSet() const { return m_accessKeyHasBeenSet; } /** *

Specifies the access key (for example, a user name) if credentials are * required to authenticate with the object storage server.

*/ inline void SetAccessKey(const Aws::String& value) { m_accessKeyHasBeenSet = true; m_accessKey = value; } /** *

Specifies the access key (for example, a user name) if credentials are * required to authenticate with the object storage server.

*/ inline void SetAccessKey(Aws::String&& value) { m_accessKeyHasBeenSet = true; m_accessKey = std::move(value); } /** *

Specifies the access key (for example, a user name) if credentials are * required to authenticate with the object storage server.

*/ inline void SetAccessKey(const char* value) { m_accessKeyHasBeenSet = true; m_accessKey.assign(value); } /** *

Specifies the access key (for example, a user name) if credentials are * required to authenticate with the object storage server.

*/ inline CreateLocationObjectStorageRequest& WithAccessKey(const Aws::String& value) { SetAccessKey(value); return *this;} /** *

Specifies the access key (for example, a user name) if credentials are * required to authenticate with the object storage server.

*/ inline CreateLocationObjectStorageRequest& WithAccessKey(Aws::String&& value) { SetAccessKey(std::move(value)); return *this;} /** *

Specifies the access key (for example, a user name) if credentials are * required to authenticate with the object storage server.

*/ inline CreateLocationObjectStorageRequest& WithAccessKey(const char* value) { SetAccessKey(value); return *this;} /** *

Specifies the secret key (for example, a password) if credentials are * required to authenticate with the object storage server.

*/ inline const Aws::String& GetSecretKey() const{ return m_secretKey; } /** *

Specifies the secret key (for example, a password) if credentials are * required to authenticate with the object storage server.

*/ inline bool SecretKeyHasBeenSet() const { return m_secretKeyHasBeenSet; } /** *

Specifies the secret key (for example, a password) if credentials are * required to authenticate with the object storage server.

*/ inline void SetSecretKey(const Aws::String& value) { m_secretKeyHasBeenSet = true; m_secretKey = value; } /** *

Specifies the secret key (for example, a password) if credentials are * required to authenticate with the object storage server.

*/ inline void SetSecretKey(Aws::String&& value) { m_secretKeyHasBeenSet = true; m_secretKey = std::move(value); } /** *

Specifies the secret key (for example, a password) if credentials are * required to authenticate with the object storage server.

*/ inline void SetSecretKey(const char* value) { m_secretKeyHasBeenSet = true; m_secretKey.assign(value); } /** *

Specifies the secret key (for example, a password) if credentials are * required to authenticate with the object storage server.

*/ inline CreateLocationObjectStorageRequest& WithSecretKey(const Aws::String& value) { SetSecretKey(value); return *this;} /** *

Specifies the secret key (for example, a password) if credentials are * required to authenticate with the object storage server.

*/ inline CreateLocationObjectStorageRequest& WithSecretKey(Aws::String&& value) { SetSecretKey(std::move(value)); return *this;} /** *

Specifies the secret key (for example, a password) if credentials are * required to authenticate with the object storage server.

*/ inline CreateLocationObjectStorageRequest& WithSecretKey(const char* value) { SetSecretKey(value); return *this;} /** *

Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can * securely connect with your location.

*/ inline const Aws::Vector& GetAgentArns() const{ return m_agentArns; } /** *

Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can * securely connect with your location.

*/ inline bool AgentArnsHasBeenSet() const { return m_agentArnsHasBeenSet; } /** *

Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can * securely connect with your location.

*/ inline void SetAgentArns(const Aws::Vector& value) { m_agentArnsHasBeenSet = true; m_agentArns = value; } /** *

Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can * securely connect with your location.

*/ inline void SetAgentArns(Aws::Vector&& value) { m_agentArnsHasBeenSet = true; m_agentArns = std::move(value); } /** *

Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can * securely connect with your location.

*/ inline CreateLocationObjectStorageRequest& WithAgentArns(const Aws::Vector& value) { SetAgentArns(value); return *this;} /** *

Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can * securely connect with your location.

*/ inline CreateLocationObjectStorageRequest& WithAgentArns(Aws::Vector&& value) { SetAgentArns(std::move(value)); return *this;} /** *

Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can * securely connect with your location.

*/ inline CreateLocationObjectStorageRequest& AddAgentArns(const Aws::String& value) { m_agentArnsHasBeenSet = true; m_agentArns.push_back(value); return *this; } /** *

Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can * securely connect with your location.

*/ inline CreateLocationObjectStorageRequest& AddAgentArns(Aws::String&& value) { m_agentArnsHasBeenSet = true; m_agentArns.push_back(std::move(value)); return *this; } /** *

Specifies the Amazon Resource Names (ARNs) of the DataSync agents that can * securely connect with your location.

*/ inline CreateLocationObjectStorageRequest& AddAgentArns(const char* value) { m_agentArnsHasBeenSet = true; m_agentArns.push_back(value); return *this; } /** *

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.

*/ inline const Aws::Vector& GetTags() const{ return m_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.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

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.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

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.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

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.

*/ inline CreateLocationObjectStorageRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

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.

*/ inline CreateLocationObjectStorageRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

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.

*/ inline CreateLocationObjectStorageRequest& AddTags(const TagListEntry& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

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.

*/ inline CreateLocationObjectStorageRequest& AddTags(TagListEntry&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

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.

*/ inline const Aws::Utils::ByteBuffer& GetServerCertificate() const{ return m_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.

*/ inline bool ServerCertificateHasBeenSet() const { return m_serverCertificateHasBeenSet; } /** *

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.

*/ inline void SetServerCertificate(const Aws::Utils::ByteBuffer& value) { m_serverCertificateHasBeenSet = true; m_serverCertificate = value; } /** *

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.

*/ inline void SetServerCertificate(Aws::Utils::ByteBuffer&& value) { m_serverCertificateHasBeenSet = true; m_serverCertificate = std::move(value); } /** *

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.

*/ inline CreateLocationObjectStorageRequest& WithServerCertificate(const Aws::Utils::ByteBuffer& value) { SetServerCertificate(value); return *this;} /** *

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.

*/ inline CreateLocationObjectStorageRequest& WithServerCertificate(Aws::Utils::ByteBuffer&& value) { SetServerCertificate(std::move(value)); return *this;} private: Aws::String m_serverHostname; bool m_serverHostnameHasBeenSet = false; int m_serverPort; bool m_serverPortHasBeenSet = false; ObjectStorageServerProtocol m_serverProtocol; bool m_serverProtocolHasBeenSet = false; Aws::String m_subdirectory; bool m_subdirectoryHasBeenSet = false; Aws::String m_bucketName; bool m_bucketNameHasBeenSet = false; Aws::String m_accessKey; bool m_accessKeyHasBeenSet = false; Aws::String m_secretKey; bool m_secretKeyHasBeenSet = false; Aws::Vector m_agentArns; bool m_agentArnsHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::Utils::ByteBuffer m_serverCertificate; bool m_serverCertificateHasBeenSet = false; }; } // namespace Model } // namespace DataSync } // namespace Aws