pi

package
v1.38.57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 10 Imported by: 23

Documentation

Overview

Package pi provides the client and types for making API requests to AWS Performance Insights.

Amazon RDS Performance Insights enables you to monitor and explore different dimensions of database load based on data captured from a running DB instance. The guide provides detailed information about Performance Insights data types, parameters and errors.

When Performance Insights is enabled, the Amazon RDS Performance Insights API provides visibility into the performance of your DB instance. Amazon CloudWatch provides the authoritative source for AWS service-vended monitoring metrics. Performance Insights offers a domain-specific view of DB load.

DB load is measured as Average Active Sessions. Performance Insights provides the data to API consumers as a two-dimensional time-series dataset. The time dimension provides DB load data for each time point in the queried time range. Each time point decomposes overall load in relation to the requested dimensions, measured at that time point. Examples include SQL, Wait event, User, and Host.

See https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27 for more information on this service.

See pi package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/pi/

Using the Client

To contact AWS Performance Insights 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 Performance Insights client PI for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/pi/#New

Index

Constants

View Source
const (
	// DetailStatusAvailable is a DetailStatus enum value
	DetailStatusAvailable = "AVAILABLE"

	// DetailStatusProcessing is a DetailStatus enum value
	DetailStatusProcessing = "PROCESSING"

	// DetailStatusUnavailable is a DetailStatus enum value
	DetailStatusUnavailable = "UNAVAILABLE"
)
View Source
const (

	// ErrCodeInternalServiceError for service response error code
	// "InternalServiceError".
	//
	// The request failed due to an unknown error.
	ErrCodeInternalServiceError = "InternalServiceError"

	// ErrCodeInvalidArgumentException for service response error code
	// "InvalidArgumentException".
	//
	// One of the arguments provided is invalid for this request.
	ErrCodeInvalidArgumentException = "InvalidArgumentException"

	// ErrCodeNotAuthorizedException for service response error code
	// "NotAuthorizedException".
	//
	// The user is not authorized to perform this request.
	ErrCodeNotAuthorizedException = "NotAuthorizedException"
)
View Source
const (
	ServiceName = "pi"        // Name of service.
	EndpointsID = ServiceName // ID to lookup a service endpoint with.
	ServiceID   = "PI"        // ServiceID is a unique identifier of a specific service.
)

Service information constants

View Source
const (
	// ServiceTypeRds is a ServiceType enum value
	ServiceTypeRds = "RDS"
)

Variables

This section is empty.

Functions

func DetailStatus_Values added in v1.38.55

func DetailStatus_Values() []string

DetailStatus_Values returns all elements of the DetailStatus enum

func ServiceType_Values added in v1.34.3

func ServiceType_Values() []string

ServiceType_Values returns all elements of the ServiceType enum

Types

type DataPoint

type DataPoint struct {

	// The time, in epoch format, associated with a particular Value.
	//
	// Timestamp is a required field
	Timestamp *time.Time `type:"timestamp" required:"true"`

	// The actual value associated with a particular Timestamp.
	//
	// Value is a required field
	Value *float64 `type:"double" required:"true"`
	// contains filtered or unexported fields
}

A timestamp, and a single numerical value, which together represent a measurement at a particular point in time.

func (DataPoint) GoString

func (s DataPoint) GoString() string

GoString returns the string representation

func (*DataPoint) SetTimestamp

func (s *DataPoint) SetTimestamp(v time.Time) *DataPoint

SetTimestamp sets the Timestamp field's value.

func (*DataPoint) SetValue

func (s *DataPoint) SetValue(v float64) *DataPoint

SetValue sets the Value field's value.

func (DataPoint) String

func (s DataPoint) String() string

String returns the string representation

type DescribeDimensionKeysInput

type DescribeDimensionKeysInput struct {

	// The date and time specifying the end of the requested time series data. The
	// value specified is exclusive, which means that data points less than (but
	// not equal to) EndTime are returned.
	//
	// The value for EndTime must be later than the value for StartTime.
	//
	// EndTime is a required field
	EndTime *time.Time `type:"timestamp" required:"true"`

	// One or more filters to apply in the request. Restrictions:
	//
	//    * Any number of filters by the same dimension, as specified in the GroupBy
	//    or Partition parameters.
	//
	//    * A single filter for any other dimension in this dimension group.
	Filter map[string]*string `type:"map"`

	// A specification for how to aggregate the data points from a query result.
	// You must specify a valid dimension group. Performance Insights returns all
	// dimensions within this group, unless you provide the names of specific dimensions
	// within this group. You can also request that Performance Insights return
	// a limited number of values for a dimension.
	//
	// GroupBy is a required field
	GroupBy *DimensionGroup `type:"structure" required:"true"`

	// An immutable, AWS Region-unique identifier for a data source. Performance
	// Insights gathers metrics from this data source.
	//
	// To use an Amazon RDS instance as a data source, you specify its DbiResourceId
	// value. For example, specify db-FAIHNTYBKTGAUSUZQYPDS2GW4A
	//
	// Identifier is a required field
	Identifier *string `type:"string" required:"true"`

	// The maximum number of items to return in the response. If more items exist
	// than the specified MaxRecords value, a pagination token is included in the
	// response so that the remaining results can be retrieved.
	MaxResults *int64 `type:"integer"`

	// The name of a Performance Insights metric to be measured.
	//
	// Valid values for Metric are:
	//
	//    * db.load.avg - a scaled representation of the number of active sessions
	//    for the database engine.
	//
	//    * db.sampledload.avg - the raw number of active sessions for the database
	//    engine.
	//
	// If the number of active sessions is less than an internal Performance Insights
	// threshold, db.load.avg and db.sampledload.avg are the same value. If the
	// number of active sessions is greater than the internal threshold, Performance
	// Insights samples the active sessions, with db.load.avg showing the scaled
	// values, db.sampledload.avg showing the raw values, and db.sampledload.avg
	// less than db.load.avg. For most use cases, you can query db.load.avg only.
	//
	// Metric is a required field
	Metric *string `type:"string" required:"true"`

	// An optional pagination token provided by a previous request. If this parameter
	// is specified, the response includes only records beyond the token, up to
	// the value specified by MaxRecords.
	NextToken *string `min:"1" type:"string"`

	// For each dimension specified in GroupBy, specify a secondary dimension to
	// further subdivide the partition keys in the response.
	PartitionBy *DimensionGroup `type:"structure"`

	// The granularity, in seconds, of the data points returned from Performance
	// Insights. A period can be as short as one second, or as long as one day (86400
	// seconds). Valid values are:
	//
	//    * 1 (one second)
	//
	//    * 60 (one minute)
	//
	//    * 300 (five minutes)
	//
	//    * 3600 (one hour)
	//
	//    * 86400 (twenty-four hours)
	//
	// If you don't specify PeriodInSeconds, then Performance Insights chooses a
	// value for you, with a goal of returning roughly 100-200 data points in the
	// response.
	PeriodInSeconds *int64 `type:"integer"`

	// The AWS service for which Performance Insights will return metrics. The only
	// valid value for ServiceType is RDS.
	//
	// ServiceType is a required field
	ServiceType *string `type:"string" required:"true" enum:"ServiceType"`

	// The date and time specifying the beginning of the requested time series data.
	// You must specify a StartTime within the past 7 days. The value specified
	// is inclusive, which means that data points equal to or greater than StartTime
	// are returned.
	//
	// The value for StartTime must be earlier than the value for EndTime.
	//
	// StartTime is a required field
	StartTime *time.Time `type:"timestamp" required:"true"`
	// contains filtered or unexported fields
}

func (DescribeDimensionKeysInput) GoString

func (s DescribeDimensionKeysInput) GoString() string

GoString returns the string representation

func (*DescribeDimensionKeysInput) SetEndTime

SetEndTime sets the EndTime field's value.

func (*DescribeDimensionKeysInput) SetFilter

SetFilter sets the Filter field's value.

func (*DescribeDimensionKeysInput) SetGroupBy

SetGroupBy sets the GroupBy field's value.

func (*DescribeDimensionKeysInput) SetIdentifier

SetIdentifier sets the Identifier field's value.

func (*DescribeDimensionKeysInput) SetMaxResults

SetMaxResults sets the MaxResults field's value.

func (*DescribeDimensionKeysInput) SetMetric

SetMetric sets the Metric field's value.

func (*DescribeDimensionKeysInput) SetNextToken

SetNextToken sets the NextToken field's value.

func (*DescribeDimensionKeysInput) SetPartitionBy

SetPartitionBy sets the PartitionBy field's value.

func (*DescribeDimensionKeysInput) SetPeriodInSeconds

SetPeriodInSeconds sets the PeriodInSeconds field's value.

func (*DescribeDimensionKeysInput) SetServiceType

SetServiceType sets the ServiceType field's value.

func (*DescribeDimensionKeysInput) SetStartTime

SetStartTime sets the StartTime field's value.

func (DescribeDimensionKeysInput) String

String returns the string representation

func (*DescribeDimensionKeysInput) Validate

func (s *DescribeDimensionKeysInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DescribeDimensionKeysOutput

type DescribeDimensionKeysOutput struct {

	// The end time for the returned dimension keys, after alignment to a granular
	// boundary (as specified by PeriodInSeconds). AlignedEndTime will be greater
	// than or equal to the value of the user-specified Endtime.
	AlignedEndTime *time.Time `type:"timestamp"`

	// The start time for the returned dimension keys, after alignment to a granular
	// boundary (as specified by PeriodInSeconds). AlignedStartTime will be less
	// than or equal to the value of the user-specified StartTime.
	AlignedStartTime *time.Time `type:"timestamp"`

	// The dimension keys that were requested.
	Keys []*DimensionKeyDescription `type:"list"`

	// An optional pagination token provided by a previous request. If this parameter
	// is specified, the response includes only records beyond the token, up to
	// the value specified by MaxRecords.
	NextToken *string `min:"1" type:"string"`

	// If PartitionBy was present in the request, PartitionKeys contains the breakdown
	// of dimension keys by the specified partitions.
	PartitionKeys []*ResponsePartitionKey `type:"list"`
	// contains filtered or unexported fields
}

func (DescribeDimensionKeysOutput) GoString

func (s DescribeDimensionKeysOutput) GoString() string

GoString returns the string representation

func (*DescribeDimensionKeysOutput) SetAlignedEndTime

SetAlignedEndTime sets the AlignedEndTime field's value.

func (*DescribeDimensionKeysOutput) SetAlignedStartTime

SetAlignedStartTime sets the AlignedStartTime field's value.

func (*DescribeDimensionKeysOutput) SetKeys

SetKeys sets the Keys field's value.

func (*DescribeDimensionKeysOutput) SetNextToken

SetNextToken sets the NextToken field's value.

func (*DescribeDimensionKeysOutput) SetPartitionKeys

SetPartitionKeys sets the PartitionKeys field's value.

func (DescribeDimensionKeysOutput) String

String returns the string representation

type DimensionGroup

type DimensionGroup struct {

	// A list of specific dimensions from a dimension group. If this parameter is
	// not present, then it signifies that all of the dimensions in the group were
	// requested, or are present in the response.
	//
	// Valid values for elements in the Dimensions array are:
	//
	//    * db.application.name - The name of the application that is connected
	//    to the database (only Aurora PostgreSQL and RDS PostgreSQL)
	//
	//    * db.host.id - The host ID of the connected client (all engines)
	//
	//    * db.host.name - The host name of the connected client (all engines)
	//
	//    * db.name - The name of the database to which the client is connected
	//    (only Aurora PostgreSQL, RDS PostgreSQL, Aurora MySQL, RDS MySQL, and
	//    MariaDB)
	//
	//    * db.session_type.name - The type of the current session (only Aurora
	//    PostgreSQL and RDS PostgreSQL)
	//
	//    * db.sql.id - The SQL ID generated by Performance Insights (all engines)
	//
	//    * db.sql.db_id - The SQL ID generated by the database (all engines)
	//
	//    * db.sql.statement - The SQL text that is being executed (all engines)
	//
	//    * db.sql.tokenized_id
	//
	//    * db.sql_tokenized.id - The SQL digest ID generated by Performance Insights
	//    (all engines)
	//
	//    * db.sql_tokenized.db_id - SQL digest ID generated by the database (all
	//    engines)
	//
	//    * db.sql_tokenized.statement - The SQL digest text (all engines)
	//
	//    * db.user.id - The ID of the user logged in to the database (all engines)
	//
	//    * db.user.name - The name of the user logged in to the database (all engines)
	//
	//    * db.wait_event.name - The event for which the backend is waiting (all
	//    engines)
	//
	//    * db.wait_event.type - The type of event for which the backend is waiting
	//    (all engines)
	//
	//    * db.wait_event_type.name - The name of the event type for which the backend
	//    is waiting (all engines)
	Dimensions []*string `min:"1" type:"list"`

	// The name of the dimension group. Valid values are:
	//
	//    * db - The name of the database to which the client is connected (only
	//    Aurora PostgreSQL, RDS PostgreSQL, Aurora MySQL, RDS MySQL, and MariaDB)
	//
	//    * db.application - The name of the application that is connected to the
	//    database (only Aurora PostgreSQL and RDS PostgreSQL)
	//
	//    * db.host - The host name of the connected client (all engines)
	//
	//    * db.session_type - The type of the current session (only Aurora PostgreSQL
	//    and RDS PostgreSQL)
	//
	//    * db.sql - The SQL that is currently executing (all engines)
	//
	//    * db.sql_tokenized - The SQL digest (all engines)
	//
	//    * db.wait_event - The event for which the database backend is waiting
	//    (all engines)
	//
	//    * db.wait_event_type - The type of event for which the database backend
	//    is waiting (all engines)
	//
	//    * db.user - The user logged in to the database (all engines)
	//
	// Group is a required field
	Group *string `type:"string" required:"true"`

	// The maximum number of items to fetch for this dimension group.
	Limit *int64 `min:"1" type:"integer"`
	// contains filtered or unexported fields
}

A logical grouping of Performance Insights metrics for a related subject area. For example, the db.sql dimension group consists of the following dimensions: db.sql.id, db.sql.db_id, db.sql.statement, and db.sql.tokenized_id.

Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements, only the first 500 bytes are returned.

func (DimensionGroup) GoString

func (s DimensionGroup) GoString() string

GoString returns the string representation

func (*DimensionGroup) SetDimensions

func (s *DimensionGroup) SetDimensions(v []*string) *DimensionGroup

SetDimensions sets the Dimensions field's value.

func (*DimensionGroup) SetGroup

func (s *DimensionGroup) SetGroup(v string) *DimensionGroup

SetGroup sets the Group field's value.

func (*DimensionGroup) SetLimit

func (s *DimensionGroup) SetLimit(v int64) *DimensionGroup

SetLimit sets the Limit field's value.

func (DimensionGroup) String

func (s DimensionGroup) String() string

String returns the string representation

func (*DimensionGroup) Validate

func (s *DimensionGroup) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DimensionKeyDescription

type DimensionKeyDescription struct {

	// A map of name-value pairs for the dimensions in the group.
	Dimensions map[string]*string `type:"map"`

	// If PartitionBy was specified, PartitionKeys contains the dimensions that
	// were.
	Partitions []*float64 `type:"list"`

	// The aggregated metric value for the dimension(s), over the requested time
	// range.
	Total *float64 `type:"double"`
	// contains filtered or unexported fields
}

An array of descriptions and aggregated values for each dimension within a dimension group.

func (DimensionKeyDescription) GoString

func (s DimensionKeyDescription) GoString() string

GoString returns the string representation

func (*DimensionKeyDescription) SetDimensions

SetDimensions sets the Dimensions field's value.

func (*DimensionKeyDescription) SetPartitions

SetPartitions sets the Partitions field's value.

func (*DimensionKeyDescription) SetTotal

SetTotal sets the Total field's value.

func (DimensionKeyDescription) String

func (s DimensionKeyDescription) String() string

String returns the string representation

type DimensionKeyDetail added in v1.38.55

type DimensionKeyDetail struct {

	// The full name of the dimension. The full name includes the group name and
	// key name. The only valid value is db.sql.statement.
	Dimension *string `type:"string"`

	// The status of the dimension detail data. Possible values include the following:
	//
	//    * AVAILABLE - The dimension detail data is ready to be retrieved.
	//
	//    * PROCESSING - The dimension detail data isn't ready to be retrieved because
	//    more processing time is required. If the requested detail data for db.sql.statement
	//    has the status PROCESSING, Performance Insights returns the truncated
	//    query.
	//
	//    * UNAVAILABLE - The dimension detail data could not be collected successfully.
	Status *string `type:"string" enum:"DetailStatus"`

	// The value of the dimension detail data. For the db.sql.statement dimension,
	// this value is either the full or truncated SQL query, depending on the return
	// status.
	Value *string `type:"string"`
	// contains filtered or unexported fields
}

An object that describes the details for a specified dimension.

func (DimensionKeyDetail) GoString added in v1.38.55

func (s DimensionKeyDetail) GoString() string

GoString returns the string representation

func (*DimensionKeyDetail) SetDimension added in v1.38.55

func (s *DimensionKeyDetail) SetDimension(v string) *DimensionKeyDetail

SetDimension sets the Dimension field's value.

func (*DimensionKeyDetail) SetStatus added in v1.38.55

func (s *DimensionKeyDetail) SetStatus(v string) *DimensionKeyDetail

SetStatus sets the Status field's value.

func (*DimensionKeyDetail) SetValue added in v1.38.55

SetValue sets the Value field's value.

func (DimensionKeyDetail) String added in v1.38.55

func (s DimensionKeyDetail) String() string

String returns the string representation

type GetDimensionKeyDetailsInput added in v1.38.55

type GetDimensionKeyDetailsInput struct {

	// The name of the dimension group. The only valid value is db.sql. Performance
	// Insights searches the specified group for the dimension group ID.
	//
	// Group is a required field
	Group *string `type:"string" required:"true"`

	// The ID of the dimension group from which to retrieve dimension details. For
	// dimension group db.sql, the group ID is db.sql.id.
	//
	// GroupIdentifier is a required field
	GroupIdentifier *string `type:"string" required:"true"`

	// The ID for a data source from which to gather dimension data. This ID must
	// be immutable and unique within an AWS Region. When a DB instance is the data
	// source, specify its DbiResourceId value. For example, specify db-ABCDEFGHIJKLMNOPQRSTU1VW2X.
	//
	// Identifier is a required field
	Identifier *string `type:"string" required:"true"`

	// A list of dimensions to retrieve the detail data for within the given dimension
	// group. For the dimension group db.sql, specify either the full dimension
	// name db.sql.statement or the short dimension name statement. If you don't
	// specify this parameter, Performance Insights returns all dimension data within
	// the specified dimension group.
	RequestedDimensions []*string `min:"1" type:"list"`

	// The AWS service for which Performance Insights returns data. The only valid
	// value is RDS.
	//
	// ServiceType is a required field
	ServiceType *string `type:"string" required:"true" enum:"ServiceType"`
	// contains filtered or unexported fields
}

func (GetDimensionKeyDetailsInput) GoString added in v1.38.55

func (s GetDimensionKeyDetailsInput) GoString() string

GoString returns the string representation

func (*GetDimensionKeyDetailsInput) SetGroup added in v1.38.55

SetGroup sets the Group field's value.

func (*GetDimensionKeyDetailsInput) SetGroupIdentifier added in v1.38.55

SetGroupIdentifier sets the GroupIdentifier field's value.

func (*GetDimensionKeyDetailsInput) SetIdentifier added in v1.38.55

SetIdentifier sets the Identifier field's value.

func (*GetDimensionKeyDetailsInput) SetRequestedDimensions added in v1.38.55

func (s *GetDimensionKeyDetailsInput) SetRequestedDimensions(v []*string) *GetDimensionKeyDetailsInput

SetRequestedDimensions sets the RequestedDimensions field's value.

func (*GetDimensionKeyDetailsInput) SetServiceType added in v1.38.55

SetServiceType sets the ServiceType field's value.

func (GetDimensionKeyDetailsInput) String added in v1.38.55

String returns the string representation

func (*GetDimensionKeyDetailsInput) Validate added in v1.38.55

func (s *GetDimensionKeyDetailsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetDimensionKeyDetailsOutput added in v1.38.55

type GetDimensionKeyDetailsOutput struct {

	// The details for the requested dimensions.
	Dimensions []*DimensionKeyDetail `type:"list"`
	// contains filtered or unexported fields
}

func (GetDimensionKeyDetailsOutput) GoString added in v1.38.55

func (s GetDimensionKeyDetailsOutput) GoString() string

GoString returns the string representation

func (*GetDimensionKeyDetailsOutput) SetDimensions added in v1.38.55

SetDimensions sets the Dimensions field's value.

func (GetDimensionKeyDetailsOutput) String added in v1.38.55

String returns the string representation

type GetResourceMetricsInput

type GetResourceMetricsInput struct {

	// The date and time specifying the end of the requested time series data. The
	// value specified is exclusive - data points less than (but not equal to) EndTime
	// will be returned.
	//
	// The value for EndTime must be later than the value for StartTime.
	//
	// EndTime is a required field
	EndTime *time.Time `type:"timestamp" required:"true"`

	// An immutable, AWS Region-unique identifier for a data source. Performance
	// Insights gathers metrics from this data source.
	//
	// To use a DB instance as a data source, specify its DbiResourceId value. For
	// example, specify db-FAIHNTYBKTGAUSUZQYPDS2GW4A.
	//
	// Identifier is a required field
	Identifier *string `type:"string" required:"true"`

	// The maximum number of items to return in the response. If more items exist
	// than the specified MaxRecords value, a pagination token is included in the
	// response so that the remaining results can be retrieved.
	MaxResults *int64 `type:"integer"`

	// An array of one or more queries to perform. Each query must specify a Performance
	// Insights metric, and can optionally specify aggregation and filtering criteria.
	//
	// MetricQueries is a required field
	MetricQueries []*MetricQuery `min:"1" type:"list" required:"true"`

	// An optional pagination token provided by a previous request. If this parameter
	// is specified, the response includes only records beyond the token, up to
	// the value specified by MaxRecords.
	NextToken *string `min:"1" type:"string"`

	// The granularity, in seconds, of the data points returned from Performance
	// Insights. A period can be as short as one second, or as long as one day (86400
	// seconds). Valid values are:
	//
	//    * 1 (one second)
	//
	//    * 60 (one minute)
	//
	//    * 300 (five minutes)
	//
	//    * 3600 (one hour)
	//
	//    * 86400 (twenty-four hours)
	//
	// If you don't specify PeriodInSeconds, then Performance Insights will choose
	// a value for you, with a goal of returning roughly 100-200 data points in
	// the response.
	PeriodInSeconds *int64 `type:"integer"`

	// The AWS service for which Performance Insights returns metrics. The only
	// valid value for ServiceType is RDS.
	//
	// ServiceType is a required field
	ServiceType *string `type:"string" required:"true" enum:"ServiceType"`

	// The date and time specifying the beginning of the requested time series data.
	// You can't specify a StartTime that's earlier than 7 days ago. The value specified
	// is inclusive - data points equal to or greater than StartTime will be returned.
	//
	// The value for StartTime must be earlier than the value for EndTime.
	//
	// StartTime is a required field
	StartTime *time.Time `type:"timestamp" required:"true"`
	// contains filtered or unexported fields
}

func (GetResourceMetricsInput) GoString

func (s GetResourceMetricsInput) GoString() string

GoString returns the string representation

func (*GetResourceMetricsInput) SetEndTime

SetEndTime sets the EndTime field's value.

func (*GetResourceMetricsInput) SetIdentifier

SetIdentifier sets the Identifier field's value.

func (*GetResourceMetricsInput) SetMaxResults

SetMaxResults sets the MaxResults field's value.

func (*GetResourceMetricsInput) SetMetricQueries

func (s *GetResourceMetricsInput) SetMetricQueries(v []*MetricQuery) *GetResourceMetricsInput

SetMetricQueries sets the MetricQueries field's value.

func (*GetResourceMetricsInput) SetNextToken

SetNextToken sets the NextToken field's value.

func (*GetResourceMetricsInput) SetPeriodInSeconds

func (s *GetResourceMetricsInput) SetPeriodInSeconds(v int64) *GetResourceMetricsInput

SetPeriodInSeconds sets the PeriodInSeconds field's value.

func (*GetResourceMetricsInput) SetServiceType

SetServiceType sets the ServiceType field's value.

func (*GetResourceMetricsInput) SetStartTime

SetStartTime sets the StartTime field's value.

func (GetResourceMetricsInput) String

func (s GetResourceMetricsInput) String() string

String returns the string representation

func (*GetResourceMetricsInput) Validate

func (s *GetResourceMetricsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetResourceMetricsOutput

type GetResourceMetricsOutput struct {

	// The end time for the returned metrics, after alignment to a granular boundary
	// (as specified by PeriodInSeconds). AlignedEndTime will be greater than or
	// equal to the value of the user-specified Endtime.
	AlignedEndTime *time.Time `type:"timestamp"`

	// The start time for the returned metrics, after alignment to a granular boundary
	// (as specified by PeriodInSeconds). AlignedStartTime will be less than or
	// equal to the value of the user-specified StartTime.
	AlignedStartTime *time.Time `type:"timestamp"`

	// An immutable, AWS Region-unique identifier for a data source. Performance
	// Insights gathers metrics from this data source.
	//
	// To use a DB instance as a data source, you specify its DbiResourceId value
	// - for example: db-FAIHNTYBKTGAUSUZQYPDS2GW4A
	Identifier *string `type:"string"`

	// An array of metric results,, where each array element contains all of the
	// data points for a particular dimension.
	MetricList []*MetricKeyDataPoints `type:"list"`

	// An optional pagination token provided by a previous request. If this parameter
	// is specified, the response includes only records beyond the token, up to
	// the value specified by MaxRecords.
	NextToken *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (GetResourceMetricsOutput) GoString

func (s GetResourceMetricsOutput) GoString() string

GoString returns the string representation

func (*GetResourceMetricsOutput) SetAlignedEndTime

SetAlignedEndTime sets the AlignedEndTime field's value.

func (*GetResourceMetricsOutput) SetAlignedStartTime

func (s *GetResourceMetricsOutput) SetAlignedStartTime(v time.Time) *GetResourceMetricsOutput

SetAlignedStartTime sets the AlignedStartTime field's value.

func (*GetResourceMetricsOutput) SetIdentifier

SetIdentifier sets the Identifier field's value.

func (*GetResourceMetricsOutput) SetMetricList

SetMetricList sets the MetricList field's value.

func (*GetResourceMetricsOutput) SetNextToken

SetNextToken sets the NextToken field's value.

func (GetResourceMetricsOutput) String

func (s GetResourceMetricsOutput) String() string

String returns the string representation

type InternalServiceError added in v1.28.0

type InternalServiceError struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"Message" type:"string"`
	// contains filtered or unexported fields
}

The request failed due to an unknown error.

func (*InternalServiceError) Code added in v1.28.0

func (s *InternalServiceError) Code() string

Code returns the exception type name.

func (*InternalServiceError) Error added in v1.28.0

func (s *InternalServiceError) Error() string

func (InternalServiceError) GoString added in v1.28.0

func (s InternalServiceError) GoString() string

GoString returns the string representation

func (*InternalServiceError) Message added in v1.28.0

func (s *InternalServiceError) Message() string

Message returns the exception's message.

func (*InternalServiceError) OrigErr added in v1.28.0

func (s *InternalServiceError) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*InternalServiceError) RequestID added in v1.28.0

func (s *InternalServiceError) RequestID() string

RequestID returns the service's response RequestID for request.

func (*InternalServiceError) StatusCode added in v1.28.0

func (s *InternalServiceError) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (InternalServiceError) String added in v1.28.0

func (s InternalServiceError) String() string

String returns the string representation

type InvalidArgumentException added in v1.28.0

type InvalidArgumentException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"Message" type:"string"`
	// contains filtered or unexported fields
}

One of the arguments provided is invalid for this request.

func (*InvalidArgumentException) Code added in v1.28.0

func (s *InvalidArgumentException) Code() string

Code returns the exception type name.

func (*InvalidArgumentException) Error added in v1.28.0

func (s *InvalidArgumentException) Error() string

func (InvalidArgumentException) GoString added in v1.28.0

func (s InvalidArgumentException) GoString() string

GoString returns the string representation

func (*InvalidArgumentException) Message added in v1.28.0

func (s *InvalidArgumentException) Message() string

Message returns the exception's message.

func (*InvalidArgumentException) OrigErr added in v1.28.0

func (s *InvalidArgumentException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*InvalidArgumentException) RequestID added in v1.28.0

func (s *InvalidArgumentException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*InvalidArgumentException) StatusCode added in v1.28.0

func (s *InvalidArgumentException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (InvalidArgumentException) String added in v1.28.0

func (s InvalidArgumentException) String() string

String returns the string representation

type MetricKeyDataPoints

type MetricKeyDataPoints struct {

	// An array of timestamp-value pairs, representing measurements over a period
	// of time.
	DataPoints []*DataPoint `type:"list"`

	// The dimension(s) to which the data points apply.
	Key *ResponseResourceMetricKey `type:"structure"`
	// contains filtered or unexported fields
}

A time-ordered series of data points, corresponding to a dimension of a Performance Insights metric.

func (MetricKeyDataPoints) GoString

func (s MetricKeyDataPoints) GoString() string

GoString returns the string representation

func (*MetricKeyDataPoints) SetDataPoints

func (s *MetricKeyDataPoints) SetDataPoints(v []*DataPoint) *MetricKeyDataPoints

SetDataPoints sets the DataPoints field's value.

func (*MetricKeyDataPoints) SetKey

SetKey sets the Key field's value.

func (MetricKeyDataPoints) String

func (s MetricKeyDataPoints) String() string

String returns the string representation

type MetricQuery

type MetricQuery struct {

	// One or more filters to apply in the request. Restrictions:
	//
	//    * Any number of filters by the same dimension, as specified in the GroupBy
	//    parameter.
	//
	//    * A single filter for any other dimension in this dimension group.
	Filter map[string]*string `type:"map"`

	// A specification for how to aggregate the data points from a query result.
	// You must specify a valid dimension group. Performance Insights will return
	// all of the dimensions within that group, unless you provide the names of
	// specific dimensions within that group. You can also request that Performance
	// Insights return a limited number of values for a dimension.
	GroupBy *DimensionGroup `type:"structure"`

	// The name of a Performance Insights metric to be measured.
	//
	// Valid values for Metric are:
	//
	//    * db.load.avg - a scaled representation of the number of active sessions
	//    for the database engine.
	//
	//    * db.sampledload.avg - the raw number of active sessions for the database
	//    engine.
	//
	// If the number of active sessions is less than an internal Performance Insights
	// threshold, db.load.avg and db.sampledload.avg are the same value. If the
	// number of active sessions is greater than the internal threshold, Performance
	// Insights samples the active sessions, with db.load.avg showing the scaled
	// values, db.sampledload.avg showing the raw values, and db.sampledload.avg
	// less than db.load.avg. For most use cases, you can query db.load.avg only.
	//
	// Metric is a required field
	Metric *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

A single query to be processed. You must provide the metric to query. If no other parameters are specified, Performance Insights returns all of the data points for that metric. You can optionally request that the data points be aggregated by dimension group ( GroupBy), and return only those data points that match your criteria (Filter).

func (MetricQuery) GoString

func (s MetricQuery) GoString() string

GoString returns the string representation

func (*MetricQuery) SetFilter

func (s *MetricQuery) SetFilter(v map[string]*string) *MetricQuery

SetFilter sets the Filter field's value.

func (*MetricQuery) SetGroupBy

func (s *MetricQuery) SetGroupBy(v *DimensionGroup) *MetricQuery

SetGroupBy sets the GroupBy field's value.

func (*MetricQuery) SetMetric

func (s *MetricQuery) SetMetric(v string) *MetricQuery

SetMetric sets the Metric field's value.

func (MetricQuery) String

func (s MetricQuery) String() string

String returns the string representation

func (*MetricQuery) Validate

func (s *MetricQuery) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type NotAuthorizedException added in v1.28.0

type NotAuthorizedException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"Message" type:"string"`
	// contains filtered or unexported fields
}

The user is not authorized to perform this request.

func (*NotAuthorizedException) Code added in v1.28.0

func (s *NotAuthorizedException) Code() string

Code returns the exception type name.

func (*NotAuthorizedException) Error added in v1.28.0

func (s *NotAuthorizedException) Error() string

func (NotAuthorizedException) GoString added in v1.28.0

func (s NotAuthorizedException) GoString() string

GoString returns the string representation

func (*NotAuthorizedException) Message added in v1.28.0

func (s *NotAuthorizedException) Message() string

Message returns the exception's message.

func (*NotAuthorizedException) OrigErr added in v1.28.0

func (s *NotAuthorizedException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*NotAuthorizedException) RequestID added in v1.28.0

func (s *NotAuthorizedException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*NotAuthorizedException) StatusCode added in v1.28.0

func (s *NotAuthorizedException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (NotAuthorizedException) String added in v1.28.0

func (s NotAuthorizedException) String() string

String returns the string representation

type PI

type PI struct {
	*client.Client
}

PI provides the API operation methods for making requests to AWS Performance Insights. See this package's package overview docs for details on the service.

PI 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) *PI

New creates a new instance of the PI 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:

mySession := session.Must(session.NewSession())

// Create a PI client from just a session.
svc := pi.New(mySession)

// Create a PI client with additional configuration
svc := pi.New(mySession, aws.NewConfig().WithRegion("us-west-2"))

func (*PI) DescribeDimensionKeys

func (c *PI) DescribeDimensionKeys(input *DescribeDimensionKeysInput) (*DescribeDimensionKeysOutput, error)

DescribeDimensionKeys API operation for AWS Performance Insights.

For a specific time period, retrieve the top N dimension keys for a metric.

Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements, only the first 500 bytes are returned.

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 Performance Insights's API operation DescribeDimensionKeys for usage and error information.

Returned Error Types:

  • InvalidArgumentException One of the arguments provided is invalid for this request.

  • InternalServiceError The request failed due to an unknown error.

  • NotAuthorizedException The user is not authorized to perform this request.

See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/DescribeDimensionKeys

func (*PI) DescribeDimensionKeysRequest

func (c *PI) DescribeDimensionKeysRequest(input *DescribeDimensionKeysInput) (req *request.Request, output *DescribeDimensionKeysOutput)

DescribeDimensionKeysRequest generates a "aws/request.Request" representing the client's request for the DescribeDimensionKeys 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 DescribeDimensionKeys for more information on using the DescribeDimensionKeys 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 DescribeDimensionKeysRequest method.
req, resp := client.DescribeDimensionKeysRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/DescribeDimensionKeys

func (*PI) DescribeDimensionKeysWithContext

func (c *PI) DescribeDimensionKeysWithContext(ctx aws.Context, input *DescribeDimensionKeysInput, opts ...request.Option) (*DescribeDimensionKeysOutput, error)

DescribeDimensionKeysWithContext is the same as DescribeDimensionKeys with the addition of the ability to pass a context and additional request options.

See DescribeDimensionKeys 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.

func (*PI) GetDimensionKeyDetails added in v1.38.55

func (c *PI) GetDimensionKeyDetails(input *GetDimensionKeyDetailsInput) (*GetDimensionKeyDetailsOutput, error)

GetDimensionKeyDetails API operation for AWS Performance Insights.

Get the attributes of the specified dimension group for a DB instance or data source. For example, if you specify a SQL ID, GetDimensionKeyDetails retrieves the full text of the dimension db.sql.statement associated with this ID. This operation is useful because GetResourceMetrics and DescribeDimensionKeys don't support retrieval of large SQL statement text.

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 Performance Insights's API operation GetDimensionKeyDetails for usage and error information.

Returned Error Types:

  • InvalidArgumentException One of the arguments provided is invalid for this request.

  • InternalServiceError The request failed due to an unknown error.

  • NotAuthorizedException The user is not authorized to perform this request.

See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetDimensionKeyDetails

func (*PI) GetDimensionKeyDetailsRequest added in v1.38.55

func (c *PI) GetDimensionKeyDetailsRequest(input *GetDimensionKeyDetailsInput) (req *request.Request, output *GetDimensionKeyDetailsOutput)

GetDimensionKeyDetailsRequest generates a "aws/request.Request" representing the client's request for the GetDimensionKeyDetails 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 GetDimensionKeyDetails for more information on using the GetDimensionKeyDetails 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 GetDimensionKeyDetailsRequest method.
req, resp := client.GetDimensionKeyDetailsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetDimensionKeyDetails

func (*PI) GetDimensionKeyDetailsWithContext added in v1.38.55

func (c *PI) GetDimensionKeyDetailsWithContext(ctx aws.Context, input *GetDimensionKeyDetailsInput, opts ...request.Option) (*GetDimensionKeyDetailsOutput, error)

GetDimensionKeyDetailsWithContext is the same as GetDimensionKeyDetails with the addition of the ability to pass a context and additional request options.

See GetDimensionKeyDetails 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.

func (*PI) GetResourceMetrics

func (c *PI) GetResourceMetrics(input *GetResourceMetricsInput) (*GetResourceMetricsOutput, error)

GetResourceMetrics API operation for AWS Performance Insights.

Retrieve Performance Insights metrics for a set of data sources, over a time period. You can provide specific dimension groups and dimensions, and provide aggregation and filtering criteria for each group.

Each response element returns a maximum of 500 bytes. For larger elements, such as SQL statements, only the first 500 bytes are returned.

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 Performance Insights's API operation GetResourceMetrics for usage and error information.

Returned Error Types:

  • InvalidArgumentException One of the arguments provided is invalid for this request.

  • InternalServiceError The request failed due to an unknown error.

  • NotAuthorizedException The user is not authorized to perform this request.

See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetResourceMetrics

func (*PI) GetResourceMetricsRequest

func (c *PI) GetResourceMetricsRequest(input *GetResourceMetricsInput) (req *request.Request, output *GetResourceMetricsOutput)

GetResourceMetricsRequest generates a "aws/request.Request" representing the client's request for the GetResourceMetrics 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 GetResourceMetrics for more information on using the GetResourceMetrics 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 GetResourceMetricsRequest method.
req, resp := client.GetResourceMetricsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/pi-2018-02-27/GetResourceMetrics

func (*PI) GetResourceMetricsWithContext

func (c *PI) GetResourceMetricsWithContext(ctx aws.Context, input *GetResourceMetricsInput, opts ...request.Option) (*GetResourceMetricsOutput, error)

GetResourceMetricsWithContext is the same as GetResourceMetrics with the addition of the ability to pass a context and additional request options.

See GetResourceMetrics 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 ResponsePartitionKey

type ResponsePartitionKey struct {

	// A dimension map that contains the dimension(s) for this partition.
	//
	// Dimensions is a required field
	Dimensions map[string]*string `type:"map" required:"true"`
	// contains filtered or unexported fields
}

If PartitionBy was specified in a DescribeDimensionKeys request, the dimensions are returned in an array. Each element in the array specifies one dimension.

func (ResponsePartitionKey) GoString

func (s ResponsePartitionKey) GoString() string

GoString returns the string representation

func (*ResponsePartitionKey) SetDimensions

func (s *ResponsePartitionKey) SetDimensions(v map[string]*string) *ResponsePartitionKey

SetDimensions sets the Dimensions field's value.

func (ResponsePartitionKey) String

func (s ResponsePartitionKey) String() string

String returns the string representation

type ResponseResourceMetricKey

type ResponseResourceMetricKey struct {

	// The valid dimensions for the metric.
	Dimensions map[string]*string `type:"map"`

	// The name of a Performance Insights metric to be measured.
	//
	// Valid values for Metric are:
	//
	//    * db.load.avg - a scaled representation of the number of active sessions
	//    for the database engine.
	//
	//    * db.sampledload.avg - the raw number of active sessions for the database
	//    engine.
	//
	// If the number of active sessions is less than an internal Performance Insights
	// threshold, db.load.avg and db.sampledload.avg are the same value. If the
	// number of active sessions is greater than the internal threshold, Performance
	// Insights samples the active sessions, with db.load.avg showing the scaled
	// values, db.sampledload.avg showing the raw values, and db.sampledload.avg
	// less than db.load.avg. For most use cases, you can query db.load.avg only.
	//
	// Metric is a required field
	Metric *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

An object describing a Performance Insights metric and one or more dimensions for that metric.

func (ResponseResourceMetricKey) GoString

func (s ResponseResourceMetricKey) GoString() string

GoString returns the string representation

func (*ResponseResourceMetricKey) SetDimensions

SetDimensions sets the Dimensions field's value.

func (*ResponseResourceMetricKey) SetMetric

SetMetric sets the Metric field's value.

func (ResponseResourceMetricKey) String

func (s ResponseResourceMetricKey) String() string

String returns the string representation

Directories

Path Synopsis
Package piiface provides an interface to enable mocking the AWS Performance Insights service client for testing your code.
Package piiface provides an interface to enable mocking the AWS Performance Insights service client for testing your code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL