Akamai
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
andvariables.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 property-snippets
directory, use this syntax
including the quotes: "#include:example-file.json"
. Make sure the property-snippets
folder contains only .json
files.
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.
Attributes reference
This data source returns this attribute:
json
- The fully expanded template with variables and all nested templates resolved.
Using getPropertyRulesTemplate
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 getPropertyRulesTemplate(args: GetPropertyRulesTemplateArgs, opts?: InvokeOptions): Promise<GetPropertyRulesTemplateResult>
function getPropertyRulesTemplateOutput(args: GetPropertyRulesTemplateOutputArgs, opts?: InvokeOptions): Output<GetPropertyRulesTemplateResult>
def get_property_rules_template(template_file: Optional[str] = None,
templates: Optional[Sequence[GetPropertyRulesTemplateTemplate]] = None,
var_definition_file: Optional[str] = None,
var_values_file: Optional[str] = None,
variables: Optional[Sequence[GetPropertyRulesTemplateVariable]] = None,
opts: Optional[InvokeOptions] = None) -> GetPropertyRulesTemplateResult
def get_property_rules_template_output(template_file: Optional[pulumi.Input[str]] = None,
templates: Optional[pulumi.Input[Sequence[pulumi.Input[GetPropertyRulesTemplateTemplateArgs]]]] = None,
var_definition_file: Optional[pulumi.Input[str]] = None,
var_values_file: Optional[pulumi.Input[str]] = None,
variables: Optional[pulumi.Input[Sequence[pulumi.Input[GetPropertyRulesTemplateVariableArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPropertyRulesTemplateResult]
func GetPropertyRulesTemplate(ctx *Context, args *GetPropertyRulesTemplateArgs, opts ...InvokeOption) (*GetPropertyRulesTemplateResult, error)
func GetPropertyRulesTemplateOutput(ctx *Context, args *GetPropertyRulesTemplateOutputArgs, opts ...InvokeOption) GetPropertyRulesTemplateResultOutput
> Note: This function is named GetPropertyRulesTemplate
in the Go SDK.
public static class GetPropertyRulesTemplate
{
public static Task<GetPropertyRulesTemplateResult> InvokeAsync(GetPropertyRulesTemplateArgs args, InvokeOptions? opts = null)
public static Output<GetPropertyRulesTemplateResult> Invoke(GetPropertyRulesTemplateInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPropertyRulesTemplateResult> getPropertyRulesTemplate(GetPropertyRulesTemplateArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
Function: akamai:index/getPropertyRulesTemplate:getPropertyRulesTemplate
Arguments:
# Arguments dictionary
The following arguments are supported:
- Template
File string 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.
- Templates
List<Get
Property Rules Template Template> - Var
Definition stringFile 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
var_values_file
and conflicts withvariables
.- Var
Values stringFile 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
var_definition_file
and conflicts withvariables
.- Variables
List<Get
Property Rules Template Variable> A definition of a variable. Variables aren't required and you can use multiple ones if needed. This argument conflicts with the
var_definition_file
andvar_values_file
arguments. Avariables
block includes:
- Template
File string 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.
- Templates
[]Get
Property Rules Template Template - Var
Definition stringFile 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
var_values_file
and conflicts withvariables
.- Var
Values stringFile 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
var_definition_file
and conflicts withvariables
.- Variables
[]Get
Property Rules Template Variable A definition of a variable. Variables aren't required and you can use multiple ones if needed. This argument conflicts with the
var_definition_file
andvar_values_file
arguments. Avariables
block includes:
- template
File String 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.
- templates
List
Property Rules Template Template> - var
Definition StringFile 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
var_values_file
and conflicts withvariables
.- var
Values StringFile 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
var_definition_file
and conflicts withvariables
.- variables
List
Property Rules Template Variable> A definition of a variable. Variables aren't required and you can use multiple ones if needed. This argument conflicts with the
var_definition_file
andvar_values_file
arguments. Avariables
block includes:
- template
File string 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.
- templates
Get
Property Rules Template Template[] - var
Definition stringFile 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
var_values_file
and conflicts withvariables
.- var
Values stringFile 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
var_definition_file
and conflicts withvariables
.- variables
Get
Property Rules Template Variable[] A definition of a variable. Variables aren't required and you can use multiple ones if needed. This argument conflicts with the
var_definition_file
andvar_values_file
arguments. Avariables
block includes:
- template_
file str 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.
- templates
Sequence[Get
Property Rules Template Template] - var_
definition_ strfile 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
var_values_file
and conflicts withvariables
.- var_
values_ strfile 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
var_definition_file
and conflicts withvariables
.- variables
Sequence[Get
Property Rules Template Variable] A definition of a variable. Variables aren't required and you can use multiple ones if needed. This argument conflicts with the
var_definition_file
andvar_values_file
arguments. Avariables
block includes:
- template
File String 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.
- templates
List
- var
Definition StringFile 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
var_values_file
and conflicts withvariables
.- var
Values StringFile 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
var_definition_file
and conflicts withvariables
.- variables
List
A definition of a variable. Variables aren't required and you can use multiple ones if needed. This argument conflicts with the
var_definition_file
andvar_values_file
arguments. Avariables
block includes:
getPropertyRulesTemplate Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Json string
- Template
File string - Templates
List<Get
Property Rules Template Template> - Var
Definition stringFile - Var
Values stringFile - Variables
List<Get
Property Rules Template Variable>
- Id string
The provider-assigned unique ID for this managed resource.
- Json string
- Template
File string - Templates
[]Get
Property Rules Template Template - Var
Definition stringFile - Var
Values stringFile - Variables
[]Get
Property Rules Template Variable
- id String
The provider-assigned unique ID for this managed resource.
- json String
- template
File String - templates
List
Property Rules Template Template> - var
Definition StringFile - var
Values StringFile - variables
List
Property Rules Template Variable>
- id string
The provider-assigned unique ID for this managed resource.
- json string
- template
File string - templates
Get
Property Rules Template Template[] - var
Definition stringFile - var
Values stringFile - variables
Get
Property Rules Template Variable[]
- id str
The provider-assigned unique ID for this managed resource.
- json str
- template_
file str - templates
Sequence[Get
Property Rules Template Template] - var_
definition_ strfile - var_
values_ strfile - variables
Sequence[Get
Property Rules Template Variable]
- id String
The provider-assigned unique ID for this managed resource.
- json String
- template
File String - templates
List
- var
Definition StringFile - var
Values StringFile - variables
List
Supporting Types
GetPropertyRulesTemplateTemplate
- Template
Data string - Template
Dir string
- Template
Data string - Template
Dir string
- template
Data String - template
Dir String
- template
Data string - template
Dir string
- template_
data str - template_
dir str
- template
Data String - template
Dir String
GetPropertyRulesTemplateVariable
Package Details
- Repository
- https://github.com/pulumi/pulumi-akamai
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
akamai
Terraform Provider.