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
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = new okta.auth.ServerPolicy("example", {
authServerId: "<auth server id>",
status: "ACTIVE",
name: "example",
description: "example",
priority: 1,
clientWhitelists: ["ALL_CLIENTS"],
});
import pulumi
import pulumi_okta as okta
example = okta.auth.ServerPolicy("example",
auth_server_id="<auth server id>",
status="ACTIVE",
name="example",
description="example",
priority=1,
client_whitelists=["ALL_CLIENTS"])
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>"),
Status: pulumi.String("ACTIVE"),
Name: pulumi.String("example"),
Description: pulumi.String("example"),
Priority: pulumi.Int(1),
ClientWhitelists: pulumi.StringArray{
pulumi.String("ALL_CLIENTS"),
},
})
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 = new Okta.Auth.ServerPolicy("example", new()
{
AuthServerId = "<auth server id>",
Status = "ACTIVE",
Name = "example",
Description = "example",
Priority = 1,
ClientWhitelists = new[]
{
"ALL_CLIENTS",
},
});
});
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>")
.status("ACTIVE")
.name("example")
.description("example")
.priority(1)
.clientWhitelists("ALL_CLIENTS")
.build());
}
}
resources:
example:
type: okta:auth:ServerPolicy
properties:
authServerId: <auth server id>
status: ACTIVE
name: example
description: example
priority: 1
clientWhitelists:
- ALL_CLIENTS
Create ServerPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerPolicy(name: string, args: ServerPolicyArgs, opts?: CustomResourceOptions);
@overload
def ServerPolicy(resource_name: str,
args: ServerPolicyArgs,
opts: Optional[ResourceOptions] = None)
@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,
priority: Optional[int] = None,
name: Optional[str] = None,
status: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var serverPolicyResource = new Okta.Auth.ServerPolicy("serverPolicyResource", new()
{
AuthServerId = "string",
ClientWhitelists = new[]
{
"string",
},
Description = "string",
Priority = 0,
Name = "string",
Status = "string",
});
example, err := auth.NewServerPolicy(ctx, "serverPolicyResource", &auth.ServerPolicyArgs{
AuthServerId: pulumi.String("string"),
ClientWhitelists: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
Priority: pulumi.Int(0),
Name: pulumi.String("string"),
Status: pulumi.String("string"),
})
var serverPolicyResource = new ServerPolicy("serverPolicyResource", ServerPolicyArgs.builder()
.authServerId("string")
.clientWhitelists("string")
.description("string")
.priority(0)
.name("string")
.status("string")
.build());
server_policy_resource = okta.auth.ServerPolicy("serverPolicyResource",
auth_server_id="string",
client_whitelists=["string"],
description="string",
priority=0,
name="string",
status="string")
const serverPolicyResource = new okta.auth.ServerPolicy("serverPolicyResource", {
authServerId: "string",
clientWhitelists: ["string"],
description: "string",
priority: 0,
name: "string",
status: "string",
});
type: okta:auth:ServerPolicy
properties:
authServerId: string
clientWhitelists:
- string
description: string
name: string
priority: 0
status: string
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
- Priority of the auth server policy
- Name string
- The name of the Auth Server Policy.
- Status string
- Default to
ACTIVE
- 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
- Priority of the auth server policy
- Name string
- The name of the Auth Server Policy.
- Status string
- Default to
ACTIVE
- 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
- Priority of the auth server policy
- name String
- The name of the Auth Server Policy.
- status String
- Default to
ACTIVE
- 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
- Priority of the auth server policy
- name string
- The name of the Auth Server Policy.
- status string
- Default to
ACTIVE
- 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
- Priority of the auth server policy
- name str
- The name of the Auth Server Policy.
- status str
- Default to
ACTIVE
- 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
- Priority of the auth server policy
- name String
- The name of the Auth Server Policy.
- status String
- Default to
ACTIVE
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
- Priority of the auth server policy
- Status string
- Default to
ACTIVE
- 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
- Priority of the auth server policy
- Status string
- Default to
ACTIVE
- 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
- Priority of the auth server policy
- status String
- Default to
ACTIVE
- 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
- Priority of the auth server policy
- status string
- Default to
ACTIVE
- 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
- Priority of the auth server policy
- status str
- Default to
ACTIVE
- 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
- Priority of the auth server policy
- status String
- Default to
ACTIVE
Import
$ pulumi import okta:auth/serverPolicy:ServerPolicy example <auth_server_id>/<policy_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Okta pulumi/pulumi-okta
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
okta
Terraform Provider.