RedshiftDataAPIService

public struct RedshiftDataAPIService

Client object for interacting with AWS RedshiftDataAPIService service.

You can use the Amazon Redshift Data API to run queries on Amazon Redshift tables. You can run individual SQL statements, which are committed if the statement succeeds.

  • Initialize the RedshiftDataAPIService client

    Declaration

    Swift

    public init(accessKeyId: String? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil, region: AWSSDKSwiftCore.Region? = nil, endpoint: String? = nil, middlewares: [AWSServiceMiddleware] = [], eventLoopGroupProvider: AWSClient.EventLoopGroupProvider = .useAWSClientShared)

    Parameters

    accessKeyId

    Public access key provided by AWS

    secretAccessKey

    Private access key provided by AWS

    sessionToken

    Token provided by STS.AssumeRole() which allows access to another AWS account

    region

    Region of server you want to communicate with

    endpoint

    Custom endpoint URL to use instead of standard AWS servers

    middlewares

    Array of middlewares to apply to requests and responses

    eventLoopGroupProvider

    EventLoopGroup to use. Use useAWSClientShared if the client shall manage its own EventLoopGroup.

  • Cancels a running query. To be canceled, a query must be running.

    Declaration

    Swift

    public func cancelStatement(_ input: CancelStatementRequest) -> EventLoopFuture<CancelStatementResponse>
  • Describes the details about a specific instance when a query was run by the Amazon Redshift Data API. The information includes when the query started, when it finished, the query status, the number of rows returned, and the SQL statement.

    Declaration

    Swift

    public func describeStatement(_ input: DescribeStatementRequest) -> EventLoopFuture<DescribeStatementResponse>
  • Describes the detailed information about a table from metadata in the cluster. The information includes its columns. A token is returned to page through the column list. 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.

    Declaration

    Swift

    public func describeTable(_ input: DescribeTableRequest) -> EventLoopFuture<DescribeTableResponse>
  • 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.

    Declaration

    Swift

    public func executeStatement(_ input: ExecuteStatementInput) -> EventLoopFuture<ExecuteStatementOutput>
  • Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement results.

    Declaration

    Swift

    public func getStatementResult(_ input: GetStatementResultRequest) -> EventLoopFuture<GetStatementResultResponse>
  • List the databases in a cluster. A token is returned to page through the database list. 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.

    Declaration

    Swift

    public func listDatabases(_ input: ListDatabasesRequest) -> EventLoopFuture<ListDatabasesResponse>
  • Lists the schemas in a database. A token is returned to page through the schema list. 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.

    Declaration

    Swift

    public func listSchemas(_ input: ListSchemasRequest) -> EventLoopFuture<ListSchemasResponse>
  • List of SQL statements. By default, only finished statements are shown. A token is returned to page through the statement list.

    Declaration

    Swift

    public func listStatements(_ input: ListStatementsRequest) -> EventLoopFuture<ListStatementsResponse>
  • List the tables in a database. If neither SchemaPattern nor TablePattern are specified, then all tables in the database are returned. A token is returned to page through the table list. 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.

    Declaration

    Swift

    public func listTables(_ input: ListTablesRequest) -> EventLoopFuture<ListTablesResponse>
  • Describes the detailed information about a table from metadata in the cluster. The information includes its columns. A token is returned to page through the column list. 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.

    Declaration

    Swift

    public func describeTablePaginator(_ input: DescribeTableRequest, onPage: @escaping (DescribeTableResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
  • Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement results.

    Declaration

    Swift

    public func getStatementResultPaginator(_ input: GetStatementResultRequest, onPage: @escaping (GetStatementResultResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
  • List the databases in a cluster. A token is returned to page through the database list. 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.

    Declaration

    Swift

    public func listDatabasesPaginator(_ input: ListDatabasesRequest, onPage: @escaping (ListDatabasesResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
  • Lists the schemas in a database. A token is returned to page through the schema list. 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.

    Declaration

    Swift

    public func listSchemasPaginator(_ input: ListSchemasRequest, onPage: @escaping (ListSchemasResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
  • List of SQL statements. By default, only finished statements are shown. A token is returned to page through the statement list.

    Declaration

    Swift

    public func listStatementsPaginator(_ input: ListStatementsRequest, onPage: @escaping (ListStatementsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
  • List the tables in a database. If neither SchemaPattern nor TablePattern are specified, then all tables in the database are returned. A token is returned to page through the table list. 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.

    Declaration

    Swift

    public func listTablesPaginator(_ input: ListTablesRequest, onPage: @escaping (ListTablesResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
  • Undocumented

    See more

    Declaration

    Swift

    public enum StatusString : String, CustomStringConvertible, Codable