okta.PolicyProfileEnrollmentApps
Explore with Pulumi AI
Manages Profile Enrollment Policy Apps
WARNING: This feature is only available as a part of the Identity Engine. Contact support for further information. This resource allows you to manage the apps in the Profile Enrollment Policy. Important Notes:
- Default Enrollment Policy can not be used in this resource since it is used as a policy to re-assign apps to when they are unassigned from this one.
- When re-assigning the app to another policy, please use ‘depends_on’ in the policy to which the app will be assigned. This is necessary to avoid unexpected behavior, since if the app is unassigned from the policy it is just assigned to the ‘Default’ one.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = okta.policy.getPolicy({
name: "My Policy",
type: "PROFILE_ENROLLMENT",
});
const test = okta.app.getApp({
label: "My App",
});
const examplePolicyProfileEnrollmentApps = new okta.PolicyProfileEnrollmentApps("example", {
policyId: exampleOktaPolicy.id,
apps: [id],
});
import pulumi
import pulumi_okta as okta
example = okta.policy.get_policy(name="My Policy",
type="PROFILE_ENROLLMENT")
test = okta.app.get_app(label="My App")
example_policy_profile_enrollment_apps = okta.PolicyProfileEnrollmentApps("example",
policy_id=example_okta_policy["id"],
apps=[id])
package main
import (
"github.com/pulumi/pulumi-okta/sdk/v4/go/okta"
"github.com/pulumi/pulumi-okta/sdk/v4/go/okta/app"
"github.com/pulumi/pulumi-okta/sdk/v4/go/okta/policy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := policy.GetPolicy(ctx, &policy.GetPolicyArgs{
Name: "My Policy",
Type: "PROFILE_ENROLLMENT",
}, nil)
if err != nil {
return err
}
_, err = app.GetApp(ctx, &app.GetAppArgs{
Label: pulumi.StringRef("My App"),
}, nil)
if err != nil {
return err
}
_, err = okta.NewPolicyProfileEnrollmentApps(ctx, "example", &okta.PolicyProfileEnrollmentAppsArgs{
PolicyId: pulumi.Any(exampleOktaPolicy.Id),
Apps: pulumi.StringArray{
id,
},
})
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 = Okta.Policy.GetPolicy.Invoke(new()
{
Name = "My Policy",
Type = "PROFILE_ENROLLMENT",
});
var test = Okta.App.GetApp.Invoke(new()
{
Label = "My App",
});
var examplePolicyProfileEnrollmentApps = new Okta.PolicyProfileEnrollmentApps("example", new()
{
PolicyId = exampleOktaPolicy.Id,
Apps = new[]
{
id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.policy.PolicyFunctions;
import com.pulumi.okta.policy.inputs.GetPolicyArgs;
import com.pulumi.okta.app.AppFunctions;
import com.pulumi.okta.app.inputs.GetAppArgs;
import com.pulumi.okta.PolicyProfileEnrollmentApps;
import com.pulumi.okta.PolicyProfileEnrollmentAppsArgs;
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) {
final var example = PolicyFunctions.getPolicy(GetPolicyArgs.builder()
.name("My Policy")
.type("PROFILE_ENROLLMENT")
.build());
final var test = AppFunctions.getApp(GetAppArgs.builder()
.label("My App")
.build());
var examplePolicyProfileEnrollmentApps = new PolicyProfileEnrollmentApps("examplePolicyProfileEnrollmentApps", PolicyProfileEnrollmentAppsArgs.builder()
.policyId(exampleOktaPolicy.id())
.apps(id)
.build());
}
}
resources:
examplePolicyProfileEnrollmentApps:
type: okta:PolicyProfileEnrollmentApps
name: example
properties:
policyId: ${exampleOktaPolicy.id}
apps:
- ${id}
variables:
example:
fn::invoke:
Function: okta:policy:getPolicy
Arguments:
name: My Policy
type: PROFILE_ENROLLMENT
test:
fn::invoke:
Function: okta:app:getApp
Arguments:
label: My App
Create PolicyProfileEnrollmentApps Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PolicyProfileEnrollmentApps(name: string, args: PolicyProfileEnrollmentAppsArgs, opts?: CustomResourceOptions);
@overload
def PolicyProfileEnrollmentApps(resource_name: str,
args: PolicyProfileEnrollmentAppsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PolicyProfileEnrollmentApps(resource_name: str,
opts: Optional[ResourceOptions] = None,
policy_id: Optional[str] = None,
apps: Optional[Sequence[str]] = None)
func NewPolicyProfileEnrollmentApps(ctx *Context, name string, args PolicyProfileEnrollmentAppsArgs, opts ...ResourceOption) (*PolicyProfileEnrollmentApps, error)
public PolicyProfileEnrollmentApps(string name, PolicyProfileEnrollmentAppsArgs args, CustomResourceOptions? opts = null)
public PolicyProfileEnrollmentApps(String name, PolicyProfileEnrollmentAppsArgs args)
public PolicyProfileEnrollmentApps(String name, PolicyProfileEnrollmentAppsArgs args, CustomResourceOptions options)
type: okta:PolicyProfileEnrollmentApps
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 PolicyProfileEnrollmentAppsArgs
- 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 PolicyProfileEnrollmentAppsArgs
- 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 PolicyProfileEnrollmentAppsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicyProfileEnrollmentAppsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PolicyProfileEnrollmentAppsArgs
- 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 policyProfileEnrollmentAppsResource = new Okta.PolicyProfileEnrollmentApps("policyProfileEnrollmentAppsResource", new()
{
PolicyId = "string",
Apps = new[]
{
"string",
},
});
example, err := okta.NewPolicyProfileEnrollmentApps(ctx, "policyProfileEnrollmentAppsResource", &okta.PolicyProfileEnrollmentAppsArgs{
PolicyId: pulumi.String("string"),
Apps: pulumi.StringArray{
pulumi.String("string"),
},
})
var policyProfileEnrollmentAppsResource = new PolicyProfileEnrollmentApps("policyProfileEnrollmentAppsResource", PolicyProfileEnrollmentAppsArgs.builder()
.policyId("string")
.apps("string")
.build());
policy_profile_enrollment_apps_resource = okta.PolicyProfileEnrollmentApps("policyProfileEnrollmentAppsResource",
policy_id="string",
apps=["string"])
const policyProfileEnrollmentAppsResource = new okta.PolicyProfileEnrollmentApps("policyProfileEnrollmentAppsResource", {
policyId: "string",
apps: ["string"],
});
type: okta:PolicyProfileEnrollmentApps
properties:
apps:
- string
policyId: string
PolicyProfileEnrollmentApps 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 PolicyProfileEnrollmentApps resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the PolicyProfileEnrollmentApps resource produces the following output properties:
- Default
Policy stringId - ID of the Default Enrollment Policy. This policy is used as a policy to re-assign apps to when they are unassigned from this one
- Id string
- The provider-assigned unique ID for this managed resource.
- Default
Policy stringId - ID of the Default Enrollment Policy. This policy is used as a policy to re-assign apps to when they are unassigned from this one
- Id string
- The provider-assigned unique ID for this managed resource.
- default
Policy StringId - ID of the Default Enrollment Policy. This policy is used as a policy to re-assign apps to when they are unassigned from this one
- id String
- The provider-assigned unique ID for this managed resource.
- default
Policy stringId - ID of the Default Enrollment Policy. This policy is used as a policy to re-assign apps to when they are unassigned from this one
- id string
- The provider-assigned unique ID for this managed resource.
- default_
policy_ strid - ID of the Default Enrollment Policy. This policy is used as a policy to re-assign apps to when they are unassigned from this one
- id str
- The provider-assigned unique ID for this managed resource.
- default
Policy StringId - ID of the Default Enrollment Policy. This policy is used as a policy to re-assign apps to when they are unassigned from this one
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing PolicyProfileEnrollmentApps Resource
Get an existing PolicyProfileEnrollmentApps 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?: PolicyProfileEnrollmentAppsState, opts?: CustomResourceOptions): PolicyProfileEnrollmentApps
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
apps: Optional[Sequence[str]] = None,
default_policy_id: Optional[str] = None,
policy_id: Optional[str] = None) -> PolicyProfileEnrollmentApps
func GetPolicyProfileEnrollmentApps(ctx *Context, name string, id IDInput, state *PolicyProfileEnrollmentAppsState, opts ...ResourceOption) (*PolicyProfileEnrollmentApps, error)
public static PolicyProfileEnrollmentApps Get(string name, Input<string> id, PolicyProfileEnrollmentAppsState? state, CustomResourceOptions? opts = null)
public static PolicyProfileEnrollmentApps get(String name, Output<String> id, PolicyProfileEnrollmentAppsState 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 IDs to be added to this policy
- Default
Policy stringId - ID of the Default Enrollment Policy. This policy is used as a policy to re-assign apps to when they are unassigned from this one
- Policy
Id string - ID of the enrollment policy.
- Apps []string
- List of app IDs to be added to this policy
- Default
Policy stringId - ID of the Default Enrollment Policy. This policy is used as a policy to re-assign apps to when they are unassigned from this one
- Policy
Id string - ID of the enrollment policy.
- apps List<String>
- List of app IDs to be added to this policy
- default
Policy StringId - ID of the Default Enrollment Policy. This policy is used as a policy to re-assign apps to when they are unassigned from this one
- policy
Id String - ID of the enrollment policy.
- apps string[]
- List of app IDs to be added to this policy
- default
Policy stringId - ID of the Default Enrollment Policy. This policy is used as a policy to re-assign apps to when they are unassigned from this one
- policy
Id string - ID of the enrollment policy.
- apps Sequence[str]
- List of app IDs to be added to this policy
- default_
policy_ strid - ID of the Default Enrollment Policy. This policy is used as a policy to re-assign apps to when they are unassigned from this one
- policy_
id str - ID of the enrollment policy.
- apps List<String>
- List of app IDs to be added to this policy
- default
Policy StringId - ID of the Default Enrollment Policy. This policy is used as a policy to re-assign apps to when they are unassigned from this one
- policy
Id String - ID of the enrollment policy.
Import
$ pulumi import okta:index/policyProfileEnrollmentApps:PolicyProfileEnrollmentApps example <policy 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
okta
Terraform Provider.