| 1 | import * as sns from "@distilled.cloud/aws/sns"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { PlatformApplication } from "./PlatformApplication.ts"; |
| 5 | |
| 6 | export interface SetEndpointAttributesRequest |
| 7 | extends sns.SetEndpointAttributesInput {} |
| 8 | |
| 9 | /** |
| 10 | * Runtime binding for `sns:SetEndpointAttributes`. |
| 11 | * |
| 12 | * Bind this operation to a {@link PlatformApplication} to update a device |
| 13 | * endpoint — e.g. re-enable it after a delivery failure or rotate its token. |
| 14 | * Provide the `SetEndpointAttributesHttp` layer on the Function to implement the binding. |
| 15 | * ### Mobile Push |
| 16 | * **Example:** Re-enable an Endpoint |
| 17 | * ```typescript |
| 18 | * const setEndpointAttributes = yield* SNS.SetEndpointAttributes(app); |
| 19 | * yield* setEndpointAttributes({ |
| 20 | * EndpointArn: endpointArn, |
| 21 | * Attributes: { Enabled: "true" }, |
| 22 | * }); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface SetEndpointAttributes extends Binding.Service< |
| 28 | SetEndpointAttributes, |
| 29 | "AWS.SNS.SetEndpointAttributes", |
| 30 | ( |
| 31 | application: PlatformApplication, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request: SetEndpointAttributesRequest, |
| 35 | ) => Effect.Effect< |
| 36 | sns.SetEndpointAttributesResponse, |
| 37 | sns.SetEndpointAttributesError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | |
| 42 | export const SetEndpointAttributes = Binding.Service<SetEndpointAttributes>( |
| 43 | "AWS.SNS.SetEndpointAttributes", |
| 44 | ); |