Akamai

v3.1.0 published on Tuesday, Oct 4, 2022 by Pulumi

getPropertyRules

Deprecated:

akamai.properties.getPropertyRules has been deprecated in favor of akamai.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/v3/go/akamai"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		my_example, err := akamai.GetPropertyRules(ctx, &GetPropertyRulesArgs{
			PropertyId: "prp_123",
			GroupId:    pulumi.StringRef("grp_12345"),
			ContractId: pulumi.StringRef("ctr_1-AB123"),
			Version:    pulumi.IntRef(3),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("propertyMatch", my_example)
		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.GetPropertyRulesArgs;
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 my-example = AkamaiFunctions.getPropertyRules(GetPropertyRulesArgs.builder()
            .propertyId("prp_123")
            .groupId("grp_12345")
            .contractId("ctr_1-AB123")
            .version(3)
            .build());

        ctx.export("propertyMatch", my_example);
    }
}
variables:
  my-example:
    Fn::Invoke:
      Function: akamai:getPropertyRules
      Arguments:
        propertyId: prp_123
        groupId: grp_12345
        contractId: ctr_1-AB123
        version: 3
outputs:
  propertyMatch: ${["my-example"]}

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 Rule format schemas 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)
}
public static CompletableFuture<GetPropertyRulesResult> getPropertyRules(GetPropertyRulesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: akamai:properties/getPropertyRules:getPropertyRules
  Arguments:
    # Arguments dictionary

The following arguments are supported:

PropertyId string

- (Required) A property's unique ID, including the prp_ prefix.

ContractId string

- (Required) A contract's unique ID, including the ctr_ prefix.

GroupId string

- (Required) A group's unique ID, including the grp_ prefix.

RuleFormat string
Version int

- (Optional) The version to return. Returns the latest version by default.

PropertyId string

- (Required) A property's unique ID, including the prp_ prefix.

ContractId string

- (Required) A contract's unique ID, including the ctr_ prefix.

GroupId string

- (Required) A group's unique ID, including the grp_ prefix.

RuleFormat string
Version int

- (Optional) The version to return. Returns the latest version by default.

propertyId String

- (Required) A property's unique ID, including the prp_ prefix.

contractId String

- (Required) A contract's unique ID, including the ctr_ prefix.

groupId String

- (Required) A group's unique ID, including the grp_ prefix.

ruleFormat String
version Integer

- (Optional) The version to return. Returns the latest version by default.

propertyId string

- (Required) A property's unique ID, including the prp_ prefix.

contractId string

- (Required) A contract's unique ID, including the ctr_ prefix.

groupId string

- (Required) A group's unique ID, including the grp_ prefix.

ruleFormat string
version number

- (Optional) The version to return. Returns the latest version by default.

property_id str

- (Required) A property's unique ID, including the prp_ prefix.

contract_id str

- (Required) A contract's unique ID, including the ctr_ prefix.

group_id str

- (Required) A group's unique ID, including the grp_ prefix.

rule_format str
version int

- (Optional) The version to return. Returns the latest version by default.

propertyId String

- (Required) A property's unique ID, including the prp_ prefix.

contractId String

- (Required) A contract's unique ID, including the ctr_ prefix.

groupId String

- (Required) A group's unique ID, including the grp_ prefix.

ruleFormat String
version Number

- (Optional) The version to return. Returns the latest version by default.

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 Integer
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
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

Package Details

Repository
https://github.com/pulumi/pulumi-akamai
License
Apache-2.0
Notes

This Pulumi package is based on the akamai Terraform Provider.