Skip to content

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)
    ...
  1. See AssociateAccountsResponseTypeDef
# associate_accounts method usage example with argument unpacking

kwargs: AssociateAccountsRequestTypeDef = {  # (1)
    "accountIds": ...,
}

parent.associate_accounts(**kwargs)
  1. See AssociateAccountsRequestTypeDef

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)
    ...
  1. See RuleTypeType
  2. See Sequence[RecommendedActionTypeType]
  3. See ScheduleTypeDef
  4. See RuleStatusType
  5. See OrganizationConfigurationUnionTypeDef
  6. See CriteriaUnionTypeDef
  7. See Sequence[TagTypeDef]
  8. See CreateAutomationRuleResponseTypeDef
# create_automation_rule method usage example with argument unpacking

kwargs: CreateAutomationRuleRequestTypeDef = {  # (1)
    "name": ...,
    "ruleType": ...,
    "recommendedActionTypes": ...,
    "schedule": ...,
    "status": ...,
}

parent.create_automation_rule(**kwargs)
  1. See CreateAutomationRuleRequestTypeDef

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)
  1. See DeleteAutomationRuleRequestTypeDef

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)
    ...
  1. See DisassociateAccountsResponseTypeDef
# disassociate_accounts method usage example with argument unpacking

kwargs: DisassociateAccountsRequestTypeDef = {  # (1)
    "accountIds": ...,
}

parent.disassociate_accounts(**kwargs)
  1. See DisassociateAccountsRequestTypeDef

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)
    ...
  1. See GetAutomationEventResponseTypeDef
# get_automation_event method usage example with argument unpacking

kwargs: GetAutomationEventRequestTypeDef = {  # (1)
    "eventId": ...,
}

parent.get_automation_event(**kwargs)
  1. See GetAutomationEventRequestTypeDef

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)
    ...
  1. See GetAutomationRuleResponseTypeDef
# get_automation_rule method usage example with argument unpacking

kwargs: GetAutomationRuleRequestTypeDef = {  # (1)
    "ruleArn": ...,
}

parent.get_automation_rule(**kwargs)
  1. See GetAutomationRuleRequestTypeDef

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)
    ...
  1. See GetEnrollmentConfigurationResponseTypeDef

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)
    ...
  1. See ListAccountsResponseTypeDef
# list_accounts method usage example with argument unpacking

kwargs: ListAccountsRequestTypeDef = {  # (1)
    "maxResults": ...,
}

parent.list_accounts(**kwargs)
  1. See ListAccountsRequestTypeDef

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)
    ...
  1. See ListAutomationEventStepsResponseTypeDef
# list_automation_event_steps method usage example with argument unpacking

kwargs: ListAutomationEventStepsRequestTypeDef = {  # (1)
    "eventId": ...,
}

parent.list_automation_event_steps(**kwargs)
  1. See ListAutomationEventStepsRequestTypeDef

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)
    ...
  1. See Sequence[AutomationEventFilterTypeDef]
  2. See ListAutomationEventSummariesResponseTypeDef
# list_automation_event_summaries method usage example with argument unpacking

kwargs: ListAutomationEventSummariesRequestTypeDef = {  # (1)
    "filters": ...,
}

parent.list_automation_event_summaries(**kwargs)
  1. See ListAutomationEventSummariesRequestTypeDef

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)
    ...
  1. See Sequence[AutomationEventFilterTypeDef]
  2. See ListAutomationEventsResponseTypeDef
# list_automation_events method usage example with argument unpacking

kwargs: ListAutomationEventsRequestTypeDef = {  # (1)
    "filters": ...,
}

parent.list_automation_events(**kwargs)
  1. See ListAutomationEventsRequestTypeDef

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)
    ...
  1. See RuleTypeType
  2. See Sequence[RecommendedActionTypeType]
  3. See OrganizationScopeTypeDef
  4. See CriteriaUnionTypeDef
  5. See ListAutomationRulePreviewResponseTypeDef
# list_automation_rule_preview method usage example with argument unpacking

kwargs: ListAutomationRulePreviewRequestTypeDef = {  # (1)
    "ruleType": ...,
    "recommendedActionTypes": ...,
}

parent.list_automation_rule_preview(**kwargs)
  1. See ListAutomationRulePreviewRequestTypeDef

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)
    ...
  1. See RuleTypeType
  2. See Sequence[RecommendedActionTypeType]
  3. See OrganizationScopeTypeDef
  4. See CriteriaUnionTypeDef
  5. 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)
  1. See ListAutomationRulePreviewSummariesRequestTypeDef

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)
    ...
  1. See Sequence[FilterTypeDef]
  2. See ListAutomationRulesResponseTypeDef
# list_automation_rules method usage example with argument unpacking

kwargs: ListAutomationRulesRequestTypeDef = {  # (1)
    "filters": ...,
}

parent.list_automation_rules(**kwargs)
  1. See ListAutomationRulesRequestTypeDef

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)
    ...
  1. See Sequence[RecommendedActionFilterTypeDef]
  2. See ListRecommendedActionSummariesResponseTypeDef
# list_recommended_action_summaries method usage example with argument unpacking

kwargs: ListRecommendedActionSummariesRequestTypeDef = {  # (1)
    "filters": ...,
}

parent.list_recommended_action_summaries(**kwargs)
  1. See ListRecommendedActionSummariesRequestTypeDef

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)
    ...
  1. See Sequence[RecommendedActionFilterTypeDef]
  2. See ListRecommendedActionsResponseTypeDef
# list_recommended_actions method usage example with argument unpacking

kwargs: ListRecommendedActionsRequestTypeDef = {  # (1)
    "filters": ...,
}

parent.list_recommended_actions(**kwargs)
  1. See ListRecommendedActionsRequestTypeDef

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)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestTypeDef

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)
    ...
  1. See RollbackAutomationEventResponseTypeDef
# rollback_automation_event method usage example with argument unpacking

kwargs: RollbackAutomationEventRequestTypeDef = {  # (1)
    "eventId": ...,
}

parent.rollback_automation_event(**kwargs)
  1. See RollbackAutomationEventRequestTypeDef

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)
    ...
  1. See StartAutomationEventResponseTypeDef
# start_automation_event method usage example with argument unpacking

kwargs: StartAutomationEventRequestTypeDef = {  # (1)
    "recommendedActionId": ...,
}

parent.start_automation_event(**kwargs)
  1. See StartAutomationEventRequestTypeDef

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]:
    ...
  1. See Sequence[TagTypeDef]
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "ruleRevision": ...,
    "tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestTypeDef

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)
  1. See UntagResourceRequestTypeDef

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)
    ...
  1. See RuleTypeType
  2. See OrganizationConfigurationUnionTypeDef
  3. See Sequence[RecommendedActionTypeType]
  4. See CriteriaUnionTypeDef
  5. See ScheduleTypeDef
  6. See RuleStatusType
  7. See UpdateAutomationRuleResponseTypeDef
# update_automation_rule method usage example with argument unpacking

kwargs: UpdateAutomationRuleRequestTypeDef = {  # (1)
    "ruleArn": ...,
    "ruleRevision": ...,
}

parent.update_automation_rule(**kwargs)
  1. See UpdateAutomationRuleRequestTypeDef

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)
    ...
  1. See EnrollmentStatusType
  2. See UpdateEnrollmentConfigurationResponseTypeDef
# update_enrollment_configuration method usage example with argument unpacking

kwargs: UpdateEnrollmentConfigurationRequestTypeDef = {  # (1)
    "status": ...,
}

parent.update_enrollment_configuration(**kwargs)
  1. See UpdateEnrollmentConfigurationRequestTypeDef

get_paginator#

Type annotations and code completion for boto3.client("compute-optimizer-automation").get_paginator method with overloads.