getPropertyRulesTemplate

The akamai.getPropertyRulesTemplate data source lets you configure a rule tree through the use of JSON template files. A rule tree is a nested block of property rules in JSON format that include match criteria and behaviors.

With this data source you define the location of the JSON template files and provide information about any user-defined variables included within the templates.

The template format used in this data source matches those used in the Property Manager CLI.

You can pass user-defined variables by supplying either:

  • paths to variableDefinitions.json and variables.json with syntax used in Property Manager CLI, or
  • a set of provider variables.

Referencing sub-files from a template

You can split each template out into a series of smaller template files. To add them to this data source, you need to include them in the currently loaded file, which corresponds to the value in the template_file argument. For example, to include example-file.json from the template directory, use this syntax including the quotes: "#include:example-file.json". All files are resolved in relation to the directory that contains the starting template file.

Inserting variables in a template

You can also add variables to a template by using a string like “${env.<variableName>}". You’ll need the quotes here too.
These variables follow the format used in the Property Manager CLI. They differ from the provider variables which should resolve normally.

Argument reference

  • template_file - (Required) The absolute path to your top-level JSON template file. The top-level template combines smaller, nested JSON templates to form your property rule tree.
  • variables - (Optional) A definition of a variable. Variables aren’t required and you can use multiple ones if needed. This argument conflicts with the variable_definition_file and variable_values_file arguments. A variables block includes:
    • name - The name of the variable used in template.
    • type - The type of variable: string, number, bool, or jsonBlock.
    • value - The value of the variable passed as a string.
  • variable_definition_file - (Optional) The absolute path to the file containing variable definitions and defaults. This file follows the syntax used in the Property Manager CLI. This argument is required if you set variable_values_file and conflicts with variables.
  • variable_values_file - (Optional) The absolute path to the file containing variable values. This file follows the syntax used in the Property Manager CLI. This argument is required if you set variable_definition_file and conflicts with variables.

Attributes reference

This data source returns this attribute:

  • json - The fully expanded template with variables and all nested templates resolved.

Using getPropertyRulesTemplate

function getPropertyRulesTemplate(args: GetPropertyRulesTemplateArgs, opts?: InvokeOptions): Promise<GetPropertyRulesTemplateResult>
def get_property_rules_template(template_file: Optional[str] = None,
                                var_definition_file: Optional[str] = None,
                                var_values_file: Optional[str] = None,
                                variables: Optional[Sequence[GetPropertyRulesTemplateVariable]] = None,
                                opts: Optional[InvokeOptions] = None) -> GetPropertyRulesTemplateResult
func GetPropertyRulesTemplate(ctx *Context, args *GetPropertyRulesTemplateArgs, opts ...InvokeOption) (*GetPropertyRulesTemplateResult, error)

Note: This function is named GetPropertyRulesTemplate in the Go SDK.

public static class GetPropertyRulesTemplate {
    public static Task<GetPropertyRulesTemplateResult> InvokeAsync(GetPropertyRulesTemplateArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

getPropertyRulesTemplate Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Json string
TemplateFile string
VarDefinitionFile string
VarValuesFile string
Variables List<GetPropertyRulesTemplateVariable>
Id string
The provider-assigned unique ID for this managed resource.
Json string
TemplateFile string
VarDefinitionFile string
VarValuesFile string
Variables []GetPropertyRulesTemplateVariable
id string
The provider-assigned unique ID for this managed resource.
json string
templateFile string
varDefinitionFile string
varValuesFile string
variables GetPropertyRulesTemplateVariable[]
id str
The provider-assigned unique ID for this managed resource.
json str
template_file str
var_definition_file str
var_values_file str
variables Sequence[GetPropertyRulesTemplateVariable]

Supporting Types

GetPropertyRulesTemplateVariable

Name string
Value string
Type string
Name string
Value string
Type string
name string
value string
type string
name str
value str
type 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.