okta.AdminRoleTargets
Explore with Pulumi AI
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.
Note 1: you have to assign a role to a user before creating this resource.
Note 2: You can target a mixture of both App and App Instance targets, but can't assign permissions to manage all
instances of an App and then a subset of that same App. For example, you can't specify that an admin has access
to manage all instances of a Salesforce app and then also specific configurations of the Salesforce app.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = new okta.AdminRoleTargets("example", {
userId: "<user_id>",
roleType: "APP_ADMIN",
apps: [
"oidc_client.<app_id>",
"facebook",
],
});
import pulumi
import pulumi_okta as okta
example = okta.AdminRoleTargets("example",
user_id="<user_id>",
role_type="APP_ADMIN",
apps=[
"oidc_client.<app_id>",
"facebook",
])
package main
import (
"github.com/pulumi/pulumi-okta/sdk/v4/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{
UserId: pulumi.String("<user_id>"),
RoleType: pulumi.String("APP_ADMIN"),
Apps: pulumi.StringArray{
pulumi.String("oidc_client.<app_id>"),
pulumi.String("facebook"),
},
})
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.AdminRoleTargets("example", new()
{
UserId = "<user_id>",
RoleType = "APP_ADMIN",
Apps = new[]
{
"oidc_client.<app_id>",
"facebook",
},
});
});
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()
.userId("<user_id>")
.roleType("APP_ADMIN")
.apps(
"oidc_client.<app_id>",
"facebook")
.build());
}
}
resources:
example:
type: okta:AdminRoleTargets
properties:
userId: <user_id>
roleType: APP_ADMIN
apps:
- oidc_client.<app_id>
- facebook
Create AdminRoleTargets Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AdminRoleTargets(name: string, args: AdminRoleTargetsArgs, opts?: CustomResourceOptions);
@overload
def AdminRoleTargets(resource_name: str,
args: AdminRoleTargetsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AdminRoleTargets(resource_name: str,
opts: Optional[ResourceOptions] = None,
role_type: Optional[str] = None,
user_id: Optional[str] = None,
apps: Optional[Sequence[str]] = None,
groups: Optional[Sequence[str]] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var adminRoleTargetsResource = new Okta.AdminRoleTargets("adminRoleTargetsResource", new()
{
RoleType = "string",
UserId = "string",
Apps = new[]
{
"string",
},
Groups = new[]
{
"string",
},
});
example, err := okta.NewAdminRoleTargets(ctx, "adminRoleTargetsResource", &okta.AdminRoleTargetsArgs{
RoleType: pulumi.String("string"),
UserId: pulumi.String("string"),
Apps: pulumi.StringArray{
pulumi.String("string"),
},
Groups: pulumi.StringArray{
pulumi.String("string"),
},
})
var adminRoleTargetsResource = new AdminRoleTargets("adminRoleTargetsResource", AdminRoleTargetsArgs.builder()
.roleType("string")
.userId("string")
.apps("string")
.groups("string")
.build());
admin_role_targets_resource = okta.AdminRoleTargets("adminRoleTargetsResource",
role_type="string",
user_id="string",
apps=["string"],
groups=["string"])
const adminRoleTargetsResource = new okta.AdminRoleTargets("adminRoleTargetsResource", {
roleType: "string",
userId: "string",
apps: ["string"],
groups: ["string"],
});
type: okta:AdminRoleTargets
properties:
apps:
- string
groups:
- string
roleType: string
userId: string
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:
- Role
Type string - Type of the role that is assigned to the user and supports optional targets. See API Docs
- User
Id string - User associated with the role
- 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
- Role
Type string - Type of the role that is assigned to the user and supports optional targets. See API Docs
- User
Id string - User associated with the role
- 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 String - Type of the role that is assigned to the user and supports optional targets. See API Docs
- user
Id String - User associated with the role
- 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
- role
Type string - Type of the role that is assigned to the user and supports optional targets. See API Docs
- user
Id string - User associated with the role
- 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 - Type of the role that is assigned to the user and supports optional targets. See API Docs
- user_
id str - User associated with the role
- 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
Type String - Type of the role that is assigned to the user and supports optional targets. See API Docs
- user
Id String - User associated with the role
- 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:
Look up 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.
- 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
- Role
Id string - ID of a role
- Role
Type string - Type of the role that is assigned to the user and supports optional targets. See API Docs
- User
Id string - User associated with the role
- 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
Id string - ID of a role
- Role
Type string - Type of the role that is assigned to the user and supports optional targets. See API Docs
- User
Id string - User associated with the role
- 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
- role
Id String - ID of a role
- role
Type String - Type of the role that is assigned to the user and supports optional targets. See API Docs
- user
Id String - User associated with the role
- 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
Id string - ID of a role
- role
Type string - Type of the role that is assigned to the user and supports optional targets. See API Docs
- user
Id string - User associated with the role
- 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 - ID of a role
- role_
type str - Type of the role that is assigned to the user and supports optional targets. See API Docs
- user_
id str - User associated with the role
- 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
- role
Id String - ID of a role
- role
Type String - Type of the role that is assigned to the user and supports optional targets. See API Docs
- user
Id String - User associated with the role
Import
$ pulumi import okta:index/adminRoleTargets:AdminRoleTargets example <user_id>/<role_type>
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.