/
api_op_DescribeTableStatistics.go
110 lines (93 loc) · 3.98 KB
/
api_op_DescribeTableStatistics.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// Code generated by smithy-go-codegen DO NOT EDIT.
package databasemigrationservice
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/databasemigrationservice/types"
"github.com/awslabs/smithy-go/middleware"
smithyhttp "github.com/awslabs/smithy-go/transport/http"
)
// Returns table statistics on the database migration task, including table name,
// rows inserted, rows updated, and rows deleted. Note that the "last updated"
// column the DMS console only indicates the time that AWS DMS last updated the
// table statistics record for a table. It does not indicate the time of the last
// update to the table.
func (c *Client) DescribeTableStatistics(ctx context.Context, params *DescribeTableStatisticsInput, optFns ...func(*Options)) (*DescribeTableStatisticsOutput, error) {
if params == nil {
params = &DescribeTableStatisticsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeTableStatistics", params, optFns, addOperationDescribeTableStatisticsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeTableStatisticsOutput)
out.ResultMetadata = metadata
return out, nil
}
//
type DescribeTableStatisticsInput struct {
// The Amazon Resource Name (ARN) of the replication task.
//
// This member is required.
ReplicationTaskArn *string
// Filters applied to table statistics. Valid filter names: schema-name |
// table-name | table-state A combination of filters creates an AND condition where
// each record matches all specified filters.
Filters []*types.Filter
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords.
Marker *string
// The maximum number of records to include in the response. If more records exist
// than the specified MaxRecords value, a pagination token called a marker is
// included in the response so that the remaining results can be retrieved.
// Default: 100 Constraints: Minimum 20, maximum 500.
MaxRecords *int32
}
//
type DescribeTableStatisticsOutput struct {
// An optional pagination token provided by a previous request. If this parameter
// is specified, the response includes only records beyond the marker, up to the
// value specified by MaxRecords.
Marker *string
// The Amazon Resource Name (ARN) of the replication task.
ReplicationTaskArn *string
// The table statistics.
TableStatistics []*types.TableStatistics
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
}
func addOperationDescribeTableStatisticsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeTableStatistics{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeTableStatistics{}, middleware.After)
if err != nil {
return err
}
awsmiddleware.AddRequestInvocationIDMiddleware(stack)
smithyhttp.AddContentLengthMiddleware(stack)
addResolveEndpointMiddleware(stack, options)
v4.AddComputePayloadSHA256Middleware(stack)
addRetryMiddlewares(stack, options)
addHTTPSignerV4Middleware(stack, options)
awsmiddleware.AddAttemptClockSkewMiddleware(stack)
addClientUserAgent(stack)
smithyhttp.AddErrorCloseResponseBodyMiddleware(stack)
smithyhttp.AddCloseResponseBodyMiddleware(stack)
addOpDescribeTableStatisticsValidationMiddleware(stack)
stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTableStatistics(options.Region), middleware.Before)
addRequestIDRetrieverMiddleware(stack)
addResponseErrorMiddleware(stack)
return nil
}
func newServiceMetadataMiddleware_opDescribeTableStatistics(region string) awsmiddleware.RegisterServiceMetadata {
return awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "dms",
OperationName: "DescribeTableStatistics",
}
}