AWS::Events::EventBusPolicy Condition - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::Events::EventBusPolicy Condition

A JSON string which you can use to limit the event bus permissions you are granting to only accounts that fulfill the condition. Currently, the only supported condition is membership in a certain Amazon organization. The string must contain Type, Key, and Value fields. The Value field specifies the ID of the Amazon organization. Following is an example value for Condition:

'{"Type" : "StringEquals", "Key": "aws:PrincipalOrgID", "Value": "o-1234567890"}'

Syntax

To declare this entity in your Amazon CloudFormation template, use the following syntax:

JSON

{ "Key" : String, "Type" : String, "Value" : String }

YAML

Key: String Type: String Value: String

Properties

Key

Specifies the key for the condition. Currently the only supported key is aws:PrincipalOrgID.

Required: No

Type: String

Update requires: No interruption

Type

Specifies the type of condition. Currently the only supported value is StringEquals.

Required: No

Type: String

Update requires: No interruption

Value

Specifies the value for the key. Currently, this must be the ID of the organization.

Required: No

Type: String

Update requires: No interruption

Examples

Set the Condition parameter

The following example sets the condition parameter to all Amazon accounts in the organization with an organization ID of o-1234567890.

JSON

"Condition": { "StringEquals": {"aws:PrincipalOrgID": "o-1234567890"} }

YAML

Condition: StringEquals: "aws:PrincipalOrgID": "o-1234567890"