okta.auth.ServerClaim
Explore with Pulumi AI
Creates an Authorization Server Claim. This resource allows you to create and configure an Authorization Server Claim.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = new okta.auth.ServerClaim("example", {
    authServerId: "<auth server id>",
    name: "staff",
    value: "String.substringAfter(user.email, \"@\") == \"example.com\"",
    scopes: [exampleOktaAuthServerScope.name],
    claimType: "IDENTITY",
});
import pulumi
import pulumi_okta as okta
example = okta.auth.ServerClaim("example",
    auth_server_id="<auth server id>",
    name="staff",
    value="String.substringAfter(user.email, \"@\") == \"example.com\"",
    scopes=[example_okta_auth_server_scope["name"]],
    claim_type="IDENTITY")
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.NewServerClaim(ctx, "example", &auth.ServerClaimArgs{
			AuthServerId: pulumi.String("<auth server id>"),
			Name:         pulumi.String("staff"),
			Value:        pulumi.String("String.substringAfter(user.email, \"@\") == \"example.com\""),
			Scopes: pulumi.StringArray{
				exampleOktaAuthServerScope.Name,
			},
			ClaimType: pulumi.String("IDENTITY"),
		})
		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.ServerClaim("example", new()
    {
        AuthServerId = "<auth server id>",
        Name = "staff",
        Value = "String.substringAfter(user.email, \"@\") == \"example.com\"",
        Scopes = new[]
        {
            exampleOktaAuthServerScope.Name,
        },
        ClaimType = "IDENTITY",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.auth.ServerClaim;
import com.pulumi.okta.auth.ServerClaimArgs;
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 ServerClaim("example", ServerClaimArgs.builder()
            .authServerId("<auth server id>")
            .name("staff")
            .value("String.substringAfter(user.email, \"@\") == \"example.com\"")
            .scopes(exampleOktaAuthServerScope.name())
            .claimType("IDENTITY")
            .build());
    }
}
resources:
  example:
    type: okta:auth:ServerClaim
    properties:
      authServerId: <auth server id>
      name: staff
      value: String.substringAfter(user.email, "@") == "example.com"
      scopes:
        - ${exampleOktaAuthServerScope.name}
      claimType: IDENTITY
Create ServerClaim Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerClaim(name: string, args: ServerClaimArgs, opts?: CustomResourceOptions);@overload
def ServerClaim(resource_name: str,
                args: ServerClaimArgs,
                opts: Optional[ResourceOptions] = None)
@overload
def ServerClaim(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                auth_server_id: Optional[str] = None,
                claim_type: Optional[str] = None,
                value: Optional[str] = None,
                always_include_in_token: Optional[bool] = None,
                group_filter_type: Optional[str] = None,
                name: Optional[str] = None,
                scopes: Optional[Sequence[str]] = None,
                status: Optional[str] = None,
                value_type: Optional[str] = None)func NewServerClaim(ctx *Context, name string, args ServerClaimArgs, opts ...ResourceOption) (*ServerClaim, error)public ServerClaim(string name, ServerClaimArgs args, CustomResourceOptions? opts = null)
public ServerClaim(String name, ServerClaimArgs args)
public ServerClaim(String name, ServerClaimArgs args, CustomResourceOptions options)
type: okta:auth:ServerClaim
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 ServerClaimArgs
- 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 ServerClaimArgs
- 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 ServerClaimArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerClaimArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerClaimArgs
- 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 serverClaimResource = new Okta.Auth.ServerClaim("serverClaimResource", new()
{
    AuthServerId = "string",
    ClaimType = "string",
    Value = "string",
    AlwaysIncludeInToken = false,
    GroupFilterType = "string",
    Name = "string",
    Scopes = new[]
    {
        "string",
    },
    Status = "string",
    ValueType = "string",
});
example, err := auth.NewServerClaim(ctx, "serverClaimResource", &auth.ServerClaimArgs{
	AuthServerId:         pulumi.String("string"),
	ClaimType:            pulumi.String("string"),
	Value:                pulumi.String("string"),
	AlwaysIncludeInToken: pulumi.Bool(false),
	GroupFilterType:      pulumi.String("string"),
	Name:                 pulumi.String("string"),
	Scopes: pulumi.StringArray{
		pulumi.String("string"),
	},
	Status:    pulumi.String("string"),
	ValueType: pulumi.String("string"),
})
var serverClaimResource = new ServerClaim("serverClaimResource", ServerClaimArgs.builder()
    .authServerId("string")
    .claimType("string")
    .value("string")
    .alwaysIncludeInToken(false)
    .groupFilterType("string")
    .name("string")
    .scopes("string")
    .status("string")
    .valueType("string")
    .build());
server_claim_resource = okta.auth.ServerClaim("serverClaimResource",
    auth_server_id="string",
    claim_type="string",
    value="string",
    always_include_in_token=False,
    group_filter_type="string",
    name="string",
    scopes=["string"],
    status="string",
    value_type="string")
const serverClaimResource = new okta.auth.ServerClaim("serverClaimResource", {
    authServerId: "string",
    claimType: "string",
    value: "string",
    alwaysIncludeInToken: false,
    groupFilterType: "string",
    name: "string",
    scopes: ["string"],
    status: "string",
    valueType: "string",
});
type: okta:auth:ServerClaim
properties:
    alwaysIncludeInToken: false
    authServerId: string
    claimType: string
    groupFilterType: string
    name: string
    scopes:
        - string
    status: string
    value: string
    valueType: string
ServerClaim 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 ServerClaim resource accepts the following input properties:
- AuthServer stringId 
- ID of the authorization server.
- ClaimType string
- Specifies whether the claim is for an access token RESOURCEor ID tokenIDENTITY.
- Value string
- The value of the claim.
- AlwaysInclude boolIn Token 
- Specifies whether to include claims in token, by default it is set to true.
- GroupFilter stringType 
- Specifies the type of group filter if value_typeisGROUPS. Can be set to one of the followingSTARTS_WITH,EQUALS,CONTAINS,REGEX.
- Name string
- The name of the claim.
- Scopes List<string>
- The list of scopes the auth server claim is tied to.
- Status string
- Default to ACTIVE
- ValueType string
- The type of value of the claim. It can be set to EXPRESSIONorGROUPS. It defaults toEXPRESSION.
- AuthServer stringId 
- ID of the authorization server.
- ClaimType string
- Specifies whether the claim is for an access token RESOURCEor ID tokenIDENTITY.
- Value string
- The value of the claim.
- AlwaysInclude boolIn Token 
- Specifies whether to include claims in token, by default it is set to true.
- GroupFilter stringType 
- Specifies the type of group filter if value_typeisGROUPS. Can be set to one of the followingSTARTS_WITH,EQUALS,CONTAINS,REGEX.
- Name string
- The name of the claim.
- Scopes []string
- The list of scopes the auth server claim is tied to.
- Status string
- Default to ACTIVE
- ValueType string
- The type of value of the claim. It can be set to EXPRESSIONorGROUPS. It defaults toEXPRESSION.
- authServer StringId 
- ID of the authorization server.
- claimType String
- Specifies whether the claim is for an access token RESOURCEor ID tokenIDENTITY.
- value String
- The value of the claim.
- alwaysInclude BooleanIn Token 
- Specifies whether to include claims in token, by default it is set to true.
- groupFilter StringType 
- Specifies the type of group filter if value_typeisGROUPS. Can be set to one of the followingSTARTS_WITH,EQUALS,CONTAINS,REGEX.
- name String
- The name of the claim.
- scopes List<String>
- The list of scopes the auth server claim is tied to.
- status String
- Default to ACTIVE
- valueType String
- The type of value of the claim. It can be set to EXPRESSIONorGROUPS. It defaults toEXPRESSION.
- authServer stringId 
- ID of the authorization server.
- claimType string
- Specifies whether the claim is for an access token RESOURCEor ID tokenIDENTITY.
- value string
- The value of the claim.
- alwaysInclude booleanIn Token 
- Specifies whether to include claims in token, by default it is set to true.
- groupFilter stringType 
- Specifies the type of group filter if value_typeisGROUPS. Can be set to one of the followingSTARTS_WITH,EQUALS,CONTAINS,REGEX.
- name string
- The name of the claim.
- scopes string[]
- The list of scopes the auth server claim is tied to.
- status string
- Default to ACTIVE
- valueType string
- The type of value of the claim. It can be set to EXPRESSIONorGROUPS. It defaults toEXPRESSION.
- auth_server_ strid 
- ID of the authorization server.
- claim_type str
- Specifies whether the claim is for an access token RESOURCEor ID tokenIDENTITY.
- value str
- The value of the claim.
- always_include_ boolin_ token 
- Specifies whether to include claims in token, by default it is set to true.
- group_filter_ strtype 
- Specifies the type of group filter if value_typeisGROUPS. Can be set to one of the followingSTARTS_WITH,EQUALS,CONTAINS,REGEX.
- name str
- The name of the claim.
- scopes Sequence[str]
- The list of scopes the auth server claim is tied to.
- status str
- Default to ACTIVE
- value_type str
- The type of value of the claim. It can be set to EXPRESSIONorGROUPS. It defaults toEXPRESSION.
- authServer StringId 
- ID of the authorization server.
- claimType String
- Specifies whether the claim is for an access token RESOURCEor ID tokenIDENTITY.
- value String
- The value of the claim.
- alwaysInclude BooleanIn Token 
- Specifies whether to include claims in token, by default it is set to true.
- groupFilter StringType 
- Specifies the type of group filter if value_typeisGROUPS. Can be set to one of the followingSTARTS_WITH,EQUALS,CONTAINS,REGEX.
- name String
- The name of the claim.
- scopes List<String>
- The list of scopes the auth server claim is tied to.
- status String
- Default to ACTIVE
- valueType String
- The type of value of the claim. It can be set to EXPRESSIONorGROUPS. It defaults toEXPRESSION.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerClaim 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 ServerClaim Resource
Get an existing ServerClaim 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?: ServerClaimState, opts?: CustomResourceOptions): ServerClaim@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        always_include_in_token: Optional[bool] = None,
        auth_server_id: Optional[str] = None,
        claim_type: Optional[str] = None,
        group_filter_type: Optional[str] = None,
        name: Optional[str] = None,
        scopes: Optional[Sequence[str]] = None,
        status: Optional[str] = None,
        value: Optional[str] = None,
        value_type: Optional[str] = None) -> ServerClaimfunc GetServerClaim(ctx *Context, name string, id IDInput, state *ServerClaimState, opts ...ResourceOption) (*ServerClaim, error)public static ServerClaim Get(string name, Input<string> id, ServerClaimState? state, CustomResourceOptions? opts = null)public static ServerClaim get(String name, Output<String> id, ServerClaimState state, CustomResourceOptions options)resources:  _:    type: okta:auth:ServerClaim    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.
- AlwaysInclude boolIn Token 
- Specifies whether to include claims in token, by default it is set to true.
- AuthServer stringId 
- ID of the authorization server.
- ClaimType string
- Specifies whether the claim is for an access token RESOURCEor ID tokenIDENTITY.
- GroupFilter stringType 
- Specifies the type of group filter if value_typeisGROUPS. Can be set to one of the followingSTARTS_WITH,EQUALS,CONTAINS,REGEX.
- Name string
- The name of the claim.
- Scopes List<string>
- The list of scopes the auth server claim is tied to.
- Status string
- Default to ACTIVE
- Value string
- The value of the claim.
- ValueType string
- The type of value of the claim. It can be set to EXPRESSIONorGROUPS. It defaults toEXPRESSION.
- AlwaysInclude boolIn Token 
- Specifies whether to include claims in token, by default it is set to true.
- AuthServer stringId 
- ID of the authorization server.
- ClaimType string
- Specifies whether the claim is for an access token RESOURCEor ID tokenIDENTITY.
- GroupFilter stringType 
- Specifies the type of group filter if value_typeisGROUPS. Can be set to one of the followingSTARTS_WITH,EQUALS,CONTAINS,REGEX.
- Name string
- The name of the claim.
- Scopes []string
- The list of scopes the auth server claim is tied to.
- Status string
- Default to ACTIVE
- Value string
- The value of the claim.
- ValueType string
- The type of value of the claim. It can be set to EXPRESSIONorGROUPS. It defaults toEXPRESSION.
- alwaysInclude BooleanIn Token 
- Specifies whether to include claims in token, by default it is set to true.
- authServer StringId 
- ID of the authorization server.
- claimType String
- Specifies whether the claim is for an access token RESOURCEor ID tokenIDENTITY.
- groupFilter StringType 
- Specifies the type of group filter if value_typeisGROUPS. Can be set to one of the followingSTARTS_WITH,EQUALS,CONTAINS,REGEX.
- name String
- The name of the claim.
- scopes List<String>
- The list of scopes the auth server claim is tied to.
- status String
- Default to ACTIVE
- value String
- The value of the claim.
- valueType String
- The type of value of the claim. It can be set to EXPRESSIONorGROUPS. It defaults toEXPRESSION.
- alwaysInclude booleanIn Token 
- Specifies whether to include claims in token, by default it is set to true.
- authServer stringId 
- ID of the authorization server.
- claimType string
- Specifies whether the claim is for an access token RESOURCEor ID tokenIDENTITY.
- groupFilter stringType 
- Specifies the type of group filter if value_typeisGROUPS. Can be set to one of the followingSTARTS_WITH,EQUALS,CONTAINS,REGEX.
- name string
- The name of the claim.
- scopes string[]
- The list of scopes the auth server claim is tied to.
- status string
- Default to ACTIVE
- value string
- The value of the claim.
- valueType string
- The type of value of the claim. It can be set to EXPRESSIONorGROUPS. It defaults toEXPRESSION.
- always_include_ boolin_ token 
- Specifies whether to include claims in token, by default it is set to true.
- auth_server_ strid 
- ID of the authorization server.
- claim_type str
- Specifies whether the claim is for an access token RESOURCEor ID tokenIDENTITY.
- group_filter_ strtype 
- Specifies the type of group filter if value_typeisGROUPS. Can be set to one of the followingSTARTS_WITH,EQUALS,CONTAINS,REGEX.
- name str
- The name of the claim.
- scopes Sequence[str]
- The list of scopes the auth server claim is tied to.
- status str
- Default to ACTIVE
- value str
- The value of the claim.
- value_type str
- The type of value of the claim. It can be set to EXPRESSIONorGROUPS. It defaults toEXPRESSION.
- alwaysInclude BooleanIn Token 
- Specifies whether to include claims in token, by default it is set to true.
- authServer StringId 
- ID of the authorization server.
- claimType String
- Specifies whether the claim is for an access token RESOURCEor ID tokenIDENTITY.
- groupFilter StringType 
- Specifies the type of group filter if value_typeisGROUPS. Can be set to one of the followingSTARTS_WITH,EQUALS,CONTAINS,REGEX.
- name String
- The name of the claim.
- scopes List<String>
- The list of scopes the auth server claim is tied to.
- status String
- Default to ACTIVE
- value String
- The value of the claim.
- valueType String
- The type of value of the claim. It can be set to EXPRESSIONorGROUPS. It defaults toEXPRESSION.
Import
$ pulumi import okta:auth/serverClaim:ServerClaim example <auth_server_id>/<claim_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 oktaTerraform Provider.