pub struct Client { /* private fields */ }Expand description
Client for Compute Optimizer Automation
Client for invoking operations on Compute Optimizer Automation. Each operation on Compute Optimizer Automation is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_computeoptimizerautomation::Client::new(&config);Occasionally, SDKs may have additional service-specific values that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Builder struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_computeoptimizerautomation::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the AssociateAccounts operation has
a Client::associate_accounts, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.associate_accounts()
.client_token("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn associate_accounts(&self) -> AssociateAccountsFluentBuilder
pub fn associate_accounts(&self) -> AssociateAccountsFluentBuilder
Constructs a fluent builder for the AssociateAccounts operation.
- The fluent builder is configurable:
account_ids(impl Into<String>)/set_account_ids(Option<Vec::<String>>):
required: trueThe IDs of the member accounts to associate. You can specify up to 50 account IDs.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique identifier to ensure idempotency of the request. Valid for 24 hours after creation.
- On success, responds with
AssociateAccountsOutputwith field(s):account_ids(Option<Vec::<String>>):The IDs of the member accounts that were successfully associated.
errors(Option<Vec::<String>>):Any errors that occurred during the association process.
- On failure, responds with
SdkError<AssociateAccountsError>
Source§impl Client
impl Client
Sourcepub fn create_automation_rule(&self) -> CreateAutomationRuleFluentBuilder
pub fn create_automation_rule(&self) -> CreateAutomationRuleFluentBuilder
Constructs a fluent builder for the CreateAutomationRule operation.
- The fluent builder is configurable:
name(impl Into<String>)/set_name(Option<String>):
required: trueThe name of the automation rule.
description(impl Into<String>)/set_description(Option<String>):
required: falseA description of the automation rule.
rule_type(RuleType)/set_rule_type(Option<RuleType>):
required: trueThe type of rule.
Only the management account or a delegated administrator can set the ruleType to be OrganizationRule.
organization_configuration(OrganizationConfiguration)/set_organization_configuration(Option<OrganizationConfiguration>):
required: falseConfiguration for organization-level rules. Required for OrganizationRule type.
priority(impl Into<String>)/set_priority(Option<String>):
required: falseA string representation of a decimal number between 0 and 1 (having up to 30 digits after the decimal point) that determines the priority of the rule. When multiple rules match the same recommended action, Compute Optimizer assigns the action to the rule with the lowest priority value (highest priority), even if that rule is scheduled to run later than other matching rules.
recommended_action_types(RecommendedActionType)/set_recommended_action_types(Option<Vec::<RecommendedActionType>>):
required: trueThe types of recommended actions this rule will automate.
criteria(Criteria)/set_criteria(Option<Criteria>):
required: falseA set of conditions that specify which recommended action qualify for implementation. When a rule is active and a recommended action matches these criteria, Compute Optimizer implements the action at the scheduled run time.
schedule(Schedule)/set_schedule(Option<Schedule>):
required: trueThe schedule for when the rule should run.
status(RuleStatus)/set_status(Option<RuleStatus>):
required: trueThe status of the rule
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: falseThe tags to associate with the rule.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique identifier to ensure idempotency of the request.
- On success, responds with
CreateAutomationRuleOutputwith field(s):rule_arn(Option<String>):The Amazon Resource Name (ARN) of the created rule.
rule_id(Option<String>):The unique identifier of the created rule.
name(Option<String>):The name of the automation rule. Must be 1-128 characters long and contain only alphanumeric characters, underscores, and hyphens.
description(Option<String>):A description of the automation rule. Can be up to 1024 characters long and contain alphanumeric characters, underscores, hyphens, spaces, and certain special characters.
rule_type(Option<RuleType>):The type of automation rule. Can be either OrganizationRule for organization-wide rules or AccountRule for account-specific rules.
rule_revision(Option<i64>):The revision number of the automation rule. This is incremented each time the rule is updated.
organization_configuration(Option<OrganizationConfiguration>):Configuration settings for organization-wide rules, including rule application order and target account IDs.
priority(Option<String>):The priority level of the automation rule, used to determine execution order when multiple rules apply to the same resource.
recommended_action_types(Option<Vec::<RecommendedActionType>>):List of recommended action types that this rule can execute, such as SnapshotAndDeleteUnattachedEbsVolume or UpgradeEbsVolumeType.
criteria(Option<Criteria>):A set of conditions that specify which recommended action qualify for implementation. When a rule is active and a recommended action matches these criteria, Compute Optimizer implements the action at the scheduled run time. You can specify up to 20 conditions per filter criteria and 20 values per condition.
schedule(Option<Schedule>):The schedule configuration for when the automation rule should execute, including cron expression, timezone, and execution window.
status(Option<RuleStatus>):The current status of the automation rule. Can be Active or Inactive.
tags(Option<Vec::<Tag>>):A list of key-value pairs used to categorize and organize the automation rule. Maximum of 200 tags allowed.
created_timestamp(Option<DateTime>):The timestamp when the automation rule was created.
- On failure, responds with
SdkError<CreateAutomationRuleError>
Source§impl Client
impl Client
Sourcepub fn delete_automation_rule(&self) -> DeleteAutomationRuleFluentBuilder
pub fn delete_automation_rule(&self) -> DeleteAutomationRuleFluentBuilder
Constructs a fluent builder for the DeleteAutomationRule operation.
- The fluent builder is configurable:
rule_arn(impl Into<String>)/set_rule_arn(Option<String>):
required: trueThe ARN of the rule to delete.
rule_revision(i64)/set_rule_revision(Option<i64>):
required: trueThe revision number of the rule to delete.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique identifier to ensure idempotency of the request.
- On success, responds with
DeleteAutomationRuleOutput - On failure, responds with
SdkError<DeleteAutomationRuleError>
Source§impl Client
impl Client
Sourcepub fn disassociate_accounts(&self) -> DisassociateAccountsFluentBuilder
pub fn disassociate_accounts(&self) -> DisassociateAccountsFluentBuilder
Constructs a fluent builder for the DisassociateAccounts operation.
- The fluent builder is configurable:
account_ids(impl Into<String>)/set_account_ids(Option<Vec::<String>>):
required: trueThe IDs of the member accounts to disassociate.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique identifier to ensure idempotency of the request.
- On success, responds with
DisassociateAccountsOutputwith field(s):account_ids(Option<Vec::<String>>):The IDs of the member accounts that were successfully disassociated.
errors(Option<Vec::<String>>):Any errors that occurred during the disassociation process.
- On failure, responds with
SdkError<DisassociateAccountsError>
Source§impl Client
impl Client
Sourcepub fn get_automation_event(&self) -> GetAutomationEventFluentBuilder
pub fn get_automation_event(&self) -> GetAutomationEventFluentBuilder
Constructs a fluent builder for the GetAutomationEvent operation.
- The fluent builder is configurable:
event_id(impl Into<String>)/set_event_id(Option<String>):
required: trueThe ID of the automation event to retrieve.
- On success, responds with
GetAutomationEventOutputwith field(s):event_id(Option<String>):The ID of the automation event to retrieve.
event_description(Option<String>):A description of the automation event.
event_type(Option<EventType>):The type of automation event.
event_status(Option<EventStatus>):The current status of the automation event.
event_status_reason(Option<String>):The reason for the current event status.
resource_arn(Option<String>):The Amazon Resource Name (ARN) of the resource affected by the automation event.
resource_id(Option<String>):The ID of the resource affected by the automation event.
recommended_action_id(Option<String>):The ID of the recommended action associated with this automation event.
account_id(Option<String>):The Amazon Web Services account ID associated with the automation event.
region(Option<String>):The Amazon Web Services Region where the automation event occurred.
rule_id(Option<String>):The ID of the automation rule that triggered this event.
resource_type(Option<ResourceType>):The type of resource affected by the automation event.
created_timestamp(Option<DateTime>):The timestamp when the automation event was created.
completed_timestamp(Option<DateTime>):The timestamp when the automation event completed.
estimated_monthly_savings(Option<EstimatedMonthlySavings>):Contains information about estimated monthly cost savings.
- On failure, responds with
SdkError<GetAutomationEventError>
Source§impl Client
impl Client
Sourcepub fn get_automation_rule(&self) -> GetAutomationRuleFluentBuilder
pub fn get_automation_rule(&self) -> GetAutomationRuleFluentBuilder
Constructs a fluent builder for the GetAutomationRule operation.
- The fluent builder is configurable:
rule_arn(impl Into<String>)/set_rule_arn(Option<String>):
required: trueThe ARN of the rule to retrieve.
- On success, responds with
GetAutomationRuleOutputwith field(s):rule_arn(Option<String>):The Amazon Resource Name (ARN) of the automation rule.
rule_id(Option<String>):The unique identifier of the automation rule.
name(Option<String>):The name of the automation rule.
description(Option<String>):A description of the automation rule.
rule_type(Option<RuleType>):The type of automation rule.
rule_revision(Option<i64>):The revision number of the automation rule.
account_id(Option<String>):The 12-digit Amazon Web Services account ID that owns this automation rule.
organization_configuration(Option<OrganizationConfiguration>):Configuration settings for organization-wide automation rules.
priority(Option<String>):A string representation of a decimal number between 0 and 1 (having up to 30 digits after the decimal point) that determines the priority of the rule.
recommended_action_types(Option<Vec::<RecommendedActionType>>):List of recommended action types that this rule can execute.
criteria(Option<Criteria>):A set of conditions that specify which recommended action qualify for implementation. When a rule is active and a recommended action matches these criteria, Compute Optimizer implements the action at the scheduled run time. You can specify up to 20 conditions per filter criteria and 20 values per condition.
schedule(Option<Schedule>):Configuration for scheduling when automation rules should execute, including timing and execution windows.
status(Option<RuleStatus>):The current status of the automation rule (Active or Inactive).
tags(Option<Vec::<Tag>>):The tags associated with the automation rule.
created_timestamp(Option<DateTime>):The timestamp when the automation rule was created.
last_updated_timestamp(Option<DateTime>):The timestamp when the automation rule was last updated.
- On failure, responds with
SdkError<GetAutomationRuleError>
Source§impl Client
impl Client
Sourcepub fn get_enrollment_configuration(
&self,
) -> GetEnrollmentConfigurationFluentBuilder
pub fn get_enrollment_configuration( &self, ) -> GetEnrollmentConfigurationFluentBuilder
Constructs a fluent builder for the GetEnrollmentConfiguration operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
GetEnrollmentConfigurationOutputwith field(s):status(EnrollmentStatus):The current enrollment status.
status_reason(Option<String>):The reason for the current enrollment status.
organization_rule_mode(Option<OrganizationRuleMode>):Specifies whether the management account can create Automation rules that implement optimization actions for this account.
last_updated_timestamp(Option<DateTime>):The timestamp of the last update to the enrollment configuration.
- On failure, responds with
SdkError<GetEnrollmentConfigurationError>
Source§impl Client
impl Client
Sourcepub fn list_accounts(&self) -> ListAccountsFluentBuilder
pub fn list_accounts(&self) -> ListAccountsFluentBuilder
Constructs a fluent builder for the ListAccounts operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results.
- On success, responds with
ListAccountsOutputwith field(s):accounts(Vec::<AccountInfo>):The list of accounts in your organization enrolled in Compute Optimizer
next_token(Option<String>):The token to use to retrieve the next page of results.
- On failure, responds with
SdkError<ListAccountsError>
Source§impl Client
impl Client
Sourcepub fn list_automation_event_steps(
&self,
) -> ListAutomationEventStepsFluentBuilder
pub fn list_automation_event_steps( &self, ) -> ListAutomationEventStepsFluentBuilder
Constructs a fluent builder for the ListAutomationEventSteps operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
event_id(impl Into<String>)/set_event_id(Option<String>):
required: trueThe ID of the automation event.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of automation event steps to return in a single response. Valid range is 1-1000.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token used for pagination to retrieve the next set of results when the response is truncated.
- On success, responds with
ListAutomationEventStepsOutputwith field(s):automation_event_steps(Option<Vec::<AutomationEventStep>>):The list of steps for the specified automation event.
next_token(Option<String>):A token used for pagination. If present, indicates there are more results available and can be used in subsequent requests.
- On failure, responds with
SdkError<ListAutomationEventStepsError>
Source§impl Client
impl Client
Sourcepub fn list_automation_event_summaries(
&self,
) -> ListAutomationEventSummariesFluentBuilder
pub fn list_automation_event_summaries( &self, ) -> ListAutomationEventSummariesFluentBuilder
Constructs a fluent builder for the ListAutomationEventSummaries operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filters(AutomationEventFilter)/set_filters(Option<Vec::<AutomationEventFilter>>):
required: falseThe filters to apply to the list of automation event summaries.
start_date_inclusive(impl Into<String>)/set_start_date_inclusive(Option<String>):
required: falseThe start date for filtering automation event summaries, inclusive. Events created on or after this date will be included.
end_date_exclusive(impl Into<String>)/set_end_date_exclusive(Option<String>):
required: falseThe end date for filtering automation event summaries, exclusive. Events created before this date will be included.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of automation event summaries to return in a single response. Valid range is 1-1000.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token used for pagination to retrieve the next set of results when the response is truncated.
- On success, responds with
ListAutomationEventSummariesOutputwith field(s):automation_event_summaries(Option<Vec::<AutomationEventSummary>>):The list of automation event summaries that match the specified criteria.
next_token(Option<String>):A token used for pagination. If present, indicates there are more results available and can be used in subsequent requests.
- On failure, responds with
SdkError<ListAutomationEventSummariesError>
Source§impl Client
impl Client
Sourcepub fn list_automation_events(&self) -> ListAutomationEventsFluentBuilder
pub fn list_automation_events(&self) -> ListAutomationEventsFluentBuilder
Constructs a fluent builder for the ListAutomationEvents operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filters(AutomationEventFilter)/set_filters(Option<Vec::<AutomationEventFilter>>):
required: falseThe filters to apply to the list of automation events.
start_time_inclusive(DateTime)/set_start_time_inclusive(Option<DateTime>):
required: falseThe start of the time range to query for events.
end_time_exclusive(DateTime)/set_end_time_exclusive(Option<DateTime>):
required: falseThe end of the time range to query for events.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of results to return in a single call.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseThe token for the next page of results.
- On success, responds with
ListAutomationEventsOutputwith field(s):automation_events(Option<Vec::<AutomationEvent>>):The list of automation events that match the specified criteria.
next_token(Option<String>):The token to use to retrieve the next page of results.
- On failure, responds with
SdkError<ListAutomationEventsError>
Source§impl Client
impl Client
Sourcepub fn list_automation_rule_preview(
&self,
) -> ListAutomationRulePreviewFluentBuilder
pub fn list_automation_rule_preview( &self, ) -> ListAutomationRulePreviewFluentBuilder
Constructs a fluent builder for the ListAutomationRulePreview operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
rule_type(RuleType)/set_rule_type(Option<RuleType>):
required: trueThe type of rule.
Only the management account or a delegated administrator can set the ruleType to be OrganizationRule.
organization_scope(OrganizationScope)/set_organization_scope(Option<OrganizationScope>):
required: falseThe organizational scope for the rule preview.
recommended_action_types(RecommendedActionType)/set_recommended_action_types(Option<Vec::<RecommendedActionType>>):
required: trueThe types of recommended actions to include in the preview.
criteria(Criteria)/set_criteria(Option<Criteria>):
required: falseA set of conditions that specify which recommended action qualify for implementation. When a rule is active and a recommended action matches these criteria, Compute Optimizer implements the action at the scheduled run time.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of automation rule preview results to return in a single response. Valid range is 1-1000.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token used for pagination to retrieve the next set of results when the response is truncated.
- On success, responds with
ListAutomationRulePreviewOutputwith field(s):preview_results(Option<Vec::<PreviewResult>>):The list of actions that would be taken based on the specified criteria.
next_token(Option<String>):A token used for pagination. If present, indicates there are more results available and can be used in subsequent requests.
- On failure, responds with
SdkError<ListAutomationRulePreviewError>
Source§impl Client
impl Client
Sourcepub fn list_automation_rule_preview_summaries(
&self,
) -> ListAutomationRulePreviewSummariesFluentBuilder
pub fn list_automation_rule_preview_summaries( &self, ) -> ListAutomationRulePreviewSummariesFluentBuilder
Constructs a fluent builder for the ListAutomationRulePreviewSummaries operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
rule_type(RuleType)/set_rule_type(Option<RuleType>):
required: trueThe type of rule.
organization_scope(OrganizationScope)/set_organization_scope(Option<OrganizationScope>):
required: falseThe organizational scope for the rule preview.
recommended_action_types(RecommendedActionType)/set_recommended_action_types(Option<Vec::<RecommendedActionType>>):
required: trueThe types of recommended actions to include in the preview.
criteria(Criteria)/set_criteria(Option<Criteria>):
required: falseA set of conditions that specify which recommended action qualify for implementation. When a rule is active and a recommended action matches these criteria, Compute Optimizer implements the action at the scheduled run time. You can specify up to 20 conditions per filter criteria and 20 values per condition.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of automation rule preview summaries to return in a single response. Valid range is 1-1000.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token used for pagination to retrieve the next set of results when the response is truncated.
- On success, responds with
ListAutomationRulePreviewSummariesOutputwith field(s):preview_result_summaries(Option<Vec::<PreviewResultSummary>>):The list of automation rule preview summaries that match the specified criteria.
next_token(Option<String>):A token used for pagination. If present, indicates there are more results available and can be used in subsequent requests.
- On failure, responds with
SdkError<ListAutomationRulePreviewSummariesError>
Source§impl Client
impl Client
Sourcepub fn list_automation_rules(&self) -> ListAutomationRulesFluentBuilder
pub fn list_automation_rules(&self) -> ListAutomationRulesFluentBuilder
Constructs a fluent builder for the ListAutomationRules operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filters(Filter)/set_filters(Option<Vec::<Filter>>):
required: falseThe filters to apply to the list of automation rules.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of automation rules to return in a single response. Valid range is 1-1000.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token used for pagination to retrieve the next set of results when the response is truncated.
- On success, responds with
ListAutomationRulesOutputwith field(s):automation_rules(Option<Vec::<AutomationRule>>):The list of automation rules that match the specified criteria.
next_token(Option<String>):A token used for pagination. If present, indicates there are more results available and can be used in subsequent requests.
- On failure, responds with
SdkError<ListAutomationRulesError>
Source§impl Client
impl Client
Sourcepub fn list_recommended_action_summaries(
&self,
) -> ListRecommendedActionSummariesFluentBuilder
pub fn list_recommended_action_summaries( &self, ) -> ListRecommendedActionSummariesFluentBuilder
Constructs a fluent builder for the ListRecommendedActionSummaries operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filters(RecommendedActionFilter)/set_filters(Option<Vec::<RecommendedActionFilter>>):
required: falseA list of filters to apply when retrieving recommended action summaries. Filters can be based on resource type, action type, account ID, and other criteria.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of recommended action summaries to return in a single response. Valid range is 1-1000.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token used for pagination to retrieve the next set of results when the response is truncated.
- On success, responds with
ListRecommendedActionSummariesOutputwith field(s):recommended_action_summaries(Option<Vec::<RecommendedActionSummary>>):The summary of recommended actions that match the specified criteria.
next_token(Option<String>):A token used for pagination. If present, indicates there are more results available and can be used in subsequent requests.
- On failure, responds with
SdkError<ListRecommendedActionSummariesError>
Source§impl Client
impl Client
Sourcepub fn list_recommended_actions(&self) -> ListRecommendedActionsFluentBuilder
pub fn list_recommended_actions(&self) -> ListRecommendedActionsFluentBuilder
Constructs a fluent builder for the ListRecommendedActions operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
filters(RecommendedActionFilter)/set_filters(Option<Vec::<RecommendedActionFilter>>):
required: falseThe filters to apply to the list of recommended actions.
max_results(i32)/set_max_results(Option<i32>):
required: falseThe maximum number of recommended actions to return in a single response. Valid range is 1-1000.
next_token(impl Into<String>)/set_next_token(Option<String>):
required: falseA token used for pagination to retrieve the next set of results when the response is truncated.
- On success, responds with
ListRecommendedActionsOutputwith field(s):recommended_actions(Option<Vec::<RecommendedAction>>):The list of recommended actions that match the specified criteria.
next_token(Option<String>):A token used for pagination. If present, indicates there are more results available and can be used in subsequent requests.
- On failure, responds with
SdkError<ListRecommendedActionsError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe ARN of the resource to list tags for.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<Vec::<Tag>>):The list of tags associated with the specified resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn rollback_automation_event(&self) -> RollbackAutomationEventFluentBuilder
pub fn rollback_automation_event(&self) -> RollbackAutomationEventFluentBuilder
Constructs a fluent builder for the RollbackAutomationEvent operation.
- The fluent builder is configurable:
event_id(impl Into<String>)/set_event_id(Option<String>):
required: trueThe ID of the automation event to roll back.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.
- On success, responds with
RollbackAutomationEventOutputwith field(s):event_id(Option<String>):The ID of the automation event being rolled back.
event_status(Option<EventStatus>):The current status of the rollback operation.
- On failure, responds with
SdkError<RollbackAutomationEventError>
Source§impl Client
impl Client
Sourcepub fn start_automation_event(&self) -> StartAutomationEventFluentBuilder
pub fn start_automation_event(&self) -> StartAutomationEventFluentBuilder
Constructs a fluent builder for the StartAutomationEvent operation.
- The fluent builder is configurable:
recommended_action_id(impl Into<String>)/set_recommended_action_id(Option<String>):
required: trueThe ID of the recommended action to automate.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.
- On success, responds with
StartAutomationEventOutputwith field(s):recommended_action_id(Option<String>):The ID of the recommended action being automated.
event_id(Option<String>):The ID of the automation event.
event_status(Option<EventStatus>):The current status of the automation event.
- On failure, responds with
SdkError<StartAutomationEventError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe ARN of the resource to tag.
rule_revision(i64)/set_rule_revision(Option<i64>):
required: trueThe revision number of the automation rule to tag. This ensures you’re tagging the correct version of the rule.
tags(Tag)/set_tags(Option<Vec::<Tag>>):
required: trueThe tags to add to the resource.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.
- On success, responds with
TagResourceOutput - On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):
required: trueThe ARN of the resource to untag.
rule_revision(i64)/set_rule_revision(Option<i64>):
required: trueThe revision number of the automation rule to untag. This ensures you’re untagging the correct version of the rule.
tag_keys(impl Into<String>)/set_tag_keys(Option<Vec::<String>>):
required: trueThe keys of the tags to remove from the resource.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_automation_rule(&self) -> UpdateAutomationRuleFluentBuilder
pub fn update_automation_rule(&self) -> UpdateAutomationRuleFluentBuilder
Constructs a fluent builder for the UpdateAutomationRule operation.
- The fluent builder is configurable:
rule_arn(impl Into<String>)/set_rule_arn(Option<String>):
required: trueThe ARN of the rule to update.
rule_revision(i64)/set_rule_revision(Option<i64>):
required: trueThe revision number of the rule to update.
name(impl Into<String>)/set_name(Option<String>):
required: falseThe updated name of the automation rule. Must be 1-128 characters long and contain only alphanumeric characters, underscores, and hyphens.
description(impl Into<String>)/set_description(Option<String>):
required: falseThe updated description of the automation rule. Can be up to 1024 characters long and contain alphanumeric characters, underscores, hyphens, spaces, and certain special characters.
rule_type(RuleType)/set_rule_type(Option<RuleType>):
required: falseThe updated type of automation rule. Can be either OrganizationRule for organization-wide rules or AccountRule for account-specific rules.
organization_configuration(OrganizationConfiguration)/set_organization_configuration(Option<OrganizationConfiguration>):
required: falseUpdated configuration settings for organization-wide rules, including rule application order and target account IDs.
priority(impl Into<String>)/set_priority(Option<String>):
required: falseThe updated priority level of the automation rule, used to determine execution order when multiple rules apply to the same resource.
recommended_action_types(RecommendedActionType)/set_recommended_action_types(Option<Vec::<RecommendedActionType>>):
required: falseUpdated list of recommended action types that this rule can execute, such as SnapshotAndDeleteUnattachedEbsVolume or UpgradeEbsVolumeType.
criteria(Criteria)/set_criteria(Option<Criteria>):
required: falseA set of conditions that specify which recommended action qualify for implementation. When a rule is active and a recommended action matches these criteria, Compute Optimizer implements the action at the scheduled run time. You can specify up to 20 conditions per filter criteria and 20 values per condition.
schedule(Schedule)/set_schedule(Option<Schedule>):
required: falseThe updated schedule configuration for when the automation rule should execute, including cron expression, timezone, and execution window.
status(RuleStatus)/set_status(Option<RuleStatus>):
required: falseThe updated status of the automation rule. Can be Active or Inactive.
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.
- On success, responds with
UpdateAutomationRuleOutputwith field(s):rule_arn(Option<String>):The ARN of the updated rule.
rule_revision(Option<i64>):The new revision number of the updated rule.
name(Option<String>):The updated name of the automation rule.
description(Option<String>):The updated description of the automation rule.
rule_type(Option<RuleType>):The updated type of automation rule.
organization_configuration(Option<OrganizationConfiguration>):The updated organization configuration settings.
priority(Option<String>):The updated priority level of the automation rule.
recommended_action_types(Option<Vec::<RecommendedActionType>>):The updated list of recommended action types.
criteria(Option<Criteria>):A set of conditions that specify which recommended action qualify for implementation. When a rule is active and a recommended action matches these criteria, Compute Optimizer implements the action at the scheduled run time. You can specify up to 20 conditions per filter criteria and 20 values per condition.
schedule(Option<Schedule>):The updated schedule configuration.
status(Option<RuleStatus>):The updated status of the automation rule.
created_timestamp(Option<DateTime>):The timestamp when the automation rule was originally created.
last_updated_timestamp(Option<DateTime>):The timestamp when the automation rule was last updated.
- On failure, responds with
SdkError<UpdateAutomationRuleError>
Source§impl Client
impl Client
Sourcepub fn update_enrollment_configuration(
&self,
) -> UpdateEnrollmentConfigurationFluentBuilder
pub fn update_enrollment_configuration( &self, ) -> UpdateEnrollmentConfigurationFluentBuilder
Constructs a fluent builder for the UpdateEnrollmentConfiguration operation.
- The fluent builder is configurable:
status(EnrollmentStatus)/set_status(Option<EnrollmentStatus>):
required: trueThe desired enrollment status.
-
Active - Enables the Automation feature for your account.
-
Inactive - Disables the Automation feature for your account and stops all of your automation rules. If you opt in again later, all rules will be inactive, and you must enable the rules you want to run. You must wait at least 24 hours after opting out to opt in again.
The
PendingandFailedoptions 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.If you are a member account, your account must be disassociated from your organization’s management account before you can disable Automation. Contact your administrator to make this change.
-
client_token(impl Into<String>)/set_client_token(Option<String>):
required: falseA unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Must be 1-64 characters long and contain only alphanumeric characters, underscores, and hyphens.
- On success, responds with
UpdateEnrollmentConfigurationOutputwith field(s):status(EnrollmentStatus):The updated enrollment status.
status_reason(Option<String>):The reason for the updated enrollment status.
last_updated_timestamp(DateTime):The timestamp when the enrollment configuration was last updated.
- On failure, responds with
SdkError<UpdateEnrollmentConfigurationError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);