OpenSearch Egress Rules V2

List all OpenSearch egress rules

Get a list of egress rules currently applied to the OpenSearch cluster

SecurityBasic Authentication
Request
path Parameters
clusterId
required
string

Id of the OpenSearch cluster

Responses
200

Sucessfully retrieved OpenSearch egress rules

400

Invalid cluster ID, expecting UUID 4 format

404

OpenSearch cluster does not exist for given Id

get/cluster-management/v2/data-sources/opensearch_cluster/{clusterId}/egress-rules/v2/
Request samples
Response samples
application/json
[
  • {
    }
]

Add egress firewall rules for a notifications/alerting webhook

Add an new egress rule

SecurityBasic Authentication
Request
Request Body schema: application/json

Details of OpenSearch plugin webhook to action into egress whitelist

openSearchBindingId
required
string[\w-]+

OpenSearch ID for alerting/notifications channel/destination for webhook

clusterId
required
string

OpenSearch cluster Id

source
required
string (OpenSearchEgressRuleSourceV2)

Source OpenSearch plugin that manages the channel/destination

Enum: "ALERTING" "NOTIFICATIONS"
type
string (OpenSearchEgressRuleTypeV2)

Type of the channel/destination

Enum: "SLACK" "WEBHOOK" "CUSTOM_WEBHOOK" "CHIME"
Responses
202

Whitelisted OpenSearch egress rule

400

Invalid cluster Id, invalid egress rule ID, source plugin is not enabled for this cluster or egress rule has already been opened.

404

OpenSearch cluster does not exist for given Id

503

Cluster is not in RUNNING state or does not support egress whitelisting operations

post/cluster-management/v2/resources/applications/opensearch/egress-rules/v2
Request samples
application/json
{
  • "clusterId": "71e4380e-32ac-4fa7-ab42-c165fe35aa55",
  • "id": "71e4380e-32ac-4fa7-ab42-c165fe35aa55~NOTIFICATIONS~qzPJmIQBGW3Cho0V3Ee_",
  • "name": "Test Webhook",
  • "openSearchBindingId": "qzPJmIQBGW3Cho0V3Ee_",
  • "source": "NOTIFICATIONS",
  • "type": "WEBHOOK"
}
Response samples
application/json
{
  • "clusterId": "71e4380e-32ac-4fa7-ab42-c165fe35aa55",
  • "id": "71e4380e-32ac-4fa7-ab42-c165fe35aa55~NOTIFICATIONS~qzPJmIQBGW3Cho0V3Ee_",
  • "name": "Test Webhook",
  • "openSearchBindingId": "qzPJmIQBGW3Cho0V3Ee_",
  • "source": "NOTIFICATIONS",
  • "type": "WEBHOOK"
}

Retrieve an existing egress rule

Get an egress rule

SecurityBasic Authentication
Request
path Parameters
egressRuleId
required
string[a-zA-Z\d-]+~\w+~[\w-]+

Composite Id for the egress rule of the format {clusterId}~{source}~{bindingId}

Responses
200

Whitelisted OpenSearch egress rule

400

Invalid rule Id format, invalid cluster Id, invalid egress rule ID or source plugin is not enabled for this cluster

404

OpenSearch egress rule does not exist for given Id

get/cluster-management/v2/resources/applications/opensearch/egress-rules/v2/{egressRuleId}
Request samples
Response samples
application/json
{
  • "clusterId": "71e4380e-32ac-4fa7-ab42-c165fe35aa55",
  • "id": "71e4380e-32ac-4fa7-ab42-c165fe35aa55~NOTIFICATIONS~qzPJmIQBGW3Cho0V3Ee_",
  • "name": "Test Webhook",
  • "openSearchBindingId": "qzPJmIQBGW3Cho0V3Ee_",
  • "source": "NOTIFICATIONS",
  • "type": "WEBHOOK"
}

Remove an existing egress rule for a given channel/destination ID

Delete an egress rule

SecurityBasic Authentication
Request
path Parameters
egressRuleId
required
string[a-zA-Z\d-]+~\w+~[\w-]+

Composite Id for the egress rule of the format {clusterId}~{source}~{bindingId}

Responses
204

OpenSearch notifications/alerting hook whitelisted for egress.

400

Invalid rule Id format, invalid cluster Id, invalid egress rule ID or source plugin is not enabled for this cluster

404

OpenSearch cluster does not exist for given Id or no egress rules exist for given target ID for this particular source.

delete/cluster-management/v2/resources/applications/opensearch/egress-rules/v2/{egressRuleId}
Request samples
Response samples
application/json
{
  • "errors": [
    ]
}