Skip to content

(aws-iotevents): golang: export _bind so that L2 constructs can be written in Go #25004

Open
@karl-dau

Description

@karl-dau

Describe the feature

I want to write my own IAction in Go (for SNS publishing), but I cannot seem to satisfy the correct interface.

Looking at the definition:

export interface IAction {
  /**
   * Returns the AWS IoT Events action specification.
   * @internal
   */
  _bind(scope: Construct, options: ActionBindOptions): ActionConfig;
}

_bind is not exported so it is not part of the generated Go IAction.

the aws-iot Actions used to have Bind exported and I could write my own actions before CDK officially supported the DynamoDBv2 action.

Passing in a Go a struct with method:

func (action *IoTEventSNSAction) _Bind(scope constructs.Construct, options *iotevents.ActionBindOptions) *iotevents.ActionConfig {

results in panic: action._bind is not a function.

Alternatively, is there another way to achieve this?

Use Case

I have no way to extend the functionality here, except first write a Typescript class.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.73.0

Environment details (OS name and version, etc.)

macOS 13.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions