ComputeOptimizer
public struct ComputeOptimizer
Client object for interacting with AWS ComputeOptimizer service.
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, including the required permissions to use the service, see the AWS Compute Optimizer User Guide.
-
Undocumented
Declaration
Swift
public let client: AWSClient
-
Initialize the ComputeOptimizer client
Declaration
Swift
public init(accessKeyId: String? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil, region: AWSSDKSwiftCore.Region? = nil, endpoint: String? = nil, middlewares: [AWSServiceMiddleware] = [], eventLoopGroupProvider: AWSClient.EventLoopGroupProvider = .useAWSClientShared)
Parameters
accessKeyId
Public access key provided by AWS
secretAccessKey
Private access key provided by AWS
sessionToken
Token provided by STS.AssumeRole() which allows access to another AWS account
region
Region of server you want to communicate with
endpoint
Custom endpoint URL to use instead of standard AWS servers
middlewares
Array of middlewares to apply to requests and responses
eventLoopGroupProvider
EventLoopGroup to use. Use
useAWSClientShared
if the client shall manage its own EventLoopGroup.
-
Describes recommendation export jobs created in the last seven days. Use the ExportAutoScalingGroupRecommendations or ExportEC2InstanceRecommendations actions to request an export of your recommendations. Then use the DescribeRecommendationExportJobs action to view your export jobs.
Declaration
Swift
public func describeRecommendationExportJobs(_ input: DescribeRecommendationExportJobsRequest) -> EventLoopFuture<DescribeRecommendationExportJobsResponse>
-
Exports optimization recommendations for Auto Scaling groups. Recommendations are exported in a comma-separated values (.csv) file, and its metadata in a JavaScript Object Notation (.json) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see Exporting Recommendations in the Compute Optimizer User Guide. You can have only one Auto Scaling group export job in progress per AWS Region.
Declaration
Swift
public func exportAutoScalingGroupRecommendations(_ input: ExportAutoScalingGroupRecommendationsRequest) -> EventLoopFuture<ExportAutoScalingGroupRecommendationsResponse>
-
Exports optimization recommendations for Amazon EC2 instances. Recommendations are exported in a comma-separated values (.csv) file, and its metadata in a JavaScript Object Notation (.json) file, to an existing Amazon Simple Storage Service (Amazon S3) bucket that you specify. For more information, see Exporting Recommendations in the Compute Optimizer User Guide. You can have only one Amazon EC2 instance export job in progress per AWS Region.
Declaration
Swift
public func exportEC2InstanceRecommendations(_ input: ExportEC2InstanceRecommendationsRequest) -> EventLoopFuture<ExportEC2InstanceRecommendationsResponse>
-
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.
Declaration
Swift
public func getAutoScalingGroupRecommendations(_ input: GetAutoScalingGroupRecommendationsRequest) -> EventLoopFuture<GetAutoScalingGroupRecommendationsResponse>
-
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.
Declaration
Swift
public func getEC2InstanceRecommendations(_ input: GetEC2InstanceRecommendationsRequest) -> EventLoopFuture<GetEC2InstanceRecommendationsResponse>
-
Returns the projected utilization metrics of Amazon EC2 instance recommendations.
Declaration
Swift
public func getEC2RecommendationProjectedMetrics(_ input: GetEC2RecommendationProjectedMetricsRequest) -> EventLoopFuture<GetEC2RecommendationProjectedMetricsResponse>
-
Returns the enrollment (opt in) status of an account to the AWS Compute Optimizer service. If the account is the master account of an organization, this action also confirms the enrollment status of member accounts within the organization.
Declaration
Swift
public func getEnrollmentStatus(_ input: GetEnrollmentStatusRequest) -> EventLoopFuture<GetEnrollmentStatusResponse>
-
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.
Declaration
Swift
public func getRecommendationSummaries(_ input: GetRecommendationSummariesRequest) -> EventLoopFuture<GetRecommendationSummariesResponse>
-
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 action can also be used to enroll member accounts within the organization.
Declaration
Swift
public func updateEnrollmentStatus(_ input: UpdateEnrollmentStatusRequest) -> EventLoopFuture<UpdateEnrollmentStatusResponse>
-
Undocumented
See moreDeclaration
Swift
public enum ExportableAutoScalingGroupField : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum ExportableInstanceField : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum FileFormat : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum FilterName : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum Finding : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum JobFilterName : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum JobStatus : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum MetricName : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum MetricStatistic : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum RecommendationSourceType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum ResourceType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum Status : String, CustomStringConvertible, Codable