ServerPolicy

Creates an Authorization Server Policy.

This resource allows you to create and configure an Authorization Server Policy.

Example Usage

using Pulumi;
using Okta = Pulumi.Okta;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Okta.Auth.ServerPolicy("example", new Okta.Auth.ServerPolicyArgs
        {
            AuthServerId = "<auth server id>",
            ClientWhitelists = 
            {
                "ALL_CLIENTS",
            },
            Description = "example",
            Priority = 1,
            Status = "ACTIVE",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-okta/sdk/v3/go/okta/auth"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := auth.NewServerPolicy(ctx, "example", &auth.ServerPolicyArgs{
			AuthServerId: pulumi.String("<auth server id>"),
			ClientWhitelists: pulumi.StringArray{
				pulumi.String("ALL_CLIENTS"),
			},
			Description: pulumi.String("example"),
			Priority:    pulumi.Int(1),
			Status:      pulumi.String("ACTIVE"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_okta as okta

example = okta.auth.ServerPolicy("example",
    auth_server_id="<auth server id>",
    client_whitelists=["ALL_CLIENTS"],
    description="example",
    priority=1,
    status="ACTIVE")
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";

const example = new okta.auth.ServerPolicy("example", {
    authServerId: "<auth server id>",
    clientWhitelists: ["ALL_CLIENTS"],
    description: "example",
    priority: 1,
    status: "ACTIVE",
});

Create a ServerPolicy Resource

new ServerPolicy(name: string, args: ServerPolicyArgs, opts?: CustomResourceOptions);
@overload
def ServerPolicy(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 auth_server_id: Optional[str] = None,
                 client_whitelists: Optional[Sequence[str]] = None,
                 description: Optional[str] = None,
                 name: Optional[str] = None,
                 priority: Optional[int] = None,
                 status: Optional[str] = None,
                 type: Optional[str] = None)
@overload
def ServerPolicy(resource_name: str,
                 args: ServerPolicyArgs,
                 opts: Optional[ResourceOptions] = None)
func NewServerPolicy(ctx *Context, name string, args ServerPolicyArgs, opts ...ResourceOption) (*ServerPolicy, error)
public ServerPolicy(string name, ServerPolicyArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ServerPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args ServerPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ServerPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ServerPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ServerPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ServerPolicy resource accepts the following input properties:

AuthServerId string
The ID of the Auth Server.
ClientWhitelists List<string>
The clients to whitelist the policy for. ["ALL_CLIENTS"] is a special value that can be used to whitelist all clients, otherwise it is a list of client ids.
Description string
The description of the Auth Server Policy.
Priority int
The priority of the Auth Server Policy.
Name string
The name of the Auth Server Policy.
Status string
The status of the Auth Server Policy.
Type string
The type of the Auth Server Policy.

Deprecated: Policy type can only be of value ‘OAUTH_AUTHORIZATION_POLICY’, so this will be removed in the future, or set as ‘Computed’ value

AuthServerId string
The ID of the Auth Server.
ClientWhitelists []string
The clients to whitelist the policy for. ["ALL_CLIENTS"] is a special value that can be used to whitelist all clients, otherwise it is a list of client ids.
Description string
The description of the Auth Server Policy.
Priority int
The priority of the Auth Server Policy.
Name string
The name of the Auth Server Policy.
Status string
The status of the Auth Server Policy.
Type string
The type of the Auth Server Policy.

Deprecated: Policy type can only be of value ‘OAUTH_AUTHORIZATION_POLICY’, so this will be removed in the future, or set as ‘Computed’ value

authServerId string
The ID of the Auth Server.
clientWhitelists string[]
The clients to whitelist the policy for. ["ALL_CLIENTS"] is a special value that can be used to whitelist all clients, otherwise it is a list of client ids.
description string
The description of the Auth Server Policy.
priority number
The priority of the Auth Server Policy.
name string
The name of the Auth Server Policy.
status string
The status of the Auth Server Policy.
type string
The type of the Auth Server Policy.

Deprecated: Policy type can only be of value ‘OAUTH_AUTHORIZATION_POLICY’, so this will be removed in the future, or set as ‘Computed’ value

auth_server_id str
The ID of the Auth Server.
client_whitelists Sequence[str]
The clients to whitelist the policy for. ["ALL_CLIENTS"] is a special value that can be used to whitelist all clients, otherwise it is a list of client ids.
description str
The description of the Auth Server Policy.
priority int
The priority of the Auth Server Policy.
name str
The name of the Auth Server Policy.
status str
The status of the Auth Server Policy.
type str
The type of the Auth Server Policy.

Deprecated: Policy type can only be of value ‘OAUTH_AUTHORIZATION_POLICY’, so this will be removed in the future, or set as ‘Computed’ value

Outputs

All input properties are implicitly available as output properties. Additionally, the ServerPolicy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ServerPolicy Resource

Get an existing ServerPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ServerPolicyState, opts?: CustomResourceOptions): ServerPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        auth_server_id: Optional[str] = None,
        client_whitelists: Optional[Sequence[str]] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        priority: Optional[int] = None,
        status: Optional[str] = None,
        type: Optional[str] = None) -> ServerPolicy
func GetServerPolicy(ctx *Context, name string, id IDInput, state *ServerPolicyState, opts ...ResourceOption) (*ServerPolicy, error)
public static ServerPolicy Get(string name, Input<string> id, ServerPolicyState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

AuthServerId string
The ID of the Auth Server.
ClientWhitelists List<string>
The clients to whitelist the policy for. ["ALL_CLIENTS"] is a special value that can be used to whitelist all clients, otherwise it is a list of client ids.
Description string
The description of the Auth Server Policy.
Name string
The name of the Auth Server Policy.
Priority int
The priority of the Auth Server Policy.
Status string
The status of the Auth Server Policy.
Type string
The type of the Auth Server Policy.

Deprecated: Policy type can only be of value ‘OAUTH_AUTHORIZATION_POLICY’, so this will be removed in the future, or set as ‘Computed’ value

AuthServerId string
The ID of the Auth Server.
ClientWhitelists []string
The clients to whitelist the policy for. ["ALL_CLIENTS"] is a special value that can be used to whitelist all clients, otherwise it is a list of client ids.
Description string
The description of the Auth Server Policy.
Name string
The name of the Auth Server Policy.
Priority int
The priority of the Auth Server Policy.
Status string
The status of the Auth Server Policy.
Type string
The type of the Auth Server Policy.

Deprecated: Policy type can only be of value ‘OAUTH_AUTHORIZATION_POLICY’, so this will be removed in the future, or set as ‘Computed’ value

authServerId string
The ID of the Auth Server.
clientWhitelists string[]
The clients to whitelist the policy for. ["ALL_CLIENTS"] is a special value that can be used to whitelist all clients, otherwise it is a list of client ids.
description string
The description of the Auth Server Policy.
name string
The name of the Auth Server Policy.
priority number
The priority of the Auth Server Policy.
status string
The status of the Auth Server Policy.
type string
The type of the Auth Server Policy.

Deprecated: Policy type can only be of value ‘OAUTH_AUTHORIZATION_POLICY’, so this will be removed in the future, or set as ‘Computed’ value

auth_server_id str
The ID of the Auth Server.
client_whitelists Sequence[str]
The clients to whitelist the policy for. ["ALL_CLIENTS"] is a special value that can be used to whitelist all clients, otherwise it is a list of client ids.
description str
The description of the Auth Server Policy.
name str
The name of the Auth Server Policy.
priority int
The priority of the Auth Server Policy.
status str
The status of the Auth Server Policy.
type str
The type of the Auth Server Policy.

Deprecated: Policy type can only be of value ‘OAUTH_AUTHORIZATION_POLICY’, so this will be removed in the future, or set as ‘Computed’ value

Import

Authorization Server Policy can be imported via the Auth Server ID and Policy ID.

 $ pulumi import okta:auth/serverPolicy:ServerPolicy example <auth server id>/<policy id>

Package Details

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