GuideReference
TrainingSupportCommunity

Policy

akamai_cloudlets_policy

Get details about a given policy.

data "akamai_cloudlets_policy" "my_cloudlets_policy" {
    policy_id = 12345
    version = 1
}
Changes to Outputs:
  + my_cloudlets_policy = {
      + activations         = []
      + api_version         = "2.0"
      + cloudlet_code       = "CD"
      + cloudlet_id         = 7
      + description         = "Phased release"
      + group_id            = 12345
      + match_rule_format   = "1.0"
      + match_rules         = jsonencode(
            [
              + {
                  + forwardSettings = {
                      + originId = "my_origin1"
                      + percent  = 50
                    }
                  + matchesAlways   = true
                  + name            = "Send to origin 1"
                  + type            = "cdMatchRule"
                },
            ]
        )
      + name                = "my_pr_cloudlet_policy"
      + policy_id           = 12345
      + revision_id         = 23456
      + rules_locked        = true
      + version             = 1
      + version_description = "Initial creation"
      + warnings            = "null"
    }

Arguments

Pass a policy ID in the body of the data block to get its details.

ArgumentRequiredDescription
policy_id‚úĒA policy ID.
versionThe version number of your policy.

Attributes

Returned are the details about the version given in the query, or if no version was provided, details about the latest version in production.

AttributeDescription
group_idYour group ID.
nameThe user created name for a policy..
api_versionThe specific version of the Cloudlets API used.
cloudlet_idA unique identifier that corresponds to a Cloudlets policy type. Value options are:
  • 0 Edge Redirector
  • 1 Visitor Prioritization
  • 3 Forward Rewrite
  • 4 Request Control
  • 5 API Prioritization
  • 6 for Audience Segmentation
  • 7 for Phased Release
  • 9 Application Load Balancer
cloudlet_codeThe character code for your cloudlet type.
  • ALB. Application load balancer.
  • AP. API prioritization.
  • AS. Audience segmentation.
  • CD. Phased release.
  • ER. Edge redirector.
  • FR. Forward rewrite
  • IG. Request control.
  • VP. Visitor prioritization.
revision_idThe revised version's ID.
policy_idA cloudlet policy ID.
descriptionA human-readable description about the policy
versionThe policy's version number.
version_descriptionThe description of this specific policy version.
rules_lockedWhether editing match_rules for the cloudlet policy version is blocked.
match_rulesThe rules for your policy in JSON format.
match_rule_formatYour match-rules version.
warningsA list of warnings that occurred during the policy's activation.
activationsA list of of current policy activation information. Contains:
  • api_version. The Cloudlets API version used.
  • network. The network on which a a cloudlets policy is active. One of staging or prod.
  • policy_info. A cloudlet policy's details. Contains:
    • policy_id. A policy's ID.
    • name. A policy's name
    • version. A policy's version number.
    • status. A policy's activation status. Value is one of:
      • inactive. The policy version is not active. No active property versions reference this policy.
      • active. The policy version is currently active and is associated with an active property version.
      • deactivated. A previously active policy version.
      • pending. The policy version activation is in progress.
      • failed. The policy version activation failed.
    • status_detail. Information about the status of an activation operation. This field is not returned when it has no value.
    • activated_by. The name of the user who activated the policy.
    • activation_date. The date on which the policy was activated in milliseconds since epoch.
  • property_info. A list of cloudlet property information. Contains:
    • name. The property's name.
    • version. The version number of the activated property.
    • group_id. Defines the group association for the policy or property. If the value is 0, the policy is not tied to a specific group but all groups for the account.
    • status. The activation status for the property. One of:
      • inactive. The policy version is not active. No active property versions reference this policy.
      • active. The policy version is currently active and is associated with an active property version.
      • deactivated. A previously active policy version.
      • pending. The policy version activation is in progress.
      • failed. The policy version activation failed.
    • activated_by. The name of the user who activated the property.
    • activation_date. The date on which the property was activated in milliseconds.