/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace SMS { namespace Model { /** */ class CreateReplicationJobRequest : public SMSRequest { public: AWS_SMS_API CreateReplicationJobRequest(); // 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 "CreateReplicationJob"; } AWS_SMS_API Aws::String SerializePayload() const override; AWS_SMS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The ID of the server.

*/ inline const Aws::String& GetServerId() const{ return m_serverId; } /** *

The ID of the server.

*/ inline bool ServerIdHasBeenSet() const { return m_serverIdHasBeenSet; } /** *

The ID of the server.

*/ inline void SetServerId(const Aws::String& value) { m_serverIdHasBeenSet = true; m_serverId = value; } /** *

The ID of the server.

*/ inline void SetServerId(Aws::String&& value) { m_serverIdHasBeenSet = true; m_serverId = std::move(value); } /** *

The ID of the server.

*/ inline void SetServerId(const char* value) { m_serverIdHasBeenSet = true; m_serverId.assign(value); } /** *

The ID of the server.

*/ inline CreateReplicationJobRequest& WithServerId(const Aws::String& value) { SetServerId(value); return *this;} /** *

The ID of the server.

*/ inline CreateReplicationJobRequest& WithServerId(Aws::String&& value) { SetServerId(std::move(value)); return *this;} /** *

The ID of the server.

*/ inline CreateReplicationJobRequest& WithServerId(const char* value) { SetServerId(value); return *this;} /** *

The seed replication time.

*/ inline const Aws::Utils::DateTime& GetSeedReplicationTime() const{ return m_seedReplicationTime; } /** *

The seed replication time.

*/ inline bool SeedReplicationTimeHasBeenSet() const { return m_seedReplicationTimeHasBeenSet; } /** *

The seed replication time.

*/ inline void SetSeedReplicationTime(const Aws::Utils::DateTime& value) { m_seedReplicationTimeHasBeenSet = true; m_seedReplicationTime = value; } /** *

The seed replication time.

*/ inline void SetSeedReplicationTime(Aws::Utils::DateTime&& value) { m_seedReplicationTimeHasBeenSet = true; m_seedReplicationTime = std::move(value); } /** *

The seed replication time.

*/ inline CreateReplicationJobRequest& WithSeedReplicationTime(const Aws::Utils::DateTime& value) { SetSeedReplicationTime(value); return *this;} /** *

The seed replication time.

*/ inline CreateReplicationJobRequest& WithSeedReplicationTime(Aws::Utils::DateTime&& value) { SetSeedReplicationTime(std::move(value)); return *this;} /** *

The time between consecutive replication runs, in hours.

*/ inline int GetFrequency() const{ return m_frequency; } /** *

The time between consecutive replication runs, in hours.

*/ inline bool FrequencyHasBeenSet() const { return m_frequencyHasBeenSet; } /** *

The time between consecutive replication runs, in hours.

*/ inline void SetFrequency(int value) { m_frequencyHasBeenSet = true; m_frequency = value; } /** *

The time between consecutive replication runs, in hours.

*/ inline CreateReplicationJobRequest& WithFrequency(int value) { SetFrequency(value); return *this;} /** *

Indicates whether to run the replication job one time.

*/ inline bool GetRunOnce() const{ return m_runOnce; } /** *

Indicates whether to run the replication job one time.

*/ inline bool RunOnceHasBeenSet() const { return m_runOnceHasBeenSet; } /** *

Indicates whether to run the replication job one time.

*/ inline void SetRunOnce(bool value) { m_runOnceHasBeenSet = true; m_runOnce = value; } /** *

Indicates whether to run the replication job one time.

*/ inline CreateReplicationJobRequest& WithRunOnce(bool value) { SetRunOnce(value); return *this;} /** *

The license type to be used for the AMI created by a successful replication * run.

*/ inline const LicenseType& GetLicenseType() const{ return m_licenseType; } /** *

The license type to be used for the AMI created by a successful replication * run.

*/ inline bool LicenseTypeHasBeenSet() const { return m_licenseTypeHasBeenSet; } /** *

The license type to be used for the AMI created by a successful replication * run.

*/ inline void SetLicenseType(const LicenseType& value) { m_licenseTypeHasBeenSet = true; m_licenseType = value; } /** *

The license type to be used for the AMI created by a successful replication * run.

*/ inline void SetLicenseType(LicenseType&& value) { m_licenseTypeHasBeenSet = true; m_licenseType = std::move(value); } /** *

The license type to be used for the AMI created by a successful replication * run.

*/ inline CreateReplicationJobRequest& WithLicenseType(const LicenseType& value) { SetLicenseType(value); return *this;} /** *

The license type to be used for the AMI created by a successful replication * run.

*/ inline CreateReplicationJobRequest& WithLicenseType(LicenseType&& value) { SetLicenseType(std::move(value)); return *this;} /** *

The name of the IAM role to be used by the Server Migration Service.

*/ inline const Aws::String& GetRoleName() const{ return m_roleName; } /** *

The name of the IAM role to be used by the Server Migration Service.

*/ inline bool RoleNameHasBeenSet() const { return m_roleNameHasBeenSet; } /** *

The name of the IAM role to be used by the Server Migration Service.

*/ inline void SetRoleName(const Aws::String& value) { m_roleNameHasBeenSet = true; m_roleName = value; } /** *

The name of the IAM role to be used by the Server Migration Service.

*/ inline void SetRoleName(Aws::String&& value) { m_roleNameHasBeenSet = true; m_roleName = std::move(value); } /** *

The name of the IAM role to be used by the Server Migration Service.

*/ inline void SetRoleName(const char* value) { m_roleNameHasBeenSet = true; m_roleName.assign(value); } /** *

The name of the IAM role to be used by the Server Migration Service.

*/ inline CreateReplicationJobRequest& WithRoleName(const Aws::String& value) { SetRoleName(value); return *this;} /** *

The name of the IAM role to be used by the Server Migration Service.

*/ inline CreateReplicationJobRequest& WithRoleName(Aws::String&& value) { SetRoleName(std::move(value)); return *this;} /** *

The name of the IAM role to be used by the Server Migration Service.

*/ inline CreateReplicationJobRequest& WithRoleName(const char* value) { SetRoleName(value); return *this;} /** *

The description of the replication job.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description of the replication job.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description of the replication job.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description of the replication job.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description of the replication job.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description of the replication job.

*/ inline CreateReplicationJobRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description of the replication job.

*/ inline CreateReplicationJobRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description of the replication job.

*/ inline CreateReplicationJobRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The maximum number of SMS-created AMIs to retain. The oldest is deleted after * the maximum number is reached and a new AMI is created.

*/ inline int GetNumberOfRecentAmisToKeep() const{ return m_numberOfRecentAmisToKeep; } /** *

The maximum number of SMS-created AMIs to retain. The oldest is deleted after * the maximum number is reached and a new AMI is created.

*/ inline bool NumberOfRecentAmisToKeepHasBeenSet() const { return m_numberOfRecentAmisToKeepHasBeenSet; } /** *

The maximum number of SMS-created AMIs to retain. The oldest is deleted after * the maximum number is reached and a new AMI is created.

*/ inline void SetNumberOfRecentAmisToKeep(int value) { m_numberOfRecentAmisToKeepHasBeenSet = true; m_numberOfRecentAmisToKeep = value; } /** *

The maximum number of SMS-created AMIs to retain. The oldest is deleted after * the maximum number is reached and a new AMI is created.

*/ inline CreateReplicationJobRequest& WithNumberOfRecentAmisToKeep(int value) { SetNumberOfRecentAmisToKeep(value); return *this;} /** *

Indicates whether the replication job produces encrypted AMIs.

*/ inline bool GetEncrypted() const{ return m_encrypted; } /** *

Indicates whether the replication job produces encrypted AMIs.

*/ inline bool EncryptedHasBeenSet() const { return m_encryptedHasBeenSet; } /** *

Indicates whether the replication job produces encrypted AMIs.

*/ inline void SetEncrypted(bool value) { m_encryptedHasBeenSet = true; m_encrypted = value; } /** *

Indicates whether the replication job produces encrypted AMIs.

*/ inline CreateReplicationJobRequest& WithEncrypted(bool value) { SetEncrypted(value); return *this;} /** *

The ID of the KMS key for replication jobs that produce encrypted AMIs. This * value can be any of the following:

  • KMS key ID

  • *

    KMS key alias

  • ARN referring to the KMS key ID

  • *
  • ARN referring to the KMS key alias

If encrypted is * true but a KMS key ID is not specified, the customer's default KMS key * for Amazon EBS is used.

*/ inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; } /** *

The ID of the KMS key for replication jobs that produce encrypted AMIs. This * value can be any of the following:

  • KMS key ID

  • *

    KMS key alias

  • ARN referring to the KMS key ID

  • *
  • ARN referring to the KMS key alias

If encrypted is * true but a KMS key ID is not specified, the customer's default KMS key * for Amazon EBS is used.

*/ inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; } /** *

The ID of the KMS key for replication jobs that produce encrypted AMIs. This * value can be any of the following:

  • KMS key ID

  • *

    KMS key alias

  • ARN referring to the KMS key ID

  • *
  • ARN referring to the KMS key alias

If encrypted is * true but a KMS key ID is not specified, the customer's default KMS key * for Amazon EBS is used.

*/ inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; } /** *

The ID of the KMS key for replication jobs that produce encrypted AMIs. This * value can be any of the following:

  • KMS key ID

  • *

    KMS key alias

  • ARN referring to the KMS key ID

  • *
  • ARN referring to the KMS key alias

If encrypted is * true but a KMS key ID is not specified, the customer's default KMS key * for Amazon EBS is used.

*/ inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); } /** *

The ID of the KMS key for replication jobs that produce encrypted AMIs. This * value can be any of the following:

  • KMS key ID

  • *

    KMS key alias

  • ARN referring to the KMS key ID

  • *
  • ARN referring to the KMS key alias

If encrypted is * true but a KMS key ID is not specified, the customer's default KMS key * for Amazon EBS is used.

*/ inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); } /** *

The ID of the KMS key for replication jobs that produce encrypted AMIs. This * value can be any of the following:

  • KMS key ID

  • *

    KMS key alias

  • ARN referring to the KMS key ID

  • *
  • ARN referring to the KMS key alias

If encrypted is * true but a KMS key ID is not specified, the customer's default KMS key * for Amazon EBS is used.

*/ inline CreateReplicationJobRequest& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;} /** *

The ID of the KMS key for replication jobs that produce encrypted AMIs. This * value can be any of the following:

  • KMS key ID

  • *

    KMS key alias

  • ARN referring to the KMS key ID

  • *
  • ARN referring to the KMS key alias

If encrypted is * true but a KMS key ID is not specified, the customer's default KMS key * for Amazon EBS is used.

*/ inline CreateReplicationJobRequest& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;} /** *

The ID of the KMS key for replication jobs that produce encrypted AMIs. This * value can be any of the following:

  • KMS key ID

  • *

    KMS key alias

  • ARN referring to the KMS key ID

  • *
  • ARN referring to the KMS key alias

If encrypted is * true but a KMS key ID is not specified, the customer's default KMS key * for Amazon EBS is used.

*/ inline CreateReplicationJobRequest& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} private: Aws::String m_serverId; bool m_serverIdHasBeenSet = false; Aws::Utils::DateTime m_seedReplicationTime; bool m_seedReplicationTimeHasBeenSet = false; int m_frequency; bool m_frequencyHasBeenSet = false; bool m_runOnce; bool m_runOnceHasBeenSet = false; LicenseType m_licenseType; bool m_licenseTypeHasBeenSet = false; Aws::String m_roleName; bool m_roleNameHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; int m_numberOfRecentAmisToKeep; bool m_numberOfRecentAmisToKeepHasBeenSet = false; bool m_encrypted; bool m_encryptedHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; }; } // namespace Model } // namespace SMS } // namespace Aws