1. Packages
  2. Okta Provider
  3. API Docs
  4. app
  5. OauthRoleAssignment
Okta v4.16.0 published on Wednesday, Apr 9, 2025 by Pulumi

okta.app.OauthRoleAssignment

Explore with Pulumi AI

Manages assignment of an admin role to an OAuth application This resource allows you to assign an Okta admin role to a OAuth service application. This requires the Okta tenant feature flag for this function to be enabled.

Create OauthRoleAssignment Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new OauthRoleAssignment(name: string, args: OauthRoleAssignmentArgs, opts?: CustomResourceOptions);
@overload
def OauthRoleAssignment(resource_name: str,
                        args: OauthRoleAssignmentArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def OauthRoleAssignment(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        client_id: Optional[str] = None,
                        type: Optional[str] = None,
                        resource_set: Optional[str] = None,
                        role: Optional[str] = None)
func NewOauthRoleAssignment(ctx *Context, name string, args OauthRoleAssignmentArgs, opts ...ResourceOption) (*OauthRoleAssignment, error)
public OauthRoleAssignment(string name, OauthRoleAssignmentArgs args, CustomResourceOptions? opts = null)
public OauthRoleAssignment(String name, OauthRoleAssignmentArgs args)
public OauthRoleAssignment(String name, OauthRoleAssignmentArgs args, CustomResourceOptions options)
type: okta:app:OauthRoleAssignment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. OauthRoleAssignmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. OauthRoleAssignmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. OauthRoleAssignmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. OauthRoleAssignmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. OauthRoleAssignmentArgs
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 oauthRoleAssignmentResource = new Okta.App.OauthRoleAssignment("oauthRoleAssignmentResource", new()
{
    ClientId = "string",
    Type = "string",
    ResourceSet = "string",
    Role = "string",
});
Copy
example, err := app.NewOauthRoleAssignment(ctx, "oauthRoleAssignmentResource", &app.OauthRoleAssignmentArgs{
	ClientId:    pulumi.String("string"),
	Type:        pulumi.String("string"),
	ResourceSet: pulumi.String("string"),
	Role:        pulumi.String("string"),
})
Copy
var oauthRoleAssignmentResource = new OauthRoleAssignment("oauthRoleAssignmentResource", OauthRoleAssignmentArgs.builder()
    .clientId("string")
    .type("string")
    .resourceSet("string")
    .role("string")
    .build());
Copy
oauth_role_assignment_resource = okta.app.OauthRoleAssignment("oauthRoleAssignmentResource",
    client_id="string",
    type="string",
    resource_set="string",
    role="string")
Copy
const oauthRoleAssignmentResource = new okta.app.OauthRoleAssignment("oauthRoleAssignmentResource", {
    clientId: "string",
    type: "string",
    resourceSet: "string",
    role: "string",
});
Copy
type: okta:app:OauthRoleAssignment
properties:
    clientId: string
    resourceSet: string
    role: string
    type: string
Copy

OauthRoleAssignment 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 OauthRoleAssignment resource accepts the following input properties:

ClientId This property is required. string
Client ID for the role to be assigned to
Type This property is required. string
Role type to assign. This can be one of the standard Okta roles, such as HELP_DESK_ADMIN, or CUSTOM. Using custom requires the resource_set and role attributes to be set.
ResourceSet string
Resource set for the custom role to assign, must be the ID of the created resource set.
Role string
Custom Role ID
ClientId This property is required. string
Client ID for the role to be assigned to
Type This property is required. string
Role type to assign. This can be one of the standard Okta roles, such as HELP_DESK_ADMIN, or CUSTOM. Using custom requires the resource_set and role attributes to be set.
ResourceSet string
Resource set for the custom role to assign, must be the ID of the created resource set.
Role string
Custom Role ID
clientId This property is required. String
Client ID for the role to be assigned to
type This property is required. String
Role type to assign. This can be one of the standard Okta roles, such as HELP_DESK_ADMIN, or CUSTOM. Using custom requires the resource_set and role attributes to be set.
resourceSet String
Resource set for the custom role to assign, must be the ID of the created resource set.
role String
Custom Role ID
clientId This property is required. string
Client ID for the role to be assigned to
type This property is required. string
Role type to assign. This can be one of the standard Okta roles, such as HELP_DESK_ADMIN, or CUSTOM. Using custom requires the resource_set and role attributes to be set.
resourceSet string
Resource set for the custom role to assign, must be the ID of the created resource set.
role string
Custom Role ID
client_id This property is required. str
Client ID for the role to be assigned to
type This property is required. str
Role type to assign. This can be one of the standard Okta roles, such as HELP_DESK_ADMIN, or CUSTOM. Using custom requires the resource_set and role attributes to be set.
resource_set str
Resource set for the custom role to assign, must be the ID of the created resource set.
role str
Custom Role ID
clientId This property is required. String
Client ID for the role to be assigned to
type This property is required. String
Role type to assign. This can be one of the standard Okta roles, such as HELP_DESK_ADMIN, or CUSTOM. Using custom requires the resource_set and role attributes to be set.
resourceSet String
Resource set for the custom role to assign, must be the ID of the created resource set.
role String
Custom Role ID

Outputs

All input properties are implicitly available as output properties. Additionally, the OauthRoleAssignment resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Label string
Label of the role assignment
Status string
Status of the role assignment
Id string
The provider-assigned unique ID for this managed resource.
Label string
Label of the role assignment
Status string
Status of the role assignment
id String
The provider-assigned unique ID for this managed resource.
label String
Label of the role assignment
status String
Status of the role assignment
id string
The provider-assigned unique ID for this managed resource.
label string
Label of the role assignment
status string
Status of the role assignment
id str
The provider-assigned unique ID for this managed resource.
label str
Label of the role assignment
status str
Status of the role assignment
id String
The provider-assigned unique ID for this managed resource.
label String
Label of the role assignment
status String
Status of the role assignment

Look up Existing OauthRoleAssignment Resource

Get an existing OauthRoleAssignment 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?: OauthRoleAssignmentState, opts?: CustomResourceOptions): OauthRoleAssignment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        client_id: Optional[str] = None,
        label: Optional[str] = None,
        resource_set: Optional[str] = None,
        role: Optional[str] = None,
        status: Optional[str] = None,
        type: Optional[str] = None) -> OauthRoleAssignment
func GetOauthRoleAssignment(ctx *Context, name string, id IDInput, state *OauthRoleAssignmentState, opts ...ResourceOption) (*OauthRoleAssignment, error)
public static OauthRoleAssignment Get(string name, Input<string> id, OauthRoleAssignmentState? state, CustomResourceOptions? opts = null)
public static OauthRoleAssignment get(String name, Output<String> id, OauthRoleAssignmentState state, CustomResourceOptions options)
resources:  _:    type: okta:app:OauthRoleAssignment    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ClientId string
Client ID for the role to be assigned to
Label string
Label of the role assignment
ResourceSet string
Resource set for the custom role to assign, must be the ID of the created resource set.
Role string
Custom Role ID
Status string
Status of the role assignment
Type string
Role type to assign. This can be one of the standard Okta roles, such as HELP_DESK_ADMIN, or CUSTOM. Using custom requires the resource_set and role attributes to be set.
ClientId string
Client ID for the role to be assigned to
Label string
Label of the role assignment
ResourceSet string
Resource set for the custom role to assign, must be the ID of the created resource set.
Role string
Custom Role ID
Status string
Status of the role assignment
Type string
Role type to assign. This can be one of the standard Okta roles, such as HELP_DESK_ADMIN, or CUSTOM. Using custom requires the resource_set and role attributes to be set.
clientId String
Client ID for the role to be assigned to
label String
Label of the role assignment
resourceSet String
Resource set for the custom role to assign, must be the ID of the created resource set.
role String
Custom Role ID
status String
Status of the role assignment
type String
Role type to assign. This can be one of the standard Okta roles, such as HELP_DESK_ADMIN, or CUSTOM. Using custom requires the resource_set and role attributes to be set.
clientId string
Client ID for the role to be assigned to
label string
Label of the role assignment
resourceSet string
Resource set for the custom role to assign, must be the ID of the created resource set.
role string
Custom Role ID
status string
Status of the role assignment
type string
Role type to assign. This can be one of the standard Okta roles, such as HELP_DESK_ADMIN, or CUSTOM. Using custom requires the resource_set and role attributes to be set.
client_id str
Client ID for the role to be assigned to
label str
Label of the role assignment
resource_set str
Resource set for the custom role to assign, must be the ID of the created resource set.
role str
Custom Role ID
status str
Status of the role assignment
type str
Role type to assign. This can be one of the standard Okta roles, such as HELP_DESK_ADMIN, or CUSTOM. Using custom requires the resource_set and role attributes to be set.
clientId String
Client ID for the role to be assigned to
label String
Label of the role assignment
resourceSet String
Resource set for the custom role to assign, must be the ID of the created resource set.
role String
Custom Role ID
status String
Status of the role assignment
type String
Role type to assign. This can be one of the standard Okta roles, such as HELP_DESK_ADMIN, or CUSTOM. Using custom requires the resource_set and role attributes to be set.

Import

$ pulumi import okta:app/oauthRoleAssignment:OauthRoleAssignment test <clientID>/<roleAssignmentID>
Copy

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.