This class is deprecated, please use NightyNightForEc2.
import { NightyNight } from '@matthewbonig/nightynight'
new NightyNight(scope: Construct, id: string, props: NightyNightProps)| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
NightyNightProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: NightyNightProps
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
public toString(): stringReturns a string representation of this construct.
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
import { NightyNight } from '@matthewbonig/nightynight'
NightyNight.isConstruct(x: any)Checks if x is a construct.
- Type: any
Any object.
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
- Deprecated: in favor of NightyNightForEc2
public readonly node: Node;- Type: constructs.Node
The tree node.
A construct that will build a Lambda and a CloudWatch Rule (cron schedule) that will set the given ASG's desired capacity.
Typically used when you've got and ASG that you can scale during set hours.
import { NightyNightForAsg } from '@matthewbonig/nightynight'
new NightyNightForAsg(scope: Construct, id: string, props: NightyNightForAsgProps)| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
NightyNightForAsgProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: NightyNightForAsgProps
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
public toString(): stringReturns a string representation of this construct.
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
import { NightyNightForAsg } from '@matthewbonig/nightynight'
NightyNightForAsg.isConstruct(x: any)Checks if x is a construct.
- Type: any
Any object.
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
public readonly node: Node;- Type: constructs.Node
The tree node.
A construct that will build a Lambda and a CloudWatch Rule (cron schedule) that will stop the given ec2 instance at the specified time.
Typically used when you've got ec2 instances that you only need during business hours and want to reduce the costs of.
import { NightyNightForEc2 } from '@matthewbonig/nightynight'
new NightyNightForEc2(scope: Construct, id: string, props: NightyNightForEc2Props)| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
NightyNightForEc2Props |
No description. |
- Type: constructs.Construct
- Type: string
- Type: NightyNightForEc2Props
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
public toString(): stringReturns a string representation of this construct.
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
import { NightyNightForEc2 } from '@matthewbonig/nightynight'
NightyNightForEc2.isConstruct(x: any)Checks if x is a construct.
- Type: any
Any object.
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
public readonly node: Node;- Type: constructs.Node
The tree node.
A construct that will build a Lambda and a CloudWatch Rule (cron schedule) that will set the given ECS Service's desired capacity.
Typically, used when you've got an ECS Service that you can scale during set hours.
import { NightyNightForEcs } from '@matthewbonig/nightynight'
new NightyNightForEcs(scope: Construct, id: string, props: NightyNightForEcsProps)| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
NightyNightForEcsProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: NightyNightForEcsProps
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
public toString(): stringReturns a string representation of this construct.
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
import { NightyNightForEcs } from '@matthewbonig/nightynight'
NightyNightForEcs.isConstruct(x: any)Checks if x is a construct.
- Type: any
Any object.
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
public readonly node: Node;- Type: constructs.Node
The tree node.
A construct that will build a Lambda and a CloudWatch Rule (cron schedule) that will stop the given rds instance at the specified time.
Typically used when you've got rds instances that you only need during business hours and want to reduce the costs of.
import { NightyNightForRds } from '@matthewbonig/nightynight'
new NightyNightForRds(scope: Construct, id: string, props: NightyNightForRdsProps)| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
NightyNightForRdsProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: NightyNightForRdsProps
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
public toString(): stringReturns a string representation of this construct.
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
import { NightyNightForRds } from '@matthewbonig/nightynight'
NightyNightForRds.isConstruct(x: any)Checks if x is a construct.
- Type: any
Any object.
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
public readonly node: Node;- Type: constructs.Node
The tree node.
A construct that will build a Lambda and a CloudWatch Rule (cron schedule) that will start the given ec2 instance at the specified time.
Typically used when you've got ec2 instances that you only need during business hours and want to reduce the costs of. Use in conjunction with the Nightynight construct at
import { WakeyWakeyForEc2 } from '@matthewbonig/nightynight'
new WakeyWakeyForEc2(scope: Construct, id: string, props: WakeyWakeyForEc2Props)| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
WakeyWakeyForEc2Props |
No description. |
- Type: constructs.Construct
- Type: string
- Type: WakeyWakeyForEc2Props
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
public toString(): stringReturns a string representation of this construct.
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
import { WakeyWakeyForEc2 } from '@matthewbonig/nightynight'
WakeyWakeyForEc2.isConstruct(x: any)Checks if x is a construct.
- Type: any
Any object.
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
public readonly node: Node;- Type: constructs.Node
The tree node.
A construct that will build a Lambda and a CloudWatch Rule (cron schedule) that will start the given rds instance at the specified time.
Typically used when you've got rds instances that you only need during business hours and want to reduce the costs of.
import { WakeyWakeyForRds } from '@matthewbonig/nightynight'
new WakeyWakeyForRds(scope: Construct, id: string, props: WakeyWakeyForRdsProps)| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
WakeyWakeyForRdsProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: WakeyWakeyForRdsProps
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
public toString(): stringReturns a string representation of this construct.
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
import { WakeyWakeyForRds } from '@matthewbonig/nightynight'
WakeyWakeyForRds.isConstruct(x: any)Checks if x is a construct.
- Type: any
Any object.
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
public readonly node: Node;- Type: constructs.Node
The tree node.
Props for the NightNight construct.
import { NightyNightForAsgProps } from '@matthewbonig/nightynight'
const nightyNightForAsgProps: NightyNightForAsgProps = { ... }| Name | Type | Description |
|---|---|---|
autoScalingGroup |
aws-cdk-lib.aws_autoscaling.IAutoScalingGroup |
the AutoScalingGroup you'd like to change the instance count on. |
desiredCapacity |
number |
Desired capacity. |
schedule |
aws-cdk-lib.aws_events.CronOptions |
An option CronOptions to specify the time of day to scale. |
public readonly autoScalingGroup: IAutoScalingGroup;- Type: aws-cdk-lib.aws_autoscaling.IAutoScalingGroup
the AutoScalingGroup you'd like to change the instance count on.
public readonly desiredCapacity: number;- Type: number
Desired capacity.
public readonly schedule: CronOptions;- Type: aws-cdk-lib.aws_events.CronOptions
- Default: { day: '*', hour: '4', minute: '0' }
An option CronOptions to specify the time of day to scale.
Props for the NightNight construct.
import { NightyNightForEc2Props } from '@matthewbonig/nightynight'
const nightyNightForEc2Props: NightyNightForEc2Props = { ... }| Name | Type | Description |
|---|---|---|
filters |
any[] |
Filters to match to find an EC2 instance. |
instanceId |
string |
the instanceId of the EC2 instance you'd like stopped. |
schedule |
aws-cdk-lib.aws_events.CronOptions |
An option CronOptions to specify the time of day to stop the instance. |
public readonly filters: any[];- Type: any[]
Filters to match to find an EC2 instance.
Must provide this if instanceId is not provided. If instanceId is provided this is ignored.
public readonly instanceId: string;- Type: string
the instanceId of the EC2 instance you'd like stopped.
Must provide this if tags is not provided.
public readonly schedule: CronOptions;- Type: aws-cdk-lib.aws_events.CronOptions
- Default: { day: '*', hour: '4', minute: '0' }
An option CronOptions to specify the time of day to stop the instance.
Props for the NightNight construct.
import { NightyNightForEcsProps } from '@matthewbonig/nightynight'
const nightyNightForEcsProps: NightyNightForEcsProps = { ... }| Name | Type | Description |
|---|---|---|
desiredCapacity |
number |
Desired capacity. |
serviceName |
string |
The service name to update. |
cluster |
aws-cdk-lib.aws_ecs.ICluster |
The ECS Cluster where the service resides. |
schedule |
aws-cdk-lib.aws_events.CronOptions |
An option CronOptions to specify the time of day to scale. |
public readonly desiredCapacity: number;- Type: number
Desired capacity.
public readonly serviceName: string;- Type: string
The service name to update.
public readonly cluster: ICluster;- Type: aws-cdk-lib.aws_ecs.ICluster
- Default: 'default'
The ECS Cluster where the service resides.
public readonly schedule: CronOptions;- Type: aws-cdk-lib.aws_events.CronOptions
- Default: { day: '*', hour: '4', minute: '0' }
An option CronOptions to specify the time of day to scale.
Props for the NightNight construct.
import { NightyNightForRdsProps } from '@matthewbonig/nightynight'
const nightyNightForRdsProps: NightyNightForRdsProps = { ... }| Name | Type | Description |
|---|---|---|
dbInstanceIdentifier |
string |
the DBInstanceIdentifier of the RDS instance you'd like stopped. |
schedule |
aws-cdk-lib.aws_events.CronOptions |
An option CronOptions to specify the time of day to stop the instance. |
public readonly dbInstanceIdentifier: string;- Type: string
the DBInstanceIdentifier of the RDS instance you'd like stopped.
public readonly schedule: CronOptions;- Type: aws-cdk-lib.aws_events.CronOptions
- Default: { day: '*', hour: '4', minute: '0' }
An option CronOptions to specify the time of day to stop the instance.
import { NightyNightProps } from '@matthewbonig/nightynight'
const nightyNightProps: NightyNightProps = { ... }| Name | Type | Description |
|---|---|---|
filters |
any[] |
Filters to match to find an EC2 instance. |
instanceId |
string |
the instanceId of the EC2 instance you'd like stopped. |
schedule |
aws-cdk-lib.aws_events.CronOptions |
An option CronOptions to specify the time of day to stop the instance. |
public readonly filters: any[];- Type: any[]
Filters to match to find an EC2 instance.
Must provide this if instanceId is not provided. If instanceId is provided this is ignored.
public readonly instanceId: string;- Type: string
the instanceId of the EC2 instance you'd like stopped.
Must provide this if tags is not provided.
public readonly schedule: CronOptions;- Type: aws-cdk-lib.aws_events.CronOptions
- Default: { day: '*', hour: '4', minute: '0' }
An option CronOptions to specify the time of day to stop the instance.
import { WakeyWakeyForEc2Props } from '@matthewbonig/nightynight'
const wakeyWakeyForEc2Props: WakeyWakeyForEc2Props = { ... }| Name | Type | Description |
|---|---|---|
filters |
any[] |
Filters to match to find an EC2 instance. |
instanceId |
string |
the instanceId of the EC2 instance you'd like started. |
schedule |
aws-cdk-lib.aws_events.CronOptions |
An option CronOptions to specify the time of day to start the instance. |
public readonly filters: any[];- Type: any[]
Filters to match to find an EC2 instance.
Must provide this if instanceId is not provided. If instanceId is provided this is ignored.
Example
[{
Name: 'STRING_VALUE',
Values: [
'STRING_VALUE',
]
}]public readonly instanceId: string;- Type: string
the instanceId of the EC2 instance you'd like started.
If instanceId is provided the filters is ignored.
public readonly schedule: CronOptions;- Type: aws-cdk-lib.aws_events.CronOptions
- Default: { day: '*', hour: '12', minute: '0' }
An option CronOptions to specify the time of day to start the instance.
Props for the WakeyWakeyForRds construct.
import { WakeyWakeyForRdsProps } from '@matthewbonig/nightynight'
const wakeyWakeyForRdsProps: WakeyWakeyForRdsProps = { ... }| Name | Type | Description |
|---|---|---|
dbInstanceIdentifier |
string |
the DBInstanceIdentifier of the RDS instance you'd like started. |
schedule |
aws-cdk-lib.aws_events.CronOptions |
An option CronOptions to specify the time of day to start the instance. |
public readonly dbInstanceIdentifier: string;- Type: string
the DBInstanceIdentifier of the RDS instance you'd like started.
public readonly schedule: CronOptions;- Type: aws-cdk-lib.aws_events.CronOptions
- Default: { day: '*', hour: '4', minute: '0' }
An option CronOptions to specify the time of day to start the instance.