/** * 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 RedshiftDataAPIService { namespace Model { /** */ class ExecuteStatementRequest : public RedshiftDataAPIServiceRequest { public: AWS_REDSHIFTDATAAPISERVICE_API ExecuteStatementRequest(); // 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 "ExecuteStatement"; } AWS_REDSHIFTDATAAPISERVICE_API Aws::String SerializePayload() const override; AWS_REDSHIFTDATAAPISERVICE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request.

*/ inline const Aws::String& GetClientToken() const{ return m_clientToken; } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request.

*/ inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request.

*/ inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request.

*/ inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request.

*/ inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); } /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request.

*/ inline ExecuteStatementRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;} /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request.

*/ inline ExecuteStatementRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;} /** *

A unique, case-sensitive identifier that you provide to ensure the * idempotency of the request.

*/ inline ExecuteStatementRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;} /** *

The cluster identifier. This parameter is required when connecting to a * cluster and authenticating using either Secrets Manager or temporary * credentials.

*/ inline const Aws::String& GetClusterIdentifier() const{ return m_clusterIdentifier; } /** *

The cluster identifier. This parameter is required when connecting to a * cluster and authenticating using either Secrets Manager or temporary * credentials.

*/ inline bool ClusterIdentifierHasBeenSet() const { return m_clusterIdentifierHasBeenSet; } /** *

The cluster identifier. This parameter is required when connecting to a * cluster and authenticating using either Secrets Manager or temporary * credentials.

*/ inline void SetClusterIdentifier(const Aws::String& value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier = value; } /** *

The cluster identifier. This parameter is required when connecting to a * cluster and authenticating using either Secrets Manager or temporary * credentials.

*/ inline void SetClusterIdentifier(Aws::String&& value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier = std::move(value); } /** *

The cluster identifier. This parameter is required when connecting to a * cluster and authenticating using either Secrets Manager or temporary * credentials.

*/ inline void SetClusterIdentifier(const char* value) { m_clusterIdentifierHasBeenSet = true; m_clusterIdentifier.assign(value); } /** *

The cluster identifier. This parameter is required when connecting to a * cluster and authenticating using either Secrets Manager or temporary * credentials.

*/ inline ExecuteStatementRequest& WithClusterIdentifier(const Aws::String& value) { SetClusterIdentifier(value); return *this;} /** *

The cluster identifier. This parameter is required when connecting to a * cluster and authenticating using either Secrets Manager or temporary * credentials.

*/ inline ExecuteStatementRequest& WithClusterIdentifier(Aws::String&& value) { SetClusterIdentifier(std::move(value)); return *this;} /** *

The cluster identifier. This parameter is required when connecting to a * cluster and authenticating using either Secrets Manager or temporary * credentials.

*/ inline ExecuteStatementRequest& WithClusterIdentifier(const char* value) { SetClusterIdentifier(value); return *this;} /** *

The name of the database. This parameter is required when authenticating * using either Secrets Manager or temporary credentials.

*/ inline const Aws::String& GetDatabase() const{ return m_database; } /** *

The name of the database. This parameter is required when authenticating * using either Secrets Manager or temporary credentials.

*/ inline bool DatabaseHasBeenSet() const { return m_databaseHasBeenSet; } /** *

The name of the database. This parameter is required when authenticating * using either Secrets Manager or temporary credentials.

*/ inline void SetDatabase(const Aws::String& value) { m_databaseHasBeenSet = true; m_database = value; } /** *

The name of the database. This parameter is required when authenticating * using either Secrets Manager or temporary credentials.

*/ inline void SetDatabase(Aws::String&& value) { m_databaseHasBeenSet = true; m_database = std::move(value); } /** *

The name of the database. This parameter is required when authenticating * using either Secrets Manager or temporary credentials.

*/ inline void SetDatabase(const char* value) { m_databaseHasBeenSet = true; m_database.assign(value); } /** *

The name of the database. This parameter is required when authenticating * using either Secrets Manager or temporary credentials.

*/ inline ExecuteStatementRequest& WithDatabase(const Aws::String& value) { SetDatabase(value); return *this;} /** *

The name of the database. This parameter is required when authenticating * using either Secrets Manager or temporary credentials.

*/ inline ExecuteStatementRequest& WithDatabase(Aws::String&& value) { SetDatabase(std::move(value)); return *this;} /** *

The name of the database. This parameter is required when authenticating * using either Secrets Manager or temporary credentials.

*/ inline ExecuteStatementRequest& WithDatabase(const char* value) { SetDatabase(value); return *this;} /** *

The database user name. This parameter is required when connecting to a * cluster as a database user and authenticating using temporary credentials.

*/ inline const Aws::String& GetDbUser() const{ return m_dbUser; } /** *

The database user name. This parameter is required when connecting to a * cluster as a database user and authenticating using temporary credentials.

*/ inline bool DbUserHasBeenSet() const { return m_dbUserHasBeenSet; } /** *

The database user name. This parameter is required when connecting to a * cluster as a database user and authenticating using temporary credentials.

*/ inline void SetDbUser(const Aws::String& value) { m_dbUserHasBeenSet = true; m_dbUser = value; } /** *

The database user name. This parameter is required when connecting to a * cluster as a database user and authenticating using temporary credentials.

*/ inline void SetDbUser(Aws::String&& value) { m_dbUserHasBeenSet = true; m_dbUser = std::move(value); } /** *

The database user name. This parameter is required when connecting to a * cluster as a database user and authenticating using temporary credentials.

*/ inline void SetDbUser(const char* value) { m_dbUserHasBeenSet = true; m_dbUser.assign(value); } /** *

The database user name. This parameter is required when connecting to a * cluster as a database user and authenticating using temporary credentials.

*/ inline ExecuteStatementRequest& WithDbUser(const Aws::String& value) { SetDbUser(value); return *this;} /** *

The database user name. This parameter is required when connecting to a * cluster as a database user and authenticating using temporary credentials.

*/ inline ExecuteStatementRequest& WithDbUser(Aws::String&& value) { SetDbUser(std::move(value)); return *this;} /** *

The database user name. This parameter is required when connecting to a * cluster as a database user and authenticating using temporary credentials.

*/ inline ExecuteStatementRequest& WithDbUser(const char* value) { SetDbUser(value); return *this;} /** *

The parameters for the SQL statement.

*/ inline const Aws::Vector& GetParameters() const{ return m_parameters; } /** *

The parameters for the SQL statement.

*/ inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; } /** *

The parameters for the SQL statement.

*/ inline void SetParameters(const Aws::Vector& value) { m_parametersHasBeenSet = true; m_parameters = value; } /** *

The parameters for the SQL statement.

*/ inline void SetParameters(Aws::Vector&& value) { m_parametersHasBeenSet = true; m_parameters = std::move(value); } /** *

The parameters for the SQL statement.

*/ inline ExecuteStatementRequest& WithParameters(const Aws::Vector& value) { SetParameters(value); return *this;} /** *

The parameters for the SQL statement.

*/ inline ExecuteStatementRequest& WithParameters(Aws::Vector&& value) { SetParameters(std::move(value)); return *this;} /** *

The parameters for the SQL statement.

*/ inline ExecuteStatementRequest& AddParameters(const SqlParameter& value) { m_parametersHasBeenSet = true; m_parameters.push_back(value); return *this; } /** *

The parameters for the SQL statement.

*/ inline ExecuteStatementRequest& AddParameters(SqlParameter&& value) { m_parametersHasBeenSet = true; m_parameters.push_back(std::move(value)); return *this; } /** *

The name or ARN of the secret that enables access to the database. This * parameter is required when authenticating using Secrets Manager.

*/ inline const Aws::String& GetSecretArn() const{ return m_secretArn; } /** *

The name or ARN of the secret that enables access to the database. This * parameter is required when authenticating using Secrets Manager.

*/ inline bool SecretArnHasBeenSet() const { return m_secretArnHasBeenSet; } /** *

The name or ARN of the secret that enables access to the database. This * parameter is required when authenticating using Secrets Manager.

*/ inline void SetSecretArn(const Aws::String& value) { m_secretArnHasBeenSet = true; m_secretArn = value; } /** *

The name or ARN of the secret that enables access to the database. This * parameter is required when authenticating using Secrets Manager.

*/ inline void SetSecretArn(Aws::String&& value) { m_secretArnHasBeenSet = true; m_secretArn = std::move(value); } /** *

The name or ARN of the secret that enables access to the database. This * parameter is required when authenticating using Secrets Manager.

*/ inline void SetSecretArn(const char* value) { m_secretArnHasBeenSet = true; m_secretArn.assign(value); } /** *

The name or ARN of the secret that enables access to the database. This * parameter is required when authenticating using Secrets Manager.

*/ inline ExecuteStatementRequest& WithSecretArn(const Aws::String& value) { SetSecretArn(value); return *this;} /** *

The name or ARN of the secret that enables access to the database. This * parameter is required when authenticating using Secrets Manager.

*/ inline ExecuteStatementRequest& WithSecretArn(Aws::String&& value) { SetSecretArn(std::move(value)); return *this;} /** *

The name or ARN of the secret that enables access to the database. This * parameter is required when authenticating using Secrets Manager.

*/ inline ExecuteStatementRequest& WithSecretArn(const char* value) { SetSecretArn(value); return *this;} /** *

The SQL statement text to run.

*/ inline const Aws::String& GetSql() const{ return m_sql; } /** *

The SQL statement text to run.

*/ inline bool SqlHasBeenSet() const { return m_sqlHasBeenSet; } /** *

The SQL statement text to run.

*/ inline void SetSql(const Aws::String& value) { m_sqlHasBeenSet = true; m_sql = value; } /** *

The SQL statement text to run.

*/ inline void SetSql(Aws::String&& value) { m_sqlHasBeenSet = true; m_sql = std::move(value); } /** *

The SQL statement text to run.

*/ inline void SetSql(const char* value) { m_sqlHasBeenSet = true; m_sql.assign(value); } /** *

The SQL statement text to run.

*/ inline ExecuteStatementRequest& WithSql(const Aws::String& value) { SetSql(value); return *this;} /** *

The SQL statement text to run.

*/ inline ExecuteStatementRequest& WithSql(Aws::String&& value) { SetSql(std::move(value)); return *this;} /** *

The SQL statement text to run.

*/ inline ExecuteStatementRequest& WithSql(const char* value) { SetSql(value); return *this;} /** *

The name of the SQL statement. You can name the SQL statement when you create * it to identify the query.

*/ inline const Aws::String& GetStatementName() const{ return m_statementName; } /** *

The name of the SQL statement. You can name the SQL statement when you create * it to identify the query.

*/ inline bool StatementNameHasBeenSet() const { return m_statementNameHasBeenSet; } /** *

The name of the SQL statement. You can name the SQL statement when you create * it to identify the query.

*/ inline void SetStatementName(const Aws::String& value) { m_statementNameHasBeenSet = true; m_statementName = value; } /** *

The name of the SQL statement. You can name the SQL statement when you create * it to identify the query.

*/ inline void SetStatementName(Aws::String&& value) { m_statementNameHasBeenSet = true; m_statementName = std::move(value); } /** *

The name of the SQL statement. You can name the SQL statement when you create * it to identify the query.

*/ inline void SetStatementName(const char* value) { m_statementNameHasBeenSet = true; m_statementName.assign(value); } /** *

The name of the SQL statement. You can name the SQL statement when you create * it to identify the query.

*/ inline ExecuteStatementRequest& WithStatementName(const Aws::String& value) { SetStatementName(value); return *this;} /** *

The name of the SQL statement. You can name the SQL statement when you create * it to identify the query.

*/ inline ExecuteStatementRequest& WithStatementName(Aws::String&& value) { SetStatementName(std::move(value)); return *this;} /** *

The name of the SQL statement. You can name the SQL statement when you create * it to identify the query.

*/ inline ExecuteStatementRequest& WithStatementName(const char* value) { SetStatementName(value); return *this;} /** *

A value that indicates whether to send an event to the Amazon EventBridge * event bus after the SQL statement runs.

*/ inline bool GetWithEvent() const{ return m_withEvent; } /** *

A value that indicates whether to send an event to the Amazon EventBridge * event bus after the SQL statement runs.

*/ inline bool WithEventHasBeenSet() const { return m_withEventHasBeenSet; } /** *

A value that indicates whether to send an event to the Amazon EventBridge * event bus after the SQL statement runs.

*/ inline void SetWithEvent(bool value) { m_withEventHasBeenSet = true; m_withEvent = value; } /** *

A value that indicates whether to send an event to the Amazon EventBridge * event bus after the SQL statement runs.

*/ inline ExecuteStatementRequest& WithWithEvent(bool value) { SetWithEvent(value); return *this;} /** *

The serverless workgroup name or Amazon Resource Name (ARN). This parameter * is required when connecting to a serverless workgroup and authenticating using * either Secrets Manager or temporary credentials.

*/ inline const Aws::String& GetWorkgroupName() const{ return m_workgroupName; } /** *

The serverless workgroup name or Amazon Resource Name (ARN). This parameter * is required when connecting to a serverless workgroup and authenticating using * either Secrets Manager or temporary credentials.

*/ inline bool WorkgroupNameHasBeenSet() const { return m_workgroupNameHasBeenSet; } /** *

The serverless workgroup name or Amazon Resource Name (ARN). This parameter * is required when connecting to a serverless workgroup and authenticating using * either Secrets Manager or temporary credentials.

*/ inline void SetWorkgroupName(const Aws::String& value) { m_workgroupNameHasBeenSet = true; m_workgroupName = value; } /** *

The serverless workgroup name or Amazon Resource Name (ARN). This parameter * is required when connecting to a serverless workgroup and authenticating using * either Secrets Manager or temporary credentials.

*/ inline void SetWorkgroupName(Aws::String&& value) { m_workgroupNameHasBeenSet = true; m_workgroupName = std::move(value); } /** *

The serverless workgroup name or Amazon Resource Name (ARN). This parameter * is required when connecting to a serverless workgroup and authenticating using * either Secrets Manager or temporary credentials.

*/ inline void SetWorkgroupName(const char* value) { m_workgroupNameHasBeenSet = true; m_workgroupName.assign(value); } /** *

The serverless workgroup name or Amazon Resource Name (ARN). This parameter * is required when connecting to a serverless workgroup and authenticating using * either Secrets Manager or temporary credentials.

*/ inline ExecuteStatementRequest& WithWorkgroupName(const Aws::String& value) { SetWorkgroupName(value); return *this;} /** *

The serverless workgroup name or Amazon Resource Name (ARN). This parameter * is required when connecting to a serverless workgroup and authenticating using * either Secrets Manager or temporary credentials.

*/ inline ExecuteStatementRequest& WithWorkgroupName(Aws::String&& value) { SetWorkgroupName(std::move(value)); return *this;} /** *

The serverless workgroup name or Amazon Resource Name (ARN). This parameter * is required when connecting to a serverless workgroup and authenticating using * either Secrets Manager or temporary credentials.

*/ inline ExecuteStatementRequest& WithWorkgroupName(const char* value) { SetWorkgroupName(value); return *this;} private: Aws::String m_clientToken; bool m_clientTokenHasBeenSet = false; Aws::String m_clusterIdentifier; bool m_clusterIdentifierHasBeenSet = false; Aws::String m_database; bool m_databaseHasBeenSet = false; Aws::String m_dbUser; bool m_dbUserHasBeenSet = false; Aws::Vector m_parameters; bool m_parametersHasBeenSet = false; Aws::String m_secretArn; bool m_secretArnHasBeenSet = false; Aws::String m_sql; bool m_sqlHasBeenSet = false; Aws::String m_statementName; bool m_statementNameHasBeenSet = false; bool m_withEvent; bool m_withEventHasBeenSet = false; Aws::String m_workgroupName; bool m_workgroupNameHasBeenSet = false; }; } // namespace Model } // namespace RedshiftDataAPIService } // namespace Aws