Okta

v3.16.0 published on Wednesday, Sep 28, 2022 by Pulumi

ServerPolicy

Creates an Authorization Server Policy.

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

Example Usage

using System.Collections.Generic;
using Pulumi;
using Okta = Pulumi.Okta;

return await Deployment.RunAsync(() => 
{
    var example = new Okta.Auth.ServerPolicy("example", new()
    {
        AuthServerId = "<auth server id>",
        ClientWhitelists = new[]
        {
            "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
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.auth.ServerPolicy;
import com.pulumi.okta.auth.ServerPolicyArgs;
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) {
        var example = new ServerPolicy("example", ServerPolicyArgs.builder()        
            .authServerId("<auth server id>")
            .clientWhitelists("ALL_CLIENTS")
            .description("example")
            .priority(1)
            .status("ACTIVE")
            .build());

    }
}
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",
});
resources:
  example:
    type: okta:auth:ServerPolicy
    properties:
      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)
public ServerPolicy(String name, ServerPolicyArgs args)
public ServerPolicy(String name, ServerPolicyArgs args, CustomResourceOptions options)
type: okta:auth:ServerPolicy
properties: # The arguments to resource properties.
options: # 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.
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.
name String
The unique name of the resource.
args ServerPolicyArgs
The arguments to resource properties.
options 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 Architecture and Concepts 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 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 Integer

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

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 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

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 string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

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)
public static ServerPolicy get(String name, Output<String> id, ServerPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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 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 Integer

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

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 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

Import

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

 $ pulumi import okta:auth/serverPolicy:ServerPolicy example &#60;auth server id&#62;/&#60;policy id&#62;

Package Details

Repository
https://github.com/pulumi/pulumi-okta
License
Apache-2.0
Notes

This Pulumi package is based on the okta Terraform Provider.