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

See Also:

AWS * API Reference

*/ class DeleteDBInstanceRequest : public RDSRequest { public: AWS_RDS_API DeleteDBInstanceRequest(); // 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 "DeleteDBInstance"; } AWS_RDS_API Aws::String SerializePayload() const override; protected: AWS_RDS_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The DB instance identifier for the DB instance to be deleted. This parameter * isn't case-sensitive.

Constraints:

  • Must match the name * of an existing DB instance.

*/ inline const Aws::String& GetDBInstanceIdentifier() const{ return m_dBInstanceIdentifier; } /** *

The DB instance identifier for the DB instance to be deleted. This parameter * isn't case-sensitive.

Constraints:

  • Must match the name * of an existing DB instance.

*/ inline bool DBInstanceIdentifierHasBeenSet() const { return m_dBInstanceIdentifierHasBeenSet; } /** *

The DB instance identifier for the DB instance to be deleted. This parameter * isn't case-sensitive.

Constraints:

  • Must match the name * of an existing DB instance.

*/ inline void SetDBInstanceIdentifier(const Aws::String& value) { m_dBInstanceIdentifierHasBeenSet = true; m_dBInstanceIdentifier = value; } /** *

The DB instance identifier for the DB instance to be deleted. This parameter * isn't case-sensitive.

Constraints:

  • Must match the name * of an existing DB instance.

*/ inline void SetDBInstanceIdentifier(Aws::String&& value) { m_dBInstanceIdentifierHasBeenSet = true; m_dBInstanceIdentifier = std::move(value); } /** *

The DB instance identifier for the DB instance to be deleted. This parameter * isn't case-sensitive.

Constraints:

  • Must match the name * of an existing DB instance.

*/ inline void SetDBInstanceIdentifier(const char* value) { m_dBInstanceIdentifierHasBeenSet = true; m_dBInstanceIdentifier.assign(value); } /** *

The DB instance identifier for the DB instance to be deleted. This parameter * isn't case-sensitive.

Constraints:

  • Must match the name * of an existing DB instance.

*/ inline DeleteDBInstanceRequest& WithDBInstanceIdentifier(const Aws::String& value) { SetDBInstanceIdentifier(value); return *this;} /** *

The DB instance identifier for the DB instance to be deleted. This parameter * isn't case-sensitive.

Constraints:

  • Must match the name * of an existing DB instance.

*/ inline DeleteDBInstanceRequest& WithDBInstanceIdentifier(Aws::String&& value) { SetDBInstanceIdentifier(std::move(value)); return *this;} /** *

The DB instance identifier for the DB instance to be deleted. This parameter * isn't case-sensitive.

Constraints:

  • Must match the name * of an existing DB instance.

*/ inline DeleteDBInstanceRequest& WithDBInstanceIdentifier(const char* value) { SetDBInstanceIdentifier(value); return *this;} /** *

A value that indicates whether to skip the creation of a final DB snapshot * before deleting the instance. If you enable this parameter, RDS doesn't create a * DB snapshot. If you don't enable this parameter, RDS creates a DB snapshot * before the DB instance is deleted. By default, skip isn't enabled, and the DB * snapshot is created.

If you don't enable this parameter, you must * specify the FinalDBSnapshotIdentifier parameter.

*

When a DB instance is in a failure state and has a status of * failed, incompatible-restore, or * incompatible-network, RDS can delete the instance only if you * enable this parameter.

If you delete a read replica or an RDS Custom * instance, you must enable this setting.

This setting is required for RDS * Custom.

*/ inline bool GetSkipFinalSnapshot() const{ return m_skipFinalSnapshot; } /** *

A value that indicates whether to skip the creation of a final DB snapshot * before deleting the instance. If you enable this parameter, RDS doesn't create a * DB snapshot. If you don't enable this parameter, RDS creates a DB snapshot * before the DB instance is deleted. By default, skip isn't enabled, and the DB * snapshot is created.

If you don't enable this parameter, you must * specify the FinalDBSnapshotIdentifier parameter.

*

When a DB instance is in a failure state and has a status of * failed, incompatible-restore, or * incompatible-network, RDS can delete the instance only if you * enable this parameter.

If you delete a read replica or an RDS Custom * instance, you must enable this setting.

This setting is required for RDS * Custom.

*/ inline bool SkipFinalSnapshotHasBeenSet() const { return m_skipFinalSnapshotHasBeenSet; } /** *

A value that indicates whether to skip the creation of a final DB snapshot * before deleting the instance. If you enable this parameter, RDS doesn't create a * DB snapshot. If you don't enable this parameter, RDS creates a DB snapshot * before the DB instance is deleted. By default, skip isn't enabled, and the DB * snapshot is created.

If you don't enable this parameter, you must * specify the FinalDBSnapshotIdentifier parameter.

*

When a DB instance is in a failure state and has a status of * failed, incompatible-restore, or * incompatible-network, RDS can delete the instance only if you * enable this parameter.

If you delete a read replica or an RDS Custom * instance, you must enable this setting.

This setting is required for RDS * Custom.

*/ inline void SetSkipFinalSnapshot(bool value) { m_skipFinalSnapshotHasBeenSet = true; m_skipFinalSnapshot = value; } /** *

A value that indicates whether to skip the creation of a final DB snapshot * before deleting the instance. If you enable this parameter, RDS doesn't create a * DB snapshot. If you don't enable this parameter, RDS creates a DB snapshot * before the DB instance is deleted. By default, skip isn't enabled, and the DB * snapshot is created.

If you don't enable this parameter, you must * specify the FinalDBSnapshotIdentifier parameter.

*

When a DB instance is in a failure state and has a status of * failed, incompatible-restore, or * incompatible-network, RDS can delete the instance only if you * enable this parameter.

If you delete a read replica or an RDS Custom * instance, you must enable this setting.

This setting is required for RDS * Custom.

*/ inline DeleteDBInstanceRequest& WithSkipFinalSnapshot(bool value) { SetSkipFinalSnapshot(value); return *this;} /** *

The DBSnapshotIdentifier of the new DBSnapshot * created when the SkipFinalSnapshot parameter is disabled.

*

If you enable this parameter and also enable SkipFinalShapshot, the * command results in an error.

This setting doesn't apply to RDS * Custom.

Constraints:

  • Must be 1 to 255 letters or * numbers.

  • First character must be a letter.

  • *

    Can't end with a hyphen or contain two consecutive hyphens.

  • *

    Can't be specified when deleting a read replica.

*/ inline const Aws::String& GetFinalDBSnapshotIdentifier() const{ return m_finalDBSnapshotIdentifier; } /** *

The DBSnapshotIdentifier of the new DBSnapshot * created when the SkipFinalSnapshot parameter is disabled.

*

If you enable this parameter and also enable SkipFinalShapshot, the * command results in an error.

This setting doesn't apply to RDS * Custom.

Constraints:

  • Must be 1 to 255 letters or * numbers.

  • First character must be a letter.

  • *

    Can't end with a hyphen or contain two consecutive hyphens.

  • *

    Can't be specified when deleting a read replica.

*/ inline bool FinalDBSnapshotIdentifierHasBeenSet() const { return m_finalDBSnapshotIdentifierHasBeenSet; } /** *

The DBSnapshotIdentifier of the new DBSnapshot * created when the SkipFinalSnapshot parameter is disabled.

*

If you enable this parameter and also enable SkipFinalShapshot, the * command results in an error.

This setting doesn't apply to RDS * Custom.

Constraints:

  • Must be 1 to 255 letters or * numbers.

  • First character must be a letter.

  • *

    Can't end with a hyphen or contain two consecutive hyphens.

  • *

    Can't be specified when deleting a read replica.

*/ inline void SetFinalDBSnapshotIdentifier(const Aws::String& value) { m_finalDBSnapshotIdentifierHasBeenSet = true; m_finalDBSnapshotIdentifier = value; } /** *

The DBSnapshotIdentifier of the new DBSnapshot * created when the SkipFinalSnapshot parameter is disabled.

*

If you enable this parameter and also enable SkipFinalShapshot, the * command results in an error.

This setting doesn't apply to RDS * Custom.

Constraints:

  • Must be 1 to 255 letters or * numbers.

  • First character must be a letter.

  • *

    Can't end with a hyphen or contain two consecutive hyphens.

  • *

    Can't be specified when deleting a read replica.

*/ inline void SetFinalDBSnapshotIdentifier(Aws::String&& value) { m_finalDBSnapshotIdentifierHasBeenSet = true; m_finalDBSnapshotIdentifier = std::move(value); } /** *

The DBSnapshotIdentifier of the new DBSnapshot * created when the SkipFinalSnapshot parameter is disabled.

*

If you enable this parameter and also enable SkipFinalShapshot, the * command results in an error.

This setting doesn't apply to RDS * Custom.

Constraints:

  • Must be 1 to 255 letters or * numbers.

  • First character must be a letter.

  • *

    Can't end with a hyphen or contain two consecutive hyphens.

  • *

    Can't be specified when deleting a read replica.

*/ inline void SetFinalDBSnapshotIdentifier(const char* value) { m_finalDBSnapshotIdentifierHasBeenSet = true; m_finalDBSnapshotIdentifier.assign(value); } /** *

The DBSnapshotIdentifier of the new DBSnapshot * created when the SkipFinalSnapshot parameter is disabled.

*

If you enable this parameter and also enable SkipFinalShapshot, the * command results in an error.

This setting doesn't apply to RDS * Custom.

Constraints:

  • Must be 1 to 255 letters or * numbers.

  • First character must be a letter.

  • *

    Can't end with a hyphen or contain two consecutive hyphens.

  • *

    Can't be specified when deleting a read replica.

*/ inline DeleteDBInstanceRequest& WithFinalDBSnapshotIdentifier(const Aws::String& value) { SetFinalDBSnapshotIdentifier(value); return *this;} /** *

The DBSnapshotIdentifier of the new DBSnapshot * created when the SkipFinalSnapshot parameter is disabled.

*

If you enable this parameter and also enable SkipFinalShapshot, the * command results in an error.

This setting doesn't apply to RDS * Custom.

Constraints:

  • Must be 1 to 255 letters or * numbers.

  • First character must be a letter.

  • *

    Can't end with a hyphen or contain two consecutive hyphens.

  • *

    Can't be specified when deleting a read replica.

*/ inline DeleteDBInstanceRequest& WithFinalDBSnapshotIdentifier(Aws::String&& value) { SetFinalDBSnapshotIdentifier(std::move(value)); return *this;} /** *

The DBSnapshotIdentifier of the new DBSnapshot * created when the SkipFinalSnapshot parameter is disabled.

*

If you enable this parameter and also enable SkipFinalShapshot, the * command results in an error.

This setting doesn't apply to RDS * Custom.

Constraints:

  • Must be 1 to 255 letters or * numbers.

  • First character must be a letter.

  • *

    Can't end with a hyphen or contain two consecutive hyphens.

  • *

    Can't be specified when deleting a read replica.

*/ inline DeleteDBInstanceRequest& WithFinalDBSnapshotIdentifier(const char* value) { SetFinalDBSnapshotIdentifier(value); return *this;} /** *

A value that indicates whether to remove automated backups immediately after * the DB instance is deleted. This parameter isn't case-sensitive. The default is * to remove automated backups immediately after the DB instance is deleted.

*/ inline bool GetDeleteAutomatedBackups() const{ return m_deleteAutomatedBackups; } /** *

A value that indicates whether to remove automated backups immediately after * the DB instance is deleted. This parameter isn't case-sensitive. The default is * to remove automated backups immediately after the DB instance is deleted.

*/ inline bool DeleteAutomatedBackupsHasBeenSet() const { return m_deleteAutomatedBackupsHasBeenSet; } /** *

A value that indicates whether to remove automated backups immediately after * the DB instance is deleted. This parameter isn't case-sensitive. The default is * to remove automated backups immediately after the DB instance is deleted.

*/ inline void SetDeleteAutomatedBackups(bool value) { m_deleteAutomatedBackupsHasBeenSet = true; m_deleteAutomatedBackups = value; } /** *

A value that indicates whether to remove automated backups immediately after * the DB instance is deleted. This parameter isn't case-sensitive. The default is * to remove automated backups immediately after the DB instance is deleted.

*/ inline DeleteDBInstanceRequest& WithDeleteAutomatedBackups(bool value) { SetDeleteAutomatedBackups(value); return *this;} private: Aws::String m_dBInstanceIdentifier; bool m_dBInstanceIdentifierHasBeenSet = false; bool m_skipFinalSnapshot; bool m_skipFinalSnapshotHasBeenSet = false; Aws::String m_finalDBSnapshotIdentifier; bool m_finalDBSnapshotIdentifierHasBeenSet = false; bool m_deleteAutomatedBackups; bool m_deleteAutomatedBackupsHasBeenSet = false; }; } // namespace Model } // namespace RDS } // namespace Aws