/** * 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 namespace Aws { namespace Lightsail { namespace Model { /** */ class CreateRelationalDatabaseFromSnapshotRequest : public LightsailRequest { public: AWS_LIGHTSAIL_API CreateRelationalDatabaseFromSnapshotRequest(); // 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 "CreateRelationalDatabaseFromSnapshot"; } AWS_LIGHTSAIL_API Aws::String SerializePayload() const override; AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name to use for your new Lightsail database resource.

*

Constraints:

  • Must contain from 2 to 255 alphanumeric * characters, or hyphens.

  • The first and last character must be a * letter or number.

*/ inline const Aws::String& GetRelationalDatabaseName() const{ return m_relationalDatabaseName; } /** *

The name to use for your new Lightsail database resource.

*

Constraints:

  • Must contain from 2 to 255 alphanumeric * characters, or hyphens.

  • The first and last character must be a * letter or number.

*/ inline bool RelationalDatabaseNameHasBeenSet() const { return m_relationalDatabaseNameHasBeenSet; } /** *

The name to use for your new Lightsail database resource.

*

Constraints:

  • Must contain from 2 to 255 alphanumeric * characters, or hyphens.

  • The first and last character must be a * letter or number.

*/ inline void SetRelationalDatabaseName(const Aws::String& value) { m_relationalDatabaseNameHasBeenSet = true; m_relationalDatabaseName = value; } /** *

The name to use for your new Lightsail database resource.

*

Constraints:

  • Must contain from 2 to 255 alphanumeric * characters, or hyphens.

  • The first and last character must be a * letter or number.

*/ inline void SetRelationalDatabaseName(Aws::String&& value) { m_relationalDatabaseNameHasBeenSet = true; m_relationalDatabaseName = std::move(value); } /** *

The name to use for your new Lightsail database resource.

*

Constraints:

  • Must contain from 2 to 255 alphanumeric * characters, or hyphens.

  • The first and last character must be a * letter or number.

*/ inline void SetRelationalDatabaseName(const char* value) { m_relationalDatabaseNameHasBeenSet = true; m_relationalDatabaseName.assign(value); } /** *

The name to use for your new Lightsail database resource.

*

Constraints:

  • Must contain from 2 to 255 alphanumeric * characters, or hyphens.

  • The first and last character must be a * letter or number.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithRelationalDatabaseName(const Aws::String& value) { SetRelationalDatabaseName(value); return *this;} /** *

The name to use for your new Lightsail database resource.

*

Constraints:

  • Must contain from 2 to 255 alphanumeric * characters, or hyphens.

  • The first and last character must be a * letter or number.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithRelationalDatabaseName(Aws::String&& value) { SetRelationalDatabaseName(std::move(value)); return *this;} /** *

The name to use for your new Lightsail database resource.

*

Constraints:

  • Must contain from 2 to 255 alphanumeric * characters, or hyphens.

  • The first and last character must be a * letter or number.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithRelationalDatabaseName(const char* value) { SetRelationalDatabaseName(value); return *this;} /** *

The Availability Zone in which to create your new database. Use the * us-east-2a case-sensitive format.

You can get a list of * Availability Zones by using the get regions operation. Be sure to * add the include relational database Availability Zones parameter to * your request.

*/ inline const Aws::String& GetAvailabilityZone() const{ return m_availabilityZone; } /** *

The Availability Zone in which to create your new database. Use the * us-east-2a case-sensitive format.

You can get a list of * Availability Zones by using the get regions operation. Be sure to * add the include relational database Availability Zones parameter to * your request.

*/ inline bool AvailabilityZoneHasBeenSet() const { return m_availabilityZoneHasBeenSet; } /** *

The Availability Zone in which to create your new database. Use the * us-east-2a case-sensitive format.

You can get a list of * Availability Zones by using the get regions operation. Be sure to * add the include relational database Availability Zones parameter to * your request.

*/ inline void SetAvailabilityZone(const Aws::String& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = value; } /** *

The Availability Zone in which to create your new database. Use the * us-east-2a case-sensitive format.

You can get a list of * Availability Zones by using the get regions operation. Be sure to * add the include relational database Availability Zones parameter to * your request.

*/ inline void SetAvailabilityZone(Aws::String&& value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone = std::move(value); } /** *

The Availability Zone in which to create your new database. Use the * us-east-2a case-sensitive format.

You can get a list of * Availability Zones by using the get regions operation. Be sure to * add the include relational database Availability Zones parameter to * your request.

*/ inline void SetAvailabilityZone(const char* value) { m_availabilityZoneHasBeenSet = true; m_availabilityZone.assign(value); } /** *

The Availability Zone in which to create your new database. Use the * us-east-2a case-sensitive format.

You can get a list of * Availability Zones by using the get regions operation. Be sure to * add the include relational database Availability Zones parameter to * your request.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithAvailabilityZone(const Aws::String& value) { SetAvailabilityZone(value); return *this;} /** *

The Availability Zone in which to create your new database. Use the * us-east-2a case-sensitive format.

You can get a list of * Availability Zones by using the get regions operation. Be sure to * add the include relational database Availability Zones parameter to * your request.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithAvailabilityZone(Aws::String&& value) { SetAvailabilityZone(std::move(value)); return *this;} /** *

The Availability Zone in which to create your new database. Use the * us-east-2a case-sensitive format.

You can get a list of * Availability Zones by using the get regions operation. Be sure to * add the include relational database Availability Zones parameter to * your request.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithAvailabilityZone(const char* value) { SetAvailabilityZone(value); return *this;} /** *

Specifies the accessibility options for your new database. A value of * true specifies a database that is available to resources outside of * your Lightsail account. A value of false specifies a database that * is available only to your Lightsail resources in the same region as your * database.

*/ inline bool GetPubliclyAccessible() const{ return m_publiclyAccessible; } /** *

Specifies the accessibility options for your new database. A value of * true specifies a database that is available to resources outside of * your Lightsail account. A value of false specifies a database that * is available only to your Lightsail resources in the same region as your * database.

*/ inline bool PubliclyAccessibleHasBeenSet() const { return m_publiclyAccessibleHasBeenSet; } /** *

Specifies the accessibility options for your new database. A value of * true specifies a database that is available to resources outside of * your Lightsail account. A value of false specifies a database that * is available only to your Lightsail resources in the same region as your * database.

*/ inline void SetPubliclyAccessible(bool value) { m_publiclyAccessibleHasBeenSet = true; m_publiclyAccessible = value; } /** *

Specifies the accessibility options for your new database. A value of * true specifies a database that is available to resources outside of * your Lightsail account. A value of false specifies a database that * is available only to your Lightsail resources in the same region as your * database.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithPubliclyAccessible(bool value) { SetPubliclyAccessible(value); return *this;} /** *

The name of the database snapshot from which to create your new database.

*/ inline const Aws::String& GetRelationalDatabaseSnapshotName() const{ return m_relationalDatabaseSnapshotName; } /** *

The name of the database snapshot from which to create your new database.

*/ inline bool RelationalDatabaseSnapshotNameHasBeenSet() const { return m_relationalDatabaseSnapshotNameHasBeenSet; } /** *

The name of the database snapshot from which to create your new database.

*/ inline void SetRelationalDatabaseSnapshotName(const Aws::String& value) { m_relationalDatabaseSnapshotNameHasBeenSet = true; m_relationalDatabaseSnapshotName = value; } /** *

The name of the database snapshot from which to create your new database.

*/ inline void SetRelationalDatabaseSnapshotName(Aws::String&& value) { m_relationalDatabaseSnapshotNameHasBeenSet = true; m_relationalDatabaseSnapshotName = std::move(value); } /** *

The name of the database snapshot from which to create your new database.

*/ inline void SetRelationalDatabaseSnapshotName(const char* value) { m_relationalDatabaseSnapshotNameHasBeenSet = true; m_relationalDatabaseSnapshotName.assign(value); } /** *

The name of the database snapshot from which to create your new database.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithRelationalDatabaseSnapshotName(const Aws::String& value) { SetRelationalDatabaseSnapshotName(value); return *this;} /** *

The name of the database snapshot from which to create your new database.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithRelationalDatabaseSnapshotName(Aws::String&& value) { SetRelationalDatabaseSnapshotName(std::move(value)); return *this;} /** *

The name of the database snapshot from which to create your new database.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithRelationalDatabaseSnapshotName(const char* value) { SetRelationalDatabaseSnapshotName(value); return *this;} /** *

The bundle ID for your new database. A bundle describes the performance * specifications for your database.

You can get a list of database bundle * IDs by using the get relational database bundles operation.

*

When creating a new database from a snapshot, you cannot choose a bundle that * is smaller than the bundle of the source database.

*/ inline const Aws::String& GetRelationalDatabaseBundleId() const{ return m_relationalDatabaseBundleId; } /** *

The bundle ID for your new database. A bundle describes the performance * specifications for your database.

You can get a list of database bundle * IDs by using the get relational database bundles operation.

*

When creating a new database from a snapshot, you cannot choose a bundle that * is smaller than the bundle of the source database.

*/ inline bool RelationalDatabaseBundleIdHasBeenSet() const { return m_relationalDatabaseBundleIdHasBeenSet; } /** *

The bundle ID for your new database. A bundle describes the performance * specifications for your database.

You can get a list of database bundle * IDs by using the get relational database bundles operation.

*

When creating a new database from a snapshot, you cannot choose a bundle that * is smaller than the bundle of the source database.

*/ inline void SetRelationalDatabaseBundleId(const Aws::String& value) { m_relationalDatabaseBundleIdHasBeenSet = true; m_relationalDatabaseBundleId = value; } /** *

The bundle ID for your new database. A bundle describes the performance * specifications for your database.

You can get a list of database bundle * IDs by using the get relational database bundles operation.

*

When creating a new database from a snapshot, you cannot choose a bundle that * is smaller than the bundle of the source database.

*/ inline void SetRelationalDatabaseBundleId(Aws::String&& value) { m_relationalDatabaseBundleIdHasBeenSet = true; m_relationalDatabaseBundleId = std::move(value); } /** *

The bundle ID for your new database. A bundle describes the performance * specifications for your database.

You can get a list of database bundle * IDs by using the get relational database bundles operation.

*

When creating a new database from a snapshot, you cannot choose a bundle that * is smaller than the bundle of the source database.

*/ inline void SetRelationalDatabaseBundleId(const char* value) { m_relationalDatabaseBundleIdHasBeenSet = true; m_relationalDatabaseBundleId.assign(value); } /** *

The bundle ID for your new database. A bundle describes the performance * specifications for your database.

You can get a list of database bundle * IDs by using the get relational database bundles operation.

*

When creating a new database from a snapshot, you cannot choose a bundle that * is smaller than the bundle of the source database.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithRelationalDatabaseBundleId(const Aws::String& value) { SetRelationalDatabaseBundleId(value); return *this;} /** *

The bundle ID for your new database. A bundle describes the performance * specifications for your database.

You can get a list of database bundle * IDs by using the get relational database bundles operation.

*

When creating a new database from a snapshot, you cannot choose a bundle that * is smaller than the bundle of the source database.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithRelationalDatabaseBundleId(Aws::String&& value) { SetRelationalDatabaseBundleId(std::move(value)); return *this;} /** *

The bundle ID for your new database. A bundle describes the performance * specifications for your database.

You can get a list of database bundle * IDs by using the get relational database bundles operation.

*

When creating a new database from a snapshot, you cannot choose a bundle that * is smaller than the bundle of the source database.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithRelationalDatabaseBundleId(const char* value) { SetRelationalDatabaseBundleId(value); return *this;} /** *

The name of the source database.

*/ inline const Aws::String& GetSourceRelationalDatabaseName() const{ return m_sourceRelationalDatabaseName; } /** *

The name of the source database.

*/ inline bool SourceRelationalDatabaseNameHasBeenSet() const { return m_sourceRelationalDatabaseNameHasBeenSet; } /** *

The name of the source database.

*/ inline void SetSourceRelationalDatabaseName(const Aws::String& value) { m_sourceRelationalDatabaseNameHasBeenSet = true; m_sourceRelationalDatabaseName = value; } /** *

The name of the source database.

*/ inline void SetSourceRelationalDatabaseName(Aws::String&& value) { m_sourceRelationalDatabaseNameHasBeenSet = true; m_sourceRelationalDatabaseName = std::move(value); } /** *

The name of the source database.

*/ inline void SetSourceRelationalDatabaseName(const char* value) { m_sourceRelationalDatabaseNameHasBeenSet = true; m_sourceRelationalDatabaseName.assign(value); } /** *

The name of the source database.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithSourceRelationalDatabaseName(const Aws::String& value) { SetSourceRelationalDatabaseName(value); return *this;} /** *

The name of the source database.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithSourceRelationalDatabaseName(Aws::String&& value) { SetSourceRelationalDatabaseName(std::move(value)); return *this;} /** *

The name of the source database.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithSourceRelationalDatabaseName(const char* value) { SetSourceRelationalDatabaseName(value); return *this;} /** *

The date and time to restore your database from.

Constraints:

    *
  • Must be before the latest restorable time for the database.

  • *
  • Cannot be specified if the use latest restorable time * parameter is true.

  • Specified in Coordinated * Universal Time (UTC).

  • Specified in the Unix time format.

    *

    For example, if you wish to use a restore time of October 1, 2018, at 8 PM * UTC, then you input 1538424000 as the restore time.

*/ inline const Aws::Utils::DateTime& GetRestoreTime() const{ return m_restoreTime; } /** *

The date and time to restore your database from.

Constraints:

    *
  • Must be before the latest restorable time for the database.

  • *
  • Cannot be specified if the use latest restorable time * parameter is true.

  • Specified in Coordinated * Universal Time (UTC).

  • Specified in the Unix time format.

    *

    For example, if you wish to use a restore time of October 1, 2018, at 8 PM * UTC, then you input 1538424000 as the restore time.

*/ inline bool RestoreTimeHasBeenSet() const { return m_restoreTimeHasBeenSet; } /** *

The date and time to restore your database from.

Constraints:

    *
  • Must be before the latest restorable time for the database.

  • *
  • Cannot be specified if the use latest restorable time * parameter is true.

  • Specified in Coordinated * Universal Time (UTC).

  • Specified in the Unix time format.

    *

    For example, if you wish to use a restore time of October 1, 2018, at 8 PM * UTC, then you input 1538424000 as the restore time.

*/ inline void SetRestoreTime(const Aws::Utils::DateTime& value) { m_restoreTimeHasBeenSet = true; m_restoreTime = value; } /** *

The date and time to restore your database from.

Constraints:

    *
  • Must be before the latest restorable time for the database.

  • *
  • Cannot be specified if the use latest restorable time * parameter is true.

  • Specified in Coordinated * Universal Time (UTC).

  • Specified in the Unix time format.

    *

    For example, if you wish to use a restore time of October 1, 2018, at 8 PM * UTC, then you input 1538424000 as the restore time.

*/ inline void SetRestoreTime(Aws::Utils::DateTime&& value) { m_restoreTimeHasBeenSet = true; m_restoreTime = std::move(value); } /** *

The date and time to restore your database from.

Constraints:

    *
  • Must be before the latest restorable time for the database.

  • *
  • Cannot be specified if the use latest restorable time * parameter is true.

  • Specified in Coordinated * Universal Time (UTC).

  • Specified in the Unix time format.

    *

    For example, if you wish to use a restore time of October 1, 2018, at 8 PM * UTC, then you input 1538424000 as the restore time.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithRestoreTime(const Aws::Utils::DateTime& value) { SetRestoreTime(value); return *this;} /** *

The date and time to restore your database from.

Constraints:

    *
  • Must be before the latest restorable time for the database.

  • *
  • Cannot be specified if the use latest restorable time * parameter is true.

  • Specified in Coordinated * Universal Time (UTC).

  • Specified in the Unix time format.

    *

    For example, if you wish to use a restore time of October 1, 2018, at 8 PM * UTC, then you input 1538424000 as the restore time.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithRestoreTime(Aws::Utils::DateTime&& value) { SetRestoreTime(std::move(value)); return *this;} /** *

Specifies whether your database is restored from the latest backup time. A * value of true restores from the latest backup time.

*

Default: false

Constraints: Cannot be specified if the * restore time parameter is provided.

*/ inline bool GetUseLatestRestorableTime() const{ return m_useLatestRestorableTime; } /** *

Specifies whether your database is restored from the latest backup time. A * value of true restores from the latest backup time.

*

Default: false

Constraints: Cannot be specified if the * restore time parameter is provided.

*/ inline bool UseLatestRestorableTimeHasBeenSet() const { return m_useLatestRestorableTimeHasBeenSet; } /** *

Specifies whether your database is restored from the latest backup time. A * value of true restores from the latest backup time.

*

Default: false

Constraints: Cannot be specified if the * restore time parameter is provided.

*/ inline void SetUseLatestRestorableTime(bool value) { m_useLatestRestorableTimeHasBeenSet = true; m_useLatestRestorableTime = value; } /** *

Specifies whether your database is restored from the latest backup time. A * value of true restores from the latest backup time.

*

Default: false

Constraints: Cannot be specified if the * restore time parameter is provided.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& WithUseLatestRestorableTime(bool value) { SetUseLatestRestorableTime(value); return *this;} /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

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

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

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

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

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

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

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

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

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

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

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

The tag keys and optional values to add to the resource during create.

*

Use the TagResource action to tag a resource after it's * created.

*/ inline CreateRelationalDatabaseFromSnapshotRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_relationalDatabaseName; bool m_relationalDatabaseNameHasBeenSet = false; Aws::String m_availabilityZone; bool m_availabilityZoneHasBeenSet = false; bool m_publiclyAccessible; bool m_publiclyAccessibleHasBeenSet = false; Aws::String m_relationalDatabaseSnapshotName; bool m_relationalDatabaseSnapshotNameHasBeenSet = false; Aws::String m_relationalDatabaseBundleId; bool m_relationalDatabaseBundleIdHasBeenSet = false; Aws::String m_sourceRelationalDatabaseName; bool m_sourceRelationalDatabaseNameHasBeenSet = false; Aws::Utils::DateTime m_restoreTime; bool m_restoreTimeHasBeenSet = false; bool m_useLatestRestorableTime; bool m_useLatestRestorableTimeHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws