@collaborne/custom-cloudformation-resources
Version:
Custom CloudFormation resources
34 lines (33 loc) • 1.21 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";
};
MetricName: {
type: "string";
};
Rules: {
type: "string";
};
};
required: string[];
};
interface ResourceAttributes {
Arn: string;
Id: string;
}
export declare class CloudFrontWafV2 extends CustomResource<ResourceAttributes, typeof SCHEMA> {
region: string;
private wafV2;
constructor(logicalResourceId: string, logger: Logger);
createResource(physicalResourceId: string, { Name, MetricName, Rules }: SchemaType<typeof SCHEMA>): Promise<Response<ResourceAttributes>>;
deleteResource(physicalResourceId: string, { Name }: SchemaType<typeof SCHEMA>): Promise<Response<ResourceAttributes>>;
updateResource(physicalResourceId: string, { Name, Rules }: SchemaType<typeof SCHEMA>): Promise<Response<ResourceAttributes>>;
protected getWebAcl(name: string): Promise<WAFV2.GetWebACLResponse>;
}
export {};