1. Packages
  2. Sumo Logic
  3. API Docs
  4. Policies
Sumo Logic v0.22.1 published on Sunday, Jun 9, 2024 by Pulumi

sumologic.Policies

Explore with Pulumi AI

sumologic logo
Sumo Logic v0.22.1 published on Sunday, Jun 9, 2024 by Pulumi

    Sets the Sumologic Policies. Since each policy is global for the entire organization, please ensure that only a single instance of this resource is defined. The behavior for defining more than one policies resource is undefined.

    The following policies are supported:

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sumologic from "@pulumi/sumologic";
    
    const examplePolicies = new sumologic.Policies("example_policies", {
        audit: false,
        dataAccessLevel: false,
        maxUserSessionTimeout: "7d",
        searchAudit: false,
        shareDashboardsOutsideOrganization: false,
        userConcurrentSessionsLimit: {
            enabled: false,
            maxConcurrentSessions: 100,
        },
    });
    
    import pulumi
    import pulumi_sumologic as sumologic
    
    example_policies = sumologic.Policies("example_policies",
        audit=False,
        data_access_level=False,
        max_user_session_timeout="7d",
        search_audit=False,
        share_dashboards_outside_organization=False,
        user_concurrent_sessions_limit=sumologic.PoliciesUserConcurrentSessionsLimitArgs(
            enabled=False,
            max_concurrent_sessions=100,
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sumologic.NewPolicies(ctx, "example_policies", &sumologic.PoliciesArgs{
    			Audit:                              pulumi.Bool(false),
    			DataAccessLevel:                    pulumi.Bool(false),
    			MaxUserSessionTimeout:              pulumi.String("7d"),
    			SearchAudit:                        pulumi.Bool(false),
    			ShareDashboardsOutsideOrganization: pulumi.Bool(false),
    			UserConcurrentSessionsLimit: &sumologic.PoliciesUserConcurrentSessionsLimitArgs{
    				Enabled:               pulumi.Bool(false),
    				MaxConcurrentSessions: pulumi.Int(100),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using SumoLogic = Pulumi.SumoLogic;
    
    return await Deployment.RunAsync(() => 
    {
        var examplePolicies = new SumoLogic.Policies("example_policies", new()
        {
            Audit = false,
            DataAccessLevel = false,
            MaxUserSessionTimeout = "7d",
            SearchAudit = false,
            ShareDashboardsOutsideOrganization = false,
            UserConcurrentSessionsLimit = new SumoLogic.Inputs.PoliciesUserConcurrentSessionsLimitArgs
            {
                Enabled = false,
                MaxConcurrentSessions = 100,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sumologic.Policies;
    import com.pulumi.sumologic.PoliciesArgs;
    import com.pulumi.sumologic.inputs.PoliciesUserConcurrentSessionsLimitArgs;
    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 examplePolicies = new Policies("examplePolicies", PoliciesArgs.builder()
                .audit(false)
                .dataAccessLevel(false)
                .maxUserSessionTimeout("7d")
                .searchAudit(false)
                .shareDashboardsOutsideOrganization(false)
                .userConcurrentSessionsLimit(PoliciesUserConcurrentSessionsLimitArgs.builder()
                    .enabled(false)
                    .maxConcurrentSessions(100)
                    .build())
                .build());
    
        }
    }
    
    resources:
      examplePolicies:
        type: sumologic:Policies
        name: example_policies
        properties:
          audit: false
          dataAccessLevel: false
          maxUserSessionTimeout: 7d
          searchAudit: false
          shareDashboardsOutsideOrganization: false
          userConcurrentSessionsLimit:
            enabled: false
            maxConcurrentSessions: 100
    

    Create Policies Resource

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

    Constructor syntax

    new Policies(name: string, args: PoliciesArgs, opts?: CustomResourceOptions);
    @overload
    def Policies(resource_name: str,
                 args: PoliciesArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Policies(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 audit: Optional[bool] = None,
                 data_access_level: Optional[bool] = None,
                 max_user_session_timeout: Optional[str] = None,
                 search_audit: Optional[bool] = None,
                 share_dashboards_outside_organization: Optional[bool] = None,
                 user_concurrent_sessions_limit: Optional[PoliciesUserConcurrentSessionsLimitArgs] = None)
    func NewPolicies(ctx *Context, name string, args PoliciesArgs, opts ...ResourceOption) (*Policies, error)
    public Policies(string name, PoliciesArgs args, CustomResourceOptions? opts = null)
    public Policies(String name, PoliciesArgs args)
    public Policies(String name, PoliciesArgs args, CustomResourceOptions options)
    
    type: sumologic:Policies
    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 PoliciesArgs
    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 PoliciesArgs
    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 PoliciesArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PoliciesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PoliciesArgs
    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 policiesResource = new SumoLogic.Policies("policiesResource", new()
    {
        Audit = false,
        DataAccessLevel = false,
        MaxUserSessionTimeout = "string",
        SearchAudit = false,
        ShareDashboardsOutsideOrganization = false,
        UserConcurrentSessionsLimit = new SumoLogic.Inputs.PoliciesUserConcurrentSessionsLimitArgs
        {
            Enabled = false,
            MaxConcurrentSessions = 0,
        },
    });
    
    example, err := sumologic.NewPolicies(ctx, "policiesResource", &sumologic.PoliciesArgs{
    	Audit:                              pulumi.Bool(false),
    	DataAccessLevel:                    pulumi.Bool(false),
    	MaxUserSessionTimeout:              pulumi.String("string"),
    	SearchAudit:                        pulumi.Bool(false),
    	ShareDashboardsOutsideOrganization: pulumi.Bool(false),
    	UserConcurrentSessionsLimit: &sumologic.PoliciesUserConcurrentSessionsLimitArgs{
    		Enabled:               pulumi.Bool(false),
    		MaxConcurrentSessions: pulumi.Int(0),
    	},
    })
    
    var policiesResource = new Policies("policiesResource", PoliciesArgs.builder()
        .audit(false)
        .dataAccessLevel(false)
        .maxUserSessionTimeout("string")
        .searchAudit(false)
        .shareDashboardsOutsideOrganization(false)
        .userConcurrentSessionsLimit(PoliciesUserConcurrentSessionsLimitArgs.builder()
            .enabled(false)
            .maxConcurrentSessions(0)
            .build())
        .build());
    
    policies_resource = sumologic.Policies("policiesResource",
        audit=False,
        data_access_level=False,
        max_user_session_timeout="string",
        search_audit=False,
        share_dashboards_outside_organization=False,
        user_concurrent_sessions_limit=sumologic.PoliciesUserConcurrentSessionsLimitArgs(
            enabled=False,
            max_concurrent_sessions=0,
        ))
    
    const policiesResource = new sumologic.Policies("policiesResource", {
        audit: false,
        dataAccessLevel: false,
        maxUserSessionTimeout: "string",
        searchAudit: false,
        shareDashboardsOutsideOrganization: false,
        userConcurrentSessionsLimit: {
            enabled: false,
            maxConcurrentSessions: 0,
        },
    });
    
    type: sumologic:Policies
    properties:
        audit: false
        dataAccessLevel: false
        maxUserSessionTimeout: string
        searchAudit: false
        shareDashboardsOutsideOrganization: false
        userConcurrentSessionsLimit:
            enabled: false
            maxConcurrentSessions: 0
    

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

    Audit bool
    Whether the Audit Policy is enabled.
    DataAccessLevel bool
    Whether the Data Access Level Policy is enabled.
    MaxUserSessionTimeout string
    The maximum web session timeout users are able to configure within their user preferences.
    SearchAudit bool
    Whether the Search Audit Policy is enabled.
    ShareDashboardsOutsideOrganization bool
    Whether the Share a Dashboard Outside Organization Policy is enabled.
    UserConcurrentSessionsLimit Pulumi.SumoLogic.Inputs.PoliciesUserConcurrentSessionsLimit
    The User Concurrent Sessions Limit Policy. See user_concurrent_sessions_limit schema for details.
    Audit bool
    Whether the Audit Policy is enabled.
    DataAccessLevel bool
    Whether the Data Access Level Policy is enabled.
    MaxUserSessionTimeout string
    The maximum web session timeout users are able to configure within their user preferences.
    SearchAudit bool
    Whether the Search Audit Policy is enabled.
    ShareDashboardsOutsideOrganization bool
    Whether the Share a Dashboard Outside Organization Policy is enabled.
    UserConcurrentSessionsLimit PoliciesUserConcurrentSessionsLimitArgs
    The User Concurrent Sessions Limit Policy. See user_concurrent_sessions_limit schema for details.
    audit Boolean
    Whether the Audit Policy is enabled.
    dataAccessLevel Boolean
    Whether the Data Access Level Policy is enabled.
    maxUserSessionTimeout String
    The maximum web session timeout users are able to configure within their user preferences.
    searchAudit Boolean
    Whether the Search Audit Policy is enabled.
    shareDashboardsOutsideOrganization Boolean
    Whether the Share a Dashboard Outside Organization Policy is enabled.
    userConcurrentSessionsLimit PoliciesUserConcurrentSessionsLimit
    The User Concurrent Sessions Limit Policy. See user_concurrent_sessions_limit schema for details.
    audit boolean
    Whether the Audit Policy is enabled.
    dataAccessLevel boolean
    Whether the Data Access Level Policy is enabled.
    maxUserSessionTimeout string
    The maximum web session timeout users are able to configure within their user preferences.
    searchAudit boolean
    Whether the Search Audit Policy is enabled.
    shareDashboardsOutsideOrganization boolean
    Whether the Share a Dashboard Outside Organization Policy is enabled.
    userConcurrentSessionsLimit PoliciesUserConcurrentSessionsLimit
    The User Concurrent Sessions Limit Policy. See user_concurrent_sessions_limit schema for details.
    audit bool
    Whether the Audit Policy is enabled.
    data_access_level bool
    Whether the Data Access Level Policy is enabled.
    max_user_session_timeout str
    The maximum web session timeout users are able to configure within their user preferences.
    search_audit bool
    Whether the Search Audit Policy is enabled.
    share_dashboards_outside_organization bool
    Whether the Share a Dashboard Outside Organization Policy is enabled.
    user_concurrent_sessions_limit PoliciesUserConcurrentSessionsLimitArgs
    The User Concurrent Sessions Limit Policy. See user_concurrent_sessions_limit schema for details.
    audit Boolean
    Whether the Audit Policy is enabled.
    dataAccessLevel Boolean
    Whether the Data Access Level Policy is enabled.
    maxUserSessionTimeout String
    The maximum web session timeout users are able to configure within their user preferences.
    searchAudit Boolean
    Whether the Search Audit Policy is enabled.
    shareDashboardsOutsideOrganization Boolean
    Whether the Share a Dashboard Outside Organization Policy is enabled.
    userConcurrentSessionsLimit Property Map
    The User Concurrent Sessions Limit Policy. See user_concurrent_sessions_limit schema for details.

    Outputs

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

    Get an existing Policies 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?: PoliciesState, opts?: CustomResourceOptions): Policies
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            audit: Optional[bool] = None,
            data_access_level: Optional[bool] = None,
            max_user_session_timeout: Optional[str] = None,
            search_audit: Optional[bool] = None,
            share_dashboards_outside_organization: Optional[bool] = None,
            user_concurrent_sessions_limit: Optional[PoliciesUserConcurrentSessionsLimitArgs] = None) -> Policies
    func GetPolicies(ctx *Context, name string, id IDInput, state *PoliciesState, opts ...ResourceOption) (*Policies, error)
    public static Policies Get(string name, Input<string> id, PoliciesState? state, CustomResourceOptions? opts = null)
    public static Policies get(String name, Output<String> id, PoliciesState 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:
    Audit bool
    Whether the Audit Policy is enabled.
    DataAccessLevel bool
    Whether the Data Access Level Policy is enabled.
    MaxUserSessionTimeout string
    The maximum web session timeout users are able to configure within their user preferences.
    SearchAudit bool
    Whether the Search Audit Policy is enabled.
    ShareDashboardsOutsideOrganization bool
    Whether the Share a Dashboard Outside Organization Policy is enabled.
    UserConcurrentSessionsLimit Pulumi.SumoLogic.Inputs.PoliciesUserConcurrentSessionsLimit
    The User Concurrent Sessions Limit Policy. See user_concurrent_sessions_limit schema for details.
    Audit bool
    Whether the Audit Policy is enabled.
    DataAccessLevel bool
    Whether the Data Access Level Policy is enabled.
    MaxUserSessionTimeout string
    The maximum web session timeout users are able to configure within their user preferences.
    SearchAudit bool
    Whether the Search Audit Policy is enabled.
    ShareDashboardsOutsideOrganization bool
    Whether the Share a Dashboard Outside Organization Policy is enabled.
    UserConcurrentSessionsLimit PoliciesUserConcurrentSessionsLimitArgs
    The User Concurrent Sessions Limit Policy. See user_concurrent_sessions_limit schema for details.
    audit Boolean
    Whether the Audit Policy is enabled.
    dataAccessLevel Boolean
    Whether the Data Access Level Policy is enabled.
    maxUserSessionTimeout String
    The maximum web session timeout users are able to configure within their user preferences.
    searchAudit Boolean
    Whether the Search Audit Policy is enabled.
    shareDashboardsOutsideOrganization Boolean
    Whether the Share a Dashboard Outside Organization Policy is enabled.
    userConcurrentSessionsLimit PoliciesUserConcurrentSessionsLimit
    The User Concurrent Sessions Limit Policy. See user_concurrent_sessions_limit schema for details.
    audit boolean
    Whether the Audit Policy is enabled.
    dataAccessLevel boolean
    Whether the Data Access Level Policy is enabled.
    maxUserSessionTimeout string
    The maximum web session timeout users are able to configure within their user preferences.
    searchAudit boolean
    Whether the Search Audit Policy is enabled.
    shareDashboardsOutsideOrganization boolean
    Whether the Share a Dashboard Outside Organization Policy is enabled.
    userConcurrentSessionsLimit PoliciesUserConcurrentSessionsLimit
    The User Concurrent Sessions Limit Policy. See user_concurrent_sessions_limit schema for details.
    audit bool
    Whether the Audit Policy is enabled.
    data_access_level bool
    Whether the Data Access Level Policy is enabled.
    max_user_session_timeout str
    The maximum web session timeout users are able to configure within their user preferences.
    search_audit bool
    Whether the Search Audit Policy is enabled.
    share_dashboards_outside_organization bool
    Whether the Share a Dashboard Outside Organization Policy is enabled.
    user_concurrent_sessions_limit PoliciesUserConcurrentSessionsLimitArgs
    The User Concurrent Sessions Limit Policy. See user_concurrent_sessions_limit schema for details.
    audit Boolean
    Whether the Audit Policy is enabled.
    dataAccessLevel Boolean
    Whether the Data Access Level Policy is enabled.
    maxUserSessionTimeout String
    The maximum web session timeout users are able to configure within their user preferences.
    searchAudit Boolean
    Whether the Search Audit Policy is enabled.
    shareDashboardsOutsideOrganization Boolean
    Whether the Share a Dashboard Outside Organization Policy is enabled.
    userConcurrentSessionsLimit Property Map
    The User Concurrent Sessions Limit Policy. See user_concurrent_sessions_limit schema for details.

    Supporting Types

    PoliciesUserConcurrentSessionsLimit, PoliciesUserConcurrentSessionsLimitArgs

    Import

    Policies can be imported using the id org-policies.

    hcl

    $ pulumi import sumologic:index/policies:Policies example_policies org-policies
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Sumo Logic pulumi/pulumi-sumologic
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the sumologic Terraform Provider.
    sumologic logo
    Sumo Logic v0.22.1 published on Sunday, Jun 9, 2024 by Pulumi