GetAutomationRule
Retrieves details about a specific automation rule.
Request Syntax
{
"ruleArn": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- ruleArn
-
The ARN of the rule to retrieve.
Type: String
Pattern:
arn:aws:compute-optimizer::[0-9]{12}:automation-rule/[a-zA-Z0-9_-]+Required: Yes
Response Syntax
{
"accountId": "string",
"createdTimestamp": number,
"criteria": {
"ebsVolumeSizeInGib": [
{
"comparison": "string",
"values": [ number ]
}
],
"ebsVolumeType": [
{
"comparison": "string",
"values": [ "string" ]
}
],
"estimatedMonthlySavings": [
{
"comparison": "string",
"values": [ number ]
}
],
"lookBackPeriodInDays": [
{
"comparison": "string",
"values": [ number ]
}
],
"region": [
{
"comparison": "string",
"values": [ "string" ]
}
],
"resourceArn": [
{
"comparison": "string",
"values": [ "string" ]
}
],
"resourceTag": [
{
"comparison": "string",
"key": "string",
"values": [ "string" ]
}
],
"restartNeeded": [
{
"comparison": "string",
"values": [ "string" ]
}
]
},
"description": "string",
"lastUpdatedTimestamp": number,
"name": "string",
"organizationConfiguration": {
"accountIds": [ "string" ],
"ruleApplyOrder": "string"
},
"priority": "string",
"recommendedActionTypes": [ "string" ],
"ruleArn": "string",
"ruleId": "string",
"ruleRevision": number,
"ruleType": "string",
"schedule": {
"executionWindowInMinutes": number,
"scheduleExpression": "string",
"scheduleExpressionTimezone": "string"
},
"status": "string",
"tags": [
{
"key": "string",
"value": "string"
}
]
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- accountId
-
The 12-digit AWS account ID that owns this automation rule.
Type: String
Pattern:
[0-9]{12} - createdTimestamp
-
The timestamp when the automation rule was created.
Type: Timestamp
- 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.
Type: Criteria object
- description
-
A description of the automation rule.
Type: String
- lastUpdatedTimestamp
-
The timestamp when the automation rule was last updated.
Type: Timestamp
- name
-
The name of the automation rule.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 128.
Pattern:
[a-zA-Z0-9_-]* - organizationConfiguration
-
Configuration settings for organization-wide automation rules.
Type: OrganizationConfiguration object
- priority
-
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.
Type: String
- recommendedActionTypes
-
List of recommended action types that this rule can execute.
Type: Array of strings
Valid Values:
SnapshotAndDeleteUnattachedEbsVolume | UpgradeEbsVolumeType - ruleArn
-
The Amazon Resource Name (ARN) of the automation rule.
Type: String
Pattern:
arn:aws:compute-optimizer::[0-9]{12}:automation-rule/[a-zA-Z0-9_-]+ - ruleId
-
The unique identifier of the automation rule.
Type: String
Pattern:
[0-9A-Za-z]{16} - ruleRevision
-
The revision number of the automation rule.
Type: Long
- ruleType
-
The type of automation rule.
Type: String
Valid Values:
OrganizationRule | AccountRule - schedule
-
Configuration for scheduling when automation rules should execute, including timing and execution windows.
Type: Schedule object
- status
-
The current status of the automation rule (Active or Inactive).
Type: String
Valid Values:
Active | Inactive -
The tags associated with the automation rule.
Type: Array of Tag objects
Array Members: Minimum number of 0 items. Maximum number of 200 items.
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
You do not have sufficient permissions to perform this action.
HTTP Status Code: 400
- ForbiddenException
-
You are not authorized to perform this action.
HTTP Status Code: 400
- InternalServerException
-
An internal error occurred while processing the request.
HTTP Status Code: 500
- InvalidParameterValueException
-
One or more parameter values are not valid.
HTTP Status Code: 400
- OptInRequiredException
-
The account must be opted in to Compute Optimizer Automation before performing this action.
HTTP Status Code: 400
- ResourceNotFoundException
-
The specified resource was not found.
HTTP Status Code: 400
- ServiceUnavailableException
-
The service is temporarily unavailable.
HTTP Status Code: 500
- ThrottlingException
-
The request was denied due to request throttling.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: