定制 synida/aws-event-bridge-wrapper 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

synida/aws-event-bridge-wrapper

最新稳定版本:v1.4.1

Composer 安装命令:

composer require synida/aws-event-bridge-wrapper

包简介

PHP wrapper for basic PutEvent functionality for the EventBridge

README 文档

README

Minimalist package to support the aws events put-events --entries <entries> command

Basic usage:

Info on the PutEvents function: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html

Accepted fields are the ones under the Entries field and the following; Detail, DetailType, EventBusName, Resources, Source, Time, TraceHeader

Important make sure that you are using aws cli 2+, otherwise you can expect errors on the entry fields from aws cli v1

// You put whatever details you want to pass in this array
$detailArray = [
    'task_id' => (new RandomGenerator())->uuid(),
    'revisions' => [
        'id' => 'edit',
        's3_path'=> "s3://{$bucket}/{$s3Key}"
    ]
];

$entryObject = new EventEntry([
    'Source' => 'some.source',
    'DetailType' => 'some.detail.type',
    'Detail' => json_encode($detailArray, JSON_THROW_ON_ERROR)
    // ect..
]);

$entriesJson = json_encode([$entryObject], JSON_THROW_ON_ERROR)

$defaultPath = 'someFilePath';
$filePath = "{$defaultPath}/someFilename.json";

file_put_contents($filePath, $entriesJson);

$awsEBCli = new EventBridge(['entries' => "file://$filePath"]);

$result = $awsEBCli->putEvents();

统计信息

  • 总下载量: 70
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固