1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package types 4 5import ( 6 "time" 7) 8 9// A timestamp, and a single numerical value, which together represent a 10// measurement at a particular point in time. 11type DataPoint struct { 12 13 // The time, in epoch format, associated with a particular Value. 14 // 15 // This member is required. 16 Timestamp *time.Time 17 18 // The actual value associated with a particular Timestamp. 19 // 20 // This member is required. 21 Value *float64 22} 23 24// A logical grouping of Performance Insights metrics for a related subject area. 25// For example, the db.sql dimension group consists of the following dimensions: 26// db.sql.id, db.sql.db_id, db.sql.statement, and db.sql.tokenized_id. Each 27// response element returns a maximum of 500 bytes. For larger elements, such as 28// SQL statements, only the first 500 bytes are returned. 29type DimensionGroup struct { 30 31 // The name of the dimension group. Valid values are: 32 // 33 // * db - The name of the 34 // database to which the client is connected (only Aurora PostgreSQL, RDS 35 // PostgreSQL, Aurora MySQL, RDS MySQL, and MariaDB) 36 // 37 // * db.application - The name 38 // of the application that is connected to the database (only Aurora PostgreSQL and 39 // RDS PostgreSQL) 40 // 41 // * db.host - The host name of the connected client (all 42 // engines) 43 // 44 // * db.session_type - The type of the current session (only Aurora 45 // PostgreSQL and RDS PostgreSQL) 46 // 47 // * db.sql - The SQL that is currently executing 48 // (all engines) 49 // 50 // * db.sql_tokenized - The SQL digest (all engines) 51 // 52 // * 53 // db.wait_event - The event for which the database backend is waiting (all 54 // engines) 55 // 56 // * db.wait_event_type - The type of event for which the database 57 // backend is waiting (all engines) 58 // 59 // * db.user - The user logged in to the database 60 // (all engines) 61 // 62 // This member is required. 63 Group *string 64 65 // A list of specific dimensions from a dimension group. If this parameter is not 66 // present, then it signifies that all of the dimensions in the group were 67 // requested, or are present in the response. Valid values for elements in the 68 // Dimensions array are: 69 // 70 // * db.application.name - The name of the application that 71 // is connected to the database (only Aurora PostgreSQL and RDS PostgreSQL) 72 // 73 // * 74 // db.host.id - The host ID of the connected client (all engines) 75 // 76 // * db.host.name - 77 // The host name of the connected client (all engines) 78 // 79 // * db.name - The name of the 80 // database to which the client is connected (only Aurora PostgreSQL, RDS 81 // PostgreSQL, Aurora MySQL, RDS MySQL, and MariaDB) 82 // 83 // * db.session_type.name - The 84 // type of the current session (only Aurora PostgreSQL and RDS PostgreSQL) 85 // 86 // * 87 // db.sql.id - The SQL ID generated by Performance Insights (all engines) 88 // 89 // * 90 // db.sql.db_id - The SQL ID generated by the database (all engines) 91 // 92 // * 93 // db.sql.statement - The SQL text that is being executed (all engines) 94 // 95 // * 96 // db.sql.tokenized_id 97 // 98 // * db.sql_tokenized.id - The SQL digest ID generated by 99 // Performance Insights (all engines) 100 // 101 // * db.sql_tokenized.db_id - SQL digest ID 102 // generated by the database (all engines) 103 // 104 // * db.sql_tokenized.statement - The SQL 105 // digest text (all engines) 106 // 107 // * db.user.id - The ID of the user logged in to the 108 // database (all engines) 109 // 110 // * db.user.name - The name of the user logged in to the 111 // database (all engines) 112 // 113 // * db.wait_event.name - The event for which the backend 114 // is waiting (all engines) 115 // 116 // * db.wait_event.type - The type of event for which the 117 // backend is waiting (all engines) 118 // 119 // * db.wait_event_type.name - The name of the 120 // event type for which the backend is waiting (all engines) 121 Dimensions []string 122 123 // The maximum number of items to fetch for this dimension group. 124 Limit *int32 125} 126 127// An array of descriptions and aggregated values for each dimension within a 128// dimension group. 129type DimensionKeyDescription struct { 130 131 // A map of name-value pairs for the dimensions in the group. 132 Dimensions map[string]string 133 134 // If PartitionBy was specified, PartitionKeys contains the dimensions that were. 135 Partitions []float64 136 137 // The aggregated metric value for the dimension(s), over the requested time range. 138 Total *float64 139} 140 141// A time-ordered series of data points, corresponding to a dimension of a 142// Performance Insights metric. 143type MetricKeyDataPoints struct { 144 145 // An array of timestamp-value pairs, representing measurements over a period of 146 // time. 147 DataPoints []DataPoint 148 149 // The dimension(s) to which the data points apply. 150 Key *ResponseResourceMetricKey 151} 152 153// A single query to be processed. You must provide the metric to query. If no 154// other parameters are specified, Performance Insights returns all of the data 155// points for that metric. You can optionally request that the data points be 156// aggregated by dimension group ( GroupBy), and return only those data points that 157// match your criteria (Filter). 158type MetricQuery struct { 159 160 // The name of a Performance Insights metric to be measured. Valid values for 161 // Metric are: 162 // 163 // * db.load.avg - a scaled representation of the number of active 164 // sessions for the database engine. 165 // 166 // * db.sampledload.avg - the raw number of 167 // active sessions for the database engine. 168 // 169 // If the number of active sessions is 170 // less than an internal Performance Insights threshold, db.load.avg and 171 // db.sampledload.avg are the same value. If the number of active sessions is 172 // greater than the internal threshold, Performance Insights samples the active 173 // sessions, with db.load.avg showing the scaled values, db.sampledload.avg showing 174 // the raw values, and db.sampledload.avg less than db.load.avg. For most use 175 // cases, you can query db.load.avg only. 176 // 177 // This member is required. 178 Metric *string 179 180 // One or more filters to apply in the request. Restrictions: 181 // 182 // * Any number of 183 // filters by the same dimension, as specified in the GroupBy parameter. 184 // 185 // * A 186 // single filter for any other dimension in this dimension group. 187 Filter map[string]string 188 189 // A specification for how to aggregate the data points from a query result. You 190 // must specify a valid dimension group. Performance Insights will return all of 191 // the dimensions within that group, unless you provide the names of specific 192 // dimensions within that group. You can also request that Performance Insights 193 // return a limited number of values for a dimension. 194 GroupBy *DimensionGroup 195} 196 197// If PartitionBy was specified in a DescribeDimensionKeys request, the dimensions 198// are returned in an array. Each element in the array specifies one dimension. 199type ResponsePartitionKey struct { 200 201 // A dimension map that contains the dimension(s) for this partition. 202 // 203 // This member is required. 204 Dimensions map[string]string 205} 206 207// An object describing a Performance Insights metric and one or more dimensions 208// for that metric. 209type ResponseResourceMetricKey struct { 210 211 // The name of a Performance Insights metric to be measured. Valid values for 212 // Metric are: 213 // 214 // * db.load.avg - a scaled representation of the number of active 215 // sessions for the database engine. 216 // 217 // * db.sampledload.avg - the raw number of 218 // active sessions for the database engine. 219 // 220 // If the number of active sessions is 221 // less than an internal Performance Insights threshold, db.load.avg and 222 // db.sampledload.avg are the same value. If the number of active sessions is 223 // greater than the internal threshold, Performance Insights samples the active 224 // sessions, with db.load.avg showing the scaled values, db.sampledload.avg showing 225 // the raw values, and db.sampledload.avg less than db.load.avg. For most use 226 // cases, you can query db.load.avg only. 227 // 228 // This member is required. 229 Metric *string 230 231 // The valid dimensions for the metric. 232 Dimensions map[string]string 233} 234