aws redshift-data execute-statement

Runs an SQL statement, which can be data manipulation language (DML) or data definition language (DDL). This statement must be a single SQL statement. Depending on the authorization method, use one of the following combinations of request parameters: AWS Secrets Manager - specify the Amazon Resource Name (ARN) of the secret and the cluster identifier that matches the cluster in the secret. Temporary credentials - specify the cluster identifier, the database name, and the database user name. Permission to call the redshift:GetClusterCredentials operation is required to use this method

Options

NameDescription
--cluster-identifier <string>The cluster identifier. This parameter is required when authenticating using either AWS Secrets Manager or temporary credentials
--database <string>The name of the database. This parameter is required when authenticating using temporary credentials
--db-user <string>The database user name. This parameter is required when authenticating using temporary credentials
--secret-arn <string>The name or ARN of the secret that enables access to the database. This parameter is required when authenticating using AWS Secrets Manager
--sql <string>The SQL statement text to run
--statement-name <string>The name of the SQL statement. You can name the SQL statement when you create it to identify the query
--with-eventA value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs
--no-with-eventA value that indicates whether to send an event to the Amazon EventBridge event bus after the SQL statement runs
--cli-input-json <string>Performs service operation based on the JSON string provided. The JSON string follows the format provided by ``--generate-cli-skeleton``. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally
--generate-cli-skeleton <string>Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value ``input``, prints a sample input JSON that can be used as an argument for ``--cli-input-json``. If provided with the value ``output``, it validates the command inputs and returns a sample output JSON for that command