1. Packages
  2. Okta
  3. API Docs
  4. AppSamlAppSettings
Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi

okta.AppSamlAppSettings

Explore with Pulumi AI

okta logo
Okta v4.8.1 published on Thursday, Apr 18, 2024 by Pulumi

    This resource allows you to manage app settings of the SAML Application . It’s basically the same as app_settings_json field in okta.app.Saml resource and can be used in cases where settings require to be managed separately.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const testSaml = new okta.app.Saml("testSaml", {
        preconfiguredApp: "amazon_aws",
        label: "Amazon AWS",
        status: "ACTIVE",
    });
    const testAppSamlAppSettings = new okta.AppSamlAppSettings("testAppSamlAppSettings", {
        appId: testSaml.id,
        settings: JSON.stringify({
            appFilter: "okta",
            awsEnvironmentType: "aws.amazon",
            groupFilter: "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)",
            joinAllRoles: false,
            loginURL: "https://console.aws.amazon.com/ec2/home",
            roleValuePattern: "arn:aws:iam::${accountid}:saml-provider/OKTA,arn:aws:iam::${accountid}:role/${role}",
            sessionDuration: 3200,
            useGroupMapping: false,
        }),
    });
    
    import pulumi
    import json
    import pulumi_okta as okta
    
    test_saml = okta.app.Saml("testSaml",
        preconfigured_app="amazon_aws",
        label="Amazon AWS",
        status="ACTIVE")
    test_app_saml_app_settings = okta.AppSamlAppSettings("testAppSamlAppSettings",
        app_id=test_saml.id,
        settings=json.dumps({
            "appFilter": "okta",
            "awsEnvironmentType": "aws.amazon",
            "groupFilter": "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)",
            "joinAllRoles": False,
            "loginURL": "https://console.aws.amazon.com/ec2/home",
            "roleValuePattern": "arn:aws:iam::${accountid}:saml-provider/OKTA,arn:aws:iam::${accountid}:role/${role}",
            "sessionDuration": 3200,
            "useGroupMapping": False,
        }))
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-okta/sdk/v4/go/okta"
    	"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 {
    		testSaml, err := app.NewSaml(ctx, "testSaml", &app.SamlArgs{
    			PreconfiguredApp: pulumi.String("amazon_aws"),
    			Label:            pulumi.String("Amazon AWS"),
    			Status:           pulumi.String("ACTIVE"),
    		})
    		if err != nil {
    			return err
    		}
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"appFilter":          "okta",
    			"awsEnvironmentType": "aws.amazon",
    			"groupFilter":        "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)",
    			"joinAllRoles":       false,
    			"loginURL":           "https://console.aws.amazon.com/ec2/home",
    			"roleValuePattern":   "arn:aws:iam::${accountid}:saml-provider/OKTA,arn:aws:iam::${accountid}:role/${role}",
    			"sessionDuration":    3200,
    			"useGroupMapping":    false,
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = okta.NewAppSamlAppSettings(ctx, "testAppSamlAppSettings", &okta.AppSamlAppSettingsArgs{
    			AppId:    testSaml.ID(),
    			Settings: pulumi.String(json0),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        var testSaml = new Okta.App.Saml("testSaml", new()
        {
            PreconfiguredApp = "amazon_aws",
            Label = "Amazon AWS",
            Status = "ACTIVE",
        });
    
        var testAppSamlAppSettings = new Okta.AppSamlAppSettings("testAppSamlAppSettings", new()
        {
            AppId = testSaml.Id,
            Settings = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["appFilter"] = "okta",
                ["awsEnvironmentType"] = "aws.amazon",
                ["groupFilter"] = "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)",
                ["joinAllRoles"] = false,
                ["loginURL"] = "https://console.aws.amazon.com/ec2/home",
                ["roleValuePattern"] = "arn:aws:iam::${accountid}:saml-provider/OKTA,arn:aws:iam::${accountid}:role/${role}",
                ["sessionDuration"] = 3200,
                ["useGroupMapping"] = false,
            }),
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.okta.app.Saml;
    import com.pulumi.okta.app.SamlArgs;
    import com.pulumi.okta.AppSamlAppSettings;
    import com.pulumi.okta.AppSamlAppSettingsArgs;
    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 testSaml = new Saml("testSaml", SamlArgs.builder()        
                .preconfiguredApp("amazon_aws")
                .label("Amazon AWS")
                .status("ACTIVE")
                .build());
    
            var testAppSamlAppSettings = new AppSamlAppSettings("testAppSamlAppSettings", AppSamlAppSettingsArgs.builder()        
                .appId(testSaml.id())
                .settings(serializeJson(
                    jsonObject(
                        jsonProperty("appFilter", "okta"),
                        jsonProperty("awsEnvironmentType", "aws.amazon"),
                        jsonProperty("groupFilter", "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)"),
                        jsonProperty("joinAllRoles", false),
                        jsonProperty("loginURL", "https://console.aws.amazon.com/ec2/home"),
                        jsonProperty("roleValuePattern", "arn:aws:iam::${accountid}:saml-provider/OKTA,arn:aws:iam::${accountid}:role/${role}"),
                        jsonProperty("sessionDuration", 3200),
                        jsonProperty("useGroupMapping", false)
                    )))
                .build());
    
        }
    }
    
    resources:
      testSaml:
        type: okta:app:Saml
        properties:
          preconfiguredApp: amazon_aws
          label: Amazon AWS
          status: ACTIVE
      testAppSamlAppSettings:
        type: okta:AppSamlAppSettings
        properties:
          appId: ${testSaml.id}
          settings:
            fn::toJSON:
              appFilter: okta
              awsEnvironmentType: aws.amazon
              groupFilter: aws_(?{{accountid}}\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\-_]+)
              joinAllRoles: false
              loginURL: https://console.aws.amazon.com/ec2/home
              roleValuePattern: arn:aws:iam::${accountid}:saml-provider/OKTA,arn:aws:iam::${accountid}:role/${role}
              sessionDuration: 3200
              useGroupMapping: false
    

    Create AppSamlAppSettings Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AppSamlAppSettings(name: string, args: AppSamlAppSettingsArgs, opts?: CustomResourceOptions);
    @overload
    def AppSamlAppSettings(resource_name: str,
                           args: AppSamlAppSettingsArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def AppSamlAppSettings(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           app_id: Optional[str] = None,
                           settings: Optional[str] = None)
    func NewAppSamlAppSettings(ctx *Context, name string, args AppSamlAppSettingsArgs, opts ...ResourceOption) (*AppSamlAppSettings, error)
    public AppSamlAppSettings(string name, AppSamlAppSettingsArgs args, CustomResourceOptions? opts = null)
    public AppSamlAppSettings(String name, AppSamlAppSettingsArgs args)
    public AppSamlAppSettings(String name, AppSamlAppSettingsArgs args, CustomResourceOptions options)
    
    type: okta:AppSamlAppSettings
    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 AppSamlAppSettingsArgs
    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 AppSamlAppSettingsArgs
    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 AppSamlAppSettingsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AppSamlAppSettingsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AppSamlAppSettingsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var appSamlAppSettingsResource = new Okta.AppSamlAppSettings("appSamlAppSettingsResource", new()
    {
        AppId = "string",
        Settings = "string",
    });
    
    example, err := okta.NewAppSamlAppSettings(ctx, "appSamlAppSettingsResource", &okta.AppSamlAppSettingsArgs{
    	AppId:    pulumi.String("string"),
    	Settings: pulumi.String("string"),
    })
    
    var appSamlAppSettingsResource = new AppSamlAppSettings("appSamlAppSettingsResource", AppSamlAppSettingsArgs.builder()        
        .appId("string")
        .settings("string")
        .build());
    
    app_saml_app_settings_resource = okta.AppSamlAppSettings("appSamlAppSettingsResource",
        app_id="string",
        settings="string")
    
    const appSamlAppSettingsResource = new okta.AppSamlAppSettings("appSamlAppSettingsResource", {
        appId: "string",
        settings: "string",
    });
    
    type: okta:AppSamlAppSettings
    properties:
        appId: string
        settings: string
    

    AppSamlAppSettings 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 AppSamlAppSettings resource accepts the following input properties:

    AppId string
    ID of the application.
    Settings string
    Application settings in JSON format.
    AppId string
    ID of the application.
    Settings string
    Application settings in JSON format.
    appId String
    ID of the application.
    settings String
    Application settings in JSON format.
    appId string
    ID of the application.
    settings string
    Application settings in JSON format.
    app_id str
    ID of the application.
    settings str
    Application settings in JSON format.
    appId String
    ID of the application.
    settings String
    Application settings in JSON format.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AppSamlAppSettings 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 AppSamlAppSettings Resource

    Get an existing AppSamlAppSettings 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?: AppSamlAppSettingsState, opts?: CustomResourceOptions): AppSamlAppSettings
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_id: Optional[str] = None,
            settings: Optional[str] = None) -> AppSamlAppSettings
    func GetAppSamlAppSettings(ctx *Context, name string, id IDInput, state *AppSamlAppSettingsState, opts ...ResourceOption) (*AppSamlAppSettings, error)
    public static AppSamlAppSettings Get(string name, Input<string> id, AppSamlAppSettingsState? state, CustomResourceOptions? opts = null)
    public static AppSamlAppSettings get(String name, Output<String> id, AppSamlAppSettingsState 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:
    AppId string
    ID of the application.
    Settings string
    Application settings in JSON format.
    AppId string
    ID of the application.
    Settings string
    Application settings in JSON format.
    appId String
    ID of the application.
    settings String
    Application settings in JSON format.
    appId string
    ID of the application.
    settings string
    Application settings in JSON format.
    app_id str
    ID of the application.
    settings str
    Application settings in JSON format.
    appId String
    ID of the application.
    settings String
    Application settings in JSON format.

    Import

    A settings for the SAML App can be imported via the Okta ID.

    $ pulumi import okta:index/appSamlAppSettings:AppSamlAppSettings example &#60;app id&#62;
    

    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.8.1 published on Thursday, Apr 18, 2024 by Pulumi