Deployments - Traffic Filter - Associationsedit

Get associated rulesetsedit

Retrieves the rulesets associated with a deployment.

Requestedit

GET /api/v1/deployments/traffic-filter/associations/{association_type}/{associated_entity_id}/rulesets

Path parametersedit

Name Type Required Description

associated_entity_id

string

Y

Associated entity ID

association_type

string

Y

Association type

Responsesedit

200

(TrafficFilterSettings) Rulesets in the deployment were successfully returned

400

(BasicFailedReply) Invalid association type. (code: traffic_filter.invalid_association_type)

Headers

x-cloud-error-codes (string; allowed values: [traffic_filter.invalid_association_type])
The error codes associated with the response
500

(BasicFailedReply) Error fetching traffic filter rulesets. (code: traffic_filter.request_execution_failed)

Headers

x-cloud-error-codes (string; allowed values: [traffic_filter.request_execution_failed])
The error codes associated with the response

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request exampleedit

curl -XGET https://api.elastic-cloud.com/api/v1/deployments/traffic-filter/associations/{association_type}/{associated_entity_id}/rulesets \
-H "Authorization: ApiKey $EC_API_KEY"

Get associated deploymentsedit

Retrieves a list of deployments that are associated to the specified ruleset.

Requestedit

GET /api/v1/deployments/traffic-filter/rulesets/{ruleset_id}/associations

Path parametersedit

Name Type Required Description

ruleset_id

string

Y

The mandatory ruleset ID.

Responsesedit

200

(RulesetAssociations) Associations referred by traffic filter rulesets were successfully returned

500

(BasicFailedReply) Error fetching deployments. (code: traffic_filter.request_execution_failed)

Headers

x-cloud-error-codes (string; allowed values: [traffic_filter.request_execution_failed])
The error codes associated with the response

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request exampleedit

curl -XGET https://api.elastic-cloud.com/api/v1/deployments/traffic-filter/rulesets/{ruleset_id}/associations \
-H "Authorization: ApiKey $EC_API_KEY"

Create ruleset associationedit

Applies the ruleset to the specified deployment.

Requestedit

POST /api/v1/deployments/traffic-filter/rulesets/{ruleset_id}/associations

Path parametersedit

Name Type Required Description

ruleset_id

string

Y

The mandatory ruleset ID.

Request bodyedit

(FilterAssociation) (required) Mandatory ruleset association description

Responsesedit

200

(EmptyResponse) Create association request was valid and the association already exists

201

(EmptyResponse) Create association request was valid and the association has been created

404

(BasicFailedReply) The traffic filter ruleset specified by {ruleset_id} cannot be found. (code: traffic_filter.not_found)

Headers

x-cloud-error-codes (string; allowed values: [traffic_filter.not_found])
The error codes associated with the response
500

(BasicFailedReply) Creation failed. (code: traffic_filter.request_execution_failed)

Headers

x-cloud-error-codes (string; allowed values: [traffic_filter.request_execution_failed])
The error codes associated with the response

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/traffic-filter/rulesets/{ruleset_id}/associations \
-H "Authorization: ApiKey $EC_API_KEY" \
-d '
{
   "entity_type" : "string",
   "id" : "string"
}
'

Delete ruleset associationedit

Deletes the traffic rules in the ruleset from the deployment.

Requestedit

DELETE /api/v1/deployments/traffic-filter/rulesets/{ruleset_id}/associations/{association_type}/{associated_entity_id}

Path parametersedit

Name Type Required Description

associated_entity_id

string

Y

Associated entity ID

association_type

string

Y

Association type

ruleset_id

string

Y

The mandatory ruleset ID.

Responsesedit

200

(EmptyResponse) Delete association request was valid and the association has been deleted

404

(BasicFailedReply) The traffic filter ruleset association cannot be found. (code: traffic_filter.not_found)

Headers

x-cloud-error-codes (string; allowed values: [traffic_filter.not_found])
The error codes associated with the response
500

(BasicFailedReply) Deletion failed. (code: traffic_filter.request_execution_failed)

Headers

x-cloud-error-codes (string; allowed values: [traffic_filter.request_execution_failed])
The error codes associated with the response

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request exampleedit

curl -XDELETE https://api.elastic-cloud.com/api/v1/deployments/traffic-filter/rulesets/{ruleset_id}/associations/{association_type}/{associated_entity_id} \
-H "Authorization: ApiKey $EC_API_KEY"