Updated on 2025-08-19 GMT+08:00

MgC Custom Policies

Custom policies can be created to supplement the system-defined policies of MgC.

You can create custom policies in either of the following ways:

  • Visual editor: Select cloud services, actions, resources, and request conditions. This does not require knowledge of policy syntax.
  • JSON: Create a JSON policy from scratch or based on an existing policy.

For details, see Creating a Custom Policy. The following section contains examples of common MgC custom policies. For details about the permissions required for IAM users to access different MgC functions, see IAM User Permissions.

Example Custom Policies

  • Allowing users to collect resource details
    {
        "Version": "1.1",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "mgc:*:query*",
                    "mgc:*:discovery",
                    "iam:agencies:listAgencies",
                    "iam:roles:listRoles",
                    "iam:quotas:listQuotas",
                    "iam:permissions:listRolesForAgency"
                ]
            }
        ]
    }
  • Allowing users to assess source resources and get target recommendations
    {
        "Version": "1.1",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "mgc:*:query*",
                    "mgc:*:discovery",
                    "mgc:*:assess*",
                    "iam:agencies:listAgencies",
                    "iam:roles:listRoles",
                    "iam:quotas:listQuotas",
                    "iam:permissions:listRolesForAgency"
                ]
            }
        ]
    }