getPropertyRules

Use the akamai.getPropertyRules data source to query and retrieve the rule tree of an existing property version. This data source lets you search across the contracts and groups you have access to.

Basic usage

This example returns the rule tree for version 3 of a property based on the selected contract and group:

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

const my-example = akamai.getPropertyRules({
    propertyId: "prp_123",
    groupId: "grp_12345",
    contractId: "ctr_1-AB123",
    version: 3,
});
export const propertyMatch = my_example;
import pulumi
import pulumi_akamai as akamai

my_example = akamai.get_property_rules(property_id="prp_123",
    group_id="grp_12345",
    contract_id="ctr_1-AB123",
    version=3)
pulumi.export("propertyMatch", my_example)
using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var my_example = Output.Create(Akamai.GetPropertyRules.InvokeAsync(new Akamai.GetPropertyRulesArgs
        {
            PropertyId = "prp_123",
            GroupId = "grp_12345",
            ContractId = "ctr_1-AB123",
            Version = 3,
        }));
        this.PropertyMatch = my_example;
    }

    [Output("propertyMatch")]
    public Output<string> PropertyMatch { get; set; }
}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "grp_12345"
		opt1 := "ctr_1-AB123"
		opt2 := 3
		my_example, err := akamai.GetPropertyRules(ctx, &GetPropertyRulesArgs{
			PropertyId: "prp_123",
			GroupId:    &opt0,
			ContractId: &opt1,
			Version:    &opt2,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("propertyMatch", my_example)
		return nil
	})
}

Argument reference

This data source supports these arguments:

  • contract_id - (Required) A contract’s unique ID, including the ctr_ prefix.
  • group_id - (Required) A group’s unique ID, including the grp_ prefix.
  • property_id - (Required) A property’s unique ID, including the prp_ prefix.
  • version - (Optional) The version to return. Returns the latest version by default.

Attributes reference

This data source returns these attributes:

  • rule_format - The rule tree version used. Property rule objects are versioned infrequently, and are known as rule formats. See About rule formats to learn more.
  • rules - A JSON-encoded rule tree for the property.
  • errors - A list of validation errors for the rule tree object returned. For more information see Errors in the Property Manager API documentation.

Using getPropertyRules

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 getPropertyRules(args: GetPropertyRulesArgs, opts?: InvokeOptions): Promise<GetPropertyRulesResult>
function getPropertyRulesOutput(args: GetPropertyRulesOutputArgs, opts?: InvokeOptions): Output<GetPropertyRulesResult>
def get_property_rules(contract_id: Optional[str] = None,
                       group_id: Optional[str] = None,
                       property_id: Optional[str] = None,
                       rule_format: Optional[str] = None,
                       version: Optional[int] = None,
                       opts: Optional[InvokeOptions] = None) -> GetPropertyRulesResult
def get_property_rules_output(contract_id: Optional[pulumi.Input[str]] = None,
                       group_id: Optional[pulumi.Input[str]] = None,
                       property_id: Optional[pulumi.Input[str]] = None,
                       rule_format: Optional[pulumi.Input[str]] = None,
                       version: Optional[pulumi.Input[int]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetPropertyRulesResult]
func GetPropertyRules(ctx *Context, args *GetPropertyRulesArgs, opts ...InvokeOption) (*GetPropertyRulesResult, error)
func GetPropertyRulesOutput(ctx *Context, args *GetPropertyRulesOutputArgs, opts ...InvokeOption) GetPropertyRulesResultOutput

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

public static class GetPropertyRules 
{
    public static Task<GetPropertyRulesResult> InvokeAsync(GetPropertyRulesArgs args, InvokeOptions? opts = null)
    public static Output<GetPropertyRulesResult> Invoke(GetPropertyRulesInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

PropertyId string
ContractId string
GroupId string
RuleFormat string
Version int
PropertyId string
ContractId string
GroupId string
RuleFormat string
Version int
propertyId string
contractId string
groupId string
ruleFormat string
version number

getPropertyRules Result

The following output properties are available:

ContractId string
Errors string
GroupId string
Id string
The provider-assigned unique ID for this managed resource.
PropertyId string
Rules string
Version int
RuleFormat string
ContractId string
Errors string
GroupId string
Id string
The provider-assigned unique ID for this managed resource.
PropertyId string
Rules string
Version int
RuleFormat string
contractId string
errors string
groupId string
id string
The provider-assigned unique ID for this managed resource.
propertyId string
rules string
version number
ruleFormat string
contract_id str
errors str
group_id str
id str
The provider-assigned unique ID for this managed resource.
property_id str
rules str
version int
rule_format str

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes
This Pulumi package is based on the akamai Terraform Provider.