package rdsdata
import "github.com/aws/aws-sdk-go-v2/service/rdsdata"
Package rdsdata provides the client and types for making API requests to AWS RDS DataService.
AWS RDS DataService provides Http Endpoint to query RDS databases.
See https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01 for more information on this service.
See rdsdata package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/rdsdata/
Using the Client
To use AWS RDS DataService with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.
See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/
See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
See the AWS RDS DataService client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/rdsdata/#New
Index ¶
- Constants
- type Client
- func New(config aws.Config) *Client
- func (c *Client) ExecuteSqlRequest(input *ExecuteSqlInput) ExecuteSqlRequest
- type ColumnMetadata
- func (s ColumnMetadata) MarshalFields(e protocol.FieldEncoder) error
- func (s ColumnMetadata) String() string
- type ExecuteSqlInput
- func (s ExecuteSqlInput) MarshalFields(e protocol.FieldEncoder) error
- func (s ExecuteSqlInput) String() string
- func (s *ExecuteSqlInput) Validate() error
- type ExecuteSqlOutput
- func (s ExecuteSqlOutput) MarshalFields(e protocol.FieldEncoder) error
- func (s ExecuteSqlOutput) String() string
- type ExecuteSqlRequest
- type ExecuteSqlResponse
- type Record
- type ResultFrame
- func (s ResultFrame) MarshalFields(e protocol.FieldEncoder) error
- func (s ResultFrame) String() string
- type ResultSetMetadata
- func (s ResultSetMetadata) MarshalFields(e protocol.FieldEncoder) error
- func (s ResultSetMetadata) String() string
- type SqlStatementResult
- func (s SqlStatementResult) MarshalFields(e protocol.FieldEncoder) error
- func (s SqlStatementResult) String() string
- type StructValue
- func (s StructValue) MarshalFields(e protocol.FieldEncoder) error
- func (s StructValue) String() string
- type Value
Constants ¶
const ( ServiceName = "AWS RDS DataService" // Service's name ServiceID = "RDSData" // Service's identifier EndpointsID = "rds-data" // Service's Endpoint identifier )
const ( // ErrCodeBadRequestException for service response error code // "BadRequestException". // // Invalid Request exception ErrCodeBadRequestException = "BadRequestException" // ErrCodeForbiddenException for service response error code // "ForbiddenException". // // Access denied exception ErrCodeForbiddenException = "ForbiddenException" // ErrCodeInternalServerErrorException for service response error code // "InternalServerErrorException". // // Internal service error ErrCodeInternalServerErrorException = "InternalServerErrorException" // ErrCodeServiceUnavailableError for service response error code // "ServiceUnavailableError". // // Internal service unavailable error = "ServiceUnavailableError" )
Types ¶
type Client ¶
Client provides the API operation methods for making requests to AWS RDS DataService. See this package's package overview docs for details on the service.
The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
New creates a new instance of the client from the provided Config.
Example:
// Create a client from just a config. svc := rdsdata.New(myConfig)
func (*Client) ExecuteSqlRequest ¶
func (c *Client) ExecuteSqlRequest(input *ExecuteSqlInput) ExecuteSqlRequest
ExecuteSqlRequest returns a request value for making API operation for AWS RDS DataService.
Executes any SQL statement on the target database synchronously
// Example sending a request using ExecuteSqlRequest. req := client.ExecuteSqlRequest(params) resp, err := req.Send(context.TODO()) if err == nil { fmt.Println(resp) }
Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteSql
type ColumnMetadata ¶
type ColumnMetadata struct { // Homogenous array base SQL type from java.sql.Types. ArrayBaseColumnType *int64 `locationName:"arrayBaseColumnType" type:"integer"` // Whether the designated column is automatically numbered IsAutoIncrement *bool `locationName:"isAutoIncrement" type:"boolean"` // Whether values in the designated column's case matters IsCaseSensitive *bool `locationName:"isCaseSensitive" type:"boolean"` // Whether values in the designated column is a cash value IsCurrency *bool `locationName:"isCurrency" type:"boolean"` // Whether values in the designated column are signed numbers IsSigned *bool `locationName:"isSigned" type:"boolean"` // Usually specified by the SQL AS. If not specified, return column name. Label *string `locationName:"label" type:"string"` // Name of the column. Name *string `locationName:"name" type:"string"` // Indicates the nullability of values in the designated column. One of columnNoNulls // (0), columnNullable (1), columnNullableUnknown (2) Nullable *int64 `locationName:"nullable" type:"integer"` // Get the designated column's specified column size.For numeric data, this // is the maximum precision. For character data, this is the length in characters. // For datetime datatypes, this is the length in characters of the String representation // (assuming the maximum allowed precision of the fractional seconds component). // For binary data, this is the length in bytes. For the ROWID datatype, this // is the length in bytes. 0 is returned for data types where the column size // is not applicable. Precision *int64 `locationName:"precision" type:"integer"` // Designated column's number of digits to right of the decimal point. 0 is // returned for data types where the scale is not applicable. Scale *int64 `locationName:"scale" type:"integer"` // Designated column's table's schema SchemaName *string `locationName:"schemaName" type:"string"` // Designated column's table name TableName *string `locationName:"tableName" type:"string"` // SQL type from java.sql.Types. Type *int64 `locationName:"type" type:"integer"` // Database-specific type name. TypeName *string `locationName:"typeName" type:"string"` // contains filtered or unexported fields }
Column Metadata Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ColumnMetadata
func (ColumnMetadata) MarshalFields ¶
func (s ColumnMetadata) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ColumnMetadata) String ¶
func (s ColumnMetadata) String() string
String returns the string representation
type ExecuteSqlInput ¶
type ExecuteSqlInput struct { // ARN of the db credentials in AWS Secret Store or the friendly secret name // // AwsSecretStoreArn is a required field AwsSecretStoreArn *string `locationName:"awsSecretStoreArn" type:"string" required:"true"` // Target DB name Database *string `locationName:"database" type:"string"` // ARN of the target db cluster or instance // // DbClusterOrInstanceArn is a required field DbClusterOrInstanceArn *string `locationName:"dbClusterOrInstanceArn" type:"string" required:"true"` // Target Schema name Schema *string `locationName:"schema" type:"string"` // SQL statement(s) to be executed. Statements can be chained by using semicolons // // SqlStatements is a required field SqlStatements *string `locationName:"sqlStatements" type:"string" required:"true"` // contains filtered or unexported fields }
Execute SQL Request Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteSqlRequest
func (ExecuteSqlInput) MarshalFields ¶
func (s ExecuteSqlInput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ExecuteSqlInput) String ¶
func (s ExecuteSqlInput) String() string
String returns the string representation
func (*ExecuteSqlInput) Validate ¶
func (s *ExecuteSqlInput) Validate() error
Validate inspects the fields of the type to determine if they are valid.
type ExecuteSqlOutput ¶
type ExecuteSqlOutput struct { // Results returned by executing the sql statement(s) // // SqlStatementResults is a required field SqlStatementResults []SqlStatementResult `locationName:"sqlStatementResults" type:"list" required:"true"` // contains filtered or unexported fields }
Execute SQL response Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteSqlResponse
func (ExecuteSqlOutput) MarshalFields ¶
func (s ExecuteSqlOutput) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ExecuteSqlOutput) String ¶
func (s ExecuteSqlOutput) String() string
String returns the string representation
type ExecuteSqlRequest ¶
type ExecuteSqlRequest struct { *aws.Request Input *ExecuteSqlInput Copy func(*ExecuteSqlInput) ExecuteSqlRequest }
ExecuteSqlRequest is the request type for the ExecuteSql API operation.
func (ExecuteSqlRequest) Send ¶
func (r ExecuteSqlRequest) Send(ctx context.Context) (*ExecuteSqlResponse, error)
Send marshals and sends the ExecuteSql API request.
type ExecuteSqlResponse ¶
type ExecuteSqlResponse struct { *ExecuteSqlOutput // contains filtered or unexported fields }
ExecuteSqlResponse is the response type for the ExecuteSql API operation.
func (*ExecuteSqlResponse) SDKResponseMetdata ¶
func (r *ExecuteSqlResponse) SDKResponseMetdata() *aws.Response
SDKResponseMetdata returns the response metadata for the ExecuteSql request.
type Record ¶
type Record struct { // Record Values []Value `locationName:"values" type:"list"` // contains filtered or unexported fields }
Row or Record Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/Record
func (Record) MarshalFields ¶
func (s Record) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (Record) String ¶
String returns the string representation
type ResultFrame ¶
type ResultFrame struct { // ResultSet Metadata. Records []Record `locationName:"records" type:"list"` // ResultSet Metadata. ResultSetMetadata *ResultSetMetadata `locationName:"resultSetMetadata" type:"structure"` // contains filtered or unexported fields }
Result Frame Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ResultFrame
func (ResultFrame) MarshalFields ¶
func (s ResultFrame) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ResultFrame) String ¶
func (s ResultFrame) String() string
String returns the string representation
type ResultSetMetadata ¶
type ResultSetMetadata struct { // Number of columns ColumnCount *int64 `locationName:"columnCount" type:"long"` // List of columns and their types ColumnMetadata []ColumnMetadata `locationName:"columnMetadata" type:"list"` // contains filtered or unexported fields }
List of columns and their types. Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ResultSetMetadata
func (ResultSetMetadata) MarshalFields ¶
func (s ResultSetMetadata) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (ResultSetMetadata) String ¶
func (s ResultSetMetadata) String() string
String returns the string representation
type SqlStatementResult ¶
type SqlStatementResult struct { // Number of rows updated. NumberOfRecordsUpdated *int64 `locationName:"numberOfRecordsUpdated" type:"long"` // ResultFrame returned by executing the sql statement ResultFrame *ResultFrame `locationName:"resultFrame" type:"structure"` // contains filtered or unexported fields }
SQL statement execution result Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/SqlStatementResult
func (SqlStatementResult) MarshalFields ¶
func (s SqlStatementResult) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (SqlStatementResult) String ¶
func (s SqlStatementResult) String() string
String returns the string representation
type StructValue ¶
type StructValue struct { // Struct or UDT Attributes []Value `locationName:"attributes" type:"list"` // contains filtered or unexported fields }
User Defined Type Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/StructValue
func (StructValue) MarshalFields ¶
func (s StructValue) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (StructValue) String ¶
func (s StructValue) String() string
String returns the string representation
type Value ¶
type Value struct { // Arbitrarily nested arrays ArrayValues []Value `locationName:"arrayValues" type:"list"` // Long value BigIntValue *int64 `locationName:"bigIntValue" type:"long"` // Bit value BitValue *bool `locationName:"bitValue" type:"boolean"` // Blob value // // BlobValue is automatically base64 encoded/decoded by the SDK. BlobValue []byte `locationName:"blobValue" type:"blob"` // Double value DoubleValue *float64 `locationName:"doubleValue" type:"double"` // Integer value IntValue *int64 `locationName:"intValue" type:"integer"` // Is column null IsNull *bool `locationName:"isNull" type:"boolean"` // Float value RealValue *float64 `locationName:"realValue" type:"float"` // String value StringValue *string `locationName:"stringValue" type:"string"` // Struct or UDT StructValue *StructValue `locationName:"structValue" type:"structure"` // contains filtered or unexported fields }
Column value Please also see https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/Value
func (Value) MarshalFields ¶
func (s Value) MarshalFields(e protocol.FieldEncoder) error
MarshalFields encodes the AWS API shape using the passed in protocol encoder.
func (Value) String ¶
String returns the string representation
Source Files ¶
api_client.go api_doc.go api_enums.go api_errors.go api_op_ExecuteSql.go api_types.go
Directories ¶
Path | Synopsis |
---|---|
service/rdsdata/rdsdataiface | Package rdsdataiface provides an interface to enable mocking the AWS RDS DataService service client for testing your code. |
- Version
- v0.9.0
- Published
- May 28, 2019
- Platform
- darwin/amd64
- Imports
- 6 packages
- Last checked
- 2 minutes ago –
Tools for package owners.