okta.app.GroupAssignment
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = new okta.app.GroupAssignment("example", {
appId: "<app id>",
groupId: "<group id>",
profile: `{
"<app_profile_field>": "<value>"
}
`,
});
import pulumi
import pulumi_okta as okta
example = okta.app.GroupAssignment("example",
app_id="<app id>",
group_id="<group id>",
profile="""{
"<app_profile_field>": "<value>"
}
""")
package main
import (
"github.com/pulumi/pulumi-okta/sdk/v4/go/okta/app"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := app.NewGroupAssignment(ctx, "example", &app.GroupAssignmentArgs{
AppId: pulumi.String("<app id>"),
GroupId: pulumi.String("<group id>"),
Profile: pulumi.String("{\n \"<app_profile_field>\": \"<value>\"\n}\n"),
})
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.App.GroupAssignment("example", new()
{
AppId = "<app id>",
GroupId = "<group id>",
Profile = @"{
""<app_profile_field>"": ""<value>""
}
",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.app.GroupAssignment;
import com.pulumi.okta.app.GroupAssignmentArgs;
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 GroupAssignment("example", GroupAssignmentArgs.builder()
.appId("<app id>")
.groupId("<group id>")
.profile("""
{
"<app_profile_field>": "<value>"
}
""")
.build());
}
}
resources:
example:
type: okta:app:GroupAssignment
properties:
appId: <app id>
groupId: <group id>
profile: |
{
"<app_profile_field>": "<value>"
}
Create GroupAssignment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GroupAssignment(name: string, args: GroupAssignmentArgs, opts?: CustomResourceOptions);
@overload
def GroupAssignment(resource_name: str,
args: GroupAssignmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GroupAssignment(resource_name: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
group_id: Optional[str] = None,
priority: Optional[int] = None,
profile: Optional[str] = None,
retain_assignment: Optional[bool] = None)
func NewGroupAssignment(ctx *Context, name string, args GroupAssignmentArgs, opts ...ResourceOption) (*GroupAssignment, error)
public GroupAssignment(string name, GroupAssignmentArgs args, CustomResourceOptions? opts = null)
public GroupAssignment(String name, GroupAssignmentArgs args)
public GroupAssignment(String name, GroupAssignmentArgs args, CustomResourceOptions options)
type: okta:app:GroupAssignment
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 GroupAssignmentArgs
- 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 GroupAssignmentArgs
- 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 GroupAssignmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GroupAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GroupAssignmentArgs
- 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 groupAssignmentResource = new Okta.App.GroupAssignment("groupAssignmentResource", new()
{
AppId = "string",
GroupId = "string",
Priority = 0,
Profile = "string",
RetainAssignment = false,
});
example, err := app.NewGroupAssignment(ctx, "groupAssignmentResource", &app.GroupAssignmentArgs{
AppId: pulumi.String("string"),
GroupId: pulumi.String("string"),
Priority: pulumi.Int(0),
Profile: pulumi.String("string"),
RetainAssignment: pulumi.Bool(false),
})
var groupAssignmentResource = new GroupAssignment("groupAssignmentResource", GroupAssignmentArgs.builder()
.appId("string")
.groupId("string")
.priority(0)
.profile("string")
.retainAssignment(false)
.build());
group_assignment_resource = okta.app.GroupAssignment("groupAssignmentResource",
app_id="string",
group_id="string",
priority=0,
profile="string",
retain_assignment=False)
const groupAssignmentResource = new okta.app.GroupAssignment("groupAssignmentResource", {
appId: "string",
groupId: "string",
priority: 0,
profile: "string",
retainAssignment: false,
});
type: okta:app:GroupAssignment
properties:
appId: string
groupId: string
priority: 0
profile: string
retainAssignment: false
GroupAssignment 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 GroupAssignment resource accepts the following input properties:
- App
Id string - App to associate group with
- Group
Id string - Group associated with the application
- Priority int
- Priority of group assignment.
- Profile string
- JSON document containing application profile
- Retain
Assignment bool - Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
- App
Id string - App to associate group with
- Group
Id string - Group associated with the application
- Priority int
- Priority of group assignment.
- Profile string
- JSON document containing application profile
- Retain
Assignment bool - Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
- app
Id String - App to associate group with
- group
Id String - Group associated with the application
- priority Integer
- Priority of group assignment.
- profile String
- JSON document containing application profile
- retain
Assignment Boolean - Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
- app
Id string - App to associate group with
- group
Id string - Group associated with the application
- priority number
- Priority of group assignment.
- profile string
- JSON document containing application profile
- retain
Assignment boolean - Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
- app_
id str - App to associate group with
- group_
id str - Group associated with the application
- priority int
- Priority of group assignment.
- profile str
- JSON document containing application profile
- retain_
assignment bool - Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
- app
Id String - App to associate group with
- group
Id String - Group associated with the application
- priority Number
- Priority of group assignment.
- profile String
- JSON document containing application profile
- retain
Assignment Boolean - Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
Outputs
All input properties are implicitly available as output properties. Additionally, the GroupAssignment resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing GroupAssignment Resource
Get an existing GroupAssignment 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?: GroupAssignmentState, opts?: CustomResourceOptions): GroupAssignment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
group_id: Optional[str] = None,
priority: Optional[int] = None,
profile: Optional[str] = None,
retain_assignment: Optional[bool] = None) -> GroupAssignment
func GetGroupAssignment(ctx *Context, name string, id IDInput, state *GroupAssignmentState, opts ...ResourceOption) (*GroupAssignment, error)
public static GroupAssignment Get(string name, Input<string> id, GroupAssignmentState? state, CustomResourceOptions? opts = null)
public static GroupAssignment get(String name, Output<String> id, GroupAssignmentState 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.
- App
Id string - App to associate group with
- Group
Id string - Group associated with the application
- Priority int
- Priority of group assignment.
- Profile string
- JSON document containing application profile
- Retain
Assignment bool - Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
- App
Id string - App to associate group with
- Group
Id string - Group associated with the application
- Priority int
- Priority of group assignment.
- Profile string
- JSON document containing application profile
- Retain
Assignment bool - Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
- app
Id String - App to associate group with
- group
Id String - Group associated with the application
- priority Integer
- Priority of group assignment.
- profile String
- JSON document containing application profile
- retain
Assignment Boolean - Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
- app
Id string - App to associate group with
- group
Id string - Group associated with the application
- priority number
- Priority of group assignment.
- profile string
- JSON document containing application profile
- retain
Assignment boolean - Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
- app_
id str - App to associate group with
- group_
id str - Group associated with the application
- priority int
- Priority of group assignment.
- profile str
- JSON document containing application profile
- retain_
assignment bool - Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
- app
Id String - App to associate group with
- group
Id String - Group associated with the application
- priority Number
- Priority of group assignment.
- profile String
- JSON document containing application profile
- retain
Assignment Boolean - Retain the group assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
Import
$ pulumi import okta:app/groupAssignment:GroupAssignment example <app_id>/<group_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.