getProperty

Use the akamai.Property data source to query and list the property ID and rule tree based on the property name.

Argument reference

This data source supports these arguments:

  • name - (Required) The property name.
  • version - (Optional) The version of the property whose ID you want to list.

Attributes reference

This data source returns these attributes:

  • property_ID - A property’s unique identifier, including the prp_ prefix.
  • rules - A JSON-encoded rule tree for a given property.

Example Usage

using Pulumi;
using Akamai = Pulumi.Akamai;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Akamai.GetProperty.InvokeAsync(new Akamai.GetPropertyArgs
        {
            Name = "terraform-demo",
            Version = 1,
        }));
        this.MyPropertyID = example;
    }

    [Output("myPropertyID")]
    public Output<string> MyPropertyID { 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 := 1
		example, err := akamai.LookupProperty(ctx, &GetPropertyArgs{
			Name:    "terraform-demo",
			Version: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("myPropertyID", example)
		return nil
	})
}
import pulumi
import pulumi_akamai as akamai

example = akamai.get_property(name="terraform-demo",
    version=1)
pulumi.export("myPropertyID", example)
import * as pulumi from "@pulumi/pulumi";
import * as akamai from "@pulumi/akamai";

const example = akamai.getProperty({
    name: "terraform-demo",
    version: "1",
});
export const myPropertyID = example;

Using getProperty

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 getProperty(args: GetPropertyArgs, opts?: InvokeOptions): Promise<GetPropertyResult>
function getPropertyOutput(args: GetPropertyOutputArgs, opts?: InvokeOptions): Output<GetPropertyResult>
def get_property(name: Optional[str] = None,
                 version: Optional[int] = None,
                 opts: Optional[InvokeOptions] = None) -> GetPropertyResult
def get_property_output(name: Optional[pulumi.Input[str]] = None,
                 version: Optional[pulumi.Input[int]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetPropertyResult]
func LookupProperty(ctx *Context, args *LookupPropertyArgs, opts ...InvokeOption) (*LookupPropertyResult, error)
func LookupPropertyOutput(ctx *Context, args *LookupPropertyOutputArgs, opts ...InvokeOption) LookupPropertyResultOutput

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

public static class GetProperty 
{
    public static Task<GetPropertyResult> InvokeAsync(GetPropertyArgs args, InvokeOptions? opts = null)
    public static Output<GetPropertyResult> Invoke(GetPropertyInvokeArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string
Version int
Name string
Version int
name string
version number
name str
version int

getProperty Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Name string
Rules string
Version int
Id string
The provider-assigned unique ID for this managed resource.
Name string
Rules string
Version int
id string
The provider-assigned unique ID for this managed resource.
name string
rules string
version number
id str
The provider-assigned unique ID for this managed resource.
name str
rules str
version int

Package Details

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