1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/redshift/Redshift_EXPORTS.h> 8 #include <aws/redshift/RedshiftRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Redshift 15 { 16 namespace Model 17 { 18 19 /** 20 * <p/><p><h3>See Also:</h3> <a 21 * href="http://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/DeleteClusterMessage">AWS 22 * API Reference</a></p> 23 */ 24 class AWS_REDSHIFT_API DeleteClusterRequest : public RedshiftRequest 25 { 26 public: 27 DeleteClusterRequest(); 28 29 // Service request name is the Operation name which will send this request out, 30 // each operation should has unique request name, so that we can get operation's name from this request. 31 // Note: this is not true for response, multiple operations may have the same response name, 32 // so we can not get operation's name from response. GetServiceRequestName()33 inline virtual const char* GetServiceRequestName() const override { return "DeleteCluster"; } 34 35 Aws::String SerializePayload() const override; 36 37 protected: 38 void DumpBodyToUrl(Aws::Http::URI& uri ) const override; 39 40 public: 41 42 /** 43 * <p>The identifier of the cluster to be deleted.</p> <p>Constraints:</p> <ul> 44 * <li> <p>Must contain lowercase characters.</p> </li> <li> <p>Must contain from 1 45 * to 63 alphanumeric characters or hyphens.</p> </li> <li> <p>First character must 46 * be a letter.</p> </li> <li> <p>Cannot end with a hyphen or contain two 47 * consecutive hyphens.</p> </li> </ul> 48 */ GetClusterIdentifier()49 inline const Aws::String& GetClusterIdentifier() const{ return m_clusterIdentifier; } 50 51 /** 52 * <p>The identifier of the cluster to be deleted.</p> <p>Constraints:</p> <ul> 53 * <li> <p>Must contain lowercase characters.</p> </li> <li> <p>Must contain from 1 54 * to 63 alphanumeric characters or hyphens.</p> </li> <li> <p>First character must 55 * be a letter.</p> </li> <li> <p>Cannot end with a hyphen or contain two 56 * consecutive hyphens.</p> </li> </ul> 57 */ ClusterIdentifierHasBeenSet()58 inline bool ClusterIdentifierHasBeenSet() const { return m_clusterIdentifierHasBeenSet; } 59 60 /** 61 * <p>The identifier of the cluster to be deleted.</p> <p>Constraints:</p> <ul> 62 * <li> <p>Must contain lowercase characters.</p> </li> <li> <p>Must contain from 1 63 * to 63 alphanumeric characters or hyphens.</p> </li> <li> <p>First character must 64 * be a letter.</p> </li> <li> <p>Cannot end with a hyphen or contain two 65 * consecutive hyphens.</p> </li> </ul> 66 */ SetClusterIdentifier(const Aws::String & value)67 inline void SetClusterIdentifier(const Aws::String& value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier = value; } 68 69 /** 70 * <p>The identifier of the cluster to be deleted.</p> <p>Constraints:</p> <ul> 71 * <li> <p>Must contain lowercase characters.</p> </li> <li> <p>Must contain from 1 72 * to 63 alphanumeric characters or hyphens.</p> </li> <li> <p>First character must 73 * be a letter.</p> </li> <li> <p>Cannot end with a hyphen or contain two 74 * consecutive hyphens.</p> </li> </ul> 75 */ SetClusterIdentifier(Aws::String && value)76 inline void SetClusterIdentifier(Aws::String&& value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier = std::move(value); } 77 78 /** 79 * <p>The identifier of the cluster to be deleted.</p> <p>Constraints:</p> <ul> 80 * <li> <p>Must contain lowercase characters.</p> </li> <li> <p>Must contain from 1 81 * to 63 alphanumeric characters or hyphens.</p> </li> <li> <p>First character must 82 * be a letter.</p> </li> <li> <p>Cannot end with a hyphen or contain two 83 * consecutive hyphens.</p> </li> </ul> 84 */ SetClusterIdentifier(const char * value)85 inline void SetClusterIdentifier(const char* value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier.assign(value); } 86 87 /** 88 * <p>The identifier of the cluster to be deleted.</p> <p>Constraints:</p> <ul> 89 * <li> <p>Must contain lowercase characters.</p> </li> <li> <p>Must contain from 1 90 * to 63 alphanumeric characters or hyphens.</p> </li> <li> <p>First character must 91 * be a letter.</p> </li> <li> <p>Cannot end with a hyphen or contain two 92 * consecutive hyphens.</p> </li> </ul> 93 */ WithClusterIdentifier(const Aws::String & value)94 inline DeleteClusterRequest& WithClusterIdentifier(const Aws::String& value) { SetClusterIdentifier(value); return *this;} 95 96 /** 97 * <p>The identifier of the cluster to be deleted.</p> <p>Constraints:</p> <ul> 98 * <li> <p>Must contain lowercase characters.</p> </li> <li> <p>Must contain from 1 99 * to 63 alphanumeric characters or hyphens.</p> </li> <li> <p>First character must 100 * be a letter.</p> </li> <li> <p>Cannot end with a hyphen or contain two 101 * consecutive hyphens.</p> </li> </ul> 102 */ WithClusterIdentifier(Aws::String && value)103 inline DeleteClusterRequest& WithClusterIdentifier(Aws::String&& value) { SetClusterIdentifier(std::move(value)); return *this;} 104 105 /** 106 * <p>The identifier of the cluster to be deleted.</p> <p>Constraints:</p> <ul> 107 * <li> <p>Must contain lowercase characters.</p> </li> <li> <p>Must contain from 1 108 * to 63 alphanumeric characters or hyphens.</p> </li> <li> <p>First character must 109 * be a letter.</p> </li> <li> <p>Cannot end with a hyphen or contain two 110 * consecutive hyphens.</p> </li> </ul> 111 */ WithClusterIdentifier(const char * value)112 inline DeleteClusterRequest& WithClusterIdentifier(const char* value) { SetClusterIdentifier(value); return *this;} 113 114 115 /** 116 * <p>Determines whether a final snapshot of the cluster is created before Amazon 117 * Redshift deletes the cluster. If <code>true</code>, a final cluster snapshot is 118 * not created. If <code>false</code>, a final cluster snapshot is created before 119 * the cluster is deleted. </p> <p>The <i>FinalClusterSnapshotIdentifier</i> 120 * parameter must be specified if <i>SkipFinalClusterSnapshot</i> is 121 * <code>false</code>.</p> <p>Default: <code>false</code> </p> 122 */ GetSkipFinalClusterSnapshot()123 inline bool GetSkipFinalClusterSnapshot() const{ return m_skipFinalClusterSnapshot; } 124 125 /** 126 * <p>Determines whether a final snapshot of the cluster is created before Amazon 127 * Redshift deletes the cluster. If <code>true</code>, a final cluster snapshot is 128 * not created. If <code>false</code>, a final cluster snapshot is created before 129 * the cluster is deleted. </p> <p>The <i>FinalClusterSnapshotIdentifier</i> 130 * parameter must be specified if <i>SkipFinalClusterSnapshot</i> is 131 * <code>false</code>.</p> <p>Default: <code>false</code> </p> 132 */ SkipFinalClusterSnapshotHasBeenSet()133 inline bool SkipFinalClusterSnapshotHasBeenSet() const { return m_skipFinalClusterSnapshotHasBeenSet; } 134 135 /** 136 * <p>Determines whether a final snapshot of the cluster is created before Amazon 137 * Redshift deletes the cluster. If <code>true</code>, a final cluster snapshot is 138 * not created. If <code>false</code>, a final cluster snapshot is created before 139 * the cluster is deleted. </p> <p>The <i>FinalClusterSnapshotIdentifier</i> 140 * parameter must be specified if <i>SkipFinalClusterSnapshot</i> is 141 * <code>false</code>.</p> <p>Default: <code>false</code> </p> 142 */ SetSkipFinalClusterSnapshot(bool value)143 inline void SetSkipFinalClusterSnapshot(bool value) { m_skipFinalClusterSnapshotHasBeenSet = true; m_skipFinalClusterSnapshot = value; } 144 145 /** 146 * <p>Determines whether a final snapshot of the cluster is created before Amazon 147 * Redshift deletes the cluster. If <code>true</code>, a final cluster snapshot is 148 * not created. If <code>false</code>, a final cluster snapshot is created before 149 * the cluster is deleted. </p> <p>The <i>FinalClusterSnapshotIdentifier</i> 150 * parameter must be specified if <i>SkipFinalClusterSnapshot</i> is 151 * <code>false</code>.</p> <p>Default: <code>false</code> </p> 152 */ WithSkipFinalClusterSnapshot(bool value)153 inline DeleteClusterRequest& WithSkipFinalClusterSnapshot(bool value) { SetSkipFinalClusterSnapshot(value); return *this;} 154 155 156 /** 157 * <p>The identifier of the final snapshot that is to be created immediately before 158 * deleting the cluster. If this parameter is provided, 159 * <i>SkipFinalClusterSnapshot</i> must be <code>false</code>. </p> 160 * <p>Constraints:</p> <ul> <li> <p>Must be 1 to 255 alphanumeric characters.</p> 161 * </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Cannot end 162 * with a hyphen or contain two consecutive hyphens.</p> </li> </ul> 163 */ GetFinalClusterSnapshotIdentifier()164 inline const Aws::String& GetFinalClusterSnapshotIdentifier() const{ return m_finalClusterSnapshotIdentifier; } 165 166 /** 167 * <p>The identifier of the final snapshot that is to be created immediately before 168 * deleting the cluster. If this parameter is provided, 169 * <i>SkipFinalClusterSnapshot</i> must be <code>false</code>. </p> 170 * <p>Constraints:</p> <ul> <li> <p>Must be 1 to 255 alphanumeric characters.</p> 171 * </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Cannot end 172 * with a hyphen or contain two consecutive hyphens.</p> </li> </ul> 173 */ FinalClusterSnapshotIdentifierHasBeenSet()174 inline bool FinalClusterSnapshotIdentifierHasBeenSet() const { return m_finalClusterSnapshotIdentifierHasBeenSet; } 175 176 /** 177 * <p>The identifier of the final snapshot that is to be created immediately before 178 * deleting the cluster. If this parameter is provided, 179 * <i>SkipFinalClusterSnapshot</i> must be <code>false</code>. </p> 180 * <p>Constraints:</p> <ul> <li> <p>Must be 1 to 255 alphanumeric characters.</p> 181 * </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Cannot end 182 * with a hyphen or contain two consecutive hyphens.</p> </li> </ul> 183 */ SetFinalClusterSnapshotIdentifier(const Aws::String & value)184 inline void SetFinalClusterSnapshotIdentifier(const Aws::String& value) { m_finalClusterSnapshotIdentifierHasBeenSet = true; m_finalClusterSnapshotIdentifier = value; } 185 186 /** 187 * <p>The identifier of the final snapshot that is to be created immediately before 188 * deleting the cluster. If this parameter is provided, 189 * <i>SkipFinalClusterSnapshot</i> must be <code>false</code>. </p> 190 * <p>Constraints:</p> <ul> <li> <p>Must be 1 to 255 alphanumeric characters.</p> 191 * </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Cannot end 192 * with a hyphen or contain two consecutive hyphens.</p> </li> </ul> 193 */ SetFinalClusterSnapshotIdentifier(Aws::String && value)194 inline void SetFinalClusterSnapshotIdentifier(Aws::String&& value) { m_finalClusterSnapshotIdentifierHasBeenSet = true; m_finalClusterSnapshotIdentifier = std::move(value); } 195 196 /** 197 * <p>The identifier of the final snapshot that is to be created immediately before 198 * deleting the cluster. If this parameter is provided, 199 * <i>SkipFinalClusterSnapshot</i> must be <code>false</code>. </p> 200 * <p>Constraints:</p> <ul> <li> <p>Must be 1 to 255 alphanumeric characters.</p> 201 * </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Cannot end 202 * with a hyphen or contain two consecutive hyphens.</p> </li> </ul> 203 */ SetFinalClusterSnapshotIdentifier(const char * value)204 inline void SetFinalClusterSnapshotIdentifier(const char* value) { m_finalClusterSnapshotIdentifierHasBeenSet = true; m_finalClusterSnapshotIdentifier.assign(value); } 205 206 /** 207 * <p>The identifier of the final snapshot that is to be created immediately before 208 * deleting the cluster. If this parameter is provided, 209 * <i>SkipFinalClusterSnapshot</i> must be <code>false</code>. </p> 210 * <p>Constraints:</p> <ul> <li> <p>Must be 1 to 255 alphanumeric characters.</p> 211 * </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Cannot end 212 * with a hyphen or contain two consecutive hyphens.</p> </li> </ul> 213 */ WithFinalClusterSnapshotIdentifier(const Aws::String & value)214 inline DeleteClusterRequest& WithFinalClusterSnapshotIdentifier(const Aws::String& value) { SetFinalClusterSnapshotIdentifier(value); return *this;} 215 216 /** 217 * <p>The identifier of the final snapshot that is to be created immediately before 218 * deleting the cluster. If this parameter is provided, 219 * <i>SkipFinalClusterSnapshot</i> must be <code>false</code>. </p> 220 * <p>Constraints:</p> <ul> <li> <p>Must be 1 to 255 alphanumeric characters.</p> 221 * </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Cannot end 222 * with a hyphen or contain two consecutive hyphens.</p> </li> </ul> 223 */ WithFinalClusterSnapshotIdentifier(Aws::String && value)224 inline DeleteClusterRequest& WithFinalClusterSnapshotIdentifier(Aws::String&& value) { SetFinalClusterSnapshotIdentifier(std::move(value)); return *this;} 225 226 /** 227 * <p>The identifier of the final snapshot that is to be created immediately before 228 * deleting the cluster. If this parameter is provided, 229 * <i>SkipFinalClusterSnapshot</i> must be <code>false</code>. </p> 230 * <p>Constraints:</p> <ul> <li> <p>Must be 1 to 255 alphanumeric characters.</p> 231 * </li> <li> <p>First character must be a letter.</p> </li> <li> <p>Cannot end 232 * with a hyphen or contain two consecutive hyphens.</p> </li> </ul> 233 */ WithFinalClusterSnapshotIdentifier(const char * value)234 inline DeleteClusterRequest& WithFinalClusterSnapshotIdentifier(const char* value) { SetFinalClusterSnapshotIdentifier(value); return *this;} 235 236 237 /** 238 * <p>The number of days that a manual snapshot is retained. If the value is -1, 239 * the manual snapshot is retained indefinitely.</p> <p>The value must be either -1 240 * or an integer between 1 and 3,653.</p> <p>The default value is -1.</p> 241 */ GetFinalClusterSnapshotRetentionPeriod()242 inline int GetFinalClusterSnapshotRetentionPeriod() const{ return m_finalClusterSnapshotRetentionPeriod; } 243 244 /** 245 * <p>The number of days that a manual snapshot is retained. If the value is -1, 246 * the manual snapshot is retained indefinitely.</p> <p>The value must be either -1 247 * or an integer between 1 and 3,653.</p> <p>The default value is -1.</p> 248 */ FinalClusterSnapshotRetentionPeriodHasBeenSet()249 inline bool FinalClusterSnapshotRetentionPeriodHasBeenSet() const { return m_finalClusterSnapshotRetentionPeriodHasBeenSet; } 250 251 /** 252 * <p>The number of days that a manual snapshot is retained. If the value is -1, 253 * the manual snapshot is retained indefinitely.</p> <p>The value must be either -1 254 * or an integer between 1 and 3,653.</p> <p>The default value is -1.</p> 255 */ SetFinalClusterSnapshotRetentionPeriod(int value)256 inline void SetFinalClusterSnapshotRetentionPeriod(int value) { m_finalClusterSnapshotRetentionPeriodHasBeenSet = true; m_finalClusterSnapshotRetentionPeriod = value; } 257 258 /** 259 * <p>The number of days that a manual snapshot is retained. If the value is -1, 260 * the manual snapshot is retained indefinitely.</p> <p>The value must be either -1 261 * or an integer between 1 and 3,653.</p> <p>The default value is -1.</p> 262 */ WithFinalClusterSnapshotRetentionPeriod(int value)263 inline DeleteClusterRequest& WithFinalClusterSnapshotRetentionPeriod(int value) { SetFinalClusterSnapshotRetentionPeriod(value); return *this;} 264 265 private: 266 267 Aws::String m_clusterIdentifier; 268 bool m_clusterIdentifierHasBeenSet; 269 270 bool m_skipFinalClusterSnapshot; 271 bool m_skipFinalClusterSnapshotHasBeenSet; 272 273 Aws::String m_finalClusterSnapshotIdentifier; 274 bool m_finalClusterSnapshotIdentifierHasBeenSet; 275 276 int m_finalClusterSnapshotRetentionPeriod; 277 bool m_finalClusterSnapshotRetentionPeriodHasBeenSet; 278 }; 279 280 } // namespace Model 281 } // namespace Redshift 282 } // namespace Aws 283