Policy Assignments

Contents

Policy Assignments

Policy assignments represent sets of different rules with a format and syntax specific to a cloud provider that a user can deploy on the cloud provider, with specific parameters to enforce said rules in order to manage resources from a compliance perspective.

Show policy assignment

GET /v2/policy/assignments/:id

This action returns information about the policy assignment identified by the given id.

Inputs

None

Returns

Field Type Description Deprecation notices Notes
id String Identifier of the policy assignment.    
name String Logical name of the policy assignment.    
description String Description of the policy assignment.    
definition_id String Identifier of the policy definition which the policy assignment belongs.    
remote_id String Identifier of the assignment on the cloud provider.    
state String State of the assignment. It can be one of these values: start, applying, applied, decommissioning, application_error, decommission_error, end.    
cloud_account_id String Identifier of the cloud account where the assignment belongs.    
parameter_values Object An object with the parameters of the policy definition of the policy assignment with the values given to each one of them.    
reseller_applied Boolean Flag indicating if the assignment was assigned by the admin customer of the reseller of the customer of the user (true) or by the customer (false)    
brownfield Boolean Flag indicating if the assignment has been imported from a cloud account (true) or created using IMCO (false).   Available from version 9.3 onwards.
label_ids String List of ids corresponding to the labels the policy assignment has assigned.    
resource_type String An identifier for the type of resource, specifically "policy_assignment".    

Back to top

Create policy assignment

POST /v2/policy/definitions/:definition_id/assignments

This action creates a new policy assignment.

Inputs

Field Type Description Required
name String Logical name of the policy assignment. Yes           
description String Description of the policy assignment. Yes
parameter_values Object Parameters of the definition with the specific values. Yes
definition_id String Definition of the resources a definition declares to be deployed. Yes
cloud_account_id String Identifier of the cloud account where the assignment belongs. Yes
label_ids Array of strings List of ids corresponding to the labels to assign to the policy assignment. No

Returns

Field Type Description Deprecation notices Notes
id String Identifier of the policy assignment.    
name String Logical name of the policy assignment.    
description String Description of the policy assignment.    
definition_id String Identifier of the policy definition which the policy assignment belongs.    
remote_id String Identifier of the assignment on the cloud provider.    
state String State of the assignment. It can be one of these values: start, applying, applied, decommissioning, application_error, decommission_error, end.    
cloud_account_id String Identifier of the cloud account where the assignment belongs.    
parameter_values Object An object with the parameters of the policy definition of the policy assignment with the values given to each one of them.    
reseller_applied Boolean Flag indicating if the assignment was assigned by the admin customer of the reseller of the customer of the user (true) or by the customer (false)    
brownfield Boolean Flag indicating if the assignment has been imported from a cloud account (true) or created using IMCO (false).   Available from version 9.3 onwards.
label_ids String List of ids corresponding to the labels the policy assignment has assigned.    
resource_type String An identifier for the type of resource, specifically "policy_assignment".    

Back to top

Update policy assignment

PUT /v2/policy/assignments/:id

This action modifies the policy assignment with the given parameters.

Inputs

Field Type Description Required
name String Logical name of the policy assignment. No
description String Description of the policy assignment. No

Returns

Field Type Description Deprecation notices Notes
id String Identifier of the policy assignment.    
name String Logical name of the policy assignment.    
description String Description of the policy assignment.    
definition_id String Identifier of the policy definition which the policy assignment belongs.    
remote_id String Identifier of the assignment on the cloud provider.    
state String State of the assignment. It can be one of these values: start, applying, applied, decommissioning, application_error, decommission_error, end.    
cloud_account_id String Identifier of the cloud account where the assignment belongs.    
parameter_values Object An object with the parameters of the policy definition of the policy assignment with the values given to each one of them.    
reseller_applied Boolean Flag indicating if the assignment was assigned by the admin customer of the reseller of the customer of the user (true) or by the customer (false)    
brownfield Boolean Flag indicating if the assignment has been imported from a cloud account (true) or created using IMCO (false).   Available from version 9.3 onwards.
label_ids String List of ids corresponding to the labels the policy assignment has assigned.    
resource_type String An identifier for the type of resource, specifically "policy_assignment".    

Back to top

Delete policy assignment

DELETE /v2/policy/assignments/:id

This action deletes the policy assignment with the given id. The policy assignment must be decommissionable.

Inputs

None

Returns

Field Type Description Deprecation notices Notes
id String Identifier of the policy assignment.    
name String Logical name of the policy assignment.    
description String Description of the policy assignment.    
definition_id String Identifier of the policy definition which the policy assignment belongs.    
remote_id String Identifier of the assignment on the cloud provider.    
state String State of the assignment. It can be one of these values: start, applying, applied, decommissioning, application_error, decommission_error, end.    
cloud_account_id String Identifier of the cloud account where the assignment belongs.    
parameter_values Object An object with the parameters of the policy definition of the policy assignment with the values given to each one of them.    
reseller_applied Boolean Flag indicating if the assignment was assigned by the admin customer of the reseller of the customer of the user (true) or by the customer (false)    
brownfield Boolean Flag indicating if the assignment has been imported from a cloud account (true) or created using IMCO (false).   Available from version 9.3 onwards.
label_ids String List of ids corresponding to the labels the policy assignment has assigned.    
resource_type String An identifier for the type of resource, specifically "policy_assignment".    

Back to top

Discard policy assignment

DELETE /v2/policy/assignments/:id/discard

This action deletes a brownfield policy assignment from IMCO but does not delete it from the cloud provider.

Inputs

None

Returns

Field Type Description Deprecation notices Notes
id String Identifier of the policy assignment.    
name String Logical name of the policy assignment.    
description String Description of the policy assignment.    
definition_id String Identifier of the policy definition which the policy assignment belongs.    
remote_id String Identifier of the assignment on the cloud provider.    
state String State of the assignment. It can be one of these values: start, applying, applied, decommissioning, application_error, decommission_error, end.    
cloud_account_id String Identifier of the cloud account where the assignment belongs.    
parameter_values Object An object with the parameters of the policy definition of the policy assignment with the values given to each one of them.    
reseller_applied Boolean Flag indicating if the assignment was assigned by the admin customer of the reseller of the customer of the user (true) or by the customer (false)    
brownfield Boolean Flag indicating if the assignment has been imported from a cloud account (true) or created using IMCO (false).   Available from version 9.3 onwards.
label_ids String List of ids corresponding to the labels the policy assignment has assigned.    
resource_type String An identifier for the type of resource, specifically "policy_assignment".    

Back to top