1. Packages
  2. Zscaler Private Access (ZPA)
  3. API Docs
  4. getPostureProfile
Zscaler Private Access v0.0.11 published on Saturday, May 4, 2024 by Zscaler

zpa.getPostureProfile

Explore with Pulumi AI

zpa logo
Zscaler Private Access v0.0.11 published on Saturday, May 4, 2024 by Zscaler

    Use the zpa_posture_profile data source to get information about a posture profile created in the Zscaler Private Access Mobile Portal. This data source can then be referenced in an Access Policy, Timeout policy, Forwarding Policy, Inspection Policy or Isolation Policy.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as zpa from "@pulumi/zpa";
    
    const example1 = zpa.getPostureProfile({
        name: "CrowdStrike_ZPA_ZTA_40",
    });
    
    import pulumi
    import pulumi_zpa as zpa
    
    example1 = zpa.get_posture_profile(name="CrowdStrike_ZPA_ZTA_40")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/zscaler/pulumi-zpa/sdk/go/zpa"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := zpa.GetPostureProfile(ctx, &zpa.GetPostureProfileArgs{
    			Name: pulumi.StringRef("CrowdStrike_ZPA_ZTA_40"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zpa = Pulumi.Zpa;
    
    return await Deployment.RunAsync(() => 
    {
        var example1 = Zpa.GetPostureProfile.Invoke(new()
        {
            Name = "CrowdStrike_ZPA_ZTA_40",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zpa.ZpaFunctions;
    import com.pulumi.zpa.inputs.GetPostureProfileArgs;
    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 example1 = ZpaFunctions.getPostureProfile(GetPostureProfileArgs.builder()
                .name("CrowdStrike_ZPA_ZTA_40")
                .build());
    
        }
    }
    
    variables:
      example1:
        fn::invoke:
          Function: zpa:getPostureProfile
          Arguments:
            name: CrowdStrike_ZPA_ZTA_40
    
    import * as pulumi from "@pulumi/pulumi";
    import * as zpa from "@pulumi/zpa";
    
    const example2 = zpa.getPostureProfile({
        name: "Detect SentinelOne",
    });
    
    import pulumi
    import pulumi_zpa as zpa
    
    example2 = zpa.get_posture_profile(name="Detect SentinelOne")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/zscaler/pulumi-zpa/sdk/go/zpa"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := zpa.GetPostureProfile(ctx, &zpa.GetPostureProfileArgs{
    			Name: pulumi.StringRef("Detect SentinelOne"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zpa = Pulumi.Zpa;
    
    return await Deployment.RunAsync(() => 
    {
        var example2 = Zpa.GetPostureProfile.Invoke(new()
        {
            Name = "Detect SentinelOne",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zpa.ZpaFunctions;
    import com.pulumi.zpa.inputs.GetPostureProfileArgs;
    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 example2 = ZpaFunctions.getPostureProfile(GetPostureProfileArgs.builder()
                .name("Detect SentinelOne")
                .build());
    
        }
    }
    
    variables:
      example2:
        fn::invoke:
          Function: zpa:getPostureProfile
          Arguments:
            name: Detect SentinelOne
    
    import * as pulumi from "@pulumi/pulumi";
    import * as zpa from "@pulumi/zpa";
    
    const example3 = zpa.getPostureProfile({
        name: "domain_joined",
    });
    
    import pulumi
    import pulumi_zpa as zpa
    
    example3 = zpa.get_posture_profile(name="domain_joined")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/zscaler/pulumi-zpa/sdk/go/zpa"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := zpa.GetPostureProfile(ctx, &zpa.GetPostureProfileArgs{
    			Name: pulumi.StringRef("domain_joined"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zpa = Pulumi.Zpa;
    
    return await Deployment.RunAsync(() => 
    {
        var example3 = Zpa.GetPostureProfile.Invoke(new()
        {
            Name = "domain_joined",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zpa.ZpaFunctions;
    import com.pulumi.zpa.inputs.GetPostureProfileArgs;
    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 example3 = ZpaFunctions.getPostureProfile(GetPostureProfileArgs.builder()
                .name("domain_joined")
                .build());
    
        }
    }
    
    variables:
      example3:
        fn::invoke:
          Function: zpa:getPostureProfile
          Arguments:
            name: domain_joined
    

    NOTE To query posture profiles that are associated with a specific Zscaler cloud, it is required to append the cloud name to the name of the posture profile as the below example:

    import * as pulumi from "@pulumi/pulumi";
    import * as zpa from "@pulumi/zpa";
    
    const example1 = zpa.getPostureProfile({
        name: "CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)",
    });
    
    import pulumi
    import pulumi_zpa as zpa
    
    example1 = zpa.get_posture_profile(name="CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/zscaler/pulumi-zpa/sdk/go/zpa"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := zpa.GetPostureProfile(ctx, &zpa.GetPostureProfileArgs{
    			Name: pulumi.StringRef("CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zpa = Pulumi.Zpa;
    
    return await Deployment.RunAsync(() => 
    {
        var example1 = Zpa.GetPostureProfile.Invoke(new()
        {
            Name = "CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zpa.ZpaFunctions;
    import com.pulumi.zpa.inputs.GetPostureProfileArgs;
    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 example1 = ZpaFunctions.getPostureProfile(GetPostureProfileArgs.builder()
                .name("CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)")
                .build());
    
        }
    }
    
    variables:
      example1:
        fn::invoke:
          Function: zpa:getPostureProfile
          Arguments:
            name: CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)
    

    NOTE When associating a posture profile with one of supported resources, the following parameter must be exported: posture_udid instead of the id of the resource.

    import * as pulumi from "@pulumi/pulumi";
    import * as zpa from "@pulumi/zpa";
    
    const example1 = zpa.getPostureProfile({
        name: "CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)",
    });
    export const zpaPostureProfile = example1.then(example1 => example1.postureUdid);
    
    import pulumi
    import pulumi_zpa as zpa
    
    example1 = zpa.get_posture_profile(name="CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)")
    pulumi.export("zpaPostureProfile", example1.posture_udid)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/zscaler/pulumi-zpa/sdk/go/zpa"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example1, err := zpa.GetPostureProfile(ctx, &zpa.GetPostureProfileArgs{
    			Name: pulumi.StringRef("CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("zpaPostureProfile", example1.PostureUdid)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zpa = Pulumi.Zpa;
    
    return await Deployment.RunAsync(() => 
    {
        var example1 = Zpa.GetPostureProfile.Invoke(new()
        {
            Name = "CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)",
        });
    
        return new Dictionary<string, object?>
        {
            ["zpaPostureProfile"] = example1.Apply(getPostureProfileResult => getPostureProfileResult.PostureUdid),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zpa.ZpaFunctions;
    import com.pulumi.zpa.inputs.GetPostureProfileArgs;
    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 example1 = ZpaFunctions.getPostureProfile(GetPostureProfileArgs.builder()
                .name("CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)")
                .build());
    
            ctx.export("zpaPostureProfile", example1.applyValue(getPostureProfileResult -> getPostureProfileResult.postureUdid()));
        }
    }
    
    variables:
      example1:
        fn::invoke:
          Function: zpa:getPostureProfile
          Arguments:
            name: CrowdStrike_ZPA_ZTA_40 (zscalertwo.net)
    outputs:
      zpaPostureProfile: ${example1.postureUdid}
    

    Using getPostureProfile

    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 getPostureProfile(args: GetPostureProfileArgs, opts?: InvokeOptions): Promise<GetPostureProfileResult>
    function getPostureProfileOutput(args: GetPostureProfileOutputArgs, opts?: InvokeOptions): Output<GetPostureProfileResult>
    def get_posture_profile(name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetPostureProfileResult
    def get_posture_profile_output(name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetPostureProfileResult]
    func GetPostureProfile(ctx *Context, args *GetPostureProfileArgs, opts ...InvokeOption) (*GetPostureProfileResult, error)
    func GetPostureProfileOutput(ctx *Context, args *GetPostureProfileOutputArgs, opts ...InvokeOption) GetPostureProfileResultOutput

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

    public static class GetPostureProfile 
    {
        public static Task<GetPostureProfileResult> InvokeAsync(GetPostureProfileArgs args, InvokeOptions? opts = null)
        public static Output<GetPostureProfileResult> Invoke(GetPostureProfileInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPostureProfileResult> getPostureProfile(GetPostureProfileArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: zpa:index/getPostureProfile:getPostureProfile
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name string
    name String
    name string
    name str
    name String

    getPostureProfile Result

    The following output properties are available:

    CreationTime string
    Domain string
    Id string
    MasterCustomerId string
    ModifiedTime string
    Modifiedby string
    PostureUdid string
    ZscalerCloud string
    ZscalerCustomerId string
    Name string
    CreationTime string
    Domain string
    Id string
    MasterCustomerId string
    ModifiedTime string
    Modifiedby string
    PostureUdid string
    ZscalerCloud string
    ZscalerCustomerId string
    Name string
    creationTime String
    domain String
    id String
    masterCustomerId String
    modifiedTime String
    modifiedby String
    postureUdid String
    zscalerCloud String
    zscalerCustomerId String
    name String
    creationTime string
    domain string
    id string
    masterCustomerId string
    modifiedTime string
    modifiedby string
    postureUdid string
    zscalerCloud string
    zscalerCustomerId string
    name string
    creationTime String
    domain String
    id String
    masterCustomerId String
    modifiedTime String
    modifiedby String
    postureUdid String
    zscalerCloud String
    zscalerCustomerId String
    name String

    Package Details

    Repository
    zpa zscaler/pulumi-zpa
    License
    MIT
    Notes
    This Pulumi package is based on the zpa Terraform Provider.
    zpa logo
    Zscaler Private Access v0.0.11 published on Saturday, May 4, 2024 by Zscaler