AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.10.0 published on Monday, Jul 11, 2022 by Pulumi

EventBusPolicy

Provides a resource to create an EventBridge resource policy to support cross-account events.

Note: EventBridge was formerly known as CloudWatch Events. The functionality is identical.

Note: The EventBridge bus policy resource (aws.cloudwatch.EventBusPolicy) is incompatible with the EventBridge permission resource (aws.cloudwatch.EventPermission) and will overwrite permissions.

Example Usage

Account Access

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var testPolicyDocument = Output.Create(Aws.Iam.GetPolicyDocument.InvokeAsync(new Aws.Iam.GetPolicyDocumentArgs
        {
            Statements = 
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementArgs
                {
                    Sid = "DevAccountAccess",
                    Effect = "Allow",
                    Actions = 
                    {
                        "events:PutEvents",
                    },
                    Resources = 
                    {
                        "arn:aws:events:eu-west-1:123456789012:event-bus/default",
                    },
                    Principals = 
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalArgs
                        {
                            Type = "AWS",
                            Identifiers = 
                            {
                                "123456789012",
                            },
                        },
                    },
                },
            },
        }));
        var testEventBusPolicy = new Aws.CloudWatch.EventBusPolicy("testEventBusPolicy", new Aws.CloudWatch.EventBusPolicyArgs
        {
            Policy = testPolicyDocument.Apply(testPolicyDocument => testPolicyDocument.Json),
            EventBusName = aws_cloudwatch_event_bus.Test.Name,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/cloudwatch"
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/iam"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testPolicyDocument, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{
			Statements: []iam.GetPolicyDocumentStatement{
				iam.GetPolicyDocumentStatement{
					Sid:    pulumi.StringRef("DevAccountAccess"),
					Effect: pulumi.StringRef("Allow"),
					Actions: []string{
						"events:PutEvents",
					},
					Resources: []string{
						"arn:aws:events:eu-west-1:123456789012:event-bus/default",
					},
					Principals: []iam.GetPolicyDocumentStatementPrincipal{
						iam.GetPolicyDocumentStatementPrincipal{
							Type: "AWS",
							Identifiers: []string{
								"123456789012",
							},
						},
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		_, err = cloudwatch.NewEventBusPolicy(ctx, "testEventBusPolicy", &cloudwatch.EventBusPolicyArgs{
			Policy:       pulumi.String(testPolicyDocument.Json),
			EventBusName: pulumi.Any(aws_cloudwatch_event_bus.Test.Name),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var testPolicyDocument = Output.of(IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
            .statements(GetPolicyDocumentStatementArgs.builder()
                .sid("DevAccountAccess")
                .effect("Allow")
                .actions("events:PutEvents")
                .resources("arn:aws:events:eu-west-1:123456789012:event-bus/default")
                .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                    .type("AWS")
                    .identifiers("123456789012")
                    .build())
                .build())
            .build()));

        var testEventBusPolicy = new EventBusPolicy("testEventBusPolicy", EventBusPolicyArgs.builder()        
            .policy(testPolicyDocument.apply(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
            .eventBusName(aws_cloudwatch_event_bus.test().name())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

test_policy_document = aws.iam.get_policy_document(statements=[aws.iam.GetPolicyDocumentStatementArgs(
    sid="DevAccountAccess",
    effect="Allow",
    actions=["events:PutEvents"],
    resources=["arn:aws:events:eu-west-1:123456789012:event-bus/default"],
    principals=[aws.iam.GetPolicyDocumentStatementPrincipalArgs(
        type="AWS",
        identifiers=["123456789012"],
    )],
)])
test_event_bus_policy = aws.cloudwatch.EventBusPolicy("testEventBusPolicy",
    policy=test_policy_document.json,
    event_bus_name=aws_cloudwatch_event_bus["test"]["name"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const testPolicyDocument = aws.iam.getPolicyDocument({
    statements: [{
        sid: "DevAccountAccess",
        effect: "Allow",
        actions: ["events:PutEvents"],
        resources: ["arn:aws:events:eu-west-1:123456789012:event-bus/default"],
        principals: [{
            type: "AWS",
            identifiers: ["123456789012"],
        }],
    }],
});
const testEventBusPolicy = new aws.cloudwatch.EventBusPolicy("testEventBusPolicy", {
    policy: testPolicyDocument.then(testPolicyDocument => testPolicyDocument.json),
    eventBusName: aws_cloudwatch_event_bus.test.name,
});
resources:
  testEventBusPolicy:
    type: aws:cloudwatch:EventBusPolicy
    properties:
      policy: ${testPolicyDocument.json}
      eventBusName: ${aws_cloudwatch_event_bus.test.name}
variables:
  testPolicyDocument:
    Fn::Invoke:
      Function: aws:iam:getPolicyDocument
      Arguments:
        statements:
          - sid: DevAccountAccess
            effect: Allow
            actions:
              - events:PutEvents
            resources:
              - arn:aws:events:eu-west-1:123456789012:event-bus/default
            principals:
              - type: AWS
                identifiers:
                  - 123456789012

Organization Access

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var testPolicyDocument = Output.Create(Aws.Iam.GetPolicyDocument.InvokeAsync(new Aws.Iam.GetPolicyDocumentArgs
        {
            Statements = 
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementArgs
                {
                    Sid = "OrganizationAccess",
                    Effect = "Allow",
                    Actions = 
                    {
                        "events:DescribeRule",
                        "events:ListRules",
                        "events:ListTargetsByRule",
                        "events:ListTagsForResource",
                    },
                    Resources = 
                    {
                        "arn:aws:events:eu-west-1:123456789012:rule/*",
                        "arn:aws:events:eu-west-1:123456789012:event-bus/default",
                    },
                    Principals = 
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalArgs
                        {
                            Type = "AWS",
                            Identifiers = 
                            {
                                "*",
                            },
                        },
                    },
                    Conditions = 
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionArgs
                        {
                            Test = "StringEquals",
                            Variable = "aws:PrincipalOrgID",
                            Values = 
                            {
                                aws_organizations_organization.Example.Id,
                            },
                        },
                    },
                },
            },
        }));
        var testEventBusPolicy = new Aws.CloudWatch.EventBusPolicy("testEventBusPolicy", new Aws.CloudWatch.EventBusPolicyArgs
        {
            Policy = testPolicyDocument.Apply(testPolicyDocument => testPolicyDocument.Json),
            EventBusName = aws_cloudwatch_event_bus.Test.Name,
        });
    }

}

Coming soon!

package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var testPolicyDocument = Output.of(IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
            .statements(GetPolicyDocumentStatementArgs.builder()
                .sid("OrganizationAccess")
                .effect("Allow")
                .actions(                
                    "events:DescribeRule",
                    "events:ListRules",
                    "events:ListTargetsByRule",
                    "events:ListTagsForResource")
                .resources(                
                    "arn:aws:events:eu-west-1:123456789012:rule/*",
                    "arn:aws:events:eu-west-1:123456789012:event-bus/default")
                .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                    .type("AWS")
                    .identifiers("*")
                    .build())
                .conditions(GetPolicyDocumentStatementConditionArgs.builder()
                    .test("StringEquals")
                    .variable("aws:PrincipalOrgID")
                    .values(aws_organizations_organization.example().id())
                    .build())
                .build())
            .build()));

        var testEventBusPolicy = new EventBusPolicy("testEventBusPolicy", EventBusPolicyArgs.builder()        
            .policy(testPolicyDocument.apply(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
            .eventBusName(aws_cloudwatch_event_bus.test().name())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

test_policy_document = aws.iam.get_policy_document(statements=[aws.iam.GetPolicyDocumentStatementArgs(
    sid="OrganizationAccess",
    effect="Allow",
    actions=[
        "events:DescribeRule",
        "events:ListRules",
        "events:ListTargetsByRule",
        "events:ListTagsForResource",
    ],
    resources=[
        "arn:aws:events:eu-west-1:123456789012:rule/*",
        "arn:aws:events:eu-west-1:123456789012:event-bus/default",
    ],
    principals=[aws.iam.GetPolicyDocumentStatementPrincipalArgs(
        type="AWS",
        identifiers=["*"],
    )],
    conditions=[aws.iam.GetPolicyDocumentStatementConditionArgs(
        test="StringEquals",
        variable="aws:PrincipalOrgID",
        values=[aws_organizations_organization["example"]["id"]],
    )],
)])
test_event_bus_policy = aws.cloudwatch.EventBusPolicy("testEventBusPolicy",
    policy=test_policy_document.json,
    event_bus_name=aws_cloudwatch_event_bus["test"]["name"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const testPolicyDocument = aws.iam.getPolicyDocument({
    statements: [{
        sid: "OrganizationAccess",
        effect: "Allow",
        actions: [
            "events:DescribeRule",
            "events:ListRules",
            "events:ListTargetsByRule",
            "events:ListTagsForResource",
        ],
        resources: [
            "arn:aws:events:eu-west-1:123456789012:rule/*",
            "arn:aws:events:eu-west-1:123456789012:event-bus/default",
        ],
        principals: [{
            type: "AWS",
            identifiers: ["*"],
        }],
        conditions: [{
            test: "StringEquals",
            variable: "aws:PrincipalOrgID",
            values: [aws_organizations_organization.example.id],
        }],
    }],
});
const testEventBusPolicy = new aws.cloudwatch.EventBusPolicy("testEventBusPolicy", {
    policy: testPolicyDocument.then(testPolicyDocument => testPolicyDocument.json),
    eventBusName: aws_cloudwatch_event_bus.test.name,
});
resources:
  testEventBusPolicy:
    type: aws:cloudwatch:EventBusPolicy
    properties:
      policy: ${testPolicyDocument.json}
      eventBusName: ${aws_cloudwatch_event_bus.test.name}
variables:
  testPolicyDocument:
    Fn::Invoke:
      Function: aws:iam:getPolicyDocument
      Arguments:
        statements:
          - sid: OrganizationAccess
            effect: Allow
            actions:
              - events:DescribeRule
              - events:ListRules
              - events:ListTargetsByRule
              - events:ListTagsForResource
            resources:
              - arn:aws:events:eu-west-1:123456789012:rule/*
              - arn:aws:events:eu-west-1:123456789012:event-bus/default
            principals:
              - type: AWS
                identifiers:
                  - '*'
            conditions:
              - test: StringEquals
                variable: aws:PrincipalOrgID
                values:
                  - ${aws_organizations_organization.example.id}

Multiple Statements

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var testPolicyDocument = Output.Create(Aws.Iam.GetPolicyDocument.InvokeAsync(new Aws.Iam.GetPolicyDocumentArgs
        {
            Statements = 
            {
                new Aws.Iam.Inputs.GetPolicyDocumentStatementArgs
                {
                    Sid = "DevAccountAccess",
                    Effect = "Allow",
                    Actions = 
                    {
                        "events:PutEvents",
                    },
                    Resources = 
                    {
                        "arn:aws:events:eu-west-1:123456789012:event-bus/default",
                    },
                    Principals = 
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalArgs
                        {
                            Type = "AWS",
                            Identifiers = 
                            {
                                "123456789012",
                            },
                        },
                    },
                },
                new Aws.Iam.Inputs.GetPolicyDocumentStatementArgs
                {
                    Sid = "OrganizationAccess",
                    Effect = "Allow",
                    Actions = 
                    {
                        "events:DescribeRule",
                        "events:ListRules",
                        "events:ListTargetsByRule",
                        "events:ListTagsForResource",
                    },
                    Resources = 
                    {
                        "arn:aws:events:eu-west-1:123456789012:rule/*",
                        "arn:aws:events:eu-west-1:123456789012:event-bus/default",
                    },
                    Principals = 
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalArgs
                        {
                            Type = "AWS",
                            Identifiers = 
                            {
                                "*",
                            },
                        },
                    },
                    Conditions = 
                    {
                        new Aws.Iam.Inputs.GetPolicyDocumentStatementConditionArgs
                        {
                            Test = "StringEquals",
                            Variable = "aws:PrincipalOrgID",
                            Values = 
                            {
                                aws_organizations_organization.Example.Id,
                            },
                        },
                    },
                },
            },
        }));
        var testEventBusPolicy = new Aws.CloudWatch.EventBusPolicy("testEventBusPolicy", new Aws.CloudWatch.EventBusPolicyArgs
        {
            Policy = testPolicyDocument.Apply(testPolicyDocument => testPolicyDocument.Json),
            EventBusName = aws_cloudwatch_event_bus.Test.Name,
        });
    }

}

Coming soon!

package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var testPolicyDocument = Output.of(IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
            .statements(            
                GetPolicyDocumentStatementArgs.builder()
                    .sid("DevAccountAccess")
                    .effect("Allow")
                    .actions("events:PutEvents")
                    .resources("arn:aws:events:eu-west-1:123456789012:event-bus/default")
                    .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                        .type("AWS")
                        .identifiers("123456789012")
                        .build())
                    .build(),
                GetPolicyDocumentStatementArgs.builder()
                    .sid("OrganizationAccess")
                    .effect("Allow")
                    .actions(                    
                        "events:DescribeRule",
                        "events:ListRules",
                        "events:ListTargetsByRule",
                        "events:ListTagsForResource")
                    .resources(                    
                        "arn:aws:events:eu-west-1:123456789012:rule/*",
                        "arn:aws:events:eu-west-1:123456789012:event-bus/default")
                    .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                        .type("AWS")
                        .identifiers("*")
                        .build())
                    .conditions(GetPolicyDocumentStatementConditionArgs.builder()
                        .test("StringEquals")
                        .variable("aws:PrincipalOrgID")
                        .values(aws_organizations_organization.example().id())
                        .build())
                    .build())
            .build()));

        var testEventBusPolicy = new EventBusPolicy("testEventBusPolicy", EventBusPolicyArgs.builder()        
            .policy(testPolicyDocument.apply(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
            .eventBusName(aws_cloudwatch_event_bus.test().name())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

test_policy_document = aws.iam.get_policy_document(statements=[
    aws.iam.GetPolicyDocumentStatementArgs(
        sid="DevAccountAccess",
        effect="Allow",
        actions=["events:PutEvents"],
        resources=["arn:aws:events:eu-west-1:123456789012:event-bus/default"],
        principals=[aws.iam.GetPolicyDocumentStatementPrincipalArgs(
            type="AWS",
            identifiers=["123456789012"],
        )],
    ),
    aws.iam.GetPolicyDocumentStatementArgs(
        sid="OrganizationAccess",
        effect="Allow",
        actions=[
            "events:DescribeRule",
            "events:ListRules",
            "events:ListTargetsByRule",
            "events:ListTagsForResource",
        ],
        resources=[
            "arn:aws:events:eu-west-1:123456789012:rule/*",
            "arn:aws:events:eu-west-1:123456789012:event-bus/default",
        ],
        principals=[aws.iam.GetPolicyDocumentStatementPrincipalArgs(
            type="AWS",
            identifiers=["*"],
        )],
        conditions=[aws.iam.GetPolicyDocumentStatementConditionArgs(
            test="StringEquals",
            variable="aws:PrincipalOrgID",
            values=[aws_organizations_organization["example"]["id"]],
        )],
    ),
])
test_event_bus_policy = aws.cloudwatch.EventBusPolicy("testEventBusPolicy",
    policy=test_policy_document.json,
    event_bus_name=aws_cloudwatch_event_bus["test"]["name"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const testPolicyDocument = aws.iam.getPolicyDocument({
    statements: [
        {
            sid: "DevAccountAccess",
            effect: "Allow",
            actions: ["events:PutEvents"],
            resources: ["arn:aws:events:eu-west-1:123456789012:event-bus/default"],
            principals: [{
                type: "AWS",
                identifiers: ["123456789012"],
            }],
        },
        {
            sid: "OrganizationAccess",
            effect: "Allow",
            actions: [
                "events:DescribeRule",
                "events:ListRules",
                "events:ListTargetsByRule",
                "events:ListTagsForResource",
            ],
            resources: [
                "arn:aws:events:eu-west-1:123456789012:rule/*",
                "arn:aws:events:eu-west-1:123456789012:event-bus/default",
            ],
            principals: [{
                type: "AWS",
                identifiers: ["*"],
            }],
            conditions: [{
                test: "StringEquals",
                variable: "aws:PrincipalOrgID",
                values: [aws_organizations_organization.example.id],
            }],
        },
    ],
});
const testEventBusPolicy = new aws.cloudwatch.EventBusPolicy("testEventBusPolicy", {
    policy: testPolicyDocument.then(testPolicyDocument => testPolicyDocument.json),
    eventBusName: aws_cloudwatch_event_bus.test.name,
});
resources:
  testEventBusPolicy:
    type: aws:cloudwatch:EventBusPolicy
    properties:
      policy: ${testPolicyDocument.json}
      eventBusName: ${aws_cloudwatch_event_bus.test.name}
variables:
  testPolicyDocument:
    Fn::Invoke:
      Function: aws:iam:getPolicyDocument
      Arguments:
        statements:
          - sid: DevAccountAccess
            effect: Allow
            actions:
              - events:PutEvents
            resources:
              - arn:aws:events:eu-west-1:123456789012:event-bus/default
            principals:
              - type: AWS
                identifiers:
                  - 123456789012
          - sid: OrganizationAccess
            effect: Allow
            actions:
              - events:DescribeRule
              - events:ListRules
              - events:ListTargetsByRule
              - events:ListTagsForResource
            resources:
              - arn:aws:events:eu-west-1:123456789012:rule/*
              - arn:aws:events:eu-west-1:123456789012:event-bus/default
            principals:
              - type: AWS
                identifiers:
                  - '*'
            conditions:
              - test: StringEquals
                variable: aws:PrincipalOrgID
                values:
                  - ${aws_organizations_organization.example.id}

Create a EventBusPolicy Resource

new EventBusPolicy(name: string, args: EventBusPolicyArgs, opts?: CustomResourceOptions);
@overload
def EventBusPolicy(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   event_bus_name: Optional[str] = None,
                   policy: Optional[str] = None)
@overload
def EventBusPolicy(resource_name: str,
                   args: EventBusPolicyArgs,
                   opts: Optional[ResourceOptions] = None)
func NewEventBusPolicy(ctx *Context, name string, args EventBusPolicyArgs, opts ...ResourceOption) (*EventBusPolicy, error)
public EventBusPolicy(string name, EventBusPolicyArgs args, CustomResourceOptions? opts = null)
public EventBusPolicy(String name, EventBusPolicyArgs args)
public EventBusPolicy(String name, EventBusPolicyArgs args, CustomResourceOptions options)
type: aws:cloudwatch:EventBusPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args EventBusPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args EventBusPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args EventBusPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EventBusPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args EventBusPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

EventBusPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The EventBusPolicy resource accepts the following input properties:

Policy string
EventBusName string

The event bus to set the permissions on. If you omit this, the permissions are set on the default event bus.

Policy string
EventBusName string

The event bus to set the permissions on. If you omit this, the permissions are set on the default event bus.

policy String
eventBusName String

The event bus to set the permissions on. If you omit this, the permissions are set on the default event bus.

policy string
eventBusName string

The event bus to set the permissions on. If you omit this, the permissions are set on the default event bus.

policy str
event_bus_name str

The event bus to set the permissions on. If you omit this, the permissions are set on the default event bus.

policy String
eventBusName String

The event bus to set the permissions on. If you omit this, the permissions are set on the default event bus.

Outputs

All input properties are implicitly available as output properties. Additionally, the EventBusPolicy resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing EventBusPolicy Resource

Get an existing EventBusPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EventBusPolicyState, opts?: CustomResourceOptions): EventBusPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        event_bus_name: Optional[str] = None,
        policy: Optional[str] = None) -> EventBusPolicy
func GetEventBusPolicy(ctx *Context, name string, id IDInput, state *EventBusPolicyState, opts ...ResourceOption) (*EventBusPolicy, error)
public static EventBusPolicy Get(string name, Input<string> id, EventBusPolicyState? state, CustomResourceOptions? opts = null)
public static EventBusPolicy get(String name, Output<String> id, EventBusPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
EventBusName string

The event bus to set the permissions on. If you omit this, the permissions are set on the default event bus.

Policy string
EventBusName string

The event bus to set the permissions on. If you omit this, the permissions are set on the default event bus.

Policy string
eventBusName String

The event bus to set the permissions on. If you omit this, the permissions are set on the default event bus.

policy String
eventBusName string

The event bus to set the permissions on. If you omit this, the permissions are set on the default event bus.

policy string
event_bus_name str

The event bus to set the permissions on. If you omit this, the permissions are set on the default event bus.

policy str
eventBusName String

The event bus to set the permissions on. If you omit this, the permissions are set on the default event bus.

policy String

Import

EventBridge permissions can be imported using the event_bus_name, e.g.,

 $ pulumi import aws:cloudwatch/eventBusPolicy:EventBusPolicy DevAccountAccess example-event-bus

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.