Documentation ¶
Overview ¶
Package rdsdataservice 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 rdsdataservice package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/rdsdataservice/
Using the Client ¶
To contact 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 RDSDataService for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/rdsdataservice/#New
Index ¶
- Constants
- type ColumnMetadata
- func (s ColumnMetadata) GoString() string
- func (s *ColumnMetadata) SetArrayBaseColumnType(v int64) *ColumnMetadata
- func (s *ColumnMetadata) SetIsAutoIncrement(v bool) *ColumnMetadata
- func (s *ColumnMetadata) SetIsCaseSensitive(v bool) *ColumnMetadata
- func (s *ColumnMetadata) SetIsCurrency(v bool) *ColumnMetadata
- func (s *ColumnMetadata) SetIsSigned(v bool) *ColumnMetadata
- func (s *ColumnMetadata) SetLabel(v string) *ColumnMetadata
- func (s *ColumnMetadata) SetName(v string) *ColumnMetadata
- func (s *ColumnMetadata) SetNullable(v int64) *ColumnMetadata
- func (s *ColumnMetadata) SetPrecision(v int64) *ColumnMetadata
- func (s *ColumnMetadata) SetScale(v int64) *ColumnMetadata
- func (s *ColumnMetadata) SetSchemaName(v string) *ColumnMetadata
- func (s *ColumnMetadata) SetTableName(v string) *ColumnMetadata
- func (s *ColumnMetadata) SetType(v int64) *ColumnMetadata
- func (s *ColumnMetadata) SetTypeName(v string) *ColumnMetadata
- func (s ColumnMetadata) String() string
- type ExecuteSqlInput
- func (s ExecuteSqlInput) GoString() string
- func (s *ExecuteSqlInput) SetAwsSecretStoreArn(v string) *ExecuteSqlInput
- func (s *ExecuteSqlInput) SetDatabase(v string) *ExecuteSqlInput
- func (s *ExecuteSqlInput) SetDbClusterOrInstanceArn(v string) *ExecuteSqlInput
- func (s *ExecuteSqlInput) SetSchema(v string) *ExecuteSqlInput
- func (s *ExecuteSqlInput) SetSqlStatements(v string) *ExecuteSqlInput
- func (s ExecuteSqlInput) String() string
- func (s *ExecuteSqlInput) Validate() error
- type ExecuteSqlOutput
- type RDSDataService
- func (c *RDSDataService) ExecuteSql(input *ExecuteSqlInput) (*ExecuteSqlOutput, error)
- func (c *RDSDataService) ExecuteSqlRequest(input *ExecuteSqlInput) (req *request.Request, output *ExecuteSqlOutput)
- func (c *RDSDataService) ExecuteSqlWithContext(ctx aws.Context, input *ExecuteSqlInput, opts ...request.Option) (*ExecuteSqlOutput, error)
- type Record
- type ResultFrame
- type ResultSetMetadata
- type SqlStatementResult
- type StructValue
- type Value
- func (s Value) GoString() string
- func (s *Value) SetArrayValues(v []*Value) *Value
- func (s *Value) SetBigIntValue(v int64) *Value
- func (s *Value) SetBitValue(v bool) *Value
- func (s *Value) SetBlobValue(v []byte) *Value
- func (s *Value) SetDoubleValue(v float64) *Value
- func (s *Value) SetIntValue(v int64) *Value
- func (s *Value) SetIsNull(v bool) *Value
- func (s *Value) SetRealValue(v float64) *Value
- func (s *Value) SetStringValue(v string) *Value
- func (s *Value) SetStructValue(v *StructValue) *Value
- func (s Value) String() string
Constants ¶
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" // "ServiceUnavailableError". // // Internal service unavailable error ErrCodeServiceUnavailableError = "ServiceUnavailableError" )
const ( ServiceName = "RDS Data" // Name of service. EndpointsID = "rds-data" // ID to lookup a service endpoint with. ServiceID = "RDS Data" // ServiceID is a unique identifer of a specific service. )
Service information constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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
func (ColumnMetadata) GoString ¶
func (s ColumnMetadata) GoString() string
GoString returns the string representation
func (*ColumnMetadata) SetArrayBaseColumnType ¶
func (s *ColumnMetadata) SetArrayBaseColumnType(v int64) *ColumnMetadata
SetArrayBaseColumnType sets the ArrayBaseColumnType field's value.
func (*ColumnMetadata) SetIsAutoIncrement ¶
func (s *ColumnMetadata) SetIsAutoIncrement(v bool) *ColumnMetadata
SetIsAutoIncrement sets the IsAutoIncrement field's value.
func (*ColumnMetadata) SetIsCaseSensitive ¶
func (s *ColumnMetadata) SetIsCaseSensitive(v bool) *ColumnMetadata
SetIsCaseSensitive sets the IsCaseSensitive field's value.
func (*ColumnMetadata) SetIsCurrency ¶
func (s *ColumnMetadata) SetIsCurrency(v bool) *ColumnMetadata
SetIsCurrency sets the IsCurrency field's value.
func (*ColumnMetadata) SetIsSigned ¶
func (s *ColumnMetadata) SetIsSigned(v bool) *ColumnMetadata
SetIsSigned sets the IsSigned field's value.
func (*ColumnMetadata) SetLabel ¶
func (s *ColumnMetadata) SetLabel(v string) *ColumnMetadata
SetLabel sets the Label field's value.
func (*ColumnMetadata) SetName ¶
func (s *ColumnMetadata) SetName(v string) *ColumnMetadata
SetName sets the Name field's value.
func (*ColumnMetadata) SetNullable ¶
func (s *ColumnMetadata) SetNullable(v int64) *ColumnMetadata
SetNullable sets the Nullable field's value.
func (*ColumnMetadata) SetPrecision ¶
func (s *ColumnMetadata) SetPrecision(v int64) *ColumnMetadata
SetPrecision sets the Precision field's value.
func (*ColumnMetadata) SetScale ¶
func (s *ColumnMetadata) SetScale(v int64) *ColumnMetadata
SetScale sets the Scale field's value.
func (*ColumnMetadata) SetSchemaName ¶
func (s *ColumnMetadata) SetSchemaName(v string) *ColumnMetadata
SetSchemaName sets the SchemaName field's value.
func (*ColumnMetadata) SetTableName ¶
func (s *ColumnMetadata) SetTableName(v string) *ColumnMetadata
SetTableName sets the TableName field's value.
func (*ColumnMetadata) SetType ¶
func (s *ColumnMetadata) SetType(v int64) *ColumnMetadata
SetType sets the Type field's value.
func (*ColumnMetadata) SetTypeName ¶
func (s *ColumnMetadata) SetTypeName(v string) *ColumnMetadata
SetTypeName sets the TypeName field's value.
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
func (ExecuteSqlInput) GoString ¶
func (s ExecuteSqlInput) GoString() string
GoString returns the string representation
func (*ExecuteSqlInput) SetAwsSecretStoreArn ¶
func (s *ExecuteSqlInput) SetAwsSecretStoreArn(v string) *ExecuteSqlInput
SetAwsSecretStoreArn sets the AwsSecretStoreArn field's value.
func (*ExecuteSqlInput) SetDatabase ¶
func (s *ExecuteSqlInput) SetDatabase(v string) *ExecuteSqlInput
SetDatabase sets the Database field's value.
func (*ExecuteSqlInput) SetDbClusterOrInstanceArn ¶
func (s *ExecuteSqlInput) SetDbClusterOrInstanceArn(v string) *ExecuteSqlInput
SetDbClusterOrInstanceArn sets the DbClusterOrInstanceArn field's value.
func (*ExecuteSqlInput) SetSchema ¶
func (s *ExecuteSqlInput) SetSchema(v string) *ExecuteSqlInput
SetSchema sets the Schema field's value.
func (*ExecuteSqlInput) SetSqlStatements ¶
func (s *ExecuteSqlInput) SetSqlStatements(v string) *ExecuteSqlInput
SetSqlStatements sets the SqlStatements field's value.
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
func (ExecuteSqlOutput) GoString ¶
func (s ExecuteSqlOutput) GoString() string
GoString returns the string representation
func (*ExecuteSqlOutput) SetSqlStatementResults ¶
func (s *ExecuteSqlOutput) SetSqlStatementResults(v []*SqlStatementResult) *ExecuteSqlOutput
SetSqlStatementResults sets the SqlStatementResults field's value.
func (ExecuteSqlOutput) String ¶
func (s ExecuteSqlOutput) String() string
String returns the string representation
type RDSDataService ¶
RDSDataService provides the API operation methods for making requests to AWS RDS DataService. See this package's package overview docs for details on the service.
RDSDataService methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
func New(p client.ConfigProvider, cfgs ...*aws.Config) *RDSDataService
New creates a new instance of the RDSDataService client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.
Example:
// Create a RDSDataService client from just a session. svc := rdsdataservice.New(mySession) // Create a RDSDataService client with additional configuration svc := rdsdataservice.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func (*RDSDataService) ExecuteSql ¶
func (c *RDSDataService) ExecuteSql(input *ExecuteSqlInput) (*ExecuteSqlOutput, error)
ExecuteSql API operation for AWS RDS DataService.
Executes any SQL statement on the target database synchronously ¶
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the AWS API reference guide for AWS RDS DataService's API operation ExecuteSql for usage and error information.
Returned Error Codes:
ErrCodeBadRequestException "BadRequestException" Invalid Request exception
ErrCodeForbiddenException "ForbiddenException" Access denied exception
ErrCodeInternalServerErrorException "InternalServerErrorException" Internal service error
ErrCodeServiceUnavailableError "ServiceUnavailableError" Internal service unavailable error
See also, https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteSql
func (*RDSDataService) ExecuteSqlRequest ¶
func (c *RDSDataService) ExecuteSqlRequest(input *ExecuteSqlInput) (req *request.Request, output *ExecuteSqlOutput)
ExecuteSqlRequest generates a "aws/request.Request" representing the client's request for the ExecuteSql operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See ExecuteSql for more information on using the ExecuteSql API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the ExecuteSqlRequest method. req, resp := client.ExecuteSqlRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/rds-data-2018-08-01/ExecuteSql
func (*RDSDataService) ExecuteSqlWithContext ¶
func (c *RDSDataService) ExecuteSqlWithContext(ctx aws.Context, input *ExecuteSqlInput, opts ...request.Option) (*ExecuteSqlOutput, error)
ExecuteSqlWithContext is the same as ExecuteSql with the addition of the ability to pass a context and additional request options.
See ExecuteSql for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.
type Record ¶
type Record struct { // Record Values []*Value `locationName:"values" type:"list"` // contains filtered or unexported fields }
Row or Record
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
func (ResultFrame) GoString ¶
func (s ResultFrame) GoString() string
GoString returns the string representation
func (*ResultFrame) SetRecords ¶
func (s *ResultFrame) SetRecords(v []*Record) *ResultFrame
SetRecords sets the Records field's value.
func (*ResultFrame) SetResultSetMetadata ¶
func (s *ResultFrame) SetResultSetMetadata(v *ResultSetMetadata) *ResultFrame
SetResultSetMetadata sets the ResultSetMetadata field's value.
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.
func (ResultSetMetadata) GoString ¶
func (s ResultSetMetadata) GoString() string
GoString returns the string representation
func (*ResultSetMetadata) SetColumnCount ¶
func (s *ResultSetMetadata) SetColumnCount(v int64) *ResultSetMetadata
SetColumnCount sets the ColumnCount field's value.
func (*ResultSetMetadata) SetColumnMetadata ¶
func (s *ResultSetMetadata) SetColumnMetadata(v []*ColumnMetadata) *ResultSetMetadata
SetColumnMetadata sets the ColumnMetadata field's value.
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
func (SqlStatementResult) GoString ¶
func (s SqlStatementResult) GoString() string
GoString returns the string representation
func (*SqlStatementResult) SetNumberOfRecordsUpdated ¶
func (s *SqlStatementResult) SetNumberOfRecordsUpdated(v int64) *SqlStatementResult
SetNumberOfRecordsUpdated sets the NumberOfRecordsUpdated field's value.
func (*SqlStatementResult) SetResultFrame ¶
func (s *SqlStatementResult) SetResultFrame(v *ResultFrame) *SqlStatementResult
SetResultFrame sets the ResultFrame field's value.
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
func (StructValue) GoString ¶
func (s StructValue) GoString() string
GoString returns the string representation
func (*StructValue) SetAttributes ¶
func (s *StructValue) SetAttributes(v []*Value) *StructValue
SetAttributes sets the Attributes field's value.
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
func (*Value) SetArrayValues ¶
SetArrayValues sets the ArrayValues field's value.
func (*Value) SetBigIntValue ¶
SetBigIntValue sets the BigIntValue field's value.
func (*Value) SetBitValue ¶
SetBitValue sets the BitValue field's value.
func (*Value) SetBlobValue ¶
SetBlobValue sets the BlobValue field's value.
func (*Value) SetDoubleValue ¶
SetDoubleValue sets the DoubleValue field's value.
func (*Value) SetIntValue ¶
SetIntValue sets the IntValue field's value.
func (*Value) SetRealValue ¶
SetRealValue sets the RealValue field's value.
func (*Value) SetStringValue ¶
SetStringValue sets the StringValue field's value.
func (*Value) SetStructValue ¶
func (s *Value) SetStructValue(v *StructValue) *Value
SetStructValue sets the StructValue field's value.
Directories ¶
Path | Synopsis |
---|---|
Package rdsdataserviceiface provides an interface to enable mocking the AWS RDS DataService service client for testing your code.
|
Package rdsdataserviceiface provides an interface to enable mocking the AWS RDS DataService service client for testing your code. |