class CfnAutomationRulePropsMixin (mixin)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.CfnPropertyMixins.AWS.ComputeOptimizer.CfnAutomationRulePropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkcfnpropertymixins/v2/awscomputeoptimizer#CfnAutomationRulePropsMixin |
Java | software.amazon.awscdk.cfnpropertymixins.services.computeoptimizer.CfnAutomationRulePropsMixin |
Python | aws_cdk.cfn_property_mixins.aws_computeoptimizer.CfnAutomationRulePropsMixin |
TypeScript | @aws-cdk/cfn-property-mixins » aws_computeoptimizer » CfnAutomationRulePropsMixin |
Implements
IMixin
Extends
Mixin
Creates an AWS Compute Optimizer automation rule that automatically implements recommended actions based on your defined criteria and schedule.
Automation rules are global resources that manage automated actions across all AWS Regions where Compute Optimizer Automation is available. Organization-level rules can only be created by the management account or delegated administrator.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_computeoptimizer as computeoptimizer } from '@aws-cdk/cfn-property-mixins';
import * as cdk from 'aws-cdk-lib';
declare const mergeStrategy: cdk.IMergeStrategy;
const cfnAutomationRulePropsMixin = new computeoptimizer.CfnAutomationRulePropsMixin({
criteria: {
ebsVolumeSizeInGib: [{
comparison: 'comparison',
values: [123],
}],
ebsVolumeType: [{
comparison: 'comparison',
values: ['values'],
}],
estimatedMonthlySavings: [{
comparison: 'comparison',
values: [123],
}],
lookBackPeriodInDays: [{
comparison: 'comparison',
values: [123],
}],
region: [{
comparison: 'comparison',
values: ['values'],
}],
resourceArn: [{
comparison: 'comparison',
values: ['values'],
}],
resourceTag: [{
comparison: 'comparison',
key: 'key',
values: ['values'],
}],
restartNeeded: [{
comparison: 'comparison',
values: ['values'],
}],
},
description: 'description',
name: 'name',
organizationConfiguration: {
accountIds: ['accountIds'],
ruleApplyOrder: 'ruleApplyOrder',
},
priority: 'priority',
recommendedActionTypes: ['recommendedActionTypes'],
ruleType: 'ruleType',
schedule: {
executionWindowInMinutes: 123,
scheduleExpression: 'scheduleExpression',
scheduleExpressionTimezone: 'scheduleExpressionTimezone',
},
status: 'status',
tags: [{
key: 'key',
value: 'value',
}],
}, /* all optional props */ {
strategy: mergeStrategy,
});
Initializer
new CfnAutomationRulePropsMixin(props: CfnAutomationRuleMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Automation Rule Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::ComputeOptimizer::AutomationRule.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | IMerge | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
IMerge
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): void
Parameters
- construct
IConstruct
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript