package dynamodbstreams
import "github.com/aws/aws-sdk-go-v2/service/dynamodbstreams"
Package dynamodbstreams provides the API client, operations, and parameter types for Amazon DynamoDB Streams.
Amazon DynamoDB Amazon DynamoDB Streams provides API actions for accessing streams and processing stream records. To learn more about application development with Streams, see Capturing Table Activity with DynamoDB Streams (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.html) in the Amazon DynamoDB Developer Guide.
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) DescribeStream(ctx context.Context, params *DescribeStreamInput, optFns ...func(*Options)) (*DescribeStreamOutput, error)
- func (c *Client) GetRecords(ctx context.Context, params *GetRecordsInput, optFns ...func(*Options)) (*GetRecordsOutput, error)
- func (c *Client) GetShardIterator(ctx context.Context, params *GetShardIteratorInput, optFns ...func(*Options)) (*GetShardIteratorOutput, error)
- func (c *Client) ListStreams(ctx context.Context, params *ListStreamsInput, optFns ...func(*Options)) (*ListStreamsOutput, error)
- type DescribeStreamInput
- type DescribeStreamOutput
- type EndpointResolver
- type EndpointResolverFunc
- type EndpointResolverOptions
- type GetRecordsInput
- type GetRecordsOutput
- type GetShardIteratorInput
- type GetShardIteratorOutput
- type HTTPClient
- type HTTPSignerV4
- type ListStreamsInput
- type ListStreamsOutput
- type Options
- type ResolveEndpoint
Constants ¶
const ServiceAPIVersion = "2012-08-10"
const ServiceID = "DynamoDB Streams"
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 DynamoDB Streams.
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) DescribeStream ¶
func (c *Client) DescribeStream(ctx context.Context, params *DescribeStreamInput, optFns ...func(*Options)) (*DescribeStreamOutput, error)
Returns information about a stream, including the current status of the stream, its Amazon Resource Name (ARN), the composition of its shards, and its corresponding DynamoDB table. You can call DescribeStream at a maximum rate of 10 times per second. Each shard in the stream has a SequenceNumberRange associated with it. If the SequenceNumberRange has a StartingSequenceNumber but no EndingSequenceNumber, then the shard is still open (able to receive more stream records). If both StartingSequenceNumber and EndingSequenceNumber are present, then that shard is closed and can no longer receive more data.
func (*Client) GetRecords ¶
func (c *Client) GetRecords(ctx context.Context, params *GetRecordsInput, optFns ...func(*Options)) (*GetRecordsOutput, error)
Retrieves the stream records from a given shard. Specify a shard iterator using the ShardIterator parameter. The shard iterator specifies the position in the shard from which you want to start reading stream records sequentially. If there are no stream records available in the portion of the shard that the iterator points to, GetRecords returns an empty list. Note that it might take multiple calls to get to a portion of the shard that contains stream records. GetRecords can retrieve a maximum of 1 MB of data or 1000 stream records, whichever comes first.
func (*Client) GetShardIterator ¶
func (c *Client) GetShardIterator(ctx context.Context, params *GetShardIteratorInput, optFns ...func(*Options)) (*GetShardIteratorOutput, error)
Returns a shard iterator. A shard iterator provides information about how to retrieve the stream records from within a shard. Use the shard iterator in a subsequent GetRecords request to read the stream records from the shard. A shard iterator expires 15 minutes after it is returned to the requester.
func (*Client) ListStreams ¶
func (c *Client) ListStreams(ctx context.Context, params *ListStreamsInput, optFns ...func(*Options)) (*ListStreamsOutput, error)
Returns an array of stream ARNs associated with the current account and endpoint. If the TableName parameter is present, then ListStreams will return only the streams ARNs for that table. You can call ListStreams at a maximum rate of 5 times per second.
type DescribeStreamInput ¶
type DescribeStreamInput struct { // The Amazon Resource Name (ARN) for the stream. // // This member is required. StreamArn *string // The shard ID of the first item that this operation will evaluate. Use the value // that was returned for LastEvaluatedShardId in the previous operation. ExclusiveStartShardId *string // The maximum number of shard objects to return. The upper limit is 100. Limit *int32 }
Represents the input of a DescribeStream operation.
type DescribeStreamOutput ¶
type DescribeStreamOutput struct { // A complete description of the stream, including its creation date and time, the // DynamoDB table associated with the stream, the shard IDs within the stream, and // the beginning and ending sequence numbers of stream records within the shards. StreamDescription *types.StreamDescription // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
Represents the output of a DescribeStream operation.
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 GetRecordsInput ¶
type GetRecordsInput struct { // A shard iterator that was retrieved from a previous GetShardIterator operation. // This iterator can be used to access the stream records in this shard. // // This member is required. ShardIterator *string // The maximum number of records to return from the shard. The upper limit is 1000. Limit *int32 }
Represents the input of a GetRecords operation.
type GetRecordsOutput ¶
type GetRecordsOutput struct { // The next position in the shard from which to start sequentially reading stream // records. If set to null, the shard has been closed and the requested iterator // will not return any more data. NextShardIterator *string // The stream records from the shard, which were retrieved using the shard // iterator. Records []types.Record // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
Represents the output of a GetRecords operation.
type GetShardIteratorInput ¶
type GetShardIteratorInput struct { // The identifier of the shard. The iterator will be returned for this shard ID. // // This member is required. ShardId *string // Determines how the shard iterator is used to start reading stream records from // the shard: // // * AT_SEQUENCE_NUMBER - Start reading exactly from the position // denoted by a specific sequence number. // // * AFTER_SEQUENCE_NUMBER - Start reading // right after the position denoted by a specific sequence number. // // * TRIM_HORIZON // - Start reading at the last (untrimmed) stream record, which is the oldest // record in the shard. In DynamoDB Streams, there is a 24 hour limit on data // retention. Stream records whose age exceeds this limit are subject to removal // (trimming) from the stream. // // * LATEST - Start reading just after the most recent // stream record in the shard, so that you always read the most recent data in the // shard. // // This member is required. ShardIteratorType types.ShardIteratorType // The Amazon Resource Name (ARN) for the stream. // // This member is required. StreamArn *string // The sequence number of a stream record in the shard from which to start reading. SequenceNumber *string }
Represents the input of a GetShardIterator operation.
type GetShardIteratorOutput ¶
type GetShardIteratorOutput struct { // The position in the shard from which to start reading stream records // sequentially. A shard iterator specifies this position using the sequence number // of a stream record in a shard. ShardIterator *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
Represents the output of a GetShardIterator operation.
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 ListStreamsInput ¶
type ListStreamsInput struct { // The ARN (Amazon Resource Name) of the first item that this operation will // evaluate. Use the value that was returned for LastEvaluatedStreamArn in the // previous operation. ExclusiveStartStreamArn *string // The maximum number of streams to return. The upper limit is 100. Limit *int32 // If this parameter is provided, then only the streams associated with this table // name are returned. TableName *string }
Represents the input of a ListStreams operation.
type ListStreamsOutput ¶
type ListStreamsOutput struct { // The stream ARN of the item where the operation stopped, inclusive of the // previous result set. Use this value to start a new operation, excluding this // value in the new request. If LastEvaluatedStreamArn is empty, then the "last // page" of results has been processed and there is no more data to be retrieved. // If LastEvaluatedStreamArn is not empty, it does not necessarily mean that there // is more data in the result set. The only way to know when you have reached the // end of the result set is when LastEvaluatedStreamArn is empty. LastEvaluatedStreamArn *string // A list of stream descriptors associated with the current account and endpoint. Streams []types.Stream // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
Represents the output of a ListStreams operation.
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
Source Files ¶
api_client.go api_op_DescribeStream.go api_op_GetRecords.go api_op_GetShardIterator.go api_op_ListStreams.go deserializers.go doc.go endpoints.go serializers.go validators.go
Directories ¶
Path | Synopsis |
---|---|
internal | |
types |
- Version
- v1.1.2
- Published
- Mar 13, 2021
- Platform
- darwin/amd64
- Imports
- 28 packages
- Last checked
- now –
Tools for package owners.