RemovePermissionCommand

Revokes the permission of another Amazon Web Services account to be able to put events to the specified event bus. Specify the account to revoke by the StatementId value that you associated with the account when you granted it permission with PutPermission. You can find the StatementId by using DescribeEventBus .

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { EventBridgeClient, RemovePermissionCommand } from "@aws-sdk/client-eventbridge"; // ES Modules import
// const { EventBridgeClient, RemovePermissionCommand } = require("@aws-sdk/client-eventbridge"); // CommonJS import
const client = new EventBridgeClient(config);
const input = { // RemovePermissionRequest
  StatementId: "STRING_VALUE",
  RemoveAllPermissions: true || false,
  EventBusName: "STRING_VALUE",
};
const command = new RemovePermissionCommand(input);
const response = await client.send(command);
// {};

RemovePermissionCommand Input

See RemovePermissionCommandInput for more details

Parameter
Type
Description
EventBusName
string | undefined

The name of the event bus to revoke permissions for. If you omit this, the default event bus is used.

RemoveAllPermissions
boolean | undefined

Specifies whether to remove all permissions.

StatementId
string | undefined

The statement ID corresponding to the account that is no longer allowed to put events to the default event bus.

RemovePermissionCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
ConcurrentModificationException
client

There is concurrent modification on a rule, target, archive, or replay.

InternalException
server

This exception occurs due to unexpected causes.

OperationDisabledException
client

The operation you are attempting is not available in this region.

ResourceNotFoundException
client

An entity that you specified does not exist.

EventBridgeServiceException
Base exception class for all service exceptions from EventBridge service.