@collaborne/custom-cloudformation-resources
Version:
Custom CloudFormation resources
37 lines (36 loc) • 1.31 kB
TypeScript
import { WAFV2 } from 'aws-sdk';
import { SchemaType } from '@collaborne/json-schema-to-type';
import { CustomResource, Response } from '../custom-resource';
import { Logger } from '../logger';
declare const SCHEMA: {
type: "object";
properties: {
Name: {
type: "string";
};
Description: {
type: "string";
};
Capacity: {
type: "number";
};
Rules: {
type: "string";
};
};
required: string[];
};
interface ResourceAttributes {
Arn: string;
Id: string;
}
export declare class CloudFrontWafV2RuleGroup extends CustomResource<ResourceAttributes, typeof SCHEMA> {
region: string;
private wafV2;
constructor(logicalResourceId: string, logger: Logger);
createResource(physicalResourceId: string, { Name, Description, Capacity, Rules }: SchemaType<typeof SCHEMA>): Promise<Response<ResourceAttributes>>;
deleteResource(physicalResourceId: string, { Name }: SchemaType<typeof SCHEMA>): Promise<Response<ResourceAttributes>>;
updateResource(physicalResourceId: string, { Name, Description, Rules }: SchemaType<typeof SCHEMA>): Promise<Response<ResourceAttributes>>;
protected getRuleGroup(name: string): Promise<WAFV2.GetRuleGroupResponse>;
}
export {};