%global _empty_manifest_terminate_build 0 Name: python-renovosolutions.aws-cdk-one-time-event Version: 2.1.110 Release: 1 Summary: AWS CDK Construct Library to create one time event schedules. License: Apache-2.0 URL: https://github.com/RenovoSolutions/cdk-library-one-time-event.git Source0: https://mirrors.nju.edu.cn/pypi/web/packages/50/8f/ca641b67480f53a9d2da5c0510a1883bf06423e056891c16e2873fe7f38f/renovosolutions.aws-cdk-one-time-event-2.1.110.tar.gz BuildArch: noarch Requires: python3-aws-cdk-lib Requires: python3-constructs Requires: python3-jsii Requires: python3-publication Requires: python3-typeguard %description # cdk-library-one-time-event [![build](https://github.com/RenovoSolutions/cdk-library-one-time-event/actions/workflows/build.yml/badge.svg)](https://github.com/RenovoSolutions/cdk-library-one-time-event/workflows/build.yml) An AWS CDK Construct library to create one time event [schedules](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.Schedule.html). ## Features * Create two types of event [schedules](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.Schedule.html) easily: * On Deployment: An one time event schedule for directly after deployment. Defaults to 10mins after. * At: A one time even schedule for any future `Date()` ## API Doc See [API](API.md) ## Examples ### Typescript - run after deploy, offset 15mins ``` import * as cdk from '@aws-cdk/core'; import * as lambda from '@aws-cdk/aws-lambda'; import * as oneTimeEvents from '@renovosolutions/cdk-library-one-time-event'; export class CdkExampleLambdaStack extends cdk.Stack { constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { super(scope, id, props); const handler = new lambda.Function(this, 'handler', { runtime: lambda.Runtime.PYTHON_3_8, code: lambda.Code.fromAsset(functionDir + '/function.zip'), handler: 'index.handler', }); new events.Rule(this, 'triggerImmediate', { schedule: new oneTimeEvents.OnDeploy(this, 'schedule', { offsetMinutes: 15 }).schedule, targets: [new targets.LambdaFunction(this.handler)], }); ``` ### Typescript - run in 24 hours ``` import * as cdk from '@aws-cdk/core'; import * as lambda from '@aws-cdk/aws-lambda'; import * as oneTimeEvents from '@renovosolutions/cdk-library-one-time-event'; export class CdkExampleLambdaStack extends cdk.Stack { constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { super(scope, id, props); const handler = new lambda.Function(this, 'handler', { runtime: lambda.Runtime.PYTHON_3_8, code: lambda.Code.fromAsset(functionDir + '/function.zip'), handler: 'index.handler', }); var tomorrow = new Date() tomorrow.setDate(tomorrow.getDate() + 1) new events.Rule(this, 'triggerImmediate', { schedule: new oneTimeEvents.At(this, 'schedule', { date: tomorrow }).schedule, targets: [new targets.LambdaFunction(this.handler)], }); ``` %package -n python3-renovosolutions.aws-cdk-one-time-event Summary: AWS CDK Construct Library to create one time event schedules. Provides: python-renovosolutions.aws-cdk-one-time-event BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-renovosolutions.aws-cdk-one-time-event # cdk-library-one-time-event [![build](https://github.com/RenovoSolutions/cdk-library-one-time-event/actions/workflows/build.yml/badge.svg)](https://github.com/RenovoSolutions/cdk-library-one-time-event/workflows/build.yml) An AWS CDK Construct library to create one time event [schedules](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.Schedule.html). ## Features * Create two types of event [schedules](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.Schedule.html) easily: * On Deployment: An one time event schedule for directly after deployment. Defaults to 10mins after. * At: A one time even schedule for any future `Date()` ## API Doc See [API](API.md) ## Examples ### Typescript - run after deploy, offset 15mins ``` import * as cdk from '@aws-cdk/core'; import * as lambda from '@aws-cdk/aws-lambda'; import * as oneTimeEvents from '@renovosolutions/cdk-library-one-time-event'; export class CdkExampleLambdaStack extends cdk.Stack { constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { super(scope, id, props); const handler = new lambda.Function(this, 'handler', { runtime: lambda.Runtime.PYTHON_3_8, code: lambda.Code.fromAsset(functionDir + '/function.zip'), handler: 'index.handler', }); new events.Rule(this, 'triggerImmediate', { schedule: new oneTimeEvents.OnDeploy(this, 'schedule', { offsetMinutes: 15 }).schedule, targets: [new targets.LambdaFunction(this.handler)], }); ``` ### Typescript - run in 24 hours ``` import * as cdk from '@aws-cdk/core'; import * as lambda from '@aws-cdk/aws-lambda'; import * as oneTimeEvents from '@renovosolutions/cdk-library-one-time-event'; export class CdkExampleLambdaStack extends cdk.Stack { constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { super(scope, id, props); const handler = new lambda.Function(this, 'handler', { runtime: lambda.Runtime.PYTHON_3_8, code: lambda.Code.fromAsset(functionDir + '/function.zip'), handler: 'index.handler', }); var tomorrow = new Date() tomorrow.setDate(tomorrow.getDate() + 1) new events.Rule(this, 'triggerImmediate', { schedule: new oneTimeEvents.At(this, 'schedule', { date: tomorrow }).schedule, targets: [new targets.LambdaFunction(this.handler)], }); ``` %package help Summary: Development documents and examples for renovosolutions.aws-cdk-one-time-event Provides: python3-renovosolutions.aws-cdk-one-time-event-doc %description help # cdk-library-one-time-event [![build](https://github.com/RenovoSolutions/cdk-library-one-time-event/actions/workflows/build.yml/badge.svg)](https://github.com/RenovoSolutions/cdk-library-one-time-event/workflows/build.yml) An AWS CDK Construct library to create one time event [schedules](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.Schedule.html). ## Features * Create two types of event [schedules](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-events.Schedule.html) easily: * On Deployment: An one time event schedule for directly after deployment. Defaults to 10mins after. * At: A one time even schedule for any future `Date()` ## API Doc See [API](API.md) ## Examples ### Typescript - run after deploy, offset 15mins ``` import * as cdk from '@aws-cdk/core'; import * as lambda from '@aws-cdk/aws-lambda'; import * as oneTimeEvents from '@renovosolutions/cdk-library-one-time-event'; export class CdkExampleLambdaStack extends cdk.Stack { constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { super(scope, id, props); const handler = new lambda.Function(this, 'handler', { runtime: lambda.Runtime.PYTHON_3_8, code: lambda.Code.fromAsset(functionDir + '/function.zip'), handler: 'index.handler', }); new events.Rule(this, 'triggerImmediate', { schedule: new oneTimeEvents.OnDeploy(this, 'schedule', { offsetMinutes: 15 }).schedule, targets: [new targets.LambdaFunction(this.handler)], }); ``` ### Typescript - run in 24 hours ``` import * as cdk from '@aws-cdk/core'; import * as lambda from '@aws-cdk/aws-lambda'; import * as oneTimeEvents from '@renovosolutions/cdk-library-one-time-event'; export class CdkExampleLambdaStack extends cdk.Stack { constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { super(scope, id, props); const handler = new lambda.Function(this, 'handler', { runtime: lambda.Runtime.PYTHON_3_8, code: lambda.Code.fromAsset(functionDir + '/function.zip'), handler: 'index.handler', }); var tomorrow = new Date() tomorrow.setDate(tomorrow.getDate() + 1) new events.Rule(this, 'triggerImmediate', { schedule: new oneTimeEvents.At(this, 'schedule', { date: tomorrow }).schedule, targets: [new targets.LambdaFunction(this.handler)], }); ``` %prep %autosetup -n renovosolutions.aws-cdk-one-time-event-2.1.110 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-renovosolutions.aws-cdk-one-time-event -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue Apr 25 2023 Python_Bot - 2.1.110-1 - Package Spec generated