1. Packages
  2. Okta
  3. API Docs
  4. auth
  5. getServerPolicy
Okta v4.8.0 published on Saturday, Mar 2, 2024 by Pulumi

okta.auth.getServerPolicy

Explore with Pulumi AI

okta logo
Okta v4.8.0 published on Saturday, Mar 2, 2024 by Pulumi

    Use this data source to retrieve an authorization server policy from Okta.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Okta.Auth.GetServerPolicy.Invoke(new()
        {
            AuthServerId = "<auth server id>",
            Name = "staff",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-okta/sdk/v4/go/okta/auth"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := auth.LookupServerPolicy(ctx, &auth.LookupServerPolicyArgs{
    			AuthServerId: "<auth server id>",
    			Name:         "staff",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.okta.auth.AuthFunctions;
    import com.pulumi.okta.auth.inputs.GetServerPolicyArgs;
    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 example = AuthFunctions.getServerPolicy(GetServerPolicyArgs.builder()
                .authServerId("<auth server id>")
                .name("staff")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_okta as okta
    
    example = okta.auth.get_server_policy(auth_server_id="<auth server id>",
        name="staff")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const example = okta.auth.getServerPolicy({
        authServerId: "<auth server id>",
        name: "staff",
    });
    
    variables:
      example:
        fn::invoke:
          Function: okta:auth:getServerPolicy
          Arguments:
            authServerId: <auth server id>
            name: staff
    

    Using getServerPolicy

    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 getServerPolicy(args: GetServerPolicyArgs, opts?: InvokeOptions): Promise<GetServerPolicyResult>
    function getServerPolicyOutput(args: GetServerPolicyOutputArgs, opts?: InvokeOptions): Output<GetServerPolicyResult>
    def get_server_policy(auth_server_id: Optional[str] = None,
                          name: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetServerPolicyResult
    def get_server_policy_output(auth_server_id: Optional[pulumi.Input[str]] = None,
                          name: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetServerPolicyResult]
    func LookupServerPolicy(ctx *Context, args *LookupServerPolicyArgs, opts ...InvokeOption) (*LookupServerPolicyResult, error)
    func LookupServerPolicyOutput(ctx *Context, args *LookupServerPolicyOutputArgs, opts ...InvokeOption) LookupServerPolicyResultOutput

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

    public static class GetServerPolicy 
    {
        public static Task<GetServerPolicyResult> InvokeAsync(GetServerPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetServerPolicyResult> Invoke(GetServerPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServerPolicyResult> getServerPolicy(GetServerPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: okta:auth/getServerPolicy:getServerPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AuthServerId string
    The ID of the Auth Server.
    Name string
    Name of policy to retrieve.
    AuthServerId string
    The ID of the Auth Server.
    Name string
    Name of policy to retrieve.
    authServerId String
    The ID of the Auth Server.
    name String
    Name of policy to retrieve.
    authServerId string
    The ID of the Auth Server.
    name string
    Name of policy to retrieve.
    auth_server_id str
    The ID of the Auth Server.
    name str
    Name of policy to retrieve.
    authServerId String
    The ID of the Auth Server.
    name String
    Name of policy to retrieve.

    getServerPolicy Result

    The following output properties are available:

    AssignedClients List<string>
    list of clients this policy is assigned to. ["ALL_CLIENTS"] is a special value when policy is assigned to all clients.
    AuthServerId string
    Description string
    description of authorization server policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Priority int
    the priority of the Auth Server Policy.
    AssignedClients []string
    list of clients this policy is assigned to. ["ALL_CLIENTS"] is a special value when policy is assigned to all clients.
    AuthServerId string
    Description string
    description of authorization server policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Priority int
    the priority of the Auth Server Policy.
    assignedClients List<String>
    list of clients this policy is assigned to. ["ALL_CLIENTS"] is a special value when policy is assigned to all clients.
    authServerId String
    description String
    description of authorization server policy.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    priority Integer
    the priority of the Auth Server Policy.
    assignedClients string[]
    list of clients this policy is assigned to. ["ALL_CLIENTS"] is a special value when policy is assigned to all clients.
    authServerId string
    description string
    description of authorization server policy.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    priority number
    the priority of the Auth Server Policy.
    assigned_clients Sequence[str]
    list of clients this policy is assigned to. ["ALL_CLIENTS"] is a special value when policy is assigned to all clients.
    auth_server_id str
    description str
    description of authorization server policy.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    priority int
    the priority of the Auth Server Policy.
    assignedClients List<String>
    list of clients this policy is assigned to. ["ALL_CLIENTS"] is a special value when policy is assigned to all clients.
    authServerId String
    description String
    description of authorization server policy.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    priority Number
    the priority of the Auth Server Policy.

    Package Details

    Repository
    Okta pulumi/pulumi-okta
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the okta Terraform Provider.
    okta logo
    Okta v4.8.0 published on Saturday, Mar 2, 2024 by Pulumi