1. Packages
  2. Okta Provider
  3. API Docs
  4. auth
  5. getServerPolicy
Okta v4.11.3 published on Monday, Oct 21, 2024 by Pulumi

okta.auth.getServerPolicy

Explore with Pulumi AI

okta logo
Okta v4.11.3 published on Monday, Oct 21, 2024 by Pulumi

    Get an authorization server policy from Okta.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const example = okta.auth.getServerPolicy({
        authServerId: "<auth server id>",
        name: "staff",
    });
    
    import pulumi
    import pulumi_okta as okta
    
    example = okta.auth.get_server_policy(auth_server_id="<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
    	})
    }
    
    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 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());
    
        }
    }
    
    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
    Auth server ID
    Name string
    Name of the policy
    AuthServerId string
    Auth server ID
    Name string
    Name of the policy
    authServerId String
    Auth server ID
    name String
    Name of the policy
    authServerId string
    Auth server ID
    name string
    Name of the policy
    auth_server_id str
    Auth server ID
    name str
    Name of the policy
    authServerId String
    Auth server ID
    name String
    Name of the policy

    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
    Auth server ID
    Description string
    Description of authorization server policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the policy
    Priority int
    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
    Auth server ID
    Description string
    Description of authorization server policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the policy
    Priority int
    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
    Auth server ID
    description String
    Description of authorization server policy.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the policy
    priority Integer
    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
    Auth server ID
    description string
    Description of authorization server policy.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name of the policy
    priority number
    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
    Auth server ID
    description str
    Description of authorization server policy.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Name of the policy
    priority int
    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
    Auth server ID
    description String
    Description of authorization server policy.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the policy
    priority Number
    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.11.3 published on Monday, Oct 21, 2024 by Pulumi