akamai.getCloudletsPolicy

Use the akamai.CloudletsPolicy data source to list details about a policy with and its specified version, or latest if not specified.

Basic usage

This example returns the policy details based on the policy ID and optionally, a version:

import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const example = akamai.getCloudletsPolicy({
    policyId: 1234,
    version: 1,
});
import pulumi
import pulumi_akamai as akamai

example = akamai.get_cloudlets_policy(policy_id=1234,
    version=1)
using System.Collections.Generic;
using Pulumi;
using Akamai = Pulumi.Akamai;

return await Deployment.RunAsync(() => 
{
    var example = Akamai.GetCloudletsPolicy.Invoke(new()
    {
        PolicyId = 1234,
        Version = 1,
    });

});
package main

import (
	"github.com/pulumi/pulumi-akamai/sdk/v4/go/akamai"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := akamai.LookupCloudletsPolicy(ctx, &akamai.LookupCloudletsPolicyArgs{
			PolicyId: 1234,
			Version:  pulumi.IntRef(1),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.akamai.AkamaiFunctions;
import com.pulumi.akamai.inputs.GetCloudletsPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = AkamaiFunctions.getCloudletsPolicy(GetCloudletsPolicyArgs.builder()
            .policyId(1234)
            .version(1)
            .build());

    }
}
variables:
  example:
    fn::invoke:
      Function: akamai:getCloudletsPolicy
      Arguments:
        policyId: 1234
        version: 1

Attributes reference

This data source returns these attributes:

  • group_id - Defines the group association for the policy. You must have edit privileges for the group.
  • name - The unique name of the policy.
  • api_version - The specific version of the Cloudlets API.
  • cloudlet_id - A unique identifier that corresponds to a Cloudlets policy type. Enter 0 for Edge Redirector, 1 for Visitor Prioritization, 3 for Forward Rewrite, 4 for Request Control, 5 for API Prioritization, 6 for Audience Segmentation, 7 for Phased Release, 8 for Input Validation, or 9 for Application Load Balancer.
  • cloudlet_code - The two- or three- character code for the type of Cloudlet. Enter ALB for Application Load Balancer, AP for API Prioritization, AS for Audience Segmentation, CD for Phased Release, ER for Edge Redirector, FR for Forward Rewrite, IG for Request Control, IV for Input Validation, or VP for Visitor Prioritization.
  • revision_id - A unique identifier given to every policy version update.
  • description - The description of this specific policy.
  • version_description - The description of this specific policy version.
  • rules_locked - Whether editing match_rules for the Cloudlet policy version is blocked.
  • match_rules- A JSON structure that defines the rules for this policy.
  • match_rule_format - The format of the Cloudlet-specific match_rules.
  • warnings - A JSON encoded list of warnings.
  • activations - A list of of current policy activation information, including:
    • api_version - The specific version of the Cloudlets API.
    • network - The network, either staging or prod on which a property or a Cloudlets policy has been activated.
    • policy_info - A list of Cloudlet policy information, including:
      • policy_id - An integer identifier that is associated with all versions of a policy.
      • name - The name of the policy.
      • version - The version number of the policy.
      • status - The activation status for the policy. Values include the following: inactive where the policy version has not been activated. No active property versions reference this policy. active where the policy version is currently active (published) and its associated property version is also active. deactivated where the policy version was previously activated but it has been superseded by a more recent activation of another policy version. pending where the policy version is proceeding through the activation workflow. failed where the policy version activation workflow has 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, including:
      • name - The name of the property.
      • version - The version number of the activated property.
      • group_id - Defines the group association for the policy or property. If returns 0, the policy is not tied to a group and in effect appears in all groups for the account. You must have edit privileges for the group.
      • status - The activation status for the property. Values include the following: inactive where the policy version has not been activated. No active property versions reference this policy. active where the policy version is currently active (published) and its associated property version is also active. deactivated where the policy version was previously activated but it has been superseded by a more recent activation of another policy version. pending where the policy version is proceeding through the activation workflow. failed where the policy version activation workflow has failed.
      • activated_by - The name of the user who activated the property.
      • activation_date - The date on which the property was activated in milliseconds since epoch.

Using getCloudletsPolicy

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getCloudletsPolicy(args: GetCloudletsPolicyArgs, opts?: InvokeOptions): Promise<GetCloudletsPolicyResult>
function getCloudletsPolicyOutput(args: GetCloudletsPolicyOutputArgs, opts?: InvokeOptions): Output<GetCloudletsPolicyResult>
def get_cloudlets_policy(policy_id: Optional[int] = None,
                         version: Optional[int] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCloudletsPolicyResult
def get_cloudlets_policy_output(policy_id: Optional[pulumi.Input[int]] = None,
                         version: Optional[pulumi.Input[int]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCloudletsPolicyResult]
func LookupCloudletsPolicy(ctx *Context, args *LookupCloudletsPolicyArgs, opts ...InvokeOption) (*LookupCloudletsPolicyResult, error)
func LookupCloudletsPolicyOutput(ctx *Context, args *LookupCloudletsPolicyOutputArgs, opts ...InvokeOption) LookupCloudletsPolicyResultOutput

> Note: This function is named LookupCloudletsPolicy in the Go SDK.

public static class GetCloudletsPolicy 
{
    public static Task<GetCloudletsPolicyResult> InvokeAsync(GetCloudletsPolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetCloudletsPolicyResult> Invoke(GetCloudletsPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCloudletsPolicyResult> getCloudletsPolicy(GetCloudletsPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: akamai:index/getCloudletsPolicy:getCloudletsPolicy
  arguments:
    # arguments dictionary

The following arguments are supported:

PolicyId int

(Required) An integer identifier that is associated with all versions of a policy.

Version int

(Optional) The version number of a policy.

PolicyId int

(Required) An integer identifier that is associated with all versions of a policy.

Version int

(Optional) The version number of a policy.

policyId Integer

(Required) An integer identifier that is associated with all versions of a policy.

version Integer

(Optional) The version number of a policy.

policyId number

(Required) An integer identifier that is associated with all versions of a policy.

version number

(Optional) The version number of a policy.

policy_id int

(Required) An integer identifier that is associated with all versions of a policy.

version int

(Optional) The version number of a policy.

policyId Number

(Required) An integer identifier that is associated with all versions of a policy.

version Number

(Optional) The version number of a policy.

getCloudletsPolicy Result

The following output properties are available:

Activations List<GetCloudletsPolicyActivation>
ApiVersion string
CloudletCode string
CloudletId int
Description string
GroupId int
Id string

The provider-assigned unique ID for this managed resource.

MatchRuleFormat string
MatchRules string
Name string
PolicyId int
RevisionId int
RulesLocked bool
VersionDescription string
Warnings string
Version int
Activations []GetCloudletsPolicyActivationType
ApiVersion string
CloudletCode string
CloudletId int
Description string
GroupId int
Id string

The provider-assigned unique ID for this managed resource.

MatchRuleFormat string
MatchRules string
Name string
PolicyId int
RevisionId int
RulesLocked bool
VersionDescription string
Warnings string
Version int
activations List<GetCloudletsPolicyActivation>
apiVersion String
cloudletCode String
cloudletId Integer
description String
groupId Integer
id String

The provider-assigned unique ID for this managed resource.

matchRuleFormat String
matchRules String
name String
policyId Integer
revisionId Integer
rulesLocked Boolean
versionDescription String
warnings String
version Integer
activations GetCloudletsPolicyActivation[]
apiVersion string
cloudletCode string
cloudletId number
description string
groupId number
id string

The provider-assigned unique ID for this managed resource.

matchRuleFormat string
matchRules string
name string
policyId number
revisionId number
rulesLocked boolean
versionDescription string
warnings string
version number
activations List<Property Map>
apiVersion String
cloudletCode String
cloudletId Number
description String
groupId Number
id String

The provider-assigned unique ID for this managed resource.

matchRuleFormat String
matchRules String
name String
policyId Number
revisionId Number
rulesLocked Boolean
versionDescription String
warnings String
version Number

Supporting Types

GetCloudletsPolicyActivation

GetCloudletsPolicyActivationPolicyInfo

ActivatedBy string
ActivationDate int
Name string
PolicyId int

(Required) An integer identifier that is associated with all versions of a policy.

Status string
StatusDetail string
Version int

(Optional) The version number of a policy.

ActivatedBy string
ActivationDate int
Name string
PolicyId int

(Required) An integer identifier that is associated with all versions of a policy.

Status string
StatusDetail string
Version int

(Optional) The version number of a policy.

activatedBy String
activationDate Integer
name String
policyId Integer

(Required) An integer identifier that is associated with all versions of a policy.

status String
statusDetail String
version Integer

(Optional) The version number of a policy.

activatedBy string
activationDate number
name string
policyId number

(Required) An integer identifier that is associated with all versions of a policy.

status string
statusDetail string
version number

(Optional) The version number of a policy.

activated_by str
activation_date int
name str
policy_id int

(Required) An integer identifier that is associated with all versions of a policy.

status str
status_detail str
version int

(Optional) The version number of a policy.

activatedBy String
activationDate Number
name String
policyId Number

(Required) An integer identifier that is associated with all versions of a policy.

status String
statusDetail String
version Number

(Optional) The version number of a policy.

GetCloudletsPolicyActivationPropertyInfo

ActivatedBy string
ActivationDate int
GroupId int
Name string
Status string
Version int

(Optional) The version number of a policy.

ActivatedBy string
ActivationDate int
GroupId int
Name string
Status string
Version int

(Optional) The version number of a policy.

activatedBy String
activationDate Integer
groupId Integer
name String
status String
version Integer

(Optional) The version number of a policy.

activatedBy string
activationDate number
groupId number
name string
status string
version number

(Optional) The version number of a policy.

activated_by str
activation_date int
group_id int
name str
status str
version int

(Optional) The version number of a policy.

activatedBy String
activationDate Number
groupId Number
name String
status String
version Number

(Optional) The version number of a policy.

Package Details

Repository
Akamai pulumi/pulumi-akamai
License
Apache-2.0
Notes

This Pulumi package is based on the akamai Terraform Provider.