Okta v4.0.0, Jun 1 23
Okta v4.0.0, Jun 1 23
okta.AppGroupAssignments
Explore with Pulumi AI
Assigns groups to an application.
This resource allows you to create multiple App Group assignments.
Example Usage
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Okta = Pulumi.Okta;
return await Deployment.RunAsync(() =>
{
var example = new Okta.AppGroupAssignments("example", new()
{
AppId = "<app id>",
Groups = new[]
{
new Okta.Inputs.AppGroupAssignmentsGroupArgs
{
Id = "<group id>",
Priority = 1,
},
new Okta.Inputs.AppGroupAssignmentsGroupArgs
{
Id = "<another group id>",
Priority = 2,
Profile = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["application profile field"] = "application profile value",
}),
},
},
});
});
package main
import (
"encoding/json"
"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 {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"application profile field": "application profile value",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = okta.NewAppGroupAssignments(ctx, "example", &okta.AppGroupAssignmentsArgs{
AppId: pulumi.String("<app id>"),
Groups: okta.AppGroupAssignmentsGroupArray{
&okta.AppGroupAssignmentsGroupArgs{
Id: pulumi.String("<group id>"),
Priority: pulumi.Int(1),
},
&okta.AppGroupAssignmentsGroupArgs{
Id: pulumi.String("<another group id>"),
Priority: pulumi.Int(2),
Profile: pulumi.String(json0),
},
},
})
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.AppGroupAssignments;
import com.pulumi.okta.AppGroupAssignmentsArgs;
import com.pulumi.okta.inputs.AppGroupAssignmentsGroupArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 AppGroupAssignments("example", AppGroupAssignmentsArgs.builder()
.appId("<app id>")
.groups(
AppGroupAssignmentsGroupArgs.builder()
.id("<group id>")
.priority(1)
.build(),
AppGroupAssignmentsGroupArgs.builder()
.id("<another group id>")
.priority(2)
.profile(serializeJson(
jsonObject(
jsonProperty("application profile field", "application profile value")
)))
.build())
.build());
}
}
import pulumi
import json
import pulumi_okta as okta
example = okta.AppGroupAssignments("example",
app_id="<app id>",
groups=[
okta.AppGroupAssignmentsGroupArgs(
id="<group id>",
priority=1,
),
okta.AppGroupAssignmentsGroupArgs(
id="<another group id>",
priority=2,
profile=json.dumps({
"application profile field": "application profile value",
}),
),
])
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const example = new okta.AppGroupAssignments("example", {
appId: "<app id>",
groups: [
{
id: "<group id>",
priority: 1,
},
{
id: "<another group id>",
priority: 2,
profile: JSON.stringify({
"application profile field": "application profile value",
}),
},
],
});
resources:
example:
type: okta:AppGroupAssignments
properties:
appId: <app id>
groups:
- id: <group id>
priority: 1
- id: <another group id>
priority: 2
profile:
fn::toJSON:
application profile field: application profile value
being unassigned on subsequent runs
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Okta = Pulumi.Okta;
return await Deployment.RunAsync(() =>
{
var app = new Okta.App.OAuth("app");
});
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.NewOAuth(ctx, "app", nil)
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.app.OAuth;
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 app = new OAuth("app");
}
}
import pulumi
import pulumi_okta as okta
app = okta.app.OAuth("app")
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";
const app = new okta.app.OAuth("app", {});
resources:
app:
type: okta:app:OAuth
Create AppGroupAssignments Resource
new AppGroupAssignments(name: string, args: AppGroupAssignmentsArgs, opts?: CustomResourceOptions);
@overload
def AppGroupAssignments(resource_name: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
groups: Optional[Sequence[AppGroupAssignmentsGroupArgs]] = None)
@overload
def AppGroupAssignments(resource_name: str,
args: AppGroupAssignmentsArgs,
opts: Optional[ResourceOptions] = None)
func NewAppGroupAssignments(ctx *Context, name string, args AppGroupAssignmentsArgs, opts ...ResourceOption) (*AppGroupAssignments, error)
public AppGroupAssignments(string name, AppGroupAssignmentsArgs args, CustomResourceOptions? opts = null)
public AppGroupAssignments(String name, AppGroupAssignmentsArgs args)
public AppGroupAssignments(String name, AppGroupAssignmentsArgs args, CustomResourceOptions options)
type: okta:AppGroupAssignments
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppGroupAssignmentsArgs
- 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 AppGroupAssignmentsArgs
- 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 AppGroupAssignmentsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AppGroupAssignmentsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AppGroupAssignmentsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AppGroupAssignments 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 AppGroupAssignments resource accepts the following input properties:
- App
Id string The ID of the application to assign a group to.
- Groups
List<App
Group Assignments Group Args> A group to assign the app to.
- App
Id string The ID of the application to assign a group to.
- Groups
[]App
Group Assignments Group Args A group to assign the app to.
- app
Id String The ID of the application to assign a group to.
- groups
List<App
Group Assignments Group Args> A group to assign the app to.
- app
Id string The ID of the application to assign a group to.
- groups
App
Group Assignments Group Args[] A group to assign the app to.
- app_
id str The ID of the application to assign a group to.
- groups
Sequence[App
Group Assignments Group Args] A group to assign the app to.
- app
Id String The ID of the application to assign a group to.
- groups List<Property Map>
A group to assign the app to.
Outputs
All input properties are implicitly available as output properties. Additionally, the AppGroupAssignments 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 AppGroupAssignments Resource
Get an existing AppGroupAssignments 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?: AppGroupAssignmentsState, opts?: CustomResourceOptions): AppGroupAssignments
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
app_id: Optional[str] = None,
groups: Optional[Sequence[AppGroupAssignmentsGroupArgs]] = None) -> AppGroupAssignments
func GetAppGroupAssignments(ctx *Context, name string, id IDInput, state *AppGroupAssignmentsState, opts ...ResourceOption) (*AppGroupAssignments, error)
public static AppGroupAssignments Get(string name, Input<string> id, AppGroupAssignmentsState? state, CustomResourceOptions? opts = null)
public static AppGroupAssignments get(String name, Output<String> id, AppGroupAssignmentsState 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 The ID of the application to assign a group to.
- Groups
List<App
Group Assignments Group Args> A group to assign the app to.
- App
Id string The ID of the application to assign a group to.
- Groups
[]App
Group Assignments Group Args A group to assign the app to.
- app
Id String The ID of the application to assign a group to.
- groups
List<App
Group Assignments Group Args> A group to assign the app to.
- app
Id string The ID of the application to assign a group to.
- groups
App
Group Assignments Group Args[] A group to assign the app to.
- app_
id str The ID of the application to assign a group to.
- groups
Sequence[App
Group Assignments Group Args] A group to assign the app to.
- app
Id String The ID of the application to assign a group to.
- groups List<Property Map>
A group to assign the app to.
Supporting Types
AppGroupAssignmentsGroup
- Id string
ID of the group to assign.
- Profile string
JSON document containing application profile
- Priority int
Priority of group assignment
- Id string
ID of the group to assign.
- Profile string
JSON document containing application profile
- Priority int
Priority of group assignment
- id String
ID of the group to assign.
- profile String
JSON document containing application profile
- priority Integer
Priority of group assignment
- id string
ID of the group to assign.
- profile string
JSON document containing application profile
- priority number
Priority of group assignment
- id str
ID of the group to assign.
- profile str
JSON document containing application profile
- priority int
Priority of group assignment
- id String
ID of the group to assign.
- profile String
JSON document containing application profile
- priority Number
Priority of group assignment
Import
An application’s group assignments can be imported via app_id
.
$ pulumi import okta:index/appGroupAssignments:AppGroupAssignments example <app_id>
Package Details
- Repository
- Okta pulumi/pulumi-okta
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
okta
Terraform Provider.