GuideReference
TrainingSupportCommunity
Guide

Shared policy

akamai_cloudlets_shared_policy

Get details about your shared cloudlet policy.

data "akamai_cloudlets_shared_policy" "my_shared_policy" {
  policy_id = 12345
  version = 1
}

output "my_shared_policy" {
  value = data.akamai_cloudlets_shared_policy.my_shared_policy
}
Changes to Outputs:
  + my_shared_policy = {
      + activations         = {
          + production = {
              + effective = null
              + latest    = null
            }
          + staging    = {
              + effective = {
                  + activation_id          = 12345
                  + created_by             = "jsmith"
                  + created_date           = "2023-11-13 11:35:35.788 +0000 UTC"
                  + finish_date            = "2020-11-13 11:38:23.683 +0000 UTC"
                  + network                = "STAGING"
                  + operation              = "ACTIVATION"
                  + policy_id              = 12345
                  + policy_version         = 1
                  + policy_version_deleted = false
                  + status                 = "SUCCESS"
                }
              + latest    = {
                  + activation_id          = 12345
                  + created_by             = "jsmith"
                  + created_date           = "2023-11-13 11:35:35.788 +0000 UTC"
                  + finish_date            = "2023-11-13 11:38:23.683 +0000 UTC"
                  + network                = "STAGING"
                  + operation              = "ACTIVATION"
                  + policy_id              = 12345
                  + policy_version         = 1
                  + policy_version_deleted = false
                  + status                 = "SUCCESS"
                }
            }
        }
      + cloudlet_type       = "ER"
      + description         = "My edge redirector shared policy"
      + group_id            = 12345
      + id                  = "akamai_cloudlets_shared_policy"
      + match_rules         = jsonencode(
            [
              + {
                  + matchURL                 = "/my_shared_policy/"
                  + name                     = "my_shared_policy"
                  + redirectURL              = "https://my_shared_er_policy.com"
                  + statusCode               = 301
                  + type                     = "erMatchRule"
                  + useIncomingQueryString   = false
                  + useIncomingSchemeAndHost = false
                  + useRelativeUrl           = "none"
                },
            ]
        )
      + name                = "my_shared_er_policy"
      + policy_id           = 151844
      + version             = 1
      + version_description = "test"
      + warnings            = jsonencode([])
    }

Arguments

Pass a cloudlet policy ID to get details about all of its versions or for a specific version, add a version number.

ArgumentRequiredDescription
policy_id✔️A cloudlet policy ID.
versionA version number for the given cloudlet policy with which to filter results.

Attributes

Returned is a list of details about your cloudlet policy.

AttributeDescription
activationsA list of current policy activation information for both the production and staging networks.

Within each network, you're given information for two types of activation, effective represents the activation that's currently in use and latest represents the most recent activation.

Note: If there's no activation for either, the value returned is null.
Both types contain:
  • activation_id. The activation ID.
  • created_by. The user who created the policy.
  • created_date. The policy's creation date.
  • finish_date. The policy's activation date.
  • network. The network on which a a cloudlets policy is active. One of staging or production.
  • operation. The operations that you can perform on a policy version, either ACTIVATION or DEACTIVATION.
  • policy_version. A policy's version number.
  • policy_id. A cloudlet policy ID.
  • 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.
  • policy_version_deleted. Whether the policy version has been deleted.
cloudlet_typeThe character code for your cloudlet type.
  • AP. API prioritization.
  • AS. Audience segmentation.
  • CD. Phased release.
  • ER. Edge redirector.
  • FR. Forward rewrite
  • IG. Request control.
descriptionThe human-readable description about your policy activation.
group_idYour group ID.
idThe data source run ID.
match_rulesThe policy's rules in JSON format.
nameA user created name for the cloudlet policy.
policy_idThe given cloudlet policy's ID.
versionThe version number of the cloudlet policy.
version_descriptionThe human-readable description about a returned cloudlet policy activation version.
warningsA list of warnings that occurred during the cloudlet policy activation.