ComputeOptimizerAutomationClient#
Index > ComputeOptimizerAutomation > ComputeOptimizerAutomationClient
Auto-generated documentation for ComputeOptimizerAutomation type annotations stubs module mypy-boto3-compute-optimizer-automation.
ComputeOptimizerAutomationClient#
Type annotations and code completion for boto3.client("compute-optimizer-automation").
boto3 documentation
# ComputeOptimizerAutomationClient usage example
from boto3.session import Session
from mypy_boto3_compute_optimizer_automation.client import ComputeOptimizerAutomationClient
def get_compute-optimizer-automation_client() -> ComputeOptimizerAutomationClient:
return Session().client("compute-optimizer-automation")
Exceptions#
boto3 client exceptions are generated in runtime.
This class provides code completion for boto3.client("compute-optimizer-automation").exceptions structure.
# Exceptions.exceptions usage example
client = boto3.client("compute-optimizer-automation")
try:
do_something(client)
except (
client.exceptions.AccessDeniedException,
client.exceptions.ClientError,
client.exceptions.ForbiddenException,
client.exceptions.IdempotencyTokenInUseException,
client.exceptions.IdempotentParameterMismatchException,
client.exceptions.InternalServerException,
client.exceptions.InvalidParameterValueException,
client.exceptions.NotManagementAccountException,
client.exceptions.OptInRequiredException,
client.exceptions.ResourceNotFoundException,
client.exceptions.ServiceQuotaExceededException,
client.exceptions.ServiceUnavailableException,
client.exceptions.ThrottlingException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_compute_optimizer_automation.client import Exceptions
def handle_error(exc: Exceptions.AccessDeniedException) -> None:
...
Methods#
can_paginate#
Type annotations and code completion for boto3.client("compute-optimizer-automation").can_paginate method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
generate_presigned_url#
Type annotations and code completion for boto3.client("compute-optimizer-automation").generate_presigned_url method.
boto3 documentation
# generate_presigned_url method definition
def generate_presigned_url(
self,
ClientMethod: str,
Params: Mapping[str, Any] = ...,
ExpiresIn: int = 3600,
HttpMethod: str = ...,
) -> str:
...
associate_accounts#
Associates one or more member accounts with your organization's management account, enabling centralized implementation of optimization actions across those accounts.
Type annotations and code completion for boto3.client("compute-optimizer-automation").associate_accounts method.
boto3 documentation
# associate_accounts method definition
def associate_accounts(
self,
*,
accountIds: Sequence[str],
clientToken: str = ...,
) -> AssociateAccountsResponseTypeDef: # (1)
...
# associate_accounts method usage example with argument unpacking
kwargs: AssociateAccountsRequestTypeDef = { # (1)
"accountIds": ...,
}
parent.associate_accounts(**kwargs)
create_automation_rule#
Creates a new automation rule to apply recommended actions to resources based on specified criteria.
Type annotations and code completion for boto3.client("compute-optimizer-automation").create_automation_rule method.
boto3 documentation
# create_automation_rule method definition
def create_automation_rule(
self,
*,
name: str,
ruleType: RuleTypeType, # (1)
recommendedActionTypes: Sequence[RecommendedActionTypeType], # (2)
schedule: ScheduleTypeDef, # (3)
status: RuleStatusType, # (4)
description: str = ...,
organizationConfiguration: OrganizationConfigurationUnionTypeDef = ..., # (5)
priority: str = ...,
criteria: CriteriaUnionTypeDef = ..., # (6)
tags: Sequence[TagTypeDef] = ..., # (7)
clientToken: str = ...,
) -> CreateAutomationRuleResponseTypeDef: # (8)
...
- See RuleTypeType
- See
Sequence[RecommendedActionTypeType] - See ScheduleTypeDef
- See RuleStatusType
- See OrganizationConfigurationUnionTypeDef
- See CriteriaUnionTypeDef
- See
Sequence[TagTypeDef] - See CreateAutomationRuleResponseTypeDef
# create_automation_rule method usage example with argument unpacking
kwargs: CreateAutomationRuleRequestTypeDef = { # (1)
"name": ...,
"ruleType": ...,
"recommendedActionTypes": ...,
"schedule": ...,
"status": ...,
}
parent.create_automation_rule(**kwargs)
delete_automation_rule#
Deletes an existing automation rule.
Type annotations and code completion for boto3.client("compute-optimizer-automation").delete_automation_rule method.
boto3 documentation
# delete_automation_rule method definition
def delete_automation_rule(
self,
*,
ruleArn: str,
ruleRevision: int,
clientToken: str = ...,
) -> dict[str, Any]:
...
# delete_automation_rule method usage example with argument unpacking
kwargs: DeleteAutomationRuleRequestTypeDef = { # (1)
"ruleArn": ...,
"ruleRevision": ...,
}
parent.delete_automation_rule(**kwargs)
disassociate_accounts#
Disassociates member accounts from your organization's management account, removing centralized automation capabilities.
Type annotations and code completion for boto3.client("compute-optimizer-automation").disassociate_accounts method.
boto3 documentation
# disassociate_accounts method definition
def disassociate_accounts(
self,
*,
accountIds: Sequence[str],
clientToken: str = ...,
) -> DisassociateAccountsResponseTypeDef: # (1)
...
# disassociate_accounts method usage example with argument unpacking
kwargs: DisassociateAccountsRequestTypeDef = { # (1)
"accountIds": ...,
}
parent.disassociate_accounts(**kwargs)
get_automation_event#
Retrieves details about a specific automation event.
Type annotations and code completion for boto3.client("compute-optimizer-automation").get_automation_event method.
boto3 documentation
# get_automation_event method definition
def get_automation_event(
self,
*,
eventId: str,
) -> GetAutomationEventResponseTypeDef: # (1)
...
# get_automation_event method usage example with argument unpacking
kwargs: GetAutomationEventRequestTypeDef = { # (1)
"eventId": ...,
}
parent.get_automation_event(**kwargs)
get_automation_rule#
Retrieves details about a specific automation rule.
Type annotations and code completion for boto3.client("compute-optimizer-automation").get_automation_rule method.
boto3 documentation
# get_automation_rule method definition
def get_automation_rule(
self,
*,
ruleArn: str,
) -> GetAutomationRuleResponseTypeDef: # (1)
...
# get_automation_rule method usage example with argument unpacking
kwargs: GetAutomationRuleRequestTypeDef = { # (1)
"ruleArn": ...,
}
parent.get_automation_rule(**kwargs)
get_enrollment_configuration#
Retrieves the current enrollment configuration for Compute Optimizer Automation.
Type annotations and code completion for boto3.client("compute-optimizer-automation").get_enrollment_configuration method.
boto3 documentation
# get_enrollment_configuration method definition
def get_enrollment_configuration(
self,
) -> GetEnrollmentConfigurationResponseTypeDef: # (1)
...
list_accounts#
Lists the accounts in your organization that are enrolled in Compute Optimizer and whether they have enabled Automation.
Type annotations and code completion for boto3.client("compute-optimizer-automation").list_accounts method.
boto3 documentation
# list_accounts method definition
def list_accounts(
self,
*,
maxResults: int = ...,
nextToken: str = ...,
) -> ListAccountsResponseTypeDef: # (1)
...
# list_accounts method usage example with argument unpacking
kwargs: ListAccountsRequestTypeDef = { # (1)
"maxResults": ...,
}
parent.list_accounts(**kwargs)
list_automation_event_steps#
Lists the steps for a specific automation event.
Type annotations and code completion for boto3.client("compute-optimizer-automation").list_automation_event_steps method.
boto3 documentation
# list_automation_event_steps method definition
def list_automation_event_steps(
self,
*,
eventId: str,
maxResults: int = ...,
nextToken: str = ...,
) -> ListAutomationEventStepsResponseTypeDef: # (1)
...
# list_automation_event_steps method usage example with argument unpacking
kwargs: ListAutomationEventStepsRequestTypeDef = { # (1)
"eventId": ...,
}
parent.list_automation_event_steps(**kwargs)
list_automation_event_summaries#
Provides a summary of automation events based on specified filters.
Type annotations and code completion for boto3.client("compute-optimizer-automation").list_automation_event_summaries method.
boto3 documentation
# list_automation_event_summaries method definition
def list_automation_event_summaries(
self,
*,
filters: Sequence[AutomationEventFilterTypeDef] = ..., # (1)
startDateInclusive: str = ...,
endDateExclusive: str = ...,
maxResults: int = ...,
nextToken: str = ...,
) -> ListAutomationEventSummariesResponseTypeDef: # (2)
...
- See
Sequence[AutomationEventFilterTypeDef] - See ListAutomationEventSummariesResponseTypeDef
# list_automation_event_summaries method usage example with argument unpacking
kwargs: ListAutomationEventSummariesRequestTypeDef = { # (1)
"filters": ...,
}
parent.list_automation_event_summaries(**kwargs)
list_automation_events#
Lists automation events based on specified filters.
Type annotations and code completion for boto3.client("compute-optimizer-automation").list_automation_events method.
boto3 documentation
# list_automation_events method definition
def list_automation_events(
self,
*,
filters: Sequence[AutomationEventFilterTypeDef] = ..., # (1)
startTimeInclusive: TimestampTypeDef = ...,
endTimeExclusive: TimestampTypeDef = ...,
maxResults: int = ...,
nextToken: str = ...,
) -> ListAutomationEventsResponseTypeDef: # (2)
...
- See
Sequence[AutomationEventFilterTypeDef] - See ListAutomationEventsResponseTypeDef
# list_automation_events method usage example with argument unpacking
kwargs: ListAutomationEventsRequestTypeDef = { # (1)
"filters": ...,
}
parent.list_automation_events(**kwargs)
list_automation_rule_preview#
Returns a preview of the recommended actions that match your Automation rule's configuration and criteria.
Type annotations and code completion for boto3.client("compute-optimizer-automation").list_automation_rule_preview method.
boto3 documentation
# list_automation_rule_preview method definition
def list_automation_rule_preview(
self,
*,
ruleType: RuleTypeType, # (1)
recommendedActionTypes: Sequence[RecommendedActionTypeType], # (2)
organizationScope: OrganizationScopeTypeDef = ..., # (3)
criteria: CriteriaUnionTypeDef = ..., # (4)
maxResults: int = ...,
nextToken: str = ...,
) -> ListAutomationRulePreviewResponseTypeDef: # (5)
...
- See RuleTypeType
- See
Sequence[RecommendedActionTypeType] - See OrganizationScopeTypeDef
- See CriteriaUnionTypeDef
- See ListAutomationRulePreviewResponseTypeDef
# list_automation_rule_preview method usage example with argument unpacking
kwargs: ListAutomationRulePreviewRequestTypeDef = { # (1)
"ruleType": ...,
"recommendedActionTypes": ...,
}
parent.list_automation_rule_preview(**kwargs)
list_automation_rule_preview_summaries#
Returns a summary of the recommended actions that match your rule preview configuration and criteria.
Type annotations and code completion for boto3.client("compute-optimizer-automation").list_automation_rule_preview_summaries method.
boto3 documentation
# list_automation_rule_preview_summaries method definition
def list_automation_rule_preview_summaries(
self,
*,
ruleType: RuleTypeType, # (1)
recommendedActionTypes: Sequence[RecommendedActionTypeType], # (2)
organizationScope: OrganizationScopeTypeDef = ..., # (3)
criteria: CriteriaUnionTypeDef = ..., # (4)
maxResults: int = ...,
nextToken: str = ...,
) -> ListAutomationRulePreviewSummariesResponseTypeDef: # (5)
...
- See RuleTypeType
- See
Sequence[RecommendedActionTypeType] - See OrganizationScopeTypeDef
- See CriteriaUnionTypeDef
- See ListAutomationRulePreviewSummariesResponseTypeDef
# list_automation_rule_preview_summaries method usage example with argument unpacking
kwargs: ListAutomationRulePreviewSummariesRequestTypeDef = { # (1)
"ruleType": ...,
"recommendedActionTypes": ...,
}
parent.list_automation_rule_preview_summaries(**kwargs)
list_automation_rules#
Lists the automation rules that match specified filters.
Type annotations and code completion for boto3.client("compute-optimizer-automation").list_automation_rules method.
boto3 documentation
# list_automation_rules method definition
def list_automation_rules(
self,
*,
filters: Sequence[FilterTypeDef] = ..., # (1)
maxResults: int = ...,
nextToken: str = ...,
) -> ListAutomationRulesResponseTypeDef: # (2)
...
- See
Sequence[FilterTypeDef] - See ListAutomationRulesResponseTypeDef
# list_automation_rules method usage example with argument unpacking
kwargs: ListAutomationRulesRequestTypeDef = { # (1)
"filters": ...,
}
parent.list_automation_rules(**kwargs)
list_recommended_action_summaries#
Provides a summary of recommended actions based on specified filters.
Type annotations and code completion for boto3.client("compute-optimizer-automation").list_recommended_action_summaries method.
boto3 documentation
# list_recommended_action_summaries method definition
def list_recommended_action_summaries(
self,
*,
filters: Sequence[RecommendedActionFilterTypeDef] = ..., # (1)
maxResults: int = ...,
nextToken: str = ...,
) -> ListRecommendedActionSummariesResponseTypeDef: # (2)
...
- See
Sequence[RecommendedActionFilterTypeDef] - See ListRecommendedActionSummariesResponseTypeDef
# list_recommended_action_summaries method usage example with argument unpacking
kwargs: ListRecommendedActionSummariesRequestTypeDef = { # (1)
"filters": ...,
}
parent.list_recommended_action_summaries(**kwargs)
list_recommended_actions#
Lists the recommended actions based that match specified filters.
Type annotations and code completion for boto3.client("compute-optimizer-automation").list_recommended_actions method.
boto3 documentation
# list_recommended_actions method definition
def list_recommended_actions(
self,
*,
filters: Sequence[RecommendedActionFilterTypeDef] = ..., # (1)
maxResults: int = ...,
nextToken: str = ...,
) -> ListRecommendedActionsResponseTypeDef: # (2)
...
- See
Sequence[RecommendedActionFilterTypeDef] - See ListRecommendedActionsResponseTypeDef
# list_recommended_actions method usage example with argument unpacking
kwargs: ListRecommendedActionsRequestTypeDef = { # (1)
"filters": ...,
}
parent.list_recommended_actions(**kwargs)
list_tags_for_resource#
Lists the tags for a specified resource.
Type annotations and code completion for boto3.client("compute-optimizer-automation").list_tags_for_resource method.
boto3 documentation
# list_tags_for_resource method definition
def list_tags_for_resource(
self,
*,
resourceArn: str,
) -> ListTagsForResourceResponseTypeDef: # (1)
...
# list_tags_for_resource method usage example with argument unpacking
kwargs: ListTagsForResourceRequestTypeDef = { # (1)
"resourceArn": ...,
}
parent.list_tags_for_resource(**kwargs)
rollback_automation_event#
Initiates a rollback for a completed automation event.
Type annotations and code completion for boto3.client("compute-optimizer-automation").rollback_automation_event method.
boto3 documentation
# rollback_automation_event method definition
def rollback_automation_event(
self,
*,
eventId: str,
clientToken: str = ...,
) -> RollbackAutomationEventResponseTypeDef: # (1)
...
# rollback_automation_event method usage example with argument unpacking
kwargs: RollbackAutomationEventRequestTypeDef = { # (1)
"eventId": ...,
}
parent.rollback_automation_event(**kwargs)
start_automation_event#
Initiates a one-time, on-demand automation for the specified recommended action.
Type annotations and code completion for boto3.client("compute-optimizer-automation").start_automation_event method.
boto3 documentation
# start_automation_event method definition
def start_automation_event(
self,
*,
recommendedActionId: str,
clientToken: str = ...,
) -> StartAutomationEventResponseTypeDef: # (1)
...
# start_automation_event method usage example with argument unpacking
kwargs: StartAutomationEventRequestTypeDef = { # (1)
"recommendedActionId": ...,
}
parent.start_automation_event(**kwargs)
tag_resource#
Adds tags to the specified resource.
Type annotations and code completion for boto3.client("compute-optimizer-automation").tag_resource method.
boto3 documentation
# tag_resource method definition
def tag_resource(
self,
*,
resourceArn: str,
ruleRevision: int,
tags: Sequence[TagTypeDef], # (1)
clientToken: str = ...,
) -> dict[str, Any]:
...
- See
Sequence[TagTypeDef]
# tag_resource method usage example with argument unpacking
kwargs: TagResourceRequestTypeDef = { # (1)
"resourceArn": ...,
"ruleRevision": ...,
"tags": ...,
}
parent.tag_resource(**kwargs)
untag_resource#
Removes tags from the specified resource.
Type annotations and code completion for boto3.client("compute-optimizer-automation").untag_resource method.
boto3 documentation
# untag_resource method definition
def untag_resource(
self,
*,
resourceArn: str,
ruleRevision: int,
tagKeys: Sequence[str],
clientToken: str = ...,
) -> dict[str, Any]:
...
# untag_resource method usage example with argument unpacking
kwargs: UntagResourceRequestTypeDef = { # (1)
"resourceArn": ...,
"ruleRevision": ...,
"tagKeys": ...,
}
parent.untag_resource(**kwargs)
update_automation_rule#
Updates an existing automation rule.
Type annotations and code completion for boto3.client("compute-optimizer-automation").update_automation_rule method.
boto3 documentation
# update_automation_rule method definition
def update_automation_rule(
self,
*,
ruleArn: str,
ruleRevision: int,
name: str = ...,
description: str = ...,
ruleType: RuleTypeType = ..., # (1)
organizationConfiguration: OrganizationConfigurationUnionTypeDef = ..., # (2)
priority: str = ...,
recommendedActionTypes: Sequence[RecommendedActionTypeType] = ..., # (3)
criteria: CriteriaUnionTypeDef = ..., # (4)
schedule: ScheduleTypeDef = ..., # (5)
status: RuleStatusType = ..., # (6)
clientToken: str = ...,
) -> UpdateAutomationRuleResponseTypeDef: # (7)
...
- See RuleTypeType
- See OrganizationConfigurationUnionTypeDef
- See
Sequence[RecommendedActionTypeType] - See CriteriaUnionTypeDef
- See ScheduleTypeDef
- See RuleStatusType
- See UpdateAutomationRuleResponseTypeDef
# update_automation_rule method usage example with argument unpacking
kwargs: UpdateAutomationRuleRequestTypeDef = { # (1)
"ruleArn": ...,
"ruleRevision": ...,
}
parent.update_automation_rule(**kwargs)
update_enrollment_configuration#
Updates your account's Compute Optimizer Automation enrollment configuration.
Type annotations and code completion for boto3.client("compute-optimizer-automation").update_enrollment_configuration method.
boto3 documentation
# update_enrollment_configuration method definition
def update_enrollment_configuration(
self,
*,
status: EnrollmentStatusType, # (1)
clientToken: str = ...,
) -> UpdateEnrollmentConfigurationResponseTypeDef: # (2)
...
# update_enrollment_configuration method usage example with argument unpacking
kwargs: UpdateEnrollmentConfigurationRequestTypeDef = { # (1)
"status": ...,
}
parent.update_enrollment_configuration(**kwargs)
get_paginator#
Type annotations and code completion for boto3.client("compute-optimizer-automation").get_paginator method with overloads.
client.get_paginator("list_accounts")-> ListAccountsPaginatorclient.get_paginator("list_automation_event_steps")-> ListAutomationEventStepsPaginatorclient.get_paginator("list_automation_event_summaries")-> ListAutomationEventSummariesPaginatorclient.get_paginator("list_automation_events")-> ListAutomationEventsPaginatorclient.get_paginator("list_automation_rule_preview")-> ListAutomationRulePreviewPaginatorclient.get_paginator("list_automation_rule_preview_summaries")-> ListAutomationRulePreviewSummariesPaginatorclient.get_paginator("list_automation_rules")-> ListAutomationRulesPaginatorclient.get_paginator("list_recommended_action_summaries")-> ListRecommendedActionSummariesPaginatorclient.get_paginator("list_recommended_actions")-> ListRecommendedActionsPaginator