#[non_exhaustive]pub struct Builder { /* private fields */ }
Expand description
A builder for LambdaFunctionRecommendation
Implementations
sourceimpl Builder
impl Builder
sourcepub fn function_arn(self, input: impl Into<String>) -> Self
pub fn function_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the current function.
sourcepub fn set_function_arn(self, input: Option<String>) -> Self
pub fn set_function_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the current function.
sourcepub fn function_version(self, input: impl Into<String>) -> Self
pub fn function_version(self, input: impl Into<String>) -> Self
The version number of the current function.
sourcepub fn set_function_version(self, input: Option<String>) -> Self
pub fn set_function_version(self, input: Option<String>) -> Self
The version number of the current function.
sourcepub fn account_id(self, input: impl Into<String>) -> Self
pub fn account_id(self, input: impl Into<String>) -> Self
The Amazon Web Services account ID of the function.
sourcepub fn set_account_id(self, input: Option<String>) -> Self
pub fn set_account_id(self, input: Option<String>) -> Self
The Amazon Web Services account ID of the function.
sourcepub fn current_memory_size(self, input: i32) -> Self
pub fn current_memory_size(self, input: i32) -> Self
The amount of memory, in MB, that's allocated to the current function.
sourcepub fn set_current_memory_size(self, input: Option<i32>) -> Self
pub fn set_current_memory_size(self, input: Option<i32>) -> Self
The amount of memory, in MB, that's allocated to the current function.
sourcepub fn number_of_invocations(self, input: i64) -> Self
pub fn number_of_invocations(self, input: i64) -> Self
The number of times your function code was applied during the look-back period.
sourcepub fn set_number_of_invocations(self, input: Option<i64>) -> Self
pub fn set_number_of_invocations(self, input: Option<i64>) -> Self
The number of times your function code was applied during the look-back period.
sourcepub fn utilization_metrics(self, input: LambdaFunctionUtilizationMetric) -> Self
pub fn utilization_metrics(self, input: LambdaFunctionUtilizationMetric) -> Self
Appends an item to utilization_metrics
.
To override the contents of this collection use set_utilization_metrics
.
An array of objects that describe the utilization metrics of the function.
sourcepub fn set_utilization_metrics(
self,
input: Option<Vec<LambdaFunctionUtilizationMetric>>
) -> Self
pub fn set_utilization_metrics(
self,
input: Option<Vec<LambdaFunctionUtilizationMetric>>
) -> Self
An array of objects that describe the utilization metrics of the function.
sourcepub fn lookback_period_in_days(self, input: f64) -> Self
pub fn lookback_period_in_days(self, input: f64) -> Self
The number of days for which utilization metrics were analyzed for the function.
sourcepub fn set_lookback_period_in_days(self, input: Option<f64>) -> Self
pub fn set_lookback_period_in_days(self, input: Option<f64>) -> Self
The number of days for which utilization metrics were analyzed for the function.
sourcepub fn last_refresh_timestamp(self, input: DateTime) -> Self
pub fn last_refresh_timestamp(self, input: DateTime) -> Self
The timestamp of when the function recommendation was last generated.
sourcepub fn set_last_refresh_timestamp(self, input: Option<DateTime>) -> Self
pub fn set_last_refresh_timestamp(self, input: Option<DateTime>) -> Self
The timestamp of when the function recommendation was last generated.
sourcepub fn finding(self, input: LambdaFunctionRecommendationFinding) -> Self
pub fn finding(self, input: LambdaFunctionRecommendationFinding) -> Self
The finding classification of the function.
Findings for functions include:
-
Optimized
— The function is correctly provisioned to run your workload based on its current configuration and its utilization history. This finding classification does not include finding reason codes. -
NotOptimized
— The function is performing at a higher level (over-provisioned) or at a lower level (under-provisioned) than required for your workload because its current configuration is not optimal. Over-provisioned resources might lead to unnecessary infrastructure cost, and under-provisioned resources might lead to poor application performance. This finding classification can include theMemoryUnderprovisioned
andMemoryUnderprovisioned
finding reason codes. -
Unavailable
— Compute Optimizer was unable to generate a recommendation for the function. This could be because the function has not accumulated sufficient metric data, or the function does not qualify for a recommendation. This finding classification can include theInsufficientData
andInconclusive
finding reason codes.Functions with a finding of unavailable are not returned unless you specify the
filter
parameter with a value ofUnavailable
in yourGetLambdaFunctionRecommendations
request.
sourcepub fn set_finding(
self,
input: Option<LambdaFunctionRecommendationFinding>
) -> Self
pub fn set_finding(
self,
input: Option<LambdaFunctionRecommendationFinding>
) -> Self
The finding classification of the function.
Findings for functions include:
-
Optimized
— The function is correctly provisioned to run your workload based on its current configuration and its utilization history. This finding classification does not include finding reason codes. -
NotOptimized
— The function is performing at a higher level (over-provisioned) or at a lower level (under-provisioned) than required for your workload because its current configuration is not optimal. Over-provisioned resources might lead to unnecessary infrastructure cost, and under-provisioned resources might lead to poor application performance. This finding classification can include theMemoryUnderprovisioned
andMemoryUnderprovisioned
finding reason codes. -
Unavailable
— Compute Optimizer was unable to generate a recommendation for the function. This could be because the function has not accumulated sufficient metric data, or the function does not qualify for a recommendation. This finding classification can include theInsufficientData
andInconclusive
finding reason codes.Functions with a finding of unavailable are not returned unless you specify the
filter
parameter with a value ofUnavailable
in yourGetLambdaFunctionRecommendations
request.
sourcepub fn finding_reason_codes(
self,
input: LambdaFunctionRecommendationFindingReasonCode
) -> Self
pub fn finding_reason_codes(
self,
input: LambdaFunctionRecommendationFindingReasonCode
) -> Self
Appends an item to finding_reason_codes
.
To override the contents of this collection use set_finding_reason_codes
.
The reason for the finding classification of the function.
Functions that have a finding classification of Optimized
don't have a finding reason code.
Finding reason codes for functions include:
-
MemoryOverprovisioned
— The function is over-provisioned when its memory configuration can be sized down while still meeting the performance requirements of your workload. An over-provisioned function might lead to unnecessary infrastructure cost. This finding reason code is part of theNotOptimized
finding classification. -
MemoryUnderprovisioned
— The function is under-provisioned when its memory configuration doesn't meet the performance requirements of the workload. An under-provisioned function might lead to poor application performance. This finding reason code is part of theNotOptimized
finding classification. -
InsufficientData
— The function does not have sufficient metric data for Compute Optimizer to generate a recommendation. For more information, see the Supported resources and requirements in the Compute Optimizer User Guide. This finding reason code is part of theUnavailable
finding classification. -
Inconclusive
— The function does not qualify for a recommendation because Compute Optimizer cannot generate a recommendation with a high degree of confidence. This finding reason code is part of theUnavailable
finding classification.
sourcepub fn set_finding_reason_codes(
self,
input: Option<Vec<LambdaFunctionRecommendationFindingReasonCode>>
) -> Self
pub fn set_finding_reason_codes(
self,
input: Option<Vec<LambdaFunctionRecommendationFindingReasonCode>>
) -> Self
The reason for the finding classification of the function.
Functions that have a finding classification of Optimized
don't have a finding reason code.
Finding reason codes for functions include:
-
MemoryOverprovisioned
— The function is over-provisioned when its memory configuration can be sized down while still meeting the performance requirements of your workload. An over-provisioned function might lead to unnecessary infrastructure cost. This finding reason code is part of theNotOptimized
finding classification. -
MemoryUnderprovisioned
— The function is under-provisioned when its memory configuration doesn't meet the performance requirements of the workload. An under-provisioned function might lead to poor application performance. This finding reason code is part of theNotOptimized
finding classification. -
InsufficientData
— The function does not have sufficient metric data for Compute Optimizer to generate a recommendation. For more information, see the Supported resources and requirements in the Compute Optimizer User Guide. This finding reason code is part of theUnavailable
finding classification. -
Inconclusive
— The function does not qualify for a recommendation because Compute Optimizer cannot generate a recommendation with a high degree of confidence. This finding reason code is part of theUnavailable
finding classification.
sourcepub fn memory_size_recommendation_options(
self,
input: LambdaFunctionMemoryRecommendationOption
) -> Self
pub fn memory_size_recommendation_options(
self,
input: LambdaFunctionMemoryRecommendationOption
) -> Self
Appends an item to memory_size_recommendation_options
.
To override the contents of this collection use set_memory_size_recommendation_options
.
An array of objects that describe the memory configuration recommendation options for the function.
sourcepub fn set_memory_size_recommendation_options(
self,
input: Option<Vec<LambdaFunctionMemoryRecommendationOption>>
) -> Self
pub fn set_memory_size_recommendation_options(
self,
input: Option<Vec<LambdaFunctionMemoryRecommendationOption>>
) -> Self
An array of objects that describe the memory configuration recommendation options for the function.
sourcepub fn current_performance_risk(self, input: CurrentPerformanceRisk) -> Self
pub fn current_performance_risk(self, input: CurrentPerformanceRisk) -> Self
The risk of the current Lambda function not meeting the performance needs of its workloads. The higher the risk, the more likely the current Lambda function requires more memory.
sourcepub fn set_current_performance_risk(
self,
input: Option<CurrentPerformanceRisk>
) -> Self
pub fn set_current_performance_risk(
self,
input: Option<CurrentPerformanceRisk>
) -> Self
The risk of the current Lambda function not meeting the performance needs of its workloads. The higher the risk, the more likely the current Lambda function requires more memory.
sourcepub fn build(self) -> LambdaFunctionRecommendation
pub fn build(self) -> LambdaFunctionRecommendation
Consumes the builder and constructs a LambdaFunctionRecommendation
Trait Implementations
impl StructuralPartialEq for Builder
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more