libZSservicesZSamazonka-compute-optimizerZSamazonka-compute-optimizer
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

Description

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) (.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 Amazon Web Services Region.

Synopsis

Creating a Request

data ExportEC2InstanceRecommendations Source #

See: newExportEC2InstanceRecommendations smart constructor.

Constructors

ExportEC2InstanceRecommendations' 

Fields

  • accountIds :: Maybe [Text]

    The IDs of the Amazon Web Services accounts for which to export instance recommendations.

    If your account is the management account of an organization, use this parameter to specify the member account for which you want to export recommendations.

    This parameter cannot be specified together with the include member accounts parameter. The parameters are mutually exclusive.

    Recommendations for member accounts are not included in the export if this parameter, or the include member accounts parameter, is omitted.

    You can specify multiple account IDs per request.

  • fileFormat :: Maybe FileFormat

    The format of the export file.

    The only export file format currently supported is Csv.

  • filters :: Maybe [Filter]

    An array of objects to specify a filter that exports a more specific set of instance recommendations.

  • fieldsToExport :: Maybe [ExportableInstanceField]

    The recommendations data to include in the export file. For more information about the fields that can be exported, see Exported files in the Compute Optimizer User Guide.

  • includeMemberAccounts :: Maybe Bool

    Indicates whether to include recommendations for resources in all member accounts of the organization if your account is the management account of an organization.

    The member accounts must also be opted in to Compute Optimizer, and trusted access for Compute Optimizer must be enabled in the organization account. For more information, see Compute Optimizer and Amazon Web Services Organizations trusted access in the Compute Optimizer User Guide.

    Recommendations for member accounts of the organization are not included in the export file if this parameter is omitted.

    Recommendations for member accounts are not included in the export if this parameter, or the account IDs parameter, is omitted.

  • recommendationPreferences :: Maybe RecommendationPreferences

    An object to specify the preferences for the Amazon EC2 instance recommendations to export.

  • s3DestinationConfig :: S3DestinationConfig

    An object to specify the destination Amazon Simple Storage Service (Amazon S3) bucket name and key prefix for the export job.

    You must create the destination Amazon S3 bucket for your recommendations export before you create the export job. Compute Optimizer does not create the S3 bucket for you. After you create the S3 bucket, ensure that it has the required permissions policy policy to allow Compute Optimizer to write the export file to it. If you plan to specify an object prefix when you create the export job, you must include the object prefix in the that you add to the S3 bucket. For more information, see Amazon S3 Bucket Policy for Compute Optimizer in the Compute Optimizer User Guide.

Instances

Instances details
Eq ExportEC2InstanceRecommendations Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

Read ExportEC2InstanceRecommendations Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

Show ExportEC2InstanceRecommendations Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

Generic ExportEC2InstanceRecommendations Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

Associated Types

type Rep ExportEC2InstanceRecommendations :: Type -> Type #

NFData ExportEC2InstanceRecommendations Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

Hashable ExportEC2InstanceRecommendations Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

ToJSON ExportEC2InstanceRecommendations Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

AWSRequest ExportEC2InstanceRecommendations Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

ToHeaders ExportEC2InstanceRecommendations Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

ToPath ExportEC2InstanceRecommendations Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

ToQuery ExportEC2InstanceRecommendations Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

type Rep ExportEC2InstanceRecommendations Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

type Rep ExportEC2InstanceRecommendations = D1 ('MetaData "ExportEC2InstanceRecommendations" "Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations" "libZSservicesZSamazonka-compute-optimizerZSamazonka-compute-optimizer" 'False) (C1 ('MetaCons "ExportEC2InstanceRecommendations'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "accountIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "fileFormat") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FileFormat)) :*: S1 ('MetaSel ('Just "filters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Filter])))) :*: ((S1 ('MetaSel ('Just "fieldsToExport") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [ExportableInstanceField])) :*: S1 ('MetaSel ('Just "includeMemberAccounts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "recommendationPreferences") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe RecommendationPreferences)) :*: S1 ('MetaSel ('Just "s3DestinationConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 S3DestinationConfig)))))
type AWSResponse ExportEC2InstanceRecommendations Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

newExportEC2InstanceRecommendations Source #

Create a value of ExportEC2InstanceRecommendations with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:accountIds:ExportEC2InstanceRecommendations', exportEC2InstanceRecommendations_accountIds - The IDs of the Amazon Web Services accounts for which to export instance recommendations.

If your account is the management account of an organization, use this parameter to specify the member account for which you want to export recommendations.

This parameter cannot be specified together with the include member accounts parameter. The parameters are mutually exclusive.

Recommendations for member accounts are not included in the export if this parameter, or the include member accounts parameter, is omitted.

You can specify multiple account IDs per request.

$sel:fileFormat:ExportEC2InstanceRecommendations', exportEC2InstanceRecommendations_fileFormat - The format of the export file.

The only export file format currently supported is Csv.

$sel:filters:ExportEC2InstanceRecommendations', exportEC2InstanceRecommendations_filters - An array of objects to specify a filter that exports a more specific set of instance recommendations.

$sel:fieldsToExport:ExportEC2InstanceRecommendations', exportEC2InstanceRecommendations_fieldsToExport - The recommendations data to include in the export file. For more information about the fields that can be exported, see Exported files in the Compute Optimizer User Guide.

$sel:includeMemberAccounts:ExportEC2InstanceRecommendations', exportEC2InstanceRecommendations_includeMemberAccounts - Indicates whether to include recommendations for resources in all member accounts of the organization if your account is the management account of an organization.

The member accounts must also be opted in to Compute Optimizer, and trusted access for Compute Optimizer must be enabled in the organization account. For more information, see Compute Optimizer and Amazon Web Services Organizations trusted access in the Compute Optimizer User Guide.

Recommendations for member accounts of the organization are not included in the export file if this parameter is omitted.

Recommendations for member accounts are not included in the export if this parameter, or the account IDs parameter, is omitted.

$sel:recommendationPreferences:ExportEC2InstanceRecommendations', exportEC2InstanceRecommendations_recommendationPreferences - An object to specify the preferences for the Amazon EC2 instance recommendations to export.

$sel:s3DestinationConfig:ExportEC2InstanceRecommendations', exportEC2InstanceRecommendations_s3DestinationConfig - An object to specify the destination Amazon Simple Storage Service (Amazon S3) bucket name and key prefix for the export job.

You must create the destination Amazon S3 bucket for your recommendations export before you create the export job. Compute Optimizer does not create the S3 bucket for you. After you create the S3 bucket, ensure that it has the required permissions policy policy to allow Compute Optimizer to write the export file to it. If you plan to specify an object prefix when you create the export job, you must include the object prefix in the that you add to the S3 bucket. For more information, see Amazon S3 Bucket Policy for Compute Optimizer in the Compute Optimizer User Guide.

Request Lenses

exportEC2InstanceRecommendations_accountIds :: Lens' ExportEC2InstanceRecommendations (Maybe [Text]) Source #

The IDs of the Amazon Web Services accounts for which to export instance recommendations.

If your account is the management account of an organization, use this parameter to specify the member account for which you want to export recommendations.

This parameter cannot be specified together with the include member accounts parameter. The parameters are mutually exclusive.

Recommendations for member accounts are not included in the export if this parameter, or the include member accounts parameter, is omitted.

You can specify multiple account IDs per request.

exportEC2InstanceRecommendations_fileFormat :: Lens' ExportEC2InstanceRecommendations (Maybe FileFormat) Source #

The format of the export file.

The only export file format currently supported is Csv.

exportEC2InstanceRecommendations_filters :: Lens' ExportEC2InstanceRecommendations (Maybe [Filter]) Source #

An array of objects to specify a filter that exports a more specific set of instance recommendations.

exportEC2InstanceRecommendations_fieldsToExport :: Lens' ExportEC2InstanceRecommendations (Maybe [ExportableInstanceField]) Source #

The recommendations data to include in the export file. For more information about the fields that can be exported, see Exported files in the Compute Optimizer User Guide.

exportEC2InstanceRecommendations_includeMemberAccounts :: Lens' ExportEC2InstanceRecommendations (Maybe Bool) Source #

Indicates whether to include recommendations for resources in all member accounts of the organization if your account is the management account of an organization.

The member accounts must also be opted in to Compute Optimizer, and trusted access for Compute Optimizer must be enabled in the organization account. For more information, see Compute Optimizer and Amazon Web Services Organizations trusted access in the Compute Optimizer User Guide.

Recommendations for member accounts of the organization are not included in the export file if this parameter is omitted.

Recommendations for member accounts are not included in the export if this parameter, or the account IDs parameter, is omitted.

exportEC2InstanceRecommendations_recommendationPreferences :: Lens' ExportEC2InstanceRecommendations (Maybe RecommendationPreferences) Source #

An object to specify the preferences for the Amazon EC2 instance recommendations to export.

exportEC2InstanceRecommendations_s3DestinationConfig :: Lens' ExportEC2InstanceRecommendations S3DestinationConfig Source #

An object to specify the destination Amazon Simple Storage Service (Amazon S3) bucket name and key prefix for the export job.

You must create the destination Amazon S3 bucket for your recommendations export before you create the export job. Compute Optimizer does not create the S3 bucket for you. After you create the S3 bucket, ensure that it has the required permissions policy policy to allow Compute Optimizer to write the export file to it. If you plan to specify an object prefix when you create the export job, you must include the object prefix in the that you add to the S3 bucket. For more information, see Amazon S3 Bucket Policy for Compute Optimizer in the Compute Optimizer User Guide.

Destructuring the Response

data ExportEC2InstanceRecommendationsResponse Source #

Constructors

ExportEC2InstanceRecommendationsResponse' 

Fields

  • jobId :: Maybe Text

    The identification number of the export job.

    Use the DescribeRecommendationExportJobs action, and specify the job ID to view the status of an export job.

  • s3Destination :: Maybe S3Destination

    An object that describes the destination Amazon S3 bucket of a recommendations export file.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq ExportEC2InstanceRecommendationsResponse Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

Read ExportEC2InstanceRecommendationsResponse Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

Show ExportEC2InstanceRecommendationsResponse Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

Generic ExportEC2InstanceRecommendationsResponse Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

NFData ExportEC2InstanceRecommendationsResponse Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

type Rep ExportEC2InstanceRecommendationsResponse Source # 
Instance details

Defined in Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations

type Rep ExportEC2InstanceRecommendationsResponse = D1 ('MetaData "ExportEC2InstanceRecommendationsResponse" "Amazonka.ComputeOptimizer.ExportEC2InstanceRecommendations" "libZSservicesZSamazonka-compute-optimizerZSamazonka-compute-optimizer" 'False) (C1 ('MetaCons "ExportEC2InstanceRecommendationsResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "jobId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "s3Destination") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe S3Destination)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newExportEC2InstanceRecommendationsResponse Source #

Create a value of ExportEC2InstanceRecommendationsResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:jobId:ExportEC2InstanceRecommendationsResponse', exportEC2InstanceRecommendationsResponse_jobId - The identification number of the export job.

Use the DescribeRecommendationExportJobs action, and specify the job ID to view the status of an export job.

$sel:s3Destination:ExportEC2InstanceRecommendationsResponse', exportEC2InstanceRecommendationsResponse_s3Destination - An object that describes the destination Amazon S3 bucket of a recommendations export file.

$sel:httpStatus:ExportEC2InstanceRecommendationsResponse', exportEC2InstanceRecommendationsResponse_httpStatus - The response's http status code.

Response Lenses

exportEC2InstanceRecommendationsResponse_jobId :: Lens' ExportEC2InstanceRecommendationsResponse (Maybe Text) Source #

The identification number of the export job.

Use the DescribeRecommendationExportJobs action, and specify the job ID to view the status of an export job.

exportEC2InstanceRecommendationsResponse_s3Destination :: Lens' ExportEC2InstanceRecommendationsResponse (Maybe S3Destination) Source #

An object that describes the destination Amazon S3 bucket of a recommendations export file.