1. Registry
  2. Packages
  3. AWS Cloud Control
  4. API Docs
  5. eventsv2
  6. getResourcePolicy

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.81.0
published on Monday, Sep 28, 2026 by Pulumi
aws-native logo aws-native logo

We recommend new projects start with resources from the AWS provider.

Viewing docs for AWS Cloud Control v1.81.0
published on Monday, Sep 28, 2026 by Pulumi

    Resource type definition for AWS::EventsV2::ResourcePolicy, the resource policy of an Amazon EventBridge event bus. This manages only the resource policy named “default”, which the bus owner writes. It does not manage the policy named “AWS_RAM”, which AWS Resource Access Manager owns on behalf of the bus owner. If the bus already has a default policy, creating this resource fails. Deleting this resource removes all permissions granted by it. An explicit Deny in this policy takes precedence over an Allow in the “AWS_RAM” policy, so deleting this resource can widen access. Set DeletionPolicy: Retain if the policy carries a Deny that you rely on. Required permissions: events:PutResourcePolicy, events:GetResourcePolicy, and events:DeleteResourcePolicy. Listing resources of this type also requires events:ListEventBuses and events:ListResourcePolicies.

    Using getResourcePolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getResourcePolicy(args: GetResourcePolicyArgs, opts?: InvokeOptions): Promise<GetResourcePolicyResult>
    function getResourcePolicyOutput(args: GetResourcePolicyOutputArgs, opts?: InvokeOutputOptions): Output<GetResourcePolicyResult>
    def get_resource_policy(event_bus_arn: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetResourcePolicyResult
    def get_resource_policy_output(event_bus_arn: pulumi.Input[Optional[str]] = None,
                            opts: Optional[InvokeOutputOptions] = None) -> Output[GetResourcePolicyResult]
    func LookupResourcePolicy(ctx *Context, args *LookupResourcePolicyArgs, opts ...InvokeOption) (*LookupResourcePolicyResult, error)
    func LookupResourcePolicyOutput(ctx *Context, args *LookupResourcePolicyOutputArgs, opts ...InvokeOption) LookupResourcePolicyResultOutput

    > Note: This function is named LookupResourcePolicy in the Go SDK.

    public static class GetResourcePolicy 
    {
        public static Task<GetResourcePolicyResult> InvokeAsync(GetResourcePolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetResourcePolicyResult> Invoke(GetResourcePolicyInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetResourcePolicyResult> Invoke(GetResourcePolicyInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetResourcePolicyResult> getResourcePolicy(GetResourcePolicyArgs args, InvokeOptions options)
    public static Output<GetResourcePolicyResult> getResourcePolicy(GetResourcePolicyArgs args, InvokeOptions options)
    public static Output<GetResourcePolicyResult> getResourcePolicy(GetResourcePolicyArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: aws-native:eventsv2:getResourcePolicy
      arguments:
        # arguments dictionary
    data "aws-native_eventsv2_get_resource_policy" "name" {
        # arguments
    }

    The following arguments are supported:

    EventBusArn string
    The Amazon Resource Name (ARN) of the event bus whose resource policy this is. The bus must already exist. This resource does not create it.
    EventBusArn string
    The Amazon Resource Name (ARN) of the event bus whose resource policy this is. The bus must already exist. This resource does not create it.
    event_bus_arn string
    The Amazon Resource Name (ARN) of the event bus whose resource policy this is. The bus must already exist. This resource does not create it.
    eventBusArn String
    The Amazon Resource Name (ARN) of the event bus whose resource policy this is. The bus must already exist. This resource does not create it.
    eventBusArn string
    The Amazon Resource Name (ARN) of the event bus whose resource policy this is. The bus must already exist. This resource does not create it.
    event_bus_arn str
    The Amazon Resource Name (ARN) of the event bus whose resource policy this is. The bus must already exist. This resource does not create it.
    eventBusArn String
    The Amazon Resource Name (ARN) of the event bus whose resource policy this is. The bus must already exist. This resource does not create it.

    getResourcePolicy Result

    The following output properties are available:

    PolicyDocument object

    The resource policy document, as a JSON object. The document can be up to 20 KB. This quota is adjustable. An empty object is not a valid policy. To remove the policy, delete this resource. The principals in the document must exist and be visible to the service when the policy is written. When you create a new IAM role or user, that principal might not be immediately visible to the service. You might need to enforce a delay before you include it in the document. For more information, see "Changes that I make are not always immediately visible" in the IAM User Guide. Declare Version. Write AWS account and role principals as ARNs rather than as account IDs. Write a single Action, Resource, or principal value as a scalar rather than as a one-element list. The service returns these forms as you wrote them. It normalizes other forms, and a normalized value can appear as drift. A stack update replaces the whole policy with this document, including any change made outside CloudFormation. For more information about event bus resource policies, see the Amazon EventBridge User Guide.

    Search the CloudFormation User Guide for AWS::EventsV2::ResourcePolicy for more information about the expected schema for this property.

    RevisionId string
    The revision identifier the service assigned to the stored policy. The identifier changes on every successful write.
    PolicyDocument interface{}

    The resource policy document, as a JSON object. The document can be up to 20 KB. This quota is adjustable. An empty object is not a valid policy. To remove the policy, delete this resource. The principals in the document must exist and be visible to the service when the policy is written. When you create a new IAM role or user, that principal might not be immediately visible to the service. You might need to enforce a delay before you include it in the document. For more information, see "Changes that I make are not always immediately visible" in the IAM User Guide. Declare Version. Write AWS account and role principals as ARNs rather than as account IDs. Write a single Action, Resource, or principal value as a scalar rather than as a one-element list. The service returns these forms as you wrote them. It normalizes other forms, and a normalized value can appear as drift. A stack update replaces the whole policy with this document, including any change made outside CloudFormation. For more information about event bus resource policies, see the Amazon EventBridge User Guide.

    Search the CloudFormation User Guide for AWS::EventsV2::ResourcePolicy for more information about the expected schema for this property.

    RevisionId string
    The revision identifier the service assigned to the stored policy. The identifier changes on every successful write.
    policy_document any

    The resource policy document, as a JSON object. The document can be up to 20 KB. This quota is adjustable. An empty object is not a valid policy. To remove the policy, delete this resource. The principals in the document must exist and be visible to the service when the policy is written. When you create a new IAM role or user, that principal might not be immediately visible to the service. You might need to enforce a delay before you include it in the document. For more information, see "Changes that I make are not always immediately visible" in the IAM User Guide. Declare Version. Write AWS account and role principals as ARNs rather than as account IDs. Write a single Action, Resource, or principal value as a scalar rather than as a one-element list. The service returns these forms as you wrote them. It normalizes other forms, and a normalized value can appear as drift. A stack update replaces the whole policy with this document, including any change made outside CloudFormation. For more information about event bus resource policies, see the Amazon EventBridge User Guide.

    Search the CloudFormation User Guide for AWS::EventsV2::ResourcePolicy for more information about the expected schema for this property.

    revision_id string
    The revision identifier the service assigned to the stored policy. The identifier changes on every successful write.
    policyDocument Object

    The resource policy document, as a JSON object. The document can be up to 20 KB. This quota is adjustable. An empty object is not a valid policy. To remove the policy, delete this resource. The principals in the document must exist and be visible to the service when the policy is written. When you create a new IAM role or user, that principal might not be immediately visible to the service. You might need to enforce a delay before you include it in the document. For more information, see "Changes that I make are not always immediately visible" in the IAM User Guide. Declare Version. Write AWS account and role principals as ARNs rather than as account IDs. Write a single Action, Resource, or principal value as a scalar rather than as a one-element list. The service returns these forms as you wrote them. It normalizes other forms, and a normalized value can appear as drift. A stack update replaces the whole policy with this document, including any change made outside CloudFormation. For more information about event bus resource policies, see the Amazon EventBridge User Guide.

    Search the CloudFormation User Guide for AWS::EventsV2::ResourcePolicy for more information about the expected schema for this property.

    revisionId String
    The revision identifier the service assigned to the stored policy. The identifier changes on every successful write.
    policyDocument any

    The resource policy document, as a JSON object. The document can be up to 20 KB. This quota is adjustable. An empty object is not a valid policy. To remove the policy, delete this resource. The principals in the document must exist and be visible to the service when the policy is written. When you create a new IAM role or user, that principal might not be immediately visible to the service. You might need to enforce a delay before you include it in the document. For more information, see "Changes that I make are not always immediately visible" in the IAM User Guide. Declare Version. Write AWS account and role principals as ARNs rather than as account IDs. Write a single Action, Resource, or principal value as a scalar rather than as a one-element list. The service returns these forms as you wrote them. It normalizes other forms, and a normalized value can appear as drift. A stack update replaces the whole policy with this document, including any change made outside CloudFormation. For more information about event bus resource policies, see the Amazon EventBridge User Guide.

    Search the CloudFormation User Guide for AWS::EventsV2::ResourcePolicy for more information about the expected schema for this property.

    revisionId string
    The revision identifier the service assigned to the stored policy. The identifier changes on every successful write.
    policy_document Any

    The resource policy document, as a JSON object. The document can be up to 20 KB. This quota is adjustable. An empty object is not a valid policy. To remove the policy, delete this resource. The principals in the document must exist and be visible to the service when the policy is written. When you create a new IAM role or user, that principal might not be immediately visible to the service. You might need to enforce a delay before you include it in the document. For more information, see "Changes that I make are not always immediately visible" in the IAM User Guide. Declare Version. Write AWS account and role principals as ARNs rather than as account IDs. Write a single Action, Resource, or principal value as a scalar rather than as a one-element list. The service returns these forms as you wrote them. It normalizes other forms, and a normalized value can appear as drift. A stack update replaces the whole policy with this document, including any change made outside CloudFormation. For more information about event bus resource policies, see the Amazon EventBridge User Guide.

    Search the CloudFormation User Guide for AWS::EventsV2::ResourcePolicy for more information about the expected schema for this property.

    revision_id str
    The revision identifier the service assigned to the stored policy. The identifier changes on every successful write.
    policyDocument Any

    The resource policy document, as a JSON object. The document can be up to 20 KB. This quota is adjustable. An empty object is not a valid policy. To remove the policy, delete this resource. The principals in the document must exist and be visible to the service when the policy is written. When you create a new IAM role or user, that principal might not be immediately visible to the service. You might need to enforce a delay before you include it in the document. For more information, see "Changes that I make are not always immediately visible" in the IAM User Guide. Declare Version. Write AWS account and role principals as ARNs rather than as account IDs. Write a single Action, Resource, or principal value as a scalar rather than as a one-element list. The service returns these forms as you wrote them. It normalizes other forms, and a normalized value can appear as drift. A stack update replaces the whole policy with this document, including any change made outside CloudFormation. For more information about event bus resource policies, see the Amazon EventBridge User Guide.

    Search the CloudFormation User Guide for AWS::EventsV2::ResourcePolicy for more information about the expected schema for this property.

    revisionId String
    The revision identifier the service assigned to the stored policy. The identifier changes on every successful write.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo aws-native logo

    We recommend new projects start with resources from the AWS provider.

    Viewing docs for AWS Cloud Control v1.81.0
    published on Monday, Sep 28, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial