Okta v4.15.0 published on Friday, Mar 7, 2025 by Pulumi
okta.auth.getServerPolicy
Explore with Pulumi AI
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)
public static Output<GetServerPolicyResult> getServerPolicy(GetServerPolicyArgs args, InvokeOptions options)
fn::invoke:
  function: okta:auth/getServerPolicy:getServerPolicy
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AuthServer stringId 
- Auth server ID
- Name string
- Name of the policy
- AuthServer stringId 
- Auth server ID
- Name string
- Name of the policy
- authServer StringId 
- Auth server ID
- name String
- Name of the policy
- authServer stringId 
- Auth server ID
- name string
- Name of the policy
- auth_server_ strid 
- Auth server ID
- name str
- Name of the policy
- authServer StringId 
- 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.
- AuthServer stringId 
- 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.
- AuthServer stringId 
- 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.
- authServer StringId 
- 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.
- authServer stringId 
- 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_ strid 
- 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.
- authServer StringId 
- 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 oktaTerraform Provider.