Deployments - Traffic Filter - Associations
editDeployments - Traffic Filter - Associations
editGet associated rulesets
editRetrieves the rulesets associated with a deployment.
Request
editGET /api/v1/deployments/traffic-filter/associations/{association_type}/{associated_entity_id}/rulesets
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Associated entity ID |
|
|
Y |
Association type |
Responses
edit-
200
-
Rulesets in the deployment were successfully returned
-
400
-
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
-
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
-
Request example
editcurl -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 deployments
editRetrieves a list of deployments that are associated to the specified ruleset.
Request
editGET /api/v1/deployments/traffic-filter/rulesets/{ruleset_id}/associations
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
The mandatory ruleset ID. |
Responses
edit-
200
-
Associations referred by traffic filter rulesets were successfully returned
-
500
-
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
-
Request example
editcurl -XGET https://api.elastic-cloud.com/api/v1/deployments/traffic-filter/rulesets/{ruleset_id}/associations \ -H "Authorization: ApiKey $EC_API_KEY"
Create ruleset association
editApplies the ruleset to the specified deployment.
Request
editPOST /api/v1/deployments/traffic-filter/rulesets/{ruleset_id}/associations
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
The mandatory ruleset ID. |
Request body
edit(FilterAssociation
) (required) Mandatory ruleset association description
Responses
edit-
200
-
Create association request was valid and the association already exists
-
201
-
Create association request was valid and the association has been created
-
404
-
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
-
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
-
Request example
editcurl -XPOST https://api.elastic-cloud.com/api/v1/deployments/traffic-filter/rulesets/{ruleset_id}/associations \ -H "Authorization: ApiKey $EC_API_KEY" \ -H 'Content-Type: application/json' \ -d ' { "entity_type" : "string", "id" : "string" } '
Delete ruleset association
editDeletes the traffic rules in the ruleset from the deployment.
Request
editDELETE /api/v1/deployments/traffic-filter/rulesets/{ruleset_id}/associations/{association_type}/{associated_entity_id}
Path parameters
editName | Type | Required | Description |
---|---|---|---|
|
|
Y |
Associated entity ID |
|
|
Y |
Association type |
|
|
Y |
The mandatory ruleset ID. |
Responses
edit-
200
-
Delete association request was valid and the association has been deleted
-
404
-
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
-
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
-
Request example
editcurl -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"