pub struct Builder { /* private fields */ }
Expand description

Implementations§

Appends an item to account_ids.

To override the contents of this collection use set_account_ids.

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.

Examples found in repository?
src/client.rs (line 1071)
1070
1071
1072
1073
        pub fn account_ids(mut self, input: impl Into<std::string::String>) -> Self {
            self.inner = self.inner.account_ids(input.into());
            self
        }

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.

Examples found in repository?
src/client.rs (line 1083)
1079
1080
1081
1082
1083
1084
1085
        pub fn set_account_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.inner = self.inner.set_account_ids(input);
            self
        }

Appends an item to filters.

To override the contents of this collection use set_filters.

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

Examples found in repository?
src/client.rs (line 1092)
1091
1092
1093
1094
        pub fn filters(mut self, input: crate::model::Filter) -> Self {
            self.inner = self.inner.filters(input);
            self
        }

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

Examples found in repository?
src/client.rs (line 1100)
1096
1097
1098
1099
1100
1101
1102
        pub fn set_filters(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Filter>>,
        ) -> Self {
            self.inner = self.inner.set_filters(input);
            self
        }

Appends an item to fields_to_export.

To override the contents of this collection use set_fields_to_export.

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.

Examples found in repository?
src/client.rs (line 1109)
1108
1109
1110
1111
        pub fn fields_to_export(mut self, input: crate::model::ExportableInstanceField) -> Self {
            self.inner = self.inner.fields_to_export(input);
            self
        }

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.

Examples found in repository?
src/client.rs (line 1117)
1113
1114
1115
1116
1117
1118
1119
        pub fn set_fields_to_export(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::ExportableInstanceField>>,
        ) -> Self {
            self.inner = self.inner.set_fields_to_export(input);
            self
        }

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 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 policy that you add to the S3 bucket. For more information, see Amazon S3 Bucket Policy for Compute Optimizer in the Compute Optimizer User Guide.

Examples found in repository?
src/client.rs (line 1123)
1122
1123
1124
1125
        pub fn s3_destination_config(mut self, input: crate::model::S3DestinationConfig) -> Self {
            self.inner = self.inner.s3_destination_config(input);
            self
        }

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 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 policy that you add to the S3 bucket. For more information, see Amazon S3 Bucket Policy for Compute Optimizer in the Compute Optimizer User Guide.

Examples found in repository?
src/client.rs (line 1132)
1128
1129
1130
1131
1132
1133
1134
        pub fn set_s3_destination_config(
            mut self,
            input: std::option::Option<crate::model::S3DestinationConfig>,
        ) -> Self {
            self.inner = self.inner.set_s3_destination_config(input);
            self
        }

The format of the export file.

The only export file format currently supported is Csv.

Examples found in repository?
src/client.rs (line 1138)
1137
1138
1139
1140
        pub fn file_format(mut self, input: crate::model::FileFormat) -> Self {
            self.inner = self.inner.file_format(input);
            self
        }

The format of the export file.

The only export file format currently supported is Csv.

Examples found in repository?
src/client.rs (line 1147)
1143
1144
1145
1146
1147
1148
1149
        pub fn set_file_format(
            mut self,
            input: std::option::Option<crate::model::FileFormat>,
        ) -> Self {
            self.inner = self.inner.set_file_format(input);
            self
        }

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.

Examples found in repository?
src/client.rs (line 1155)
1154
1155
1156
1157
        pub fn include_member_accounts(mut self, input: bool) -> Self {
            self.inner = self.inner.include_member_accounts(input);
            self
        }

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.

Examples found in repository?
src/client.rs (line 1163)
1162
1163
1164
1165
        pub fn set_include_member_accounts(mut self, input: std::option::Option<bool>) -> Self {
            self.inner = self.inner.set_include_member_accounts(input);
            self
        }

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

Examples found in repository?
src/client.rs (line 1171)
1167
1168
1169
1170
1171
1172
1173
        pub fn recommendation_preferences(
            mut self,
            input: crate::model::RecommendationPreferences,
        ) -> Self {
            self.inner = self.inner.recommendation_preferences(input);
            self
        }

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

Examples found in repository?
src/client.rs (line 1179)
1175
1176
1177
1178
1179
1180
1181
        pub fn set_recommendation_preferences(
            mut self,
            input: std::option::Option<crate::model::RecommendationPreferences>,
        ) -> Self {
            self.inner = self.inner.set_recommendation_preferences(input);
            self
        }

Consumes the builder and constructs a ExportEc2InstanceRecommendationsInput.

Examples found in repository?
src/client.rs (line 1030)
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
        pub async fn customize(
            self,
        ) -> std::result::Result<
            crate::operation::customize::CustomizableOperation<
                crate::operation::ExportEC2InstanceRecommendations,
                aws_http::retry::AwsResponseRetryClassifier,
            >,
            aws_smithy_http::result::SdkError<crate::error::ExportEC2InstanceRecommendationsError>,
        > {
            let handle = self.handle.clone();
            let operation = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            Ok(crate::operation::customize::CustomizableOperation { handle, operation })
        }

        /// Sends the request and returns the response.
        ///
        /// If an error occurs, an `SdkError` will be returned with additional details that
        /// can be matched against.
        ///
        /// By default, any retryable failures will be retried twice. Retry behavior
        /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
        /// set when configuring the client.
        pub async fn send(
            self,
        ) -> std::result::Result<
            crate::output::ExportEc2InstanceRecommendationsOutput,
            aws_smithy_http::result::SdkError<crate::error::ExportEC2InstanceRecommendationsError>,
        > {
            let op = self
                .inner
                .build()
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?
                .make_operation(&self.handle.conf)
                .await
                .map_err(aws_smithy_http::result::SdkError::construction_failure)?;
            self.handle.client.call(op).await
        }

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more