Deployments - IP Filtering - CRUD

Get associated rulesets

Retrieves the rulesets associated with a deployment.

Request

GET /api/v1/deployments/ip-filtering/associations/{association_type}/{associated_entity_id}/rulesets

Path parameters

Name Type Required Description

associated_entity_id

string

Y

Mandatory associated entity ID

association_type

string

Y

Mandatory association type ID

Responses

200
(IpFilteringSettings) Rulesets in the deployment were successfully returned
500
(BasicFailedReply) Request execution failed (code: 'ip_filtering.request_execution_failed')
Warning

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

Request example

curl -XGET {{hostname}}/api/v1/deployments/ip-filtering/associations/{association_type}/{associated_entity_id}/rulesets \
-u $CLOUD_USER:$CLOUD_KEY

Get all rulesets

Retrieves all of the user rulesets.

Request

GET /api/v1/deployments/ip-filtering/rulesets

Query parameters

Name Type Required Description

include_associations

boolean; default: false

N

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

Responses

200
(IpFilterRulesets) The IP filter rulesets for the user were successfully returned
500
(BasicFailedReply) The request execution failed (code: 'ip_filtering.request_execution_failed')
Warning

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

Request example

curl -XGET {{hostname}}/api/v1/deployments/ip-filtering/rulesets \
-u $CLOUD_USER:$CLOUD_KEY

Create a ruleset

Creates a ruleset that combines a set of rules.

Request

POST /api/v1/deployments/ip-filtering/rulesets

Request body

(IpFilterRuleset) (required) The ruleset definition

Responses

201
(RuleSetResponse) The ruleset definition is valid and the creation has started
400
(BasicFailedReply) The ruleset definition contains errors (code: 'ip_filtering.ruleset_invalid')
449
(BasicFailedReply) elevated permissions are required. (code: '"root.needs_elevated_permissions"')
500
(BasicFailedReply) The request execution failed (code: 'ip_filtering.request_execution_failed')
Warning

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

Request example

curl -XPOST {{hostname}}/api/v1/deployments/ip-filtering/rulesets \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "associations" : [
      {
         "entity_type" : "string",
         "id" : "string"
      }
   ],
   "description" : "string",
   "id" : "string",
   "name" : "string",
   "rules" : [
      {
         "description" : "string",
         "id" : "string",
         "source" : "string"
      }
   ],
   "total_associations" : 0
}
'

Delete a ruleset

Deletes the ruleset by ID.

Request

DELETE /api/v1/deployments/ip-filtering/rulesets/{ruleset_id}

Path parameters

Name Type Required Description

ruleset_id

string

Y

The mandatory ruleset ID

Query parameters

Name Type Required Description

ignore_associations

boolean

N

When true, ignores the associations and deletes the rule set. When false, recognizes the associations, which prevents the deletion of the rule set.

Responses

200
(EmptyResponse) The IP filter ruleset was successfully deleted
404
(BasicFailedReply) The IP filter ruleset specified by {ruleset_id} cannot be found (code: 'ip_filtering.ruleset_not_found')
449
(BasicFailedReply) elevated permissions are required. (code: '"root.needs_elevated_permissions"')
500
(BasicFailedReply) The request execution failed (code: 'ip_filtering.request_execution_failed')
Warning

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

Request example

curl -XDELETE {{hostname}}/api/v1/deployments/ip-filtering/rulesets/{ruleset_id} \
-u $CLOUD_USER:$CLOUD_KEY

Get a ruleset

Retrieves the ruleset by ID.

Request

GET /api/v1/deployments/ip-filtering/rulesets/{ruleset_id}

Path parameters

Name Type Required Description

ruleset_id

string

Y

The mandatory ruleset ID

Query parameters

Name Type Required Description

include_associations

boolean; default: false

N

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

Responses

200

(IpFilterRuleset) The IP filter ruleset was successfully returned

Headers

x-cloud-resource-created (string)
The date-time when the resource was created (ISO format relative to UTC)
x-cloud-resource-last-modified (string)
The date-time when the resource was last modified (ISO format relative to UTC)
x-cloud-resource-version (string)
The resource version, which is used to avoid update conflicts with concurrent operations
404
(BasicFailedReply) The IP filter ruleset specified by {ruleset_id} cannot be found (code: 'ip_filtering.ruleset_not_found')
500
(BasicFailedReply) The request execution failed (code: 'ip_filtering.request_execution_failed')
Warning

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

Request example

curl -XGET {{hostname}}/api/v1/deployments/ip-filtering/rulesets/{ruleset_id} \
-u $CLOUD_USER:$CLOUD_KEY

Updates a ruleset

Updates the ruleset with the definition.

Request

PUT /api/v1/deployments/ip-filtering/rulesets/{ruleset_id}

Path parameters

Name Type Required Description

ruleset_id

string

Y

The mandatory ruleset ID

Request body

(IpFilterRuleset) (required) The ruleset definition

Responses

200
(RuleSetResponse) The ruleset definition was valid and the update has started
400
(BasicFailedReply) The ruleset definition contains errors (code: 'ip_filtering.ruleset_invalid')
449
(BasicFailedReply) elevated permissions are required. (code: '"root.needs_elevated_permissions"')
500
(BasicFailedReply) The request execution failed (code: 'ip_filtering.request_execution_failed')
Warning

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

Request example

curl -XPUT {{hostname}}/api/v1/deployments/ip-filtering/rulesets/{ruleset_id} \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "associations" : [
      {
         "entity_type" : "string",
         "id" : "string"
      }
   ],
   "description" : "string",
   "id" : "string",
   "name" : "string",
   "rules" : [
      {
         "description" : "string",
         "id" : "string",
         "source" : "string"
      }
   ],
   "total_associations" : 0
}
'

Get associated deployments

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

Request

GET /api/v1/deployments/ip-filtering/rulesets/{ruleset_id}/associations

Path parameters

Name Type Required Description

ruleset_id

string

Y

Mandatory ruleset ID

Responses

200
(RulesetAssociations) Associations referred by IP filter rulesets were successfully returned
500
(BasicFailedReply) Request execution failed (code: 'ip_filtering.request_execution_failed')
Warning

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

Request example

curl -XGET {{hostname}}/api/v1/deployments/ip-filtering/rulesets/{ruleset_id}/associations \
-u $CLOUD_USER:$CLOUD_KEY

Create ruleset association

Applies the ruleset to the specified deployment.

Request

POST /api/v1/deployments/ip-filtering/rulesets/{ruleset_id}/associations

Path parameters

Name Type Required Description

ruleset_id

string

Y

Mandatory ruleset ID

Request body

(FilterAssociation) (required) Mandatory ruleset association description

Responses

201
(EmptyResponse) Create association request was valid and the association has been created
404
(BasicFailedReply) Associated entity specified by {id} cannot be found (code: 'ip_filtering.associated_entity_not_found')
449
(BasicFailedReply) Elevated permissions are required. (code: '"root.needs_elevated_permissions"')
500
(BasicFailedReply) Request execution failed (code: 'ip_filtering.request_execution_failed')
Warning

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

Request example

curl -XPOST {{hostname}}/api/v1/deployments/ip-filtering/rulesets/{ruleset_id}/associations \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "entity_type" : "string",
   "id" : "string"
}
'

Delete ruleset association

Deletes the traffic rules in the ruleset from the deployment.

Request

DELETE /api/v1/deployments/ip-filtering/rulesets/{ruleset_id}/associations/{association_type}/{associated_entity_id}

Path parameters

Name Type Required Description

associated_entity_id

string

Y

Mandatory associated entity ID

association_type

string

Y

Mandatory association type ID

ruleset_id

string

Y

Mandatory ruleset ID

Responses

200
(EmptyResponse) Delete association request was valid and the association has been deleted
449
(BasicFailedReply) Elevated permissions are required. (code: '"root.needs_elevated_permissions"')
500
(BasicFailedReply) Request execution failed (code: 'ip_filtering.request_execution_failed')
Warning

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

Request example

curl -XDELETE {{hostname}}/api/v1/deployments/ip-filtering/rulesets/{ruleset_id}/associations/{association_type}/{associated_entity_id} \
-u $CLOUD_USER:$CLOUD_KEY