# eb-sdk

Part of **EB**

# EventBridge Developer Tools Console Guide

## Operations Overview

| Operation | Console Entry Path | Prerequisites | Description |
|----------|-------------------|--------------|-------------|
| Install SDK for Go | Not applicable (CLI-only) | Go 1.12.0 or later installed | Set up the EventBridge SDK for Go applications using terminal commands. |
| Install SDK for Java | Console > EventBridge > SDKs > Install SDK for Java | JDK installed, Maven installed | Configure Maven dependencies to use the EventBridge Java SDK. |
| Install SDK for PHP | Console > EventBridge > SDK Installation | PHP installed, Composer installed | Use Composer to install the EventBridge PHP SDK and output library. |
| SDK for TypeScript | Console > EventBridge > SDKs > TypeScript | Node.js ≥14, npm/yarn, Alibaba Cloud account access | Access TypeScript SDK installation instructions and code examples via the console. |

## Operation Steps

### Install SDK for Go

**Navigation**: Not applicable — this operation is performed entirely in the terminal.

**Prerequisites**:
- Go 1.12.0 or later is installed

1. Enable Go modules in your environment  
   - Element: `go env -w GO111MODULE=on` (text_input) — run in terminal  
   - Notes: Required to manage dependencies with `go mod`

2. Configure GOPROXY for faster module downloads  
   - Element: `go env -w GOPROXY=https://goproxy.cn,direct` (text_input) — run in terminal  

3. Initialize a new Go module (if starting a new project)  
   - Element: `go mod init` (text_input) — run in terminal  

4. Install the EventBridge SDK for Go  
   - Element: `go get github.com/alibabacloud-go/eventbridge-sdk` (text_input) — run in terminal  

5. Install the Tea Console output library  
   - Element: `go get github.com/alibabacloud/tea-console` (text_input) — run in terminal  

**Form Fields**: Not applicable

### Install SDK for Java

**Navigation**: Console > EventBridge > SDKs > Install SDK for Java

**Prerequisites**:
- Java Development Kit (JDK) installed
- Maven installed (version ≥ 3.6.0)

1. Navigate to the EventBridge console  
   - Element: **EventBridge** (menu) — left navigation panel  

2. Open the SDK documentation section  
   - Element: **SDKs** (link) — left navigation panel  

3. Select the Java SDK installation guide  
   - Element: **Install SDK for Java** (link) — main content area  

4. Add the Maven dependency to your `pom.xml` file  
   - Element: `<dependency>...</dependency>` block (textarea) — copy exact XML snippet from page  
   - Notes: The required artifact is `eventbridge-client` version `1.2.6` from group `com.aliyun`

**Form Fields**: Not applicable

### Install SDK for PHP

**Navigation**: Console > EventBridge > SDK Installation

**Prerequisites**:
- PHP is installed
- Composer is installed

1. Verify your PHP version  
   - Element: `php -v` (text_input) — terminal/command line  

2. Install the EventBridge SDK via Composer  
   - Element: `composer require alibabacloud/eventbridge` (text_input) — terminal/command line  

3. Install the Tea Console output library  
   - Element: `composer require alibabacloud/tea-console` (text_input) — terminal/command line  

**Form Fields**: Not applicable

### SDK for TypeScript

**Navigation**: Console > EventBridge > SDKs > TypeScript

**Prerequisites**:
- Node.js version 14 or higher installed
- npm or yarn package manager available
- Access to Alibaba Cloud account with appropriate permissions

1. Navigate to the EventBridge console  
   - Element: **EventBridge** (menu) — left navigation panel  

2. Open the SDKs section  
   - Element: **SDKs** (link) — left navigation panel  

3. Select the TypeScript SDK option  
   - Element: **TypeScript** (button) — main content area  
   - Notes: A new page loads displaying installation commands (`npm install @alicloud/eventbridge`) and usage examples  

**Form Fields**: Not applicable

## FAQ

Q: Do I need to use the console to install the Go SDK?  
A: No. The Go SDK is installed entirely via terminal commands using `go get`. The console does not provide a GUI installer for Go.

Q: Where can I find the exact Maven dependency for the Java SDK?  
A: In the EventBridge console, go to **Console > EventBridge > SDKs > Install SDK for Java**. The page displays the full `<dependency>` block with groupId, artifactId, and version.

Q: Can I install the PHP SDK without Composer?  
A: No. The PHP SDK requires Composer for dependency management. Ensure Composer is installed before proceeding.

Q: What permissions do I need to access the SDK documentation in the console?  
A: You need basic read access to the EventBridge service in your Alibaba Cloud account. No special permissions are required to view SDK installation guides.

Q: Are the SDKs charged separately from EventBridge usage?  
A: The SDK libraries themselves are free to download and use. However, API calls made through the SDK to EventBridge are billed according to the service’s pricing model.

## Pricing & Billing

### Billing Model
Billing is based on actual API request volume (per request), not SDK usage. The SDKs are free to install and integrate.

### Price Reference

| Tier | Input Price | Output Price |
|------|-------------|--------------|
| default | ¥0.0001 per call | ¥0.0001 per call |
| default (TypeScript) | ¥0.0005 per call | ¥0.0005 per call |

> Note: PHP and TypeScript SDKs trigger billable EventBridge API calls. Go and Java SDKs follow the same underlying service pricing.

### Free Tier
- PHP: 1,000 free calls per month  
- TypeScript: 10,000 free calls per month  

### Billing Notes
- Charges apply per event published or consumed via the SDK, even if no downstream processing occurs.
- Maximum request rate: 100 QPS (queries per second) per account.
- Billing is based on actual usage; no charges accrue for merely installing or importing the SDK.