@altostra/core
Version:
Core library for shared types and logic
58 lines (57 loc) • 1.98 kB
TypeScript
import type { NonEmptyString } from "../../../common/CustomTypes/NonEmptyString";
import type { NaturalNumber } from "../../../common/CustomTypes/Numerics";
import type { Arn } from "../../CustomTypes/Arn";
import type { AwsResourceCommon } from "../common";
import type { LaunchType } from "../ECS/common";
import type { CloudFormationValue } from "../IntrinsicFunctions";
import type { EventPattern } from "./EventPattern";
export declare type RuleType = 'AWS::Events::Rule';
export interface Rule extends AwsResourceCommon {
Type: RuleType;
Properties: RuleProperties;
}
export interface CommonRuleProperties {
Description?: string;
Name?: string;
RoleArn?: CloudFormationValue<Arn>;
State?: RuleState;
Targets?: RuleTarget[];
}
export interface EventRuleProperties extends CommonRuleProperties {
EventPattern: EventPattern;
EventBusName?: string;
}
export interface ScheduledRuleProperties extends CommonRuleProperties {
ScheduleExpression: string;
}
export declare type RuleProperties = EventRuleProperties | ScheduledRuleProperties;
export declare type RuleState = 'DISABLED' | 'ENABLED';
export interface RuleTarget {
Id: CloudFormationValue<NonEmptyString>;
Arn: CloudFormationValue<Arn>;
RoleArn?: CloudFormationValue<Arn>;
BatchParameters?: object;
EcsParameters?: EcsParameters;
HttpParameters?: object;
KinesisParameters?: object;
RunCommandParameters?: object;
SqsParameters?: object;
InputTransformer?: object;
Input?: string;
InputPath?: string;
}
export interface EcsParameters {
Group?: CloudFormationValue;
LaunchType?: LaunchType;
NetworkConfiguration?: {
AwsVpcConfiguration: AwsVpcConfiguration;
};
PlatformVersion?: string;
TaskCount?: NaturalNumber;
TaskDefinitionArn: CloudFormationValue<Arn>;
}
export interface AwsVpcConfiguration {
AssignPublicIp?: 'DISABLED' | 'ENABLED';
SecurityGroups?: string[];
Subnets: string[];
}