package qldbsession
import "github.com/aws/aws-sdk-go-v2/service/qldbsession"
Package qldbsession provides the API client, operations, and parameter types for Amazon QLDB Session.
The transactional data APIs for Amazon QLDB Instead of interacting directly with this API, we recommend using the QLDB driver or the QLDB shell to execute data transactions on a ledger.
* If you are working with an AWS SDK, use the QLDB driver. The driver provides a high-level abstraction layer above this QLDB Session data plane and manages SendCommand API calls for you. For information and a list of supported programming languages, see Getting started with the driver (https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-driver.html) in the Amazon QLDB Developer Guide.
* If you are working with the AWS Command Line Interface (AWS CLI), use the QLDB shell. The shell is a command line interface that uses the QLDB driver to interact with a ledger. For information, see Accessing Amazon QLDB using the QLDB shell (https://docs.aws.amazon.com/qldb/latest/developerguide/data-shell.html).
Index ¶
- Constants
- func NewDefaultEndpointResolver() *internalendpoints.Resolver
- func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)
- func WithEndpointResolver(v EndpointResolver) func(*Options)
- type Client
- func New(options Options, optFns ...func(*Options)) *Client
- func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client
- func (c *Client) SendCommand(ctx context.Context, params *SendCommandInput, optFns ...func(*Options)) (*SendCommandOutput, error)
- type EndpointResolver
- type EndpointResolverFunc
- type EndpointResolverOptions
- type HTTPClient
- type HTTPSignerV4
- type Options
- type ResolveEndpoint
- func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, )
- func (*ResolveEndpoint) ID() string
- type SendCommandInput
- type SendCommandOutput
Constants ¶
const ServiceAPIVersion = "2019-07-11"
const ServiceID = "QLDB Session"
Functions ¶
func NewDefaultEndpointResolver ¶
func NewDefaultEndpointResolver() *internalendpoints.Resolver
NewDefaultEndpointResolver constructs a new service endpoint resolver
func WithAPIOptions ¶
func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)
WithAPIOptions returns a functional option for setting the Client's APIOptions option.
func WithEndpointResolver ¶
func WithEndpointResolver(v EndpointResolver) func(*Options)
WithEndpointResolver returns a functional option for setting the Client's EndpointResolver option.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides the API client to make operations call for Amazon QLDB Session.
func New ¶
New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.
func NewFromConfig ¶
NewFromConfig returns a new client from the provided config.
func (*Client) SendCommand ¶
func (c *Client) SendCommand(ctx context.Context, params *SendCommandInput, optFns ...func(*Options)) (*SendCommandOutput, error)
Sends a command to an Amazon QLDB ledger. Instead of interacting directly with this API, we recommend using the QLDB driver or the QLDB shell to execute data transactions on a ledger.
* If you are working with an AWS SDK, use the QLDB driver. The driver provides a high-level abstraction layer above this QLDB Session data plane and manages SendCommand API calls for you. For information and a list of supported programming languages, see Getting started with the driver (https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started-driver.html) in the Amazon QLDB Developer Guide.
* If you are working with the AWS Command Line Interface (AWS CLI), use the QLDB shell. The shell is a command line interface that uses the QLDB driver to interact with a ledger. For information, see Accessing Amazon QLDB using the QLDB shell (https://docs.aws.amazon.com/qldb/latest/developerguide/data-shell.html).
type EndpointResolver ¶
type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) }
EndpointResolver interface for resolving service endpoints.
func EndpointResolverFromURL ¶
func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver
EndpointResolverFromURL returns an EndpointResolver configured using the provided endpoint url. By default, the resolved endpoint resolver uses the client region as signing region, and the endpoint source is set to EndpointSourceCustom.You can provide functional options to configure endpoint values for the resolved endpoint.
type EndpointResolverFunc ¶
type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
EndpointResolverFunc is a helper utility that wraps a function so it satisfies the EndpointResolver interface. This is useful when you want to add additional endpoint resolving logic, or stub out specific endpoints with custom values.
func (EndpointResolverFunc) ResolveEndpoint ¶
func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error)
type EndpointResolverOptions ¶
type EndpointResolverOptions = internalendpoints.Options
EndpointResolverOptions is the service endpoint resolver options
type HTTPClient ¶
type HTTPSignerV4 ¶
type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error }
type Options ¶
type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. Retryer aws.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient }
func (Options) Copy ¶
Copy creates a clone where the APIOptions list is deep copied.
type ResolveEndpoint ¶
type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions }
func (*ResolveEndpoint) HandleSerialize ¶
func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, )
func (*ResolveEndpoint) ID ¶
func (*ResolveEndpoint) ID() string
type SendCommandInput ¶
type SendCommandInput struct { // Command to abort the current transaction. AbortTransaction *types.AbortTransactionRequest // Command to commit the specified transaction. CommitTransaction *types.CommitTransactionRequest // Command to end the current session. EndSession *types.EndSessionRequest // Command to execute a statement in the specified transaction. ExecuteStatement *types.ExecuteStatementRequest // Command to fetch a page. FetchPage *types.FetchPageRequest // Specifies the session token for the current command. A session token is constant // throughout the life of the session. To obtain a session token, run the // StartSession command. This SessionToken is required for every subsequent command // that is issued during the current session. SessionToken *string // Command to start a new session. A session token is obtained as part of the // response. StartSession *types.StartSessionRequest // Command to start a new transaction. StartTransaction *types.StartTransactionRequest // contains filtered or unexported fields }
type SendCommandOutput ¶
type SendCommandOutput struct { // Contains the details of the aborted transaction. AbortTransaction *types.AbortTransactionResult // Contains the details of the committed transaction. CommitTransaction *types.CommitTransactionResult // Contains the details of the ended session. EndSession *types.EndSessionResult // Contains the details of the executed statement. ExecuteStatement *types.ExecuteStatementResult // Contains the details of the fetched page. FetchPage *types.FetchPageResult // Contains the details of the started session that includes a session token. This // SessionToken is required for every subsequent command that is issued during the // current session. StartSession *types.StartSessionResult // Contains the details of the started transaction. StartTransaction *types.StartTransactionResult // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata // contains filtered or unexported fields }
Source Files ¶
api_client.go api_op_SendCommand.go deserializers.go doc.go endpoints.go go_module_metadata.go serializers.go validators.go
Directories ¶
Path | Synopsis |
---|---|
internal | |
types |
- Version
- v1.4.2
- Published
- Aug 4, 2021
- Platform
- js/wasm
- Imports
- 28 packages
- Last checked
- now –
Tools for package owners.