Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

Use Utility Class allows to use apply a common logic for to custom compliance policies with different types of Input Objects in Cloudaware Compliance Engine.

Use case: A Your company has a tagging policy in place. This tagging policy is used for all object types. If we’d like it is necessary to check the presence of three specific tags on objects, we you would need to create three CE different policies in Compliance Engine. Since these policies would have the same logic, you can create and use a utility class one Utility Class instead of coping the logic for three individual policies.

1. Log in to Cloudaware account → select Compliance Engine in the main menu under your username.

...

3. Give a class a meaningful name. Note that Class name should be a valid Java identifier, e.g. in this example, CheckCloudAccountTags:

...

Click Save.

4. Use the Class Editor to edit the class logic:

...

5. Review the logic → Save.

6. Click ValidateDeployDeploy Results.

After the utility class is successfully deployed, you may use its methods in different policies. In this example, we created a sample method TagUtility.checkObjectTags for checking tags on cloud accounts (objects: AWS Account, Azure Subscription, Google Project). We can invoke tag presence validation using this single method.