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 System.Collections.Generic;
using Pulumi;
using Akamai = Pulumi.Akamai;
return await Deployment.RunAsync(() =>
{
var my_example = Akamai.GetPropertyRules.Invoke(new()
{
PropertyId = "prp_123",
GroupId = "grp_12345",
ContractId = "ctr_1-AB123",
Version = 3,
});
return new Dictionary<string, object?>
{
["propertyMatch"] = my_example,
};
});
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 {
my_example, err := akamai.GetPropertyRules(ctx, &akamai.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:index/getPropertyRules:getPropertyRules
arguments:
# arguments dictionary
The following arguments are supported:
- Property
Id string (Required) A property's unique ID, including the
prp_
prefix.- Contract
Id string (Required) A contract's unique ID, including the
ctr_
prefix.- Group
Id string (Required) A group's unique ID, including the
grp_
prefix.- Rule
Format string - Version int
(Optional) The version to return. Returns the latest version by default.
- Property
Id string (Required) A property's unique ID, including the
prp_
prefix.- Contract
Id string (Required) A contract's unique ID, including the
ctr_
prefix.- Group
Id string (Required) A group's unique ID, including the
grp_
prefix.- Rule
Format string - Version int
(Optional) The version to return. Returns the latest version by default.
- property
Id String (Required) A property's unique ID, including the
prp_
prefix.- contract
Id String (Required) A contract's unique ID, including the
ctr_
prefix.- group
Id String (Required) A group's unique ID, including the
grp_
prefix.- rule
Format String - version Integer
(Optional) The version to return. Returns the latest version by default.
- property
Id string (Required) A property's unique ID, including the
prp_
prefix.- contract
Id string (Required) A contract's unique ID, including the
ctr_
prefix.- group
Id string (Required) A group's unique ID, including the
grp_
prefix.- rule
Format 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.
- property
Id String (Required) A property's unique ID, including the
prp_
prefix.- contract
Id String (Required) A contract's unique ID, including the
ctr_
prefix.- group
Id String (Required) A group's unique ID, including the
grp_
prefix.- rule
Format String - version Number
(Optional) The version to return. Returns the latest version by default.
getPropertyRules Result
The following output properties are available:
- Contract
Id string - Errors string
- Group
Id string - Id string
The provider-assigned unique ID for this managed resource.
- Property
Id string - Rules string
- Version int
- Rule
Format string
- Contract
Id string - Errors string
- Group
Id string - Id string
The provider-assigned unique ID for this managed resource.
- Property
Id string - Rules string
- Version int
- Rule
Format string
- contract
Id String - errors String
- group
Id String - id String
The provider-assigned unique ID for this managed resource.
- property
Id String - rules String
- version Integer
- rule
Format String
- contract
Id string - errors string
- group
Id string - id string
The provider-assigned unique ID for this managed resource.
- property
Id string - rules string
- version number
- rule
Format 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
- contract
Id String - errors String
- group
Id String - id String
The provider-assigned unique ID for this managed resource.
- property
Id String - rules String
- version Number
- rule
Format String
Package Details
- Repository
- Akamai pulumi/pulumi-akamai
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
akamai
Terraform Provider.