1. Packages
  2. Okta Provider
  3. API Docs
  4. AdminRoleTargets
Okta v4.11.3 published on Monday, Oct 21, 2024 by Pulumi

okta.AdminRoleTargets

Explore with Pulumi AI

okta logo
Okta v4.11.3 published on Monday, Oct 21, 2024 by Pulumi

    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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The AdminRoleTargets resource accepts the following input properties:

    RoleType string
    Type of the role that is assigned to the user and supports optional targets. See API Docs
    UserId 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
    RoleType string
    Type of the role that is assigned to the user and supports optional targets. See API Docs
    UserId 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
    roleType String
    Type of the role that is assigned to the user and supports optional targets. See API Docs
    userId 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
    roleType string
    Type of the role that is assigned to the user and supports optional targets. See API Docs
    userId 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
    roleType String
    Type of the role that is assigned to the user and supports optional targets. See API Docs
    userId 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:

    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId string
    ID of a role
    Id string
    The provider-assigned unique ID for this managed resource.
    RoleId string
    ID of a role
    id String
    The provider-assigned unique ID for this managed resource.
    roleId String
    ID of a role
    id string
    The provider-assigned unique ID for this managed resource.
    roleId string
    ID of a role
    id str
    The provider-assigned unique ID for this managed resource.
    role_id str
    ID of a role
    id String
    The provider-assigned unique ID for this managed resource.
    roleId String
    ID of a role

    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.
    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
    ID of a role
    RoleType string
    Type of the role that is assigned to the user and supports optional targets. See API Docs
    UserId 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
    RoleId string
    ID of a role
    RoleType string
    Type of the role that is assigned to the user and supports optional targets. See API Docs
    UserId 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
    roleId String
    ID of a role
    roleType String
    Type of the role that is assigned to the user and supports optional targets. See API Docs
    userId 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
    roleId string
    ID of a role
    roleType string
    Type of the role that is assigned to the user and supports optional targets. See API Docs
    userId 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
    roleId String
    ID of a role
    roleType String
    Type of the role that is assigned to the user and supports optional targets. See API Docs
    userId 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.
    okta logo
    Okta v4.11.3 published on Monday, Oct 21, 2024 by Pulumi