Okta v4.8.0 published on Saturday, Mar 2, 2024 by Pulumi
okta.auth.ServerPolicy
Explore with Pulumi AI
Creates an Authorization Server Policy.
This resource allows you to create and configure an Authorization Server Policy.
Example Usage
using System.Collections.Generic;
using System.Linq;
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/v4/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 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)
@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:
- Auth
Server stringId - The ID of the Auth Server.
- Client
Whitelists 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.
- Auth
Server stringId - The ID of the Auth Server.
- Client
Whitelists []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.
- auth
Server StringId - The ID of the Auth Server.
- client
Whitelists 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.
- auth
Server stringId - The ID of the Auth Server.
- client
Whitelists 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.
- auth_
server_ strid - 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.
- auth
Server StringId - The ID of the Auth Server.
- client
Whitelists 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.
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 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) -> 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.
- Auth
Server stringId - The ID of the Auth Server.
- Client
Whitelists 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.
- Auth
Server stringId - The ID of the Auth Server.
- Client
Whitelists []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.
- auth
Server StringId - The ID of the Auth Server.
- client
Whitelists 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.
- auth
Server stringId - The ID of the Auth Server.
- client
Whitelists 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.
- auth_
server_ strid - 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.
- auth
Server StringId - The ID of the Auth Server.
- client
Whitelists 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.
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
- Okta pulumi/pulumi-okta
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
okta
Terraform Provider.