Amazon EventBridge
API Reference (API Version 2015-10-07)

CreatePartnerEventSource

Called by an SaaS partner to create a partner event source.

Note

This operation is not used by AWS customers.

Each partner event source can be used by one AWS account to create a matching partner event bus in that AWS account. A SaaS partner must create one partner event source for each AWS account that wants to receive those event types.

A partner event source creates events based on resources in the SaaS partner's service or application.

An AWS account that creates a partner event bus that matches the partner event source can use that event bus to receive events from the partner, and then process them using AWS Events rules and targets.

Partner event source names follow this format:

aws.partner/partner_name/event_namespace/event_name

  • partner_name is determined during partner registration and identifies the partner to AWS customers.

  • For event_namespace, we recommend that partners use a string that identifies the AWS customer within the partner's system. This should not be the customer's AWS account ID.

  • event_name is determined by the partner, and should uniquely identify an event-generating resource within the partner system. This should help AWS customers decide whether to create an event bus to receive these events.

Request Syntax

{ "Account": "string", "Name": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Account

The AWS account ID of the customer who is permitted to create a matching partner event bus for this partner event source.

Type: String

Length Constraints: Fixed length of 12.

Pattern: \d{12}

Required: Yes

Name

The name of the partner event source. This name must be unique and must be in the format partner_name/event_namespace/event_name . The AWS account that wants to use this partner event source must create a partner event bus with a name that matches the name of the partner event source.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: aws\.partner(/[\.\-_A-Za-z0-9]+){2,}

Required: Yes

Response Syntax

{ "EventSourceArn": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

EventSourceArn

The ARN of the partner event source.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

ConcurrentModificationException

There is concurrent modification on a resource.

HTTP Status Code: 400

InternalException

This exception occurs due to unexpected causes.

HTTP Status Code: 500

LimitExceededException

You tried to create more resources than is allowed.

HTTP Status Code: 400

ResourceAlreadyExistsException

The resource that you're trying to create already exists.

HTTP Status Code: 400

Example

Creates a partner event source

The following example creates a partner event source called aws.partner/PartnerName/acct1/repo1.

Sample Request

POST / HTTP/1.1 Host: events.<region>.<domain> x-amz-Date: <Date> Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=content-type;date;host;user-agent;x-amz-date;x-amz-target;x-amzn-requestid, Signature=<Signature> User-Agent: <UserAgentString> Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes> Connection: Keep-Alive X-Amz-Target: AWSEvents.CreatePartnerEventSource { "Name": "aws.partner/PartnerName/acct1/repo1", "Account": "123456789012" }

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: <RequestId> Content-Type: application/x-amz-json-1.1 Content-Length: <PayloadSizeBytes> Date: <Date> { "EventSourceArn": "arn:aws:events:us-east-2::event-source/aws.partner/PartnerName/acct1/repo1" }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: