cloudcomponents.cdk-s3-antivirus-2.1.0
توضیحات
Antivirus for Amazon S3
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | cloudcomponents.cdk-s3-antivirus-2.1.0 |
| نام | cloudcomponents.cdk-s3-antivirus |
| نسخه کتابخانه | 2.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | hupe1980 |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/cloudcomponents/cdk-constructs |
| آدرس اینترنتی | https://pypi.org/project/cloudcomponents.cdk-s3-antivirus/ |
| مجوز | MIT |
[](https://github.com/cloudcomponents/cdk-constructs)
# @cloudcomponents/cdk-s3-antivirus
[](https://github.com/cloudcomponents/cdk-constructs/actions?query=workflow=Build)
[](https://github.com/hupe1980/cdkdx)
[](https://www.npmjs.com/package/@cloudcomponents/cdk-s3-antivirus)
[](https://pypi.org/project/cloudcomponents.cdk-s3-antivirus/)
> Antivirus for Amazon S3
## Install
TypeScript/JavaScript:
```bash
npm i @cloudcomponents/cdk-s3-antivirus
```
Python:
```bash
pip install cloudcomponents.cdk-s3-antivirus
```
## How to use
```python
import { Scanner } from '@cloudcomponents/cdk-s3-antivirus';
import { RemovalPolicy, Stack, StackProps } from 'aws-cdk-lib';
import { SnsDestination } from 'aws-cdk-lib/aws-lambda-destinations';
import { Bucket } from 'aws-cdk-lib/aws-s3';
import { Topic } from 'aws-cdk-lib/aws-sns';
import { EmailSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';
import { Construct } from 'constructs';
export class S3AntivirusStack extends Stack {
constructor(scope: Construct, id: string, props: StackProps) {
super(scope, id, props);
const bucket = new Bucket(this, 'Bucket', {
autoDeleteObjects: true,
removalPolicy: RemovalPolicy.DESTROY,
});
const topic = new Topic(this, 'Topic');
if (process.env.DEVSECOPS_TEAM_EMAIL) {
topic.addSubscription(new EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL));
}
const scanner = new Scanner(this, 'Scanner', {
onResult: new SnsDestination(topic),
onError: new SnsDestination(topic),
});
scanner.addSourceBucket(bucket);
}
}
```
## API Reference
See [API.md](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-s3-antivirus/API.md).
## Example
See more complete [examples](https://github.com/cloudcomponents/cdk-constructs/tree/master/examples).
## License
[MIT](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-s3-antivirus/LICENSE)
نیازمندی
| مقدار | نام |
|---|---|
| <3.0.0,>=2.8.0 | aws-cdk-lib |
| <11.0.0,>=10.0.41 | constructs |
| <2.0.0,>=1.52.1 | jsii |
| >=0.0.3 | publication |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl cloudcomponents.cdk-s3-antivirus-2.1.0:
pip install cloudcomponents.cdk-s3-antivirus-2.1.0.whl
نصب پکیج tar.gz cloudcomponents.cdk-s3-antivirus-2.1.0:
pip install cloudcomponents.cdk-s3-antivirus-2.1.0.tar.gz