Struct aws_sdk_computeoptimizer::client::Client
source · [−]pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* private fields */ }
Expand description
Client for AWS Compute Optimizer
Client for invoking operations on AWS Compute Optimizer. Each operation on AWS Compute Optimizer is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_computeoptimizer::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */
Constructing a client with custom configuration
use aws_config::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_computeoptimizer::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_computeoptimizer::Client::from_conf(config);
Implementations
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
impl<C, M, R> Client<C, M, R> where
C: SmithyConnector,
M: SmithyMiddleware<C>,
R: NewRequestPolicy,
Constructs a fluent builder for the DeleteRecommendationPreferences
operation.
- The fluent builder is configurable:
resource_type(ResourceType)
/set_resource_type(Option<ResourceType>)
:The target resource type of the recommendation preference to delete.
The
Ec2Instance
option encompasses standalone instances and instances that are part of Auto Scaling groups. TheAutoScalingGroup
option encompasses only instances that are part of an Auto Scaling group.scope(Scope)
/set_scope(Option<Scope>)
:An object that describes the scope of the recommendation preference to delete.
You can delete recommendation preferences that are created at the organization level (for management accounts of an organization only), account level, and resource level. For more information, see Activating enhanced infrastructure metrics in the Compute Optimizer User Guide.
recommendation_preference_names(Vec<RecommendationPreferenceName>)
/set_recommendation_preference_names(Option<Vec<RecommendationPreferenceName>>)
:The name of the recommendation preference to delete.
Enhanced infrastructure metrics (
EnhancedInfrastructureMetrics
) is the only feature that can be activated through preferences. Therefore, it is also the only recommendation preference that can be deleted.
- On success, responds with
DeleteRecommendationPreferencesOutput
- On failure, responds with
SdkError<DeleteRecommendationPreferencesError>
pub fn describe_recommendation_export_jobs(
&self
) -> DescribeRecommendationExportJobs<C, M, R>
pub fn describe_recommendation_export_jobs(
&self
) -> DescribeRecommendationExportJobs<C, M, R>
Constructs a fluent builder for the DescribeRecommendationExportJobs
operation.
- The fluent builder is configurable:
job_ids(Vec<String>)
/set_job_ids(Option<Vec<String>>)
:The identification numbers of the export jobs to return.
An export job ID is returned when you create an export using the
ExportAutoScalingGroupRecommendations
orExportEC2InstanceRecommendations
actions.All export jobs created in the last seven days are returned if this parameter is omitted.
filters(Vec<JobFilter>)
/set_filters(Option<Vec<JobFilter>>)
:An array of objects to specify a filter that returns a more specific list of export jobs.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token to advance to the next page of export jobs.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of export jobs to return with a single request.
To retrieve the remaining results, make another request with the returned
nextToken
value.
- On success, responds with
DescribeRecommendationExportJobsOutput
with field(s):recommendation_export_jobs(Option<Vec<RecommendationExportJob>>)
:An array of objects that describe recommendation export jobs.
next_token(Option<String>)
:The token to use to advance to the next page of export jobs.
This value is null when there are no more pages of export jobs to return.
- On failure, responds with
SdkError<DescribeRecommendationExportJobsError>
pub fn export_auto_scaling_group_recommendations(
&self
) -> ExportAutoScalingGroupRecommendations<C, M, R>
pub fn export_auto_scaling_group_recommendations(
&self
) -> ExportAutoScalingGroupRecommendations<C, M, R>
Constructs a fluent builder for the ExportAutoScalingGroupRecommendations
operation.
- The fluent builder is configurable:
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The IDs of the Amazon Web Services accounts for which to export Auto Scaling group 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.
filters(Vec<Filter>)
/set_filters(Option<Vec<Filter>>)
:An array of objects to specify a filter that exports a more specific set of Auto Scaling group recommendations.
fields_to_export(Vec<ExportableAutoScalingGroupField>)
/set_fields_to_export(Option<Vec<ExportableAutoScalingGroupField>>)
: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.
s3_destination_config(S3DestinationConfig)
/set_s3_destination_config(Option<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 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.
file_format(FileFormat)
/set_file_format(Option<FileFormat>)
:The format of the export file.
The only export file format currently supported is
Csv
.include_member_accounts(bool)
/set_include_member_accounts(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.
This parameter cannot be specified together with the account IDs parameter. The parameters are mutually exclusive.
Recommendations for member accounts are not included in the export if this parameter, or the account IDs parameter, is omitted.
recommendation_preferences(RecommendationPreferences)
/set_recommendation_preferences(Option<RecommendationPreferences>)
:An object to specify the preferences for the Auto Scaling group recommendations to export.
- On success, responds with
ExportAutoScalingGroupRecommendationsOutput
with field(s):job_id(Option<String>)
:The identification number of the export job.
Use the
DescribeRecommendationExportJobs
action, and specify the job ID to view the status of an export job.s3_destination(Option<S3Destination>)
:An object that describes the destination Amazon S3 bucket of a recommendations export file.
- On failure, responds with
SdkError<ExportAutoScalingGroupRecommendationsError>
Constructs a fluent builder for the ExportEBSVolumeRecommendations
operation.
- The fluent builder is configurable:
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The IDs of the Amazon Web Services accounts for which to export Amazon EBS volume 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.
filters(Vec<EbsFilter>)
/set_filters(Option<Vec<EbsFilter>>)
:An array of objects to specify a filter that exports a more specific set of Amazon EBS volume recommendations.
fields_to_export(Vec<ExportableVolumeField>)
/set_fields_to_export(Option<Vec<ExportableVolumeField>>)
: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.
s3_destination_config(S3DestinationConfig)
/set_s3_destination_config(Option<S3DestinationConfig>)
:Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and key prefix for a recommendations 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 permission 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.
file_format(FileFormat)
/set_file_format(Option<FileFormat>)
:The format of the export file.
The only export file format currently supported is
Csv
.include_member_accounts(bool)
/set_include_member_accounts(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.
This parameter cannot be specified together with the account IDs parameter. The parameters are mutually exclusive.
Recommendations for member accounts are not included in the export if this parameter, or the account IDs parameter, is omitted.
- On success, responds with
ExportEbsVolumeRecommendationsOutput
with field(s):job_id(Option<String>)
:The identification number of the export job.
Use the
DescribeRecommendationExportJobs
action, and specify the job ID to view the status of an export job.s3_destination(Option<S3Destination>)
:Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and object keys of a recommendations export file, and its associated metadata file.
- On failure, responds with
SdkError<ExportEBSVolumeRecommendationsError>
pub fn export_ec2_instance_recommendations(
&self
) -> ExportEC2InstanceRecommendations<C, M, R>
pub fn export_ec2_instance_recommendations(
&self
) -> ExportEC2InstanceRecommendations<C, M, R>
Constructs a fluent builder for the ExportEC2InstanceRecommendations
operation.
- The fluent builder is configurable:
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
: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.
filters(Vec<Filter>)
/set_filters(Option<Vec<Filter>>)
:An array of objects to specify a filter that exports a more specific set of instance recommendations.
fields_to_export(Vec<ExportableInstanceField>)
/set_fields_to_export(Option<Vec<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.
s3_destination_config(S3DestinationConfig)
/set_s3_destination_config(Option<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 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.
file_format(FileFormat)
/set_file_format(Option<FileFormat>)
:The format of the export file.
The only export file format currently supported is
Csv
.include_member_accounts(bool)
/set_include_member_accounts(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.
recommendation_preferences(RecommendationPreferences)
/set_recommendation_preferences(Option<RecommendationPreferences>)
:An object to specify the preferences for the Amazon EC2 instance recommendations to export.
- On success, responds with
ExportEc2InstanceRecommendationsOutput
with field(s):job_id(Option<String>)
:The identification number of the export job.
Use the
DescribeRecommendationExportJobs
action, and specify the job ID to view the status of an export job.s3_destination(Option<S3Destination>)
:An object that describes the destination Amazon S3 bucket of a recommendations export file.
- On failure, responds with
SdkError<ExportEC2InstanceRecommendationsError>
pub fn export_lambda_function_recommendations(
&self
) -> ExportLambdaFunctionRecommendations<C, M, R>
pub fn export_lambda_function_recommendations(
&self
) -> ExportLambdaFunctionRecommendations<C, M, R>
Constructs a fluent builder for the ExportLambdaFunctionRecommendations
operation.
- The fluent builder is configurable:
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The IDs of the Amazon Web Services accounts for which to export Lambda function 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.
filters(Vec<LambdaFunctionRecommendationFilter>)
/set_filters(Option<Vec<LambdaFunctionRecommendationFilter>>)
:An array of objects to specify a filter that exports a more specific set of Lambda function recommendations.
fields_to_export(Vec<ExportableLambdaFunctionField>)
/set_fields_to_export(Option<Vec<ExportableLambdaFunctionField>>)
: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.
s3_destination_config(S3DestinationConfig)
/set_s3_destination_config(Option<S3DestinationConfig>)
:Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and key prefix for a recommendations 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 permission 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.
file_format(FileFormat)
/set_file_format(Option<FileFormat>)
:The format of the export file.
The only export file format currently supported is
Csv
.include_member_accounts(bool)
/set_include_member_accounts(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.
This parameter cannot be specified together with the account IDs parameter. The parameters are mutually exclusive.
Recommendations for member accounts are not included in the export if this parameter, or the account IDs parameter, is omitted.
- On success, responds with
ExportLambdaFunctionRecommendationsOutput
with field(s):job_id(Option<String>)
:The identification number of the export job.
Use the
DescribeRecommendationExportJobs
action, and specify the job ID to view the status of an export job.s3_destination(Option<S3Destination>)
:Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name and object keys of a recommendations export file, and its associated metadata file.
- On failure, responds with
SdkError<ExportLambdaFunctionRecommendationsError>
pub fn get_auto_scaling_group_recommendations(
&self
) -> GetAutoScalingGroupRecommendations<C, M, R>
pub fn get_auto_scaling_group_recommendations(
&self
) -> GetAutoScalingGroupRecommendations<C, M, R>
Constructs a fluent builder for the GetAutoScalingGroupRecommendations
operation.
- The fluent builder is configurable:
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The ID of the Amazon Web Services account for which to return Auto Scaling group recommendations.
If your account is the management account of an organization, use this parameter to specify the member account for which you want to return Auto Scaling group recommendations.
Only one account ID can be specified per request.
auto_scaling_group_arns(Vec<String>)
/set_auto_scaling_group_arns(Option<Vec<String>>)
:The Amazon Resource Name (ARN) of the Auto Scaling groups for which to return recommendations.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token to advance to the next page of Auto Scaling group recommendations.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of Auto Scaling group recommendations to return with a single request.
To retrieve the remaining results, make another request with the returned
nextToken
value.filters(Vec<Filter>)
/set_filters(Option<Vec<Filter>>)
:An array of objects to specify a filter that returns a more specific list of Auto Scaling group recommendations.
recommendation_preferences(RecommendationPreferences)
/set_recommendation_preferences(Option<RecommendationPreferences>)
:An object to specify the preferences for the Auto Scaling group recommendations to return in the response.
- On success, responds with
GetAutoScalingGroupRecommendationsOutput
with field(s):next_token(Option<String>)
: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.
auto_scaling_group_recommendations(Option<Vec<AutoScalingGroupRecommendation>>)
:An array of objects that describe Auto Scaling group recommendations.
errors(Option<Vec<GetRecommendationError>>)
: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.
- On failure, responds with
SdkError<GetAutoScalingGroupRecommendationsError>
Constructs a fluent builder for the GetEBSVolumeRecommendations
operation.
- The fluent builder is configurable:
volume_arns(Vec<String>)
/set_volume_arns(Option<Vec<String>>)
:The Amazon Resource Name (ARN) of the volumes for which to return recommendations.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token to advance to the next page of volume recommendations.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of volume recommendations to return with a single request.
To retrieve the remaining results, make another request with the returned
nextToken
value.filters(Vec<EbsFilter>)
/set_filters(Option<Vec<EbsFilter>>)
:An array of objects to specify a filter that returns a more specific list of volume recommendations.
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The ID of the Amazon Web Services account for which to return volume recommendations.
If your account is the management account of an organization, use this parameter to specify the member account for which you want to return volume recommendations.
Only one account ID can be specified per request.
- On success, responds with
GetEbsVolumeRecommendationsOutput
with field(s):next_token(Option<String>)
:The token to use to advance to the next page of volume recommendations.
This value is null when there are no more pages of volume recommendations to return.
volume_recommendations(Option<Vec<VolumeRecommendation>>)
:An array of objects that describe volume recommendations.
errors(Option<Vec<GetRecommendationError>>)
:An array of objects that describe errors of the request.
For example, an error is returned if you request recommendations for an unsupported volume.
- On failure, responds with
SdkError<GetEBSVolumeRecommendationsError>
Constructs a fluent builder for the GetEC2InstanceRecommendations
operation.
- The fluent builder is configurable:
instance_arns(Vec<String>)
/set_instance_arns(Option<Vec<String>>)
:The Amazon Resource Name (ARN) of the instances for which to return recommendations.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token to advance to the next page of instance recommendations.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of instance recommendations to return with a single request.
To retrieve the remaining results, make another request with the returned
nextToken
value.filters(Vec<Filter>)
/set_filters(Option<Vec<Filter>>)
:An array of objects to specify a filter that returns a more specific list of instance recommendations.
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The ID of the Amazon Web Services account for which to return 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 return instance recommendations.
Only one account ID can be specified per request.
recommendation_preferences(RecommendationPreferences)
/set_recommendation_preferences(Option<RecommendationPreferences>)
:An object to specify the preferences for the Amazon EC2 instance recommendations to return in the response.
- On success, responds with
GetEc2InstanceRecommendationsOutput
with field(s):next_token(Option<String>)
: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.
instance_recommendations(Option<Vec<InstanceRecommendation>>)
:An array of objects that describe instance recommendations.
errors(Option<Vec<GetRecommendationError>>)
: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.
- On failure, responds with
SdkError<GetEC2InstanceRecommendationsError>
pub fn get_ec2_recommendation_projected_metrics(
&self
) -> GetEC2RecommendationProjectedMetrics<C, M, R>
pub fn get_ec2_recommendation_projected_metrics(
&self
) -> GetEC2RecommendationProjectedMetrics<C, M, R>
Constructs a fluent builder for the GetEC2RecommendationProjectedMetrics
operation.
- The fluent builder is configurable:
instance_arn(impl Into<String>)
/set_instance_arn(Option<String>)
:The Amazon Resource Name (ARN) of the instances for which to return recommendation projected metrics.
stat(MetricStatistic)
/set_stat(Option<MetricStatistic>)
:The statistic of the projected metrics.
period(i32)
/set_period(i32)
:The granularity, in seconds, of the projected metrics data points.
start_time(DateTime)
/set_start_time(Option<DateTime>)
:The timestamp of the first projected metrics data point to return.
end_time(DateTime)
/set_end_time(Option<DateTime>)
:The timestamp of the last projected metrics data point to return.
recommendation_preferences(RecommendationPreferences)
/set_recommendation_preferences(Option<RecommendationPreferences>)
:An object to specify the preferences for the Amazon EC2 recommendation projected metrics to return in the response.
- On success, responds with
GetEc2RecommendationProjectedMetricsOutput
with field(s):recommended_option_projected_metrics(Option<Vec<RecommendedOptionProjectedMetric>>)
:An array of objects that describes projected metrics.
- On failure, responds with
SdkError<GetEC2RecommendationProjectedMetricsError>
pub fn get_effective_recommendation_preferences(
&self
) -> GetEffectiveRecommendationPreferences<C, M, R>
pub fn get_effective_recommendation_preferences(
&self
) -> GetEffectiveRecommendationPreferences<C, M, R>
Constructs a fluent builder for the GetEffectiveRecommendationPreferences
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The Amazon Resource Name (ARN) of the resource for which to confirm effective recommendation preferences. Only EC2 instance and Auto Scaling group ARNs are currently supported.
- On success, responds with
GetEffectiveRecommendationPreferencesOutput
with field(s):enhanced_infrastructure_metrics(Option<EnhancedInfrastructureMetrics>)
:The status of the enhanced infrastructure metrics recommendation preference. Considers all applicable preferences that you might have set at the resource, account, and organization level.
A status of
Active
confirms that the preference is applied in the latest recommendation refresh, and a status ofInactive
confirms that it’s not yet applied to recommendations.To validate whether the preference is applied to your last generated set of recommendations, review the
effectiveRecommendationPreferences
value in the response of theGetAutoScalingGroupRecommendations
andGetEC2InstanceRecommendations
actions.For more information, see Enhanced infrastructure metrics in the Compute Optimizer User Guide.
- On failure, responds with
SdkError<GetEffectiveRecommendationPreferencesError>
Constructs a fluent builder for the GetEnrollmentStatus
operation.
- The fluent builder takes no input, just
send
it. - On success, responds with
GetEnrollmentStatusOutput
with field(s):status(Option<Status>)
:The enrollment status of the account.
status_reason(Option<String>)
: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.member_accounts_enrolled(bool)
:Confirms the enrollment status of member accounts of the organization, if the account is a management account of an organization.
last_updated_timestamp(Option<DateTime>)
:The Unix epoch timestamp, in seconds, of when the account enrollment status was last updated.
number_of_member_accounts_opted_in(Option<i32>)
:The count of organization member accounts that are opted in to the service, if your account is an organization management account.
- On failure, responds with
SdkError<GetEnrollmentStatusError>
pub fn get_enrollment_statuses_for_organization(
&self
) -> GetEnrollmentStatusesForOrganization<C, M, R>
pub fn get_enrollment_statuses_for_organization(
&self
) -> GetEnrollmentStatusesForOrganization<C, M, R>
Constructs a fluent builder for the GetEnrollmentStatusesForOrganization
operation.
- The fluent builder is configurable:
filters(Vec<EnrollmentFilter>)
/set_filters(Option<Vec<EnrollmentFilter>>)
:An array of objects to specify a filter that returns a more specific list of account enrollment statuses.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token to advance to the next page of account enrollment statuses.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of account enrollment statuses to return with a single request. You can specify up to 100 statuses to return with each request.
To retrieve the remaining results, make another request with the returned
nextToken
value.
- On success, responds with
GetEnrollmentStatusesForOrganizationOutput
with field(s):account_enrollment_statuses(Option<Vec<AccountEnrollmentStatus>>)
:An array of objects that describe the enrollment statuses of organization member accounts.
next_token(Option<String>)
:The token to use to advance to the next page of account enrollment statuses.
This value is null when there are no more pages of account enrollment statuses to return.
- On failure, responds with
SdkError<GetEnrollmentStatusesForOrganizationError>
pub fn get_lambda_function_recommendations(
&self
) -> GetLambdaFunctionRecommendations<C, M, R>
pub fn get_lambda_function_recommendations(
&self
) -> GetLambdaFunctionRecommendations<C, M, R>
Constructs a fluent builder for the GetLambdaFunctionRecommendations
operation.
- The fluent builder is configurable:
function_arns(Vec<String>)
/set_function_arns(Option<Vec<String>>)
:The Amazon Resource Name (ARN) of the functions for which to return recommendations.
You can specify a qualified or unqualified ARN. If you specify an unqualified ARN without a function version suffix, Compute Optimizer will return recommendations for the latest (
$LATEST
) version of the function. If you specify a qualified ARN with a version suffix, Compute Optimizer will return recommendations for the specified function version. For more information about using function versions, see Using versions in the Lambda Developer Guide.account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The ID of the Amazon Web Services account for which to return function recommendations.
If your account is the management account of an organization, use this parameter to specify the member account for which you want to return function recommendations.
Only one account ID can be specified per request.
filters(Vec<LambdaFunctionRecommendationFilter>)
/set_filters(Option<Vec<LambdaFunctionRecommendationFilter>>)
:An array of objects to specify a filter that returns a more specific list of function recommendations.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token to advance to the next page of function recommendations.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of function recommendations to return with a single request.
To retrieve the remaining results, make another request with the returned
nextToken
value.
- On success, responds with
GetLambdaFunctionRecommendationsOutput
with field(s):next_token(Option<String>)
:The token to use to advance to the next page of function recommendations.
This value is null when there are no more pages of function recommendations to return.
lambda_function_recommendations(Option<Vec<LambdaFunctionRecommendation>>)
:An array of objects that describe function recommendations.
- On failure, responds with
SdkError<GetLambdaFunctionRecommendationsError>
Constructs a fluent builder for the GetRecommendationPreferences
operation.
- The fluent builder is configurable:
resource_type(ResourceType)
/set_resource_type(Option<ResourceType>)
:The target resource type of the recommendation preference for which to return preferences.
The
Ec2Instance
option encompasses standalone instances and instances that are part of Auto Scaling groups. TheAutoScalingGroup
option encompasses only instances that are part of an Auto Scaling group.scope(Scope)
/set_scope(Option<Scope>)
:An object that describes the scope of the recommendation preference to return.
You can return recommendation preferences that are created at the organization level (for management accounts of an organization only), account level, and resource level. For more information, see Activating enhanced infrastructure metrics in the Compute Optimizer User Guide.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token to advance to the next page of recommendation preferences.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of recommendation preferences to return with a single request.
To retrieve the remaining results, make another request with the returned
nextToken
value.
- On success, responds with
GetRecommendationPreferencesOutput
with field(s):next_token(Option<String>)
:The token to use to advance to the next page of recommendation preferences.
This value is null when there are no more pages of recommendation preferences to return.
recommendation_preferences_details(Option<Vec<RecommendationPreferencesDetail>>)
:An array of objects that describe recommendation preferences.
- On failure, responds with
SdkError<GetRecommendationPreferencesError>
Constructs a fluent builder for the GetRecommendationSummaries
operation.
- The fluent builder is configurable:
account_ids(Vec<String>)
/set_account_ids(Option<Vec<String>>)
:The ID of the Amazon Web Services account for which to return recommendation summaries.
If your account is the management account of an organization, use this parameter to specify the member account for which you want to return recommendation summaries.
Only one account ID can be specified per request.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token to advance to the next page of recommendation summaries.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of recommendation summaries to return with a single request.
To retrieve the remaining results, make another request with the returned
nextToken
value.
- On success, responds with
GetRecommendationSummariesOutput
with field(s):next_token(Option<String>)
: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.
recommendation_summaries(Option<Vec<RecommendationSummary>>)
:An array of objects that summarize a recommendation.
- On failure, responds with
SdkError<GetRecommendationSummariesError>
Constructs a fluent builder for the PutRecommendationPreferences
operation.
- The fluent builder is configurable:
resource_type(ResourceType)
/set_resource_type(Option<ResourceType>)
:The target resource type of the recommendation preference to create.
The
Ec2Instance
option encompasses standalone instances and instances that are part of Auto Scaling groups. TheAutoScalingGroup
option encompasses only instances that are part of an Auto Scaling group.scope(Scope)
/set_scope(Option<Scope>)
:An object that describes the scope of the recommendation preference to create.
You can create recommendation preferences at the organization level (for management accounts of an organization only), account level, and resource level. For more information, see Activating enhanced infrastructure metrics in the Compute Optimizer User Guide.
You cannot create recommendation preferences for Auto Scaling groups at the organization and account levels. You can create recommendation preferences for Auto Scaling groups only at the resource level by specifying a scope name of
ResourceArn
and a scope value of the Auto Scaling group Amazon Resource Name (ARN). This will configure the preference for all instances that are part of the specified Auto Scaling group. You also cannot create recommendation preferences at the resource level for instances that are part of an Auto Scaling group. You can create recommendation preferences at the resource level only for standalone instances.enhanced_infrastructure_metrics(EnhancedInfrastructureMetrics)
/set_enhanced_infrastructure_metrics(Option<EnhancedInfrastructureMetrics>)
:The status of the enhanced infrastructure metrics recommendation preference to create or update.
Specify the
Active
status to activate the preference, or specifyInactive
to deactivate the preference.For more information, see Enhanced infrastructure metrics in the Compute Optimizer User Guide.
inferred_workload_types(InferredWorkloadTypesPreference)
/set_inferred_workload_types(Option<InferredWorkloadTypesPreference>)
:The status of the inferred workload types recommendation preference to create or update.
The inferred workload type feature is active by default. To deactivate it, create a recommendation preference.
Specify the
Inactive
status to deactivate the feature, or specifyActive
to activate it.For more information, see Inferred workload types in the Compute Optimizer User Guide.
- On success, responds with
PutRecommendationPreferencesOutput
- On failure, responds with
SdkError<PutRecommendationPreferencesError>
Constructs a fluent builder for the UpdateEnrollmentStatus
operation.
- The fluent builder is configurable:
status(Status)
/set_status(Option<Status>)
:The new enrollment status of the account.
The following status options are available:
-
Active
- Opts in your account to the Compute Optimizer service. Compute Optimizer begins analyzing the configuration and utilization metrics of your Amazon Web Services resources after you opt in. For more information, see Metrics analyzed by Compute Optimizer in the Compute Optimizer User Guide. -
Inactive
- Opts out your account from the Compute Optimizer service. Your account’s recommendations and related metrics data will be deleted from Compute Optimizer after you opt out.
The
Pending
andFailed
options cannot be used to update the enrollment status of an account. They are returned in the response of a request to update the enrollment status of an account.-
include_member_accounts(bool)
/set_include_member_accounts(bool)
:Indicates whether to enroll member accounts of the organization if the account is the management account of an organization.
- On success, responds with
UpdateEnrollmentStatusOutput
with field(s):status(Option<Status>)
:The enrollment status of the account.
status_reason(Option<String>)
: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.
- On failure, responds with
SdkError<UpdateEnrollmentStatusError>
Creates a client with the given service config and connector override.
Trait Implementations
Auto Trait Implementations
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !RefUnwindSafe for Client<C, M, R>
impl<C = DynConnector, M = DefaultMiddleware, R = Standard> !UnwindSafe for Client<C, M, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
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