1. Packages
  2. Lacework Provider
  3. API Docs
  4. ManagedPolicies
lacework 2.0.6 published on Monday, Apr 14, 2025 by lacework

lacework.ManagedPolicies

Explore with Pulumi AI

lacework logo
lacework 2.0.6 published on Monday, Apr 14, 2025 by lacework

    Use this resource to update the state (enabled/disabled) and the severity properties for Lacework-defined policies.

    Example Usage

    The following example shows how to manage three Lacework-defined policies.

    import * as pulumi from "@pulumi/pulumi";
    import * as lacework from "@pulumi/lacework";
    
    const example = new lacework.ManagedPolicies("example", {policies: [
        {
            enabled: true,
            id: "lacework-global-1",
            severity: "High",
        },
        {
            enabled: false,
            id: "lacework-global-2",
            severity: "Critical",
        },
        {
            enabled: true,
            id: "lacework-global-10",
            severity: "Low",
        },
    ]});
    
    import pulumi
    import pulumi_lacework as lacework
    
    example = lacework.ManagedPolicies("example", policies=[
        {
            "enabled": True,
            "id": "lacework-global-1",
            "severity": "High",
        },
        {
            "enabled": False,
            "id": "lacework-global-2",
            "severity": "Critical",
        },
        {
            "enabled": True,
            "id": "lacework-global-10",
            "severity": "Low",
        },
    ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/lacework/v2/lacework"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := lacework.NewManagedPolicies(ctx, "example", &lacework.ManagedPoliciesArgs{
    			Policies: lacework.ManagedPoliciesPolicyArray{
    				&lacework.ManagedPoliciesPolicyArgs{
    					Enabled:  pulumi.Bool(true),
    					Id:       pulumi.String("lacework-global-1"),
    					Severity: pulumi.String("High"),
    				},
    				&lacework.ManagedPoliciesPolicyArgs{
    					Enabled:  pulumi.Bool(false),
    					Id:       pulumi.String("lacework-global-2"),
    					Severity: pulumi.String("Critical"),
    				},
    				&lacework.ManagedPoliciesPolicyArgs{
    					Enabled:  pulumi.Bool(true),
    					Id:       pulumi.String("lacework-global-10"),
    					Severity: pulumi.String("Low"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Lacework = Pulumi.Lacework;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Lacework.ManagedPolicies("example", new()
        {
            Policies = new[]
            {
                new Lacework.Inputs.ManagedPoliciesPolicyArgs
                {
                    Enabled = true,
                    Id = "lacework-global-1",
                    Severity = "High",
                },
                new Lacework.Inputs.ManagedPoliciesPolicyArgs
                {
                    Enabled = false,
                    Id = "lacework-global-2",
                    Severity = "Critical",
                },
                new Lacework.Inputs.ManagedPoliciesPolicyArgs
                {
                    Enabled = true,
                    Id = "lacework-global-10",
                    Severity = "Low",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.lacework.ManagedPolicies;
    import com.pulumi.lacework.ManagedPoliciesArgs;
    import com.pulumi.lacework.inputs.ManagedPoliciesPolicyArgs;
    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 ManagedPolicies("example", ManagedPoliciesArgs.builder()
                .policies(            
                    ManagedPoliciesPolicyArgs.builder()
                        .enabled(true)
                        .id("lacework-global-1")
                        .severity("High")
                        .build(),
                    ManagedPoliciesPolicyArgs.builder()
                        .enabled(false)
                        .id("lacework-global-2")
                        .severity("Critical")
                        .build(),
                    ManagedPoliciesPolicyArgs.builder()
                        .enabled(true)
                        .id("lacework-global-10")
                        .severity("Low")
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: lacework:ManagedPolicies
        properties:
          policies:
            - enabled: true
              id: lacework-global-1
              severity: High
            - enabled: false
              id: lacework-global-2
              severity: Critical
            - enabled: true
              id: lacework-global-10
              severity: Low
    

    Create ManagedPolicies Resource

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

    Constructor syntax

    new ManagedPolicies(name: string, args: ManagedPoliciesArgs, opts?: CustomResourceOptions);
    @overload
    def ManagedPolicies(resource_name: str,
                        args: ManagedPoliciesArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def ManagedPolicies(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        policies: Optional[Sequence[ManagedPoliciesPolicyArgs]] = None,
                        managed_policies_id: Optional[str] = None)
    func NewManagedPolicies(ctx *Context, name string, args ManagedPoliciesArgs, opts ...ResourceOption) (*ManagedPolicies, error)
    public ManagedPolicies(string name, ManagedPoliciesArgs args, CustomResourceOptions? opts = null)
    public ManagedPolicies(String name, ManagedPoliciesArgs args)
    public ManagedPolicies(String name, ManagedPoliciesArgs args, CustomResourceOptions options)
    
    type: lacework:ManagedPolicies
    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 ManagedPoliciesArgs
    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 ManagedPoliciesArgs
    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 ManagedPoliciesArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ManagedPoliciesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ManagedPoliciesArgs
    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 managedPoliciesResource = new Lacework.ManagedPolicies("managedPoliciesResource", new()
    {
        Policies = new[]
        {
            new Lacework.Inputs.ManagedPoliciesPolicyArgs
            {
                Enabled = false,
                Id = "string",
                Severity = "string",
            },
        },
        ManagedPoliciesId = "string",
    });
    
    example, err := lacework.NewManagedPolicies(ctx, "managedPoliciesResource", &lacework.ManagedPoliciesArgs{
    	Policies: lacework.ManagedPoliciesPolicyArray{
    		&lacework.ManagedPoliciesPolicyArgs{
    			Enabled:  pulumi.Bool(false),
    			Id:       pulumi.String("string"),
    			Severity: pulumi.String("string"),
    		},
    	},
    	ManagedPoliciesId: pulumi.String("string"),
    })
    
    var managedPoliciesResource = new ManagedPolicies("managedPoliciesResource", ManagedPoliciesArgs.builder()
        .policies(ManagedPoliciesPolicyArgs.builder()
            .enabled(false)
            .id("string")
            .severity("string")
            .build())
        .managedPoliciesId("string")
        .build());
    
    managed_policies_resource = lacework.ManagedPolicies("managedPoliciesResource",
        policies=[{
            "enabled": False,
            "id": "string",
            "severity": "string",
        }],
        managed_policies_id="string")
    
    const managedPoliciesResource = new lacework.ManagedPolicies("managedPoliciesResource", {
        policies: [{
            enabled: false,
            id: "string",
            severity: "string",
        }],
        managedPoliciesId: "string",
    });
    
    type: lacework:ManagedPolicies
    properties:
        managedPoliciesId: string
        policies:
            - enabled: false
              id: string
              severity: string
    

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

    Policies List<ManagedPoliciesPolicy>
    A list of Lacework managed policies
    ManagedPoliciesId string
    Policies []ManagedPoliciesPolicyArgs
    A list of Lacework managed policies
    ManagedPoliciesId string
    policies List<ManagedPoliciesPolicy>
    A list of Lacework managed policies
    managedPoliciesId String
    policies ManagedPoliciesPolicy[]
    A list of Lacework managed policies
    managedPoliciesId string
    policies List<Property Map>
    A list of Lacework managed policies
    managedPoliciesId String

    Outputs

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

    Get an existing ManagedPolicies 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?: ManagedPoliciesState, opts?: CustomResourceOptions): ManagedPolicies
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            managed_policies_id: Optional[str] = None,
            policies: Optional[Sequence[ManagedPoliciesPolicyArgs]] = None) -> ManagedPolicies
    func GetManagedPolicies(ctx *Context, name string, id IDInput, state *ManagedPoliciesState, opts ...ResourceOption) (*ManagedPolicies, error)
    public static ManagedPolicies Get(string name, Input<string> id, ManagedPoliciesState? state, CustomResourceOptions? opts = null)
    public static ManagedPolicies get(String name, Output<String> id, ManagedPoliciesState state, CustomResourceOptions options)
    resources:  _:    type: lacework:ManagedPolicies    get:      id: ${id}
    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:
    ManagedPoliciesId string
    Policies List<ManagedPoliciesPolicy>
    A list of Lacework managed policies
    ManagedPoliciesId string
    Policies []ManagedPoliciesPolicyArgs
    A list of Lacework managed policies
    managedPoliciesId String
    policies List<ManagedPoliciesPolicy>
    A list of Lacework managed policies
    managedPoliciesId string
    policies ManagedPoliciesPolicy[]
    A list of Lacework managed policies
    managedPoliciesId String
    policies List<Property Map>
    A list of Lacework managed policies

    Supporting Types

    ManagedPoliciesPolicy, ManagedPoliciesPolicyArgs

    Enabled bool
    Whether the policy is enabled or disabled.
    Id string
    The Lacework-defined policy id.
    Severity string
    The list of the severities. Valid severities include: Critical, High, Medium, Low and Info.
    Enabled bool
    Whether the policy is enabled or disabled.
    Id string
    The Lacework-defined policy id.
    Severity string
    The list of the severities. Valid severities include: Critical, High, Medium, Low and Info.
    enabled Boolean
    Whether the policy is enabled or disabled.
    id String
    The Lacework-defined policy id.
    severity String
    The list of the severities. Valid severities include: Critical, High, Medium, Low and Info.
    enabled boolean
    Whether the policy is enabled or disabled.
    id string
    The Lacework-defined policy id.
    severity string
    The list of the severities. Valid severities include: Critical, High, Medium, Low and Info.
    enabled bool
    Whether the policy is enabled or disabled.
    id str
    The Lacework-defined policy id.
    severity str
    The list of the severities. Valid severities include: Critical, High, Medium, Low and Info.
    enabled Boolean
    Whether the policy is enabled or disabled.
    id String
    The Lacework-defined policy id.
    severity String
    The list of the severities. Valid severities include: Critical, High, Medium, Low and Info.

    Package Details

    Repository
    lacework lacework/terraform-provider-lacework
    License
    Notes
    This Pulumi package is based on the lacework Terraform Provider.
    lacework logo
    lacework 2.0.6 published on Monday, Apr 14, 2025 by lacework