okta.RealmAssignment
Explore with Pulumi AI
Creates an Okta Realm Assignment. This resource allows you to create and configure an Okta Realm Assignment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = new okta.Realm("example", {
name: "Example Realm",
realmType: "DEFAULT",
});
const test = new okta.RealmAssignment("test", {
name: "Example Realm Assignment",
priority: 55,
status: "ACTIVE",
profileSourceId: testOktaIdpSaml.id,
conditionExpression: "user.profile.login.contains(\"@example.com\")",
realmId: example.id,
});
import pulumi
import pulumi_okta as okta
example = okta.Realm("example",
name="Example Realm",
realm_type="DEFAULT")
test = okta.RealmAssignment("test",
name="Example Realm Assignment",
priority=55,
status="ACTIVE",
profile_source_id=test_okta_idp_saml["id"],
condition_expression="user.profile.login.contains(\"@example.com\")",
realm_id=example.id)
package main
import (
"github.com/pulumi/pulumi-okta/sdk/v5/go/okta"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := okta.NewRealm(ctx, "example", &okta.RealmArgs{
Name: pulumi.String("Example Realm"),
RealmType: pulumi.String("DEFAULT"),
})
if err != nil {
return err
}
_, err = okta.NewRealmAssignment(ctx, "test", &okta.RealmAssignmentArgs{
Name: pulumi.String("Example Realm Assignment"),
Priority: pulumi.Int(55),
Status: pulumi.String("ACTIVE"),
ProfileSourceId: pulumi.Any(testOktaIdpSaml.Id),
ConditionExpression: pulumi.String("user.profile.login.contains(\"@example.com\")"),
RealmId: example.ID(),
})
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.Realm("example", new()
{
Name = "Example Realm",
RealmType = "DEFAULT",
});
var test = new Okta.RealmAssignment("test", new()
{
Name = "Example Realm Assignment",
Priority = 55,
Status = "ACTIVE",
ProfileSourceId = testOktaIdpSaml.Id,
ConditionExpression = "user.profile.login.contains(\"@example.com\")",
RealmId = example.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.Realm;
import com.pulumi.okta.RealmArgs;
import com.pulumi.okta.RealmAssignment;
import com.pulumi.okta.RealmAssignmentArgs;
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 Realm("example", RealmArgs.builder()
.name("Example Realm")
.realmType("DEFAULT")
.build());
var test = new RealmAssignment("test", RealmAssignmentArgs.builder()
.name("Example Realm Assignment")
.priority(55)
.status("ACTIVE")
.profileSourceId(testOktaIdpSaml.id())
.conditionExpression("user.profile.login.contains(\"@example.com\")")
.realmId(example.id())
.build());
}
}
resources:
test:
type: okta:RealmAssignment
properties:
name: Example Realm Assignment
priority: 55
status: ACTIVE
profileSourceId: ${testOktaIdpSaml.id}
conditionExpression: user.profile.login.contains("@example.com")
realmId: ${example.id}
example:
type: okta:Realm
properties:
name: Example Realm
realmType: DEFAULT
Create RealmAssignment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RealmAssignment(name: string, args: RealmAssignmentArgs, opts?: CustomResourceOptions);
@overload
def RealmAssignment(resource_name: str,
args: RealmAssignmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RealmAssignment(resource_name: str,
opts: Optional[ResourceOptions] = None,
profile_source_id: Optional[str] = None,
realm_id: Optional[str] = None,
condition_expression: Optional[str] = None,
name: Optional[str] = None,
priority: Optional[int] = None,
status: Optional[str] = None)
func NewRealmAssignment(ctx *Context, name string, args RealmAssignmentArgs, opts ...ResourceOption) (*RealmAssignment, error)
public RealmAssignment(string name, RealmAssignmentArgs args, CustomResourceOptions? opts = null)
public RealmAssignment(String name, RealmAssignmentArgs args)
public RealmAssignment(String name, RealmAssignmentArgs args, CustomResourceOptions options)
type: okta:RealmAssignment
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 RealmAssignmentArgs
- 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 RealmAssignmentArgs
- 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 RealmAssignmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RealmAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RealmAssignmentArgs
- 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 realmAssignmentResource = new Okta.RealmAssignment("realmAssignmentResource", new()
{
ProfileSourceId = "string",
RealmId = "string",
ConditionExpression = "string",
Name = "string",
Priority = 0,
Status = "string",
});
example, err := okta.NewRealmAssignment(ctx, "realmAssignmentResource", &okta.RealmAssignmentArgs{
ProfileSourceId: pulumi.String("string"),
RealmId: pulumi.String("string"),
ConditionExpression: pulumi.String("string"),
Name: pulumi.String("string"),
Priority: pulumi.Int(0),
Status: pulumi.String("string"),
})
var realmAssignmentResource = new RealmAssignment("realmAssignmentResource", RealmAssignmentArgs.builder()
.profileSourceId("string")
.realmId("string")
.conditionExpression("string")
.name("string")
.priority(0)
.status("string")
.build());
realm_assignment_resource = okta.RealmAssignment("realmAssignmentResource",
profile_source_id="string",
realm_id="string",
condition_expression="string",
name="string",
priority=0,
status="string")
const realmAssignmentResource = new okta.RealmAssignment("realmAssignmentResource", {
profileSourceId: "string",
realmId: "string",
conditionExpression: "string",
name: "string",
priority: 0,
status: "string",
});
type: okta:RealmAssignment
properties:
conditionExpression: string
name: string
priority: 0
profileSourceId: string
realmId: string
status: string
RealmAssignment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RealmAssignment resource accepts the following input properties:
- Profile
Source stringId - The ID of the Profile Source.
- Realm
Id string - The ID of the Realm asscociated with the Realm Assignment.
- Condition
Expression string - Condition expression for the Realm Assignment in Okta Expression Language. Example:
user.profile.role =="Manager"
oruser.profile.state.contains("example")
. - Name string
- The name of the Okta Realm Assignment.
- Priority int
- The Priority of the Realm Assignment. The lower the number, the higher the priority.
- Status string
- Defines whether the Realm Assignment is active or not. Valid values:
ACTIVE
andINACTIVE
.
- Profile
Source stringId - The ID of the Profile Source.
- Realm
Id string - The ID of the Realm asscociated with the Realm Assignment.
- Condition
Expression string - Condition expression for the Realm Assignment in Okta Expression Language. Example:
user.profile.role =="Manager"
oruser.profile.state.contains("example")
. - Name string
- The name of the Okta Realm Assignment.
- Priority int
- The Priority of the Realm Assignment. The lower the number, the higher the priority.
- Status string
- Defines whether the Realm Assignment is active or not. Valid values:
ACTIVE
andINACTIVE
.
- profile
Source StringId - The ID of the Profile Source.
- realm
Id String - The ID of the Realm asscociated with the Realm Assignment.
- condition
Expression String - Condition expression for the Realm Assignment in Okta Expression Language. Example:
user.profile.role =="Manager"
oruser.profile.state.contains("example")
. - name String
- The name of the Okta Realm Assignment.
- priority Integer
- The Priority of the Realm Assignment. The lower the number, the higher the priority.
- status String
- Defines whether the Realm Assignment is active or not. Valid values:
ACTIVE
andINACTIVE
.
- profile
Source stringId - The ID of the Profile Source.
- realm
Id string - The ID of the Realm asscociated with the Realm Assignment.
- condition
Expression string - Condition expression for the Realm Assignment in Okta Expression Language. Example:
user.profile.role =="Manager"
oruser.profile.state.contains("example")
. - name string
- The name of the Okta Realm Assignment.
- priority number
- The Priority of the Realm Assignment. The lower the number, the higher the priority.
- status string
- Defines whether the Realm Assignment is active or not. Valid values:
ACTIVE
andINACTIVE
.
- profile_
source_ strid - The ID of the Profile Source.
- realm_
id str - The ID of the Realm asscociated with the Realm Assignment.
- condition_
expression str - Condition expression for the Realm Assignment in Okta Expression Language. Example:
user.profile.role =="Manager"
oruser.profile.state.contains("example")
. - name str
- The name of the Okta Realm Assignment.
- priority int
- The Priority of the Realm Assignment. The lower the number, the higher the priority.
- status str
- Defines whether the Realm Assignment is active or not. Valid values:
ACTIVE
andINACTIVE
.
- profile
Source StringId - The ID of the Profile Source.
- realm
Id String - The ID of the Realm asscociated with the Realm Assignment.
- condition
Expression String - Condition expression for the Realm Assignment in Okta Expression Language. Example:
user.profile.role =="Manager"
oruser.profile.state.contains("example")
. - name String
- The name of the Okta Realm Assignment.
- priority Number
- The Priority of the Realm Assignment. The lower the number, the higher the priority.
- status String
- Defines whether the Realm Assignment is active or not. Valid values:
ACTIVE
andINACTIVE
.
Outputs
All input properties are implicitly available as output properties. Additionally, the RealmAssignment resource produces the following output properties:
- id str
- The provider-assigned unique ID for this managed resource.
- is_
default bool - Indicates whether the realm assignment is the default.
Look up Existing RealmAssignment Resource
Get an existing RealmAssignment 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?: RealmAssignmentState, opts?: CustomResourceOptions): RealmAssignment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
condition_expression: Optional[str] = None,
is_default: Optional[bool] = None,
name: Optional[str] = None,
priority: Optional[int] = None,
profile_source_id: Optional[str] = None,
realm_id: Optional[str] = None,
status: Optional[str] = None) -> RealmAssignment
func GetRealmAssignment(ctx *Context, name string, id IDInput, state *RealmAssignmentState, opts ...ResourceOption) (*RealmAssignment, error)
public static RealmAssignment Get(string name, Input<string> id, RealmAssignmentState? state, CustomResourceOptions? opts = null)
public static RealmAssignment get(String name, Output<String> id, RealmAssignmentState state, CustomResourceOptions options)
resources: _: type: okta:RealmAssignment get: id: ${id}
- 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.
- Condition
Expression string - Condition expression for the Realm Assignment in Okta Expression Language. Example:
user.profile.role =="Manager"
oruser.profile.state.contains("example")
. - Is
Default bool - Indicates whether the realm assignment is the default.
- Name string
- The name of the Okta Realm Assignment.
- Priority int
- The Priority of the Realm Assignment. The lower the number, the higher the priority.
- Profile
Source stringId - The ID of the Profile Source.
- Realm
Id string - The ID of the Realm asscociated with the Realm Assignment.
- Status string
- Defines whether the Realm Assignment is active or not. Valid values:
ACTIVE
andINACTIVE
.
- Condition
Expression string - Condition expression for the Realm Assignment in Okta Expression Language. Example:
user.profile.role =="Manager"
oruser.profile.state.contains("example")
. - Is
Default bool - Indicates whether the realm assignment is the default.
- Name string
- The name of the Okta Realm Assignment.
- Priority int
- The Priority of the Realm Assignment. The lower the number, the higher the priority.
- Profile
Source stringId - The ID of the Profile Source.
- Realm
Id string - The ID of the Realm asscociated with the Realm Assignment.
- Status string
- Defines whether the Realm Assignment is active or not. Valid values:
ACTIVE
andINACTIVE
.
- condition
Expression String - Condition expression for the Realm Assignment in Okta Expression Language. Example:
user.profile.role =="Manager"
oruser.profile.state.contains("example")
. - is
Default Boolean - Indicates whether the realm assignment is the default.
- name String
- The name of the Okta Realm Assignment.
- priority Integer
- The Priority of the Realm Assignment. The lower the number, the higher the priority.
- profile
Source StringId - The ID of the Profile Source.
- realm
Id String - The ID of the Realm asscociated with the Realm Assignment.
- status String
- Defines whether the Realm Assignment is active or not. Valid values:
ACTIVE
andINACTIVE
.
- condition
Expression string - Condition expression for the Realm Assignment in Okta Expression Language. Example:
user.profile.role =="Manager"
oruser.profile.state.contains("example")
. - is
Default boolean - Indicates whether the realm assignment is the default.
- name string
- The name of the Okta Realm Assignment.
- priority number
- The Priority of the Realm Assignment. The lower the number, the higher the priority.
- profile
Source stringId - The ID of the Profile Source.
- realm
Id string - The ID of the Realm asscociated with the Realm Assignment.
- status string
- Defines whether the Realm Assignment is active or not. Valid values:
ACTIVE
andINACTIVE
.
- condition_
expression str - Condition expression for the Realm Assignment in Okta Expression Language. Example:
user.profile.role =="Manager"
oruser.profile.state.contains("example")
. - is_
default bool - Indicates whether the realm assignment is the default.
- name str
- The name of the Okta Realm Assignment.
- priority int
- The Priority of the Realm Assignment. The lower the number, the higher the priority.
- profile_
source_ strid - The ID of the Profile Source.
- realm_
id str - The ID of the Realm asscociated with the Realm Assignment.
- status str
- Defines whether the Realm Assignment is active or not. Valid values:
ACTIVE
andINACTIVE
.
- condition
Expression String - Condition expression for the Realm Assignment in Okta Expression Language. Example:
user.profile.role =="Manager"
oruser.profile.state.contains("example")
. - is
Default Boolean - Indicates whether the realm assignment is the default.
- name String
- The name of the Okta Realm Assignment.
- priority Number
- The Priority of the Realm Assignment. The lower the number, the higher the priority.
- profile
Source StringId - The ID of the Profile Source.
- realm
Id String - The ID of the Realm asscociated with the Realm Assignment.
- status String
- Defines whether the Realm Assignment is active or not. Valid values:
ACTIVE
andINACTIVE
.
Import
$ pulumi import okta:index/realmAssignment:RealmAssignment example <realm_assignment_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.