Okta

v3.16.0 published on Wednesday, Sep 28, 2022 by Pulumi

AdminRoleTargets

Manages targets for administrator roles.

This resource allows you to define permissions for admin roles into a smaller subset of Groups or Apps within your org. You can define admin roles to target Groups, Applications, and Application Instances.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Okta = Pulumi.Okta;

return await Deployment.RunAsync(() => 
{
    var example = new Okta.AdminRoleTargets("example", new()
    {
        Apps = new[]
        {
            "oidc_client.<app_id>",
            "facebook",
        },
        RoleType = "APP_ADMIN",
        UserId = "<user_id>",
    });

});
package main

import (
	"github.com/pulumi/pulumi-okta/sdk/v3/go/okta"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := okta.NewAdminRoleTargets(ctx, "example", &okta.AdminRoleTargetsArgs{
			Apps: pulumi.StringArray{
				pulumi.String("oidc_client.<app_id>"),
				pulumi.String("facebook"),
			},
			RoleType: pulumi.String("APP_ADMIN"),
			UserId:   pulumi.String("<user_id>"),
		})
		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.AdminRoleTargets;
import com.pulumi.okta.AdminRoleTargetsArgs;
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 AdminRoleTargets("example", AdminRoleTargetsArgs.builder()        
            .apps(            
                "oidc_client.<app_id>",
                "facebook")
            .roleType("APP_ADMIN")
            .userId("<user_id>")
            .build());

    }
}
import pulumi
import pulumi_okta as okta

example = okta.AdminRoleTargets("example",
    apps=[
        "oidc_client.<app_id>",
        "facebook",
    ],
    role_type="APP_ADMIN",
    user_id="<user_id>")
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";

const example = new okta.AdminRoleTargets("example", {
    apps: [
        "oidc_client.<app_id>",
        "facebook",
    ],
    roleType: "APP_ADMIN",
    userId: "<user_id>",
});
resources:
  example:
    type: okta:AdminRoleTargets
    properties:
      apps:
        - oidc_client.<app_id>
        - facebook
      roleType: APP_ADMIN
      userId: <user_id>

Create a AdminRoleTargets Resource

new AdminRoleTargets(name: string, args: AdminRoleTargetsArgs, opts?: CustomResourceOptions);
@overload
def AdminRoleTargets(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     apps: Optional[Sequence[str]] = None,
                     groups: Optional[Sequence[str]] = None,
                     role_type: Optional[str] = None,
                     user_id: Optional[str] = None)
@overload
def AdminRoleTargets(resource_name: str,
                     args: AdminRoleTargetsArgs,
                     opts: Optional[ResourceOptions] = None)
func NewAdminRoleTargets(ctx *Context, name string, args AdminRoleTargetsArgs, opts ...ResourceOption) (*AdminRoleTargets, error)
public AdminRoleTargets(string name, AdminRoleTargetsArgs args, CustomResourceOptions? opts = null)
public AdminRoleTargets(String name, AdminRoleTargetsArgs args)
public AdminRoleTargets(String name, AdminRoleTargetsArgs args, CustomResourceOptions options)
type: okta:AdminRoleTargets
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AdminRoleTargetsArgs
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 AdminRoleTargetsArgs
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 AdminRoleTargetsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AdminRoleTargetsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AdminRoleTargetsArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

RoleType string

Name of the role associated with the user.

UserId string

ID of the user.

Apps List<string>

List of app names (name represents set of app instances) or a combination of app name and app instance ID (like 'salesforce' or 'facebook.0oapsqQ6dv19pqyEo0g3').

Groups List<string>

List of group IDs. Conflicts with apps.

RoleType string

Name of the role associated with the user.

UserId string

ID of the user.

Apps []string

List of app names (name represents set of app instances) or a combination of app name and app instance ID (like 'salesforce' or 'facebook.0oapsqQ6dv19pqyEo0g3').

Groups []string

List of group IDs. Conflicts with apps.

roleType String

Name of the role associated with the user.

userId String

ID of the user.

apps List<String>

List of app names (name represents set of app instances) or a combination of app name and app instance ID (like 'salesforce' or 'facebook.0oapsqQ6dv19pqyEo0g3').

groups List<String>

List of group IDs. Conflicts with apps.

roleType string

Name of the role associated with the user.

userId string

ID of the user.

apps string[]

List of app names (name represents set of app instances) or a combination of app name and app instance ID (like 'salesforce' or 'facebook.0oapsqQ6dv19pqyEo0g3').

groups string[]

List of group IDs. Conflicts with apps.

role_type str

Name of the role associated with the user.

user_id str

ID of the user.

apps Sequence[str]

List of app names (name represents set of app instances) or a combination of app name and app instance ID (like 'salesforce' or 'facebook.0oapsqQ6dv19pqyEo0g3').

groups Sequence[str]

List of group IDs. Conflicts with apps.

roleType String

Name of the role associated with the user.

userId String

ID of the user.

apps List<String>

List of app names (name represents set of app instances) or a combination of app name and app instance ID (like 'salesforce' or 'facebook.0oapsqQ6dv19pqyEo0g3').

groups List<String>

List of group IDs. Conflicts with apps.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

RoleId string

Role ID.

Id string

The provider-assigned unique ID for this managed resource.

RoleId string

Role ID.

id String

The provider-assigned unique ID for this managed resource.

roleId String

Role ID.

id string

The provider-assigned unique ID for this managed resource.

roleId string

Role ID.

id str

The provider-assigned unique ID for this managed resource.

role_id str

Role ID.

id String

The provider-assigned unique ID for this managed resource.

roleId String

Role ID.

Look up an Existing AdminRoleTargets Resource

Get an existing AdminRoleTargets 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?: AdminRoleTargetsState, opts?: CustomResourceOptions): AdminRoleTargets
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        apps: Optional[Sequence[str]] = None,
        groups: Optional[Sequence[str]] = None,
        role_id: Optional[str] = None,
        role_type: Optional[str] = None,
        user_id: Optional[str] = None) -> AdminRoleTargets
func GetAdminRoleTargets(ctx *Context, name string, id IDInput, state *AdminRoleTargetsState, opts ...ResourceOption) (*AdminRoleTargets, error)
public static AdminRoleTargets Get(string name, Input<string> id, AdminRoleTargetsState? state, CustomResourceOptions? opts = null)
public static AdminRoleTargets get(String name, Output<String> id, AdminRoleTargetsState 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.
The following state arguments are supported:
Apps List<string>

List of app names (name represents set of app instances) or a combination of app name and app instance ID (like 'salesforce' or 'facebook.0oapsqQ6dv19pqyEo0g3').

Groups List<string>

List of group IDs. Conflicts with apps.

RoleId string

Role ID.

RoleType string

Name of the role associated with the user.

UserId string

ID of the user.

Apps []string

List of app names (name represents set of app instances) or a combination of app name and app instance ID (like 'salesforce' or 'facebook.0oapsqQ6dv19pqyEo0g3').

Groups []string

List of group IDs. Conflicts with apps.

RoleId string

Role ID.

RoleType string

Name of the role associated with the user.

UserId string

ID of the user.

apps List<String>

List of app names (name represents set of app instances) or a combination of app name and app instance ID (like 'salesforce' or 'facebook.0oapsqQ6dv19pqyEo0g3').

groups List<String>

List of group IDs. Conflicts with apps.

roleId String

Role ID.

roleType String

Name of the role associated with the user.

userId String

ID of the user.

apps string[]

List of app names (name represents set of app instances) or a combination of app name and app instance ID (like 'salesforce' or 'facebook.0oapsqQ6dv19pqyEo0g3').

groups string[]

List of group IDs. Conflicts with apps.

roleId string

Role ID.

roleType string

Name of the role associated with the user.

userId string

ID of the user.

apps Sequence[str]

List of app names (name represents set of app instances) or a combination of app name and app instance ID (like 'salesforce' or 'facebook.0oapsqQ6dv19pqyEo0g3').

groups Sequence[str]

List of group IDs. Conflicts with apps.

role_id str

Role ID.

role_type str

Name of the role associated with the user.

user_id str

ID of the user.

apps List<String>

List of app names (name represents set of app instances) or a combination of app name and app instance ID (like 'salesforce' or 'facebook.0oapsqQ6dv19pqyEo0g3').

groups List<String>

List of group IDs. Conflicts with apps.

roleId String

Role ID.

roleType String

Name of the role associated with the user.

userId String

ID of the user.

Import

Okta Admin Role Targets can be imported via the Okta ID.

 $ pulumi import okta:index/adminRoleTargets:AdminRoleTargets example &#60;user id&#62;/&#60;role type&#62;

Package Details

Repository
https://github.com/pulumi/pulumi-okta
License
Apache-2.0
Notes

This Pulumi package is based on the okta Terraform Provider.