Class EventPermission
Provides a resource to create a CloudWatch Events permission to support cross-account events in the current account default event bus.
Example Usage
Account Access
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var devAccountAccess = new Aws.CloudWatch.EventPermission("devAccountAccess", new Aws.CloudWatch.EventPermissionArgs
{
Principal = "123456789012",
StatementId = "DevAccountAccess",
});
}
}
Organization Access
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var organizationAccess = new Aws.CloudWatch.EventPermission("organizationAccess", new Aws.CloudWatch.EventPermissionArgs
{
Condition = new Aws.CloudWatch.Inputs.EventPermissionConditionArgs
{
Key = "aws:PrincipalOrgID",
Type = "StringEquals",
Value = aws_organizations_organization.Example.Id,
},
Principal = "*",
StatementId = "OrganizationAccess",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.CloudWatch
Assembly: Pulumi.Aws.dll
Syntax
public class EventPermission : CustomResource
Constructors
View SourceEventPermission(String, EventPermissionArgs, CustomResourceOptions)
Create a EventPermission resource with the given unique name, arguments, and options.
Declaration
public EventPermission(string name, EventPermissionArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| EventPermissionArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAction
The action that you are enabling the other account to perform. Defaults to events:PutEvents.
Declaration
public Output<string> Action { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Condition
Configuration block to limit the event bus permissions you are granting to only accounts that fulfill the condition. Specified below.
Declaration
public Output<EventPermissionCondition> Condition { get; }
Property Value
| Type | Description |
|---|---|
| Output<EventPermissionCondition> |
Principal
The 12-digit AWS account ID that you are permitting to put events to your default event bus. Specify * to permit any account to put events to your default event bus, optionally limited by condition.
Declaration
public Output<string> Principal { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
StatementId
An identifier string for the external account that you are granting permissions to.
Declaration
public Output<string> StatementId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, EventPermissionState, CustomResourceOptions)
Get an existing EventPermission resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static EventPermission Get(string name, Input<string> id, EventPermissionState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| EventPermissionState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| EventPermission |