computeoptimizer

package
v0.23.3 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package computeoptimizer provides the client and types for making API requests to AWS Compute Optimizer.

AWS Compute Optimizer is a service that analyzes the configuration and utilization metrics of your AWS resources, such as EC2 instances and Auto Scaling groups. It reports whether your resources are optimal, and generates optimization recommendations to reduce the cost and improve the performance of your workloads. Compute Optimizer also provides recent utilization metric data, as well as projected utilization metric data for the recommendations, which you can use to evaluate which recommendation provides the best price-performance trade-off. The analysis of your usage patterns can help you decide when to move or resize your running resources, and still meet your performance and capacity requirements. For more information about Compute Optimizer, see the AWS Compute Optimizer User Guide (https://docs.aws.amazon.com/compute-optimizer/latest/ug/).

See https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01 for more information on this service.

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

Using the Client

To use AWS Compute Optimizer 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 Compute Optimizer client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/computeoptimizer/#New

Index

Constants

View Source
const (
	ServiceName = "AWS Compute Optimizer" // Service's name
	ServiceID   = "ComputeOptimizer"      // Service's identifier
	EndpointsID = "compute-optimizer"     // Service's Endpoint identifier
)
View Source
const (

	// ErrCodeAccessDeniedException for service response error code
	// "AccessDeniedException".
	//
	// You do not have sufficient access to perform this action.
	ErrCodeAccessDeniedException = "AccessDeniedException"

	// ErrCodeInternalServerException for service response error code
	// "InternalServerException".
	//
	// The request processing has failed because of an unknown error, exception,
	// or failure.
	ErrCodeInternalServerException = "InternalServerException"

	// ErrCodeInvalidParameterValueException for service response error code
	// "InvalidParameterValueException".
	//
	// An invalid or out-of-range value was supplied for the input parameter.
	ErrCodeInvalidParameterValueException = "InvalidParameterValueException"

	// ErrCodeMissingAuthenticationToken for service response error code
	// "MissingAuthenticationToken".
	//
	// The request must contain either a valid (registered) AWS access key ID or
	// X.509 certificate.
	ErrCodeMissingAuthenticationToken = "MissingAuthenticationToken"

	// ErrCodeOptInRequiredException for service response error code
	// "OptInRequiredException".
	//
	// You must opt in to the service to perform this action.
	ErrCodeOptInRequiredException = "OptInRequiredException"

	// ErrCodeResourceNotFoundException for service response error code
	// "ResourceNotFoundException".
	//
	// The specified resource was not found.
	ErrCodeResourceNotFoundException = "ResourceNotFoundException"

	// ErrCodeServiceUnavailableException for service response error code
	// "ServiceUnavailableException".
	//
	// The request has failed due to a temporary failure of the server.
	ErrCodeServiceUnavailableException = "ServiceUnavailableException"

	// ErrCodeThrottlingException for service response error code
	// "ThrottlingException".
	//
	// The limit on the number of requests per second was exceeded.
	ErrCodeThrottlingException = "ThrottlingException"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoScalingGroupConfiguration

type AutoScalingGroupConfiguration struct {

	// The desired capacity, or number of instances, for the Auto Scaling group.
	DesiredCapacity *int64 `locationName:"desiredCapacity" type:"integer"`

	// The instance type for the Auto Scaling group.
	InstanceType *string `locationName:"instanceType" type:"string"`

	// The maximum size, or maximum number of instances, for the Auto Scaling group.
	MaxSize *int64 `locationName:"maxSize" type:"integer"`

	// The minimum size, or minimum number of instances, for the Auto Scaling group.
	MinSize *int64 `locationName:"minSize" type:"integer"`
	// contains filtered or unexported fields
}

Describes the configuration of an Auto Scaling group.

func (AutoScalingGroupConfiguration) String

String returns the string representation

type AutoScalingGroupRecommendation

type AutoScalingGroupRecommendation struct {

	// The AWS account ID of the Auto Scaling group.
	AccountId *string `locationName:"accountId" type:"string"`

	// The Amazon Resource Name (ARN) of the Auto Scaling group.
	AutoScalingGroupArn *string `locationName:"autoScalingGroupArn" type:"string"`

	// The name of the Auto Scaling group.
	AutoScalingGroupName *string `locationName:"autoScalingGroupName" type:"string"`

	// An array of objects that describe the current configuration of the Auto Scaling
	// group.
	CurrentConfiguration *AutoScalingGroupConfiguration `locationName:"currentConfiguration" type:"structure"`

	// The finding classification for the Auto Scaling group.
	//
	// Findings for Auto Scaling groups include:
	//
	//    * NotOptimized —An Auto Scaling group is considered not optimized when
	//    AWS Compute Optimizer identifies a recommendation that can provide better
	//    performance for your workload.
	//
	//    * Optimized —An Auto Scaling group is considered optimized when Compute
	//    Optimizer determines that the group is correctly provisioned to run your
	//    workload based on the chosen instance type. For optimized resources, Compute
	//    Optimizer might recommend a new generation instance type.
	//
	// The values that are returned might be NOT_OPTIMIZED or OPTIMIZED.
	Finding Finding `locationName:"finding" type:"string" enum:"true"`

	// The time stamp of when the Auto Scaling group recommendation was last refreshed.
	LastRefreshTimestamp *time.Time `locationName:"lastRefreshTimestamp" type:"timestamp"`

	// The number of days for which utilization metrics were analyzed for the Auto
	// Scaling group.
	LookBackPeriodInDays *float64 `locationName:"lookBackPeriodInDays" type:"double"`

	// An array of objects that describe the recommendation options for the Auto
	// Scaling group.
	RecommendationOptions []AutoScalingGroupRecommendationOption `locationName:"recommendationOptions" type:"list"`

	// An array of objects that describe the utilization metrics of the Auto Scaling
	// group.
	UtilizationMetrics []UtilizationMetric `locationName:"utilizationMetrics" type:"list"`
	// contains filtered or unexported fields
}

Describes an Auto Scaling group recommendation.

func (AutoScalingGroupRecommendation) String

String returns the string representation

type AutoScalingGroupRecommendationOption

type AutoScalingGroupRecommendationOption struct {

	// An array of objects that describe an Auto Scaling group configuration.
	Configuration *AutoScalingGroupConfiguration `locationName:"configuration" type:"structure"`

	// The performance risk of the Auto Scaling group configuration recommendation.
	//
	// Performance risk is the likelihood of the recommended instance type not meeting
	// the performance requirement of your workload.
	//
	// The lowest performance risk is categorized as 0, and the highest as 5.
	PerformanceRisk *float64 `locationName:"performanceRisk" type:"double"`

	// An array of objects that describe the projected utilization metrics of the
	// Auto Scaling group recommendation option.
	ProjectedUtilizationMetrics []UtilizationMetric `locationName:"projectedUtilizationMetrics" type:"list"`

	// The rank of the Auto Scaling group recommendation option.
	//
	// The top recommendation option is ranked as 1.
	Rank *int64 `locationName:"rank" type:"integer"`
	// contains filtered or unexported fields
}

Describes a recommendation option for an Auto Scaling group.

func (AutoScalingGroupRecommendationOption) String

String returns the string representation

type Client

type Client struct {
	*aws.Client
}

Client provides the API operation methods for making requests to AWS Compute Optimizer. See this package's package overview docs for details on the service.

The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(config aws.Config) *Client

New creates a new instance of the client from the provided Config.

Example:

// Create a client from just a config.
svc := computeoptimizer.New(myConfig)

func (*Client) GetAutoScalingGroupRecommendationsRequest

func (c *Client) GetAutoScalingGroupRecommendationsRequest(input *GetAutoScalingGroupRecommendationsInput) GetAutoScalingGroupRecommendationsRequest

GetAutoScalingGroupRecommendationsRequest returns a request value for making API operation for AWS Compute Optimizer.

Returns Auto Scaling group recommendations.

AWS Compute Optimizer currently generates recommendations for Auto Scaling groups that are configured to run instances of the M, C, R, T, and X instance families. The service does not generate recommendations for Auto Scaling groups that have a scaling policy attached to them, or that do not have the same values for desired, minimum, and maximum capacity. In order for Compute Optimizer to analyze your Auto Scaling groups, they must be of a fixed size. For more information, see the AWS Compute Optimizer User Guide (https://docs.aws.amazon.com/compute-optimizer/latest/ug/what-is.html).

// Example sending a request using GetAutoScalingGroupRecommendationsRequest.
req := client.GetAutoScalingGroupRecommendationsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetAutoScalingGroupRecommendations

func (*Client) GetEC2InstanceRecommendationsRequest

func (c *Client) GetEC2InstanceRecommendationsRequest(input *GetEC2InstanceRecommendationsInput) GetEC2InstanceRecommendationsRequest

GetEC2InstanceRecommendationsRequest returns a request value for making API operation for AWS Compute Optimizer.

Returns Amazon EC2 instance recommendations.

AWS Compute Optimizer currently generates recommendations for Amazon Elastic Compute Cloud (Amazon EC2) and Amazon EC2 Auto Scaling. It generates recommendations for M, C, R, T, and X instance families. For more information, see the AWS Compute Optimizer User Guide (https://docs.aws.amazon.com/compute-optimizer/latest/ug/what-is.html).

// Example sending a request using GetEC2InstanceRecommendationsRequest.
req := client.GetEC2InstanceRecommendationsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetEC2InstanceRecommendations

func (*Client) GetEC2RecommendationProjectedMetricsRequest

func (c *Client) GetEC2RecommendationProjectedMetricsRequest(input *GetEC2RecommendationProjectedMetricsInput) GetEC2RecommendationProjectedMetricsRequest

GetEC2RecommendationProjectedMetricsRequest returns a request value for making API operation for AWS Compute Optimizer.

Returns the projected utilization metrics of Amazon EC2 instance recommendations.

// Example sending a request using GetEC2RecommendationProjectedMetricsRequest.
req := client.GetEC2RecommendationProjectedMetricsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetEC2RecommendationProjectedMetrics

func (*Client) GetEnrollmentStatusRequest

func (c *Client) GetEnrollmentStatusRequest(input *GetEnrollmentStatusInput) GetEnrollmentStatusRequest

GetEnrollmentStatusRequest returns a request value for making API operation for AWS Compute Optimizer.

Returns the enrollment (opt in) status of an account to the AWS Compute Optimizer service.

If the account is a master account of an organization, this operation also confirms the enrollment status of member accounts within the organization.

// Example sending a request using GetEnrollmentStatusRequest.
req := client.GetEnrollmentStatusRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetEnrollmentStatus

func (*Client) GetRecommendationSummariesRequest

func (c *Client) GetRecommendationSummariesRequest(input *GetRecommendationSummariesInput) GetRecommendationSummariesRequest

GetRecommendationSummariesRequest returns a request value for making API operation for AWS Compute Optimizer.

Returns the optimization findings for an account.

For example, it returns the number of Amazon EC2 instances in an account that are under-provisioned, over-provisioned, or optimized. It also returns the number of Auto Scaling groups in an account that are not optimized, or optimized.

// Example sending a request using GetRecommendationSummariesRequest.
req := client.GetRecommendationSummariesRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/GetRecommendationSummaries

func (*Client) UpdateEnrollmentStatusRequest

func (c *Client) UpdateEnrollmentStatusRequest(input *UpdateEnrollmentStatusInput) UpdateEnrollmentStatusRequest

UpdateEnrollmentStatusRequest returns a request value for making API operation for AWS Compute Optimizer.

Updates the enrollment (opt in) status of an account to the AWS Compute Optimizer service.

If the account is a master account of an organization, this operation can also enroll member accounts within the organization.

// Example sending a request using UpdateEnrollmentStatusRequest.
req := client.UpdateEnrollmentStatusRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-2019-11-01/UpdateEnrollmentStatus

type Filter

type Filter struct {

	// The name of the filter.
	//
	// Specify Finding to filter the results to a specific findings classification.
	//
	// Specify RecommendationSourceType to filter the results to a specific resource
	// type.
	Name FilterName `locationName:"name" type:"string" enum:"true"`

	// The value of the filter.
	//
	// If you specify the name parameter as Finding, and you're recommendations
	// for an instance, then the valid values are Underprovisioned, Overprovisioned,
	// NotOptimized, or Optimized.
	//
	// If you specify the name parameter as Finding, and you're recommendations
	// for an Auto Scaling group, then the valid values are Optimized, or NotOptimized.
	//
	// If you specify the name parameter as RecommendationSourceType, then the valid
	// values are EC2Instance, or AutoScalingGroup.
	Values []string `locationName:"values" type:"list"`
	// contains filtered or unexported fields
}

Describes a filter that returns a more specific list of recommendations.

func (Filter) String

func (s Filter) String() string

String returns the string representation

type FilterName

type FilterName string
const (
	FilterNameFinding                  FilterName = "Finding"
	FilterNameRecommendationSourceType FilterName = "RecommendationSourceType"
)

Enum values for FilterName

func (FilterName) MarshalValue

func (enum FilterName) MarshalValue() (string, error)

func (FilterName) MarshalValueBuf

func (enum FilterName) MarshalValueBuf(b []byte) ([]byte, error)

type Finding

type Finding string
const (
	FindingUnderprovisioned Finding = "Underprovisioned"
	FindingOverprovisioned  Finding = "Overprovisioned"
	FindingOptimized        Finding = "Optimized"
	FindingNotOptimized     Finding = "NotOptimized"
)

Enum values for Finding

func (Finding) MarshalValue

func (enum Finding) MarshalValue() (string, error)

func (Finding) MarshalValueBuf

func (enum Finding) MarshalValueBuf(b []byte) ([]byte, error)

type GetAutoScalingGroupRecommendationsInput

type GetAutoScalingGroupRecommendationsInput struct {

	// The AWS account IDs for which to return Auto Scaling group recommendations.
	//
	// Only one account ID can be specified per request.
	AccountIds []string `locationName:"accountIds" type:"list"`

	// The Amazon Resource Name (ARN) of the Auto Scaling groups for which to return
	// recommendations.
	AutoScalingGroupArns []string `locationName:"autoScalingGroupArns" type:"list"`

	// An array of objects that describe a filter that returns a more specific list
	// of Auto Scaling group recommendations.
	Filters []Filter `locationName:"filters" type:"list"`

	// The maximum number of Auto Scaling group recommendations to return with a
	// single call.
	//
	// To retrieve the remaining results, make another call with the returned NextToken
	// value.
	MaxResults *int64 `locationName:"maxResults" type:"integer"`

	// The token to advance to the next page of Auto Scaling group recommendations.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

func (GetAutoScalingGroupRecommendationsInput) String

String returns the string representation

type GetAutoScalingGroupRecommendationsOutput

type GetAutoScalingGroupRecommendationsOutput struct {

	// An array of objects that describe Auto Scaling group recommendations.
	AutoScalingGroupRecommendations []AutoScalingGroupRecommendation `locationName:"autoScalingGroupRecommendations" type:"list"`

	// An array of objects that describe errors of the request.
	//
	// For example, an error is returned if you request recommendations for an unsupported
	// Auto Scaling group.
	Errors []GetRecommendationError `locationName:"errors" type:"list"`

	// The token to use to advance to the next page of Auto Scaling group recommendations.
	//
	// This value is null when there are no more pages of Auto Scaling group recommendations
	// to return.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

func (GetAutoScalingGroupRecommendationsOutput) String

String returns the string representation

type GetAutoScalingGroupRecommendationsRequest

GetAutoScalingGroupRecommendationsRequest is the request type for the GetAutoScalingGroupRecommendations API operation.

func (GetAutoScalingGroupRecommendationsRequest) Send

Send marshals and sends the GetAutoScalingGroupRecommendations API request.

type GetAutoScalingGroupRecommendationsResponse

type GetAutoScalingGroupRecommendationsResponse struct {
	*GetAutoScalingGroupRecommendationsOutput
	// contains filtered or unexported fields
}

GetAutoScalingGroupRecommendationsResponse is the response type for the GetAutoScalingGroupRecommendations API operation.

func (*GetAutoScalingGroupRecommendationsResponse) SDKResponseMetdata

func (r *GetAutoScalingGroupRecommendationsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetAutoScalingGroupRecommendations request.

type GetEC2InstanceRecommendationsInput

type GetEC2InstanceRecommendationsInput struct {

	// The AWS account IDs for which to return instance recommendations.
	//
	// Only one account ID can be specified per request.
	AccountIds []string `locationName:"accountIds" type:"list"`

	// An array of objects that describe a filter that returns a more specific list
	// of instance recommendations.
	Filters []Filter `locationName:"filters" type:"list"`

	// The Amazon Resource Name (ARN) of the instances for which to return recommendations.
	InstanceArns []string `locationName:"instanceArns" type:"list"`

	// The maximum number of instance recommendations to return with a single call.
	//
	// To retrieve the remaining results, make another call with the returned NextToken
	// value.
	MaxResults *int64 `locationName:"maxResults" type:"integer"`

	// The token to advance to the next page of instance recommendations.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

func (GetEC2InstanceRecommendationsInput) String

String returns the string representation

type GetEC2InstanceRecommendationsOutput

type GetEC2InstanceRecommendationsOutput struct {

	// An array of objects that describe errors of the request.
	//
	// For example, an error is returned if you request recommendations for an instance
	// of an unsupported instance family.
	Errors []GetRecommendationError `locationName:"errors" type:"list"`

	// An array of objects that describe instance recommendations.
	InstanceRecommendations []InstanceRecommendation `locationName:"instanceRecommendations" type:"list"`

	// The token to use to advance to the next page of instance recommendations.
	//
	// This value is null when there are no more pages of instance recommendations
	// to return.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

func (GetEC2InstanceRecommendationsOutput) String

String returns the string representation

type GetEC2InstanceRecommendationsRequest

type GetEC2InstanceRecommendationsRequest struct {
	*aws.Request
	Input *GetEC2InstanceRecommendationsInput
	Copy  func(*GetEC2InstanceRecommendationsInput) GetEC2InstanceRecommendationsRequest
}

GetEC2InstanceRecommendationsRequest is the request type for the GetEC2InstanceRecommendations API operation.

func (GetEC2InstanceRecommendationsRequest) Send

Send marshals and sends the GetEC2InstanceRecommendations API request.

type GetEC2InstanceRecommendationsResponse

type GetEC2InstanceRecommendationsResponse struct {
	*GetEC2InstanceRecommendationsOutput
	// contains filtered or unexported fields
}

GetEC2InstanceRecommendationsResponse is the response type for the GetEC2InstanceRecommendations API operation.

func (*GetEC2InstanceRecommendationsResponse) SDKResponseMetdata

func (r *GetEC2InstanceRecommendationsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetEC2InstanceRecommendations request.

type GetEC2RecommendationProjectedMetricsInput

type GetEC2RecommendationProjectedMetricsInput struct {

	// The time stamp of the last projected metrics data point to return.
	//
	// EndTime is a required field
	EndTime *time.Time `locationName:"endTime" type:"timestamp" required:"true"`

	// The Amazon Resource Name (ARN) of the instances for which to return recommendation
	// projected metrics.
	//
	// InstanceArn is a required field
	InstanceArn *string `locationName:"instanceArn" type:"string" required:"true"`

	// The granularity, in seconds, of the projected metrics data points.
	//
	// Period is a required field
	Period *int64 `locationName:"period" type:"integer" required:"true"`

	// The time stamp of the first projected metrics data point to return.
	//
	// StartTime is a required field
	StartTime *time.Time `locationName:"startTime" type:"timestamp" required:"true"`

	// The statistic of the projected metrics.
	//
	// Stat is a required field
	Stat MetricStatistic `locationName:"stat" type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

func (GetEC2RecommendationProjectedMetricsInput) String

String returns the string representation

func (*GetEC2RecommendationProjectedMetricsInput) Validate

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

type GetEC2RecommendationProjectedMetricsOutput

type GetEC2RecommendationProjectedMetricsOutput struct {

	// An array of objects that describe a projected metrics.
	RecommendedOptionProjectedMetrics []RecommendedOptionProjectedMetric `locationName:"recommendedOptionProjectedMetrics" type:"list"`
	// contains filtered or unexported fields
}

func (GetEC2RecommendationProjectedMetricsOutput) String

String returns the string representation

type GetEC2RecommendationProjectedMetricsRequest

GetEC2RecommendationProjectedMetricsRequest is the request type for the GetEC2RecommendationProjectedMetrics API operation.

func (GetEC2RecommendationProjectedMetricsRequest) Send

Send marshals and sends the GetEC2RecommendationProjectedMetrics API request.

type GetEC2RecommendationProjectedMetricsResponse

type GetEC2RecommendationProjectedMetricsResponse struct {
	*GetEC2RecommendationProjectedMetricsOutput
	// contains filtered or unexported fields
}

GetEC2RecommendationProjectedMetricsResponse is the response type for the GetEC2RecommendationProjectedMetrics API operation.

func (*GetEC2RecommendationProjectedMetricsResponse) SDKResponseMetdata

SDKResponseMetdata returns the response metadata for the GetEC2RecommendationProjectedMetrics request.

type GetEnrollmentStatusInput

type GetEnrollmentStatusInput struct {
	// contains filtered or unexported fields
}

func (GetEnrollmentStatusInput) String

func (s GetEnrollmentStatusInput) String() string

String returns the string representation

type GetEnrollmentStatusOutput

type GetEnrollmentStatusOutput struct {

	// Confirms the enrollment status of member accounts within the organization,
	// if the account is a master account of an organization.
	MemberAccountsEnrolled *bool `locationName:"memberAccountsEnrolled" type:"boolean"`

	// The enrollment status of the account.
	Status Status `locationName:"status" type:"string" enum:"true"`

	// The reason for the enrollment status of the account.
	//
	// For example, an account might show a status of Pending because member accounts
	// of an organization require more time to be enrolled in the service.
	StatusReason *string `locationName:"statusReason" type:"string"`
	// contains filtered or unexported fields
}

func (GetEnrollmentStatusOutput) String

func (s GetEnrollmentStatusOutput) String() string

String returns the string representation

type GetEnrollmentStatusRequest

type GetEnrollmentStatusRequest struct {
	*aws.Request
	Input *GetEnrollmentStatusInput
	Copy  func(*GetEnrollmentStatusInput) GetEnrollmentStatusRequest
}

GetEnrollmentStatusRequest is the request type for the GetEnrollmentStatus API operation.

func (GetEnrollmentStatusRequest) Send

Send marshals and sends the GetEnrollmentStatus API request.

type GetEnrollmentStatusResponse

type GetEnrollmentStatusResponse struct {
	*GetEnrollmentStatusOutput
	// contains filtered or unexported fields
}

GetEnrollmentStatusResponse is the response type for the GetEnrollmentStatus API operation.

func (*GetEnrollmentStatusResponse) SDKResponseMetdata

func (r *GetEnrollmentStatusResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetEnrollmentStatus request.

type GetRecommendationError

type GetRecommendationError struct {

	// The error code.
	Code *string `locationName:"code" type:"string"`

	// The ID of the error.
	Identifier *string `locationName:"identifier" type:"string"`

	// The message, or reason, for the error.
	Message *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

Describes an error experienced when getting recommendations.

For example, an error is returned if you request recommendations for an unsupported Auto Scaling group, or if you request recommendations for an instance of an unsupported instance family.

func (GetRecommendationError) String

func (s GetRecommendationError) String() string

String returns the string representation

type GetRecommendationSummariesInput

type GetRecommendationSummariesInput struct {

	// The AWS account IDs for which to return recommendation summaries.
	//
	// Only one account ID can be specified per request.
	AccountIds []string `locationName:"accountIds" type:"list"`

	// The maximum number of recommendation summaries to return with a single call.
	//
	// To retrieve the remaining results, make another call with the returned NextToken
	// value.
	MaxResults *int64 `locationName:"maxResults" type:"integer"`

	// The token to advance to the next page of recommendation summaries.
	NextToken *string `locationName:"nextToken" type:"string"`
	// contains filtered or unexported fields
}

func (GetRecommendationSummariesInput) String

String returns the string representation

type GetRecommendationSummariesOutput

type GetRecommendationSummariesOutput struct {

	// The token to use to advance to the next page of recommendation summaries.
	//
	// This value is null when there are no more pages of recommendation summaries
	// to return.
	NextToken *string `locationName:"nextToken" type:"string"`

	// An array of objects that summarize a recommendation.
	RecommendationSummaries []RecommendationSummary `locationName:"recommendationSummaries" type:"list"`
	// contains filtered or unexported fields
}

func (GetRecommendationSummariesOutput) String

String returns the string representation

type GetRecommendationSummariesRequest

type GetRecommendationSummariesRequest struct {
	*aws.Request
	Input *GetRecommendationSummariesInput
	Copy  func(*GetRecommendationSummariesInput) GetRecommendationSummariesRequest
}

GetRecommendationSummariesRequest is the request type for the GetRecommendationSummaries API operation.

func (GetRecommendationSummariesRequest) Send

Send marshals and sends the GetRecommendationSummaries API request.

type GetRecommendationSummariesResponse

type GetRecommendationSummariesResponse struct {
	*GetRecommendationSummariesOutput
	// contains filtered or unexported fields
}

GetRecommendationSummariesResponse is the response type for the GetRecommendationSummaries API operation.

func (*GetRecommendationSummariesResponse) SDKResponseMetdata

func (r *GetRecommendationSummariesResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetRecommendationSummaries request.

type InstanceRecommendation

type InstanceRecommendation struct {

	// The AWS account ID of the instance recommendation.
	AccountId *string `locationName:"accountId" type:"string"`

	// The instance type of the current instance.
	CurrentInstanceType *string `locationName:"currentInstanceType" type:"string"`

	// The finding classification for the instance.
	//
	// Findings for instances include:
	//
	//    * Underprovisioned —An instance is considered under-provisioned when
	//    at least one specification of your instance, such as CPU, memory, or network,
	//    does not meet the performance requirements of your workload. Under-provisioned
	//    instances may lead to poor application performance.
	//
	//    * Overprovisioned —An instance is considered over-provisioned when at
	//    least one specification of your instance, such as CPU, memory, or network,
	//    can be sized down while still meeting the performance requirements of
	//    your workload, and no specification is under-provisioned. Over-provisioned
	//    instances may lead to unnecessary infrastructure cost.
	//
	//    * Optimized —An instance is considered optimized when all specifications
	//    of your instance, such as CPU, memory, and network, meet the performance
	//    requirements of your workload and is not over provisioned. An optimized
	//    instance runs your workloads with optimal performance and infrastructure
	//    cost. For optimized resources, AWS Compute Optimizer might recommend a
	//    new generation instance type.
	//
	// The values that are returned might be UNDER_PROVISIONED, OVER_PROVISIONED,
	// or OPTIMIZED.
	Finding Finding `locationName:"finding" type:"string" enum:"true"`

	// The Amazon Resource Name (ARN) of the current instance.
	InstanceArn *string `locationName:"instanceArn" type:"string"`

	// The name of the current instance.
	InstanceName *string `locationName:"instanceName" type:"string"`

	// The time stamp of when the instance recommendation was last refreshed.
	LastRefreshTimestamp *time.Time `locationName:"lastRefreshTimestamp" type:"timestamp"`

	// The number of days for which utilization metrics were analyzed for the instance.
	LookBackPeriodInDays *float64 `locationName:"lookBackPeriodInDays" type:"double"`

	// An array of objects that describe the recommendation options for the instance.
	RecommendationOptions []InstanceRecommendationOption `locationName:"recommendationOptions" type:"list"`

	// An array of objects that describe the source resource of the recommendation.
	RecommendationSources []RecommendationSource `locationName:"recommendationSources" type:"list"`

	// An array of objects that describe the utilization metrics of the instance.
	UtilizationMetrics []UtilizationMetric `locationName:"utilizationMetrics" type:"list"`
	// contains filtered or unexported fields
}

Describes an Amazon EC2 instance recommendation.

func (InstanceRecommendation) String

func (s InstanceRecommendation) String() string

String returns the string representation

type InstanceRecommendationOption

type InstanceRecommendationOption struct {

	// The instance type of the instance recommendation.
	InstanceType *string `locationName:"instanceType" type:"string"`

	// The performance risk of the instance recommendation option.
	//
	// Performance risk is the likelihood of the recommended instance type not meeting
	// the performance requirement of your workload.
	//
	// The lowest performance risk is categorized as 0, and the highest as 5.
	PerformanceRisk *float64 `locationName:"performanceRisk" type:"double"`

	// An array of objects that describe the projected utilization metrics of the
	// instance recommendation option.
	ProjectedUtilizationMetrics []UtilizationMetric `locationName:"projectedUtilizationMetrics" type:"list"`

	// The rank of the instance recommendation option.
	//
	// The top recommendation option is ranked as 1.
	Rank *int64 `locationName:"rank" type:"integer"`
	// contains filtered or unexported fields
}

Describes a recommendation option for an Amazon EC2 instance.

func (InstanceRecommendationOption) String

String returns the string representation

type MetricName

type MetricName string
const (
	MetricNameCpu    MetricName = "Cpu"
	MetricNameMemory MetricName = "Memory"
)

Enum values for MetricName

func (MetricName) MarshalValue

func (enum MetricName) MarshalValue() (string, error)

func (MetricName) MarshalValueBuf

func (enum MetricName) MarshalValueBuf(b []byte) ([]byte, error)

type MetricStatistic

type MetricStatistic string
const (
	MetricStatisticMaximum MetricStatistic = "Maximum"
	MetricStatisticAverage MetricStatistic = "Average"
)

Enum values for MetricStatistic

func (MetricStatistic) MarshalValue

func (enum MetricStatistic) MarshalValue() (string, error)

func (MetricStatistic) MarshalValueBuf

func (enum MetricStatistic) MarshalValueBuf(b []byte) ([]byte, error)

type ProjectedMetric

type ProjectedMetric struct {

	// The name of the projected utilization metric.
	//
	// Memory metrics are only returned for resources that have the unified CloudWatch
	// agent installed on them. For more information, see Enabling Memory Utilization
	// with the CloudWatch Agent (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html).
	Name MetricName `locationName:"name" type:"string" enum:"true"`

	// The time stamps of the projected utilization metric.
	Timestamps []time.Time `locationName:"timestamps" type:"list"`

	// The values of the projected utilization metrics.
	Values []float64 `locationName:"values" type:"list"`
	// contains filtered or unexported fields
}

Describes a projected utilization metric of a recommendation option, such as an Amazon EC2 instance.

func (ProjectedMetric) String

func (s ProjectedMetric) String() string

String returns the string representation

type RecommendationSource

type RecommendationSource struct {

	// The Amazon Resource Name (ARN) of the recommendation source.
	RecommendationSourceArn *string `locationName:"recommendationSourceArn" type:"string"`

	// The resource type of the recommendation source.
	RecommendationSourceType RecommendationSourceType `locationName:"recommendationSourceType" type:"string" enum:"true"`
	// contains filtered or unexported fields
}

Describes the source of a recommendation, such as an Amazon EC2 instance or Auto Scaling group.

func (RecommendationSource) String

func (s RecommendationSource) String() string

String returns the string representation

type RecommendationSourceType

type RecommendationSourceType string
const (
	RecommendationSourceTypeEc2instance      RecommendationSourceType = "Ec2Instance"
	RecommendationSourceTypeAutoScalingGroup RecommendationSourceType = "AutoScalingGroup"
)

Enum values for RecommendationSourceType

func (RecommendationSourceType) MarshalValue

func (enum RecommendationSourceType) MarshalValue() (string, error)

func (RecommendationSourceType) MarshalValueBuf

func (enum RecommendationSourceType) MarshalValueBuf(b []byte) ([]byte, error)

type RecommendationSummary

type RecommendationSummary struct {

	// The AWS account ID of the recommendation summary.
	AccountId *string `locationName:"accountId" type:"string"`

	// The resource type of the recommendation.
	RecommendationResourceType RecommendationSourceType `locationName:"recommendationResourceType" type:"string" enum:"true"`

	// An array of objects that describe a recommendation summary.
	Summaries []Summary `locationName:"summaries" type:"list"`
	// contains filtered or unexported fields
}

A summary of a recommendation.

func (RecommendationSummary) String

func (s RecommendationSummary) String() string

String returns the string representation

type RecommendedOptionProjectedMetric

type RecommendedOptionProjectedMetric struct {

	// An array of objects that describe a projected utilization metric.
	ProjectedMetrics []ProjectedMetric `locationName:"projectedMetrics" type:"list"`

	// The rank of the recommendation option projected metric.
	//
	// The top recommendation option is ranked as 1.
	//
	// The projected metric rank correlates to the recommendation option rank. For
	// example, the projected metric ranked as 1 is related to the recommendation
	// option that is also ranked as 1 in the same response.
	Rank *int64 `locationName:"rank" type:"integer"`

	// The recommended instance type.
	RecommendedInstanceType *string `locationName:"recommendedInstanceType" type:"string"`
	// contains filtered or unexported fields
}

Describes a projected utilization metric of a recommendation option.

func (RecommendedOptionProjectedMetric) String

String returns the string representation

type Status

type Status string
const (
	StatusActive   Status = "Active"
	StatusInactive Status = "Inactive"
	StatusPending  Status = "Pending"
	StatusFailed   Status = "Failed"
)

Enum values for Status

func (Status) MarshalValue

func (enum Status) MarshalValue() (string, error)

func (Status) MarshalValueBuf

func (enum Status) MarshalValueBuf(b []byte) ([]byte, error)

type Summary

type Summary struct {

	// The finding classification of the recommendation.
	Name Finding `locationName:"name" type:"string" enum:"true"`

	// The value of the recommendation summary.
	Value *float64 `locationName:"value" type:"double"`
	// contains filtered or unexported fields
}

The summary of a recommendation.

func (Summary) String

func (s Summary) String() string

String returns the string representation

type UpdateEnrollmentStatusInput

type UpdateEnrollmentStatusInput struct {

	// Indicates whether to enroll member accounts within the organization, if the
	// account is a master account of an organization.
	IncludeMemberAccounts *bool `locationName:"includeMemberAccounts" type:"boolean"`

	// The new enrollment status of the account.
	//
	// Accepted options are Active or Inactive. You will get an error if Pending
	// or Failed are specified.
	//
	// Status is a required field
	Status Status `locationName:"status" type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

func (UpdateEnrollmentStatusInput) String

String returns the string representation

func (*UpdateEnrollmentStatusInput) Validate

func (s *UpdateEnrollmentStatusInput) Validate() error

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

type UpdateEnrollmentStatusOutput

type UpdateEnrollmentStatusOutput struct {

	// The enrollment status of the account.
	Status Status `locationName:"status" type:"string" enum:"true"`

	// The reason for the enrollment status of the account. For example, an account
	// might show a status of Pending because member accounts of an organization
	// require more time to be enrolled in the service.
	StatusReason *string `locationName:"statusReason" type:"string"`
	// contains filtered or unexported fields
}

func (UpdateEnrollmentStatusOutput) String

String returns the string representation

type UpdateEnrollmentStatusRequest

type UpdateEnrollmentStatusRequest struct {
	*aws.Request
	Input *UpdateEnrollmentStatusInput
	Copy  func(*UpdateEnrollmentStatusInput) UpdateEnrollmentStatusRequest
}

UpdateEnrollmentStatusRequest is the request type for the UpdateEnrollmentStatus API operation.

func (UpdateEnrollmentStatusRequest) Send

Send marshals and sends the UpdateEnrollmentStatus API request.

type UpdateEnrollmentStatusResponse

type UpdateEnrollmentStatusResponse struct {
	*UpdateEnrollmentStatusOutput
	// contains filtered or unexported fields
}

UpdateEnrollmentStatusResponse is the response type for the UpdateEnrollmentStatus API operation.

func (*UpdateEnrollmentStatusResponse) SDKResponseMetdata

func (r *UpdateEnrollmentStatusResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the UpdateEnrollmentStatus request.

type UtilizationMetric

type UtilizationMetric struct {

	// The name of the utilization metric.
	//
	// Memory metrics are only returned for resources that have the unified CloudWatch
	// agent installed on them. For more information, see Enabling Memory Utilization
	// with the CloudWatch Agent (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html).
	Name MetricName `locationName:"name" type:"string" enum:"true"`

	// The statistic of the utilization metric.
	Statistic MetricStatistic `locationName:"statistic" type:"string" enum:"true"`

	// The value of the utilization metric.
	Value *float64 `locationName:"value" type:"double"`
	// contains filtered or unexported fields
}

Describes a utilization metric of a resource, such as an Amazon EC2 instance.

func (UtilizationMetric) String

func (s UtilizationMetric) String() string

String returns the string representation

Directories

Path Synopsis
Package computeoptimizeriface provides an interface to enable mocking the AWS Compute Optimizer service client for testing your code.
Package computeoptimizeriface provides an interface to enable mocking the AWS Compute Optimizer service client for testing your code.

Jump to

Keyboard shortcuts

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