@alicloud/eventbridge20200401 6.4.0 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
@@ -1037,6 +1037,27 @@ export default class Client extends OpenApi {
1037
1037
  * @returns PollAskResultResponse
1038
1038
  */
1039
1039
  pollAskResult(request: $_model.PollAskResultRequest): Promise<$_model.PollAskResultResponse>;
1040
+ /**
1041
+ * Sends events to an event bus.
1042
+ *
1043
+ * @remarks
1044
+ * Sends one or more events to an event bus.
1045
+ *
1046
+ * @param tmpReq - PutEventsRequest
1047
+ * @param runtime - runtime options for this request RuntimeOptions
1048
+ * @returns PutEventsResponse
1049
+ */
1050
+ putEventsWithOptions(tmpReq: $_model.PutEventsRequest, runtime: $dara.RuntimeOptions): Promise<$_model.PutEventsResponse>;
1051
+ /**
1052
+ * Sends events to an event bus.
1053
+ *
1054
+ * @remarks
1055
+ * Sends one or more events to an event bus.
1056
+ *
1057
+ * @param request - PutEventsRequest
1058
+ * @returns PutEventsResponse
1059
+ */
1060
+ putEvents(request: $_model.PutEventsRequest): Promise<$_model.PutEventsResponse>;
1040
1061
  /**
1041
1062
  * Create or update event targets for the specified rule.
1042
1063
  *
package/dist/client.js CHANGED
@@ -2881,6 +2881,59 @@ class Client extends openapi_core_1.default {
2881
2881
  let runtime = new $dara.RuntimeOptions({});
2882
2882
  return await this.pollAskResultWithOptions(request, runtime);
2883
2883
  }
2884
+ /**
2885
+ * Sends events to an event bus.
2886
+ *
2887
+ * @remarks
2888
+ * Sends one or more events to an event bus.
2889
+ *
2890
+ * @param tmpReq - PutEventsRequest
2891
+ * @param runtime - runtime options for this request RuntimeOptions
2892
+ * @returns PutEventsResponse
2893
+ */
2894
+ async putEventsWithOptions(tmpReq, runtime) {
2895
+ tmpReq.validate();
2896
+ let request = new $_model.PutEventsShrinkRequest({});
2897
+ openapi_core_2.OpenApiUtil.convert(tmpReq, request);
2898
+ if (!$dara.isNull(tmpReq.eventList)) {
2899
+ request.eventListShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.eventList, "EventList", "json");
2900
+ }
2901
+ let body = {};
2902
+ if (!$dara.isNull(request.eventBusName)) {
2903
+ body["EventBusName"] = request.eventBusName;
2904
+ }
2905
+ if (!$dara.isNull(request.eventListShrink)) {
2906
+ body["EventList"] = request.eventListShrink;
2907
+ }
2908
+ let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
2909
+ body: openapi_core_2.OpenApiUtil.parseToMap(body),
2910
+ });
2911
+ let params = new openapi_core_2.$OpenApiUtil.Params({
2912
+ action: "PutEvents",
2913
+ version: "2020-04-01",
2914
+ protocol: "HTTPS",
2915
+ pathname: "/",
2916
+ method: "POST",
2917
+ authType: "AK",
2918
+ style: "RPC",
2919
+ reqBodyType: "formData",
2920
+ bodyType: "json",
2921
+ });
2922
+ return $dara.cast(await this.callApi(params, req, runtime), new $_model.PutEventsResponse({}));
2923
+ }
2924
+ /**
2925
+ * Sends events to an event bus.
2926
+ *
2927
+ * @remarks
2928
+ * Sends one or more events to an event bus.
2929
+ *
2930
+ * @param request - PutEventsRequest
2931
+ * @returns PutEventsResponse
2932
+ */
2933
+ async putEvents(request) {
2934
+ let runtime = new $dara.RuntimeOptions({});
2935
+ return await this.putEventsWithOptions(request, runtime);
2936
+ }
2884
2937
  /**
2885
2938
  * Create or update event targets for the specified rule.
2886
2939
  *