1. Packages
  2. Azure Classic
  3. API Docs
  4. securitycenter
  5. AdvancedThreatProtection

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.securitycenter.AdvancedThreatProtection

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Manages a resources Advanced Threat Protection setting.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "atp-example",
        location: "West Europe",
    });
    const exampleAccount = new azure.storage.Account("example", {
        name: "examplestorage",
        resourceGroupName: example.name,
        location: example.location,
        accountTier: "Standard",
        accountReplicationType: "LRS",
        tags: {
            environment: "example",
        },
    });
    const exampleAdvancedThreatProtection = new azure.securitycenter.AdvancedThreatProtection("example", {
        targetResourceId: exampleAccount.id,
        enabled: true,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="atp-example",
        location="West Europe")
    example_account = azure.storage.Account("example",
        name="examplestorage",
        resource_group_name=example.name,
        location=example.location,
        account_tier="Standard",
        account_replication_type="LRS",
        tags={
            "environment": "example",
        })
    example_advanced_threat_protection = azure.securitycenter.AdvancedThreatProtection("example",
        target_resource_id=example_account.id,
        enabled=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/securitycenter"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("atp-example"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
    			Name:                   pulumi.String("examplestorage"),
    			ResourceGroupName:      example.Name,
    			Location:               example.Location,
    			AccountTier:            pulumi.String("Standard"),
    			AccountReplicationType: pulumi.String("LRS"),
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("example"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = securitycenter.NewAdvancedThreatProtection(ctx, "example", &securitycenter.AdvancedThreatProtectionArgs{
    			TargetResourceId: exampleAccount.ID(),
    			Enabled:          pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "atp-example",
            Location = "West Europe",
        });
    
        var exampleAccount = new Azure.Storage.Account("example", new()
        {
            Name = "examplestorage",
            ResourceGroupName = example.Name,
            Location = example.Location,
            AccountTier = "Standard",
            AccountReplicationType = "LRS",
            Tags = 
            {
                { "environment", "example" },
            },
        });
    
        var exampleAdvancedThreatProtection = new Azure.SecurityCenter.AdvancedThreatProtection("example", new()
        {
            TargetResourceId = exampleAccount.Id,
            Enabled = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.storage.Account;
    import com.pulumi.azure.storage.AccountArgs;
    import com.pulumi.azure.securitycenter.AdvancedThreatProtection;
    import com.pulumi.azure.securitycenter.AdvancedThreatProtectionArgs;
    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 ResourceGroup("example", ResourceGroupArgs.builder()
                .name("atp-example")
                .location("West Europe")
                .build());
    
            var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
                .name("examplestorage")
                .resourceGroupName(example.name())
                .location(example.location())
                .accountTier("Standard")
                .accountReplicationType("LRS")
                .tags(Map.of("environment", "example"))
                .build());
    
            var exampleAdvancedThreatProtection = new AdvancedThreatProtection("exampleAdvancedThreatProtection", AdvancedThreatProtectionArgs.builder()
                .targetResourceId(exampleAccount.id())
                .enabled(true)
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: atp-example
          location: West Europe
      exampleAccount:
        type: azure:storage:Account
        name: example
        properties:
          name: examplestorage
          resourceGroupName: ${example.name}
          location: ${example.location}
          accountTier: Standard
          accountReplicationType: LRS
          tags:
            environment: example
      exampleAdvancedThreatProtection:
        type: azure:securitycenter:AdvancedThreatProtection
        name: example
        properties:
          targetResourceId: ${exampleAccount.id}
          enabled: true
    

    Create AdvancedThreatProtection Resource

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

    Constructor syntax

    new AdvancedThreatProtection(name: string, args: AdvancedThreatProtectionArgs, opts?: CustomResourceOptions);
    @overload
    def AdvancedThreatProtection(resource_name: str,
                                 args: AdvancedThreatProtectionArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def AdvancedThreatProtection(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 enabled: Optional[bool] = None,
                                 target_resource_id: Optional[str] = None)
    func NewAdvancedThreatProtection(ctx *Context, name string, args AdvancedThreatProtectionArgs, opts ...ResourceOption) (*AdvancedThreatProtection, error)
    public AdvancedThreatProtection(string name, AdvancedThreatProtectionArgs args, CustomResourceOptions? opts = null)
    public AdvancedThreatProtection(String name, AdvancedThreatProtectionArgs args)
    public AdvancedThreatProtection(String name, AdvancedThreatProtectionArgs args, CustomResourceOptions options)
    
    type: azure:securitycenter:AdvancedThreatProtection
    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 AdvancedThreatProtectionArgs
    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 AdvancedThreatProtectionArgs
    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 AdvancedThreatProtectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AdvancedThreatProtectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AdvancedThreatProtectionArgs
    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 advancedThreatProtectionResource = new Azure.SecurityCenter.AdvancedThreatProtection("advancedThreatProtectionResource", new()
    {
        Enabled = false,
        TargetResourceId = "string",
    });
    
    example, err := securitycenter.NewAdvancedThreatProtection(ctx, "advancedThreatProtectionResource", &securitycenter.AdvancedThreatProtectionArgs{
    	Enabled:          pulumi.Bool(false),
    	TargetResourceId: pulumi.String("string"),
    })
    
    var advancedThreatProtectionResource = new AdvancedThreatProtection("advancedThreatProtectionResource", AdvancedThreatProtectionArgs.builder()
        .enabled(false)
        .targetResourceId("string")
        .build());
    
    advanced_threat_protection_resource = azure.securitycenter.AdvancedThreatProtection("advancedThreatProtectionResource",
        enabled=False,
        target_resource_id="string")
    
    const advancedThreatProtectionResource = new azure.securitycenter.AdvancedThreatProtection("advancedThreatProtectionResource", {
        enabled: false,
        targetResourceId: "string",
    });
    
    type: azure:securitycenter:AdvancedThreatProtection
    properties:
        enabled: false
        targetResourceId: string
    

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

    Enabled bool
    Should Advanced Threat Protection be enabled on this resource?
    TargetResourceId string
    The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
    Enabled bool
    Should Advanced Threat Protection be enabled on this resource?
    TargetResourceId string
    The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
    enabled Boolean
    Should Advanced Threat Protection be enabled on this resource?
    targetResourceId String
    The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
    enabled boolean
    Should Advanced Threat Protection be enabled on this resource?
    targetResourceId string
    The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
    enabled bool
    Should Advanced Threat Protection be enabled on this resource?
    target_resource_id str
    The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
    enabled Boolean
    Should Advanced Threat Protection be enabled on this resource?
    targetResourceId String
    The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.

    Outputs

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

    Get an existing AdvancedThreatProtection 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?: AdvancedThreatProtectionState, opts?: CustomResourceOptions): AdvancedThreatProtection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None,
            target_resource_id: Optional[str] = None) -> AdvancedThreatProtection
    func GetAdvancedThreatProtection(ctx *Context, name string, id IDInput, state *AdvancedThreatProtectionState, opts ...ResourceOption) (*AdvancedThreatProtection, error)
    public static AdvancedThreatProtection Get(string name, Input<string> id, AdvancedThreatProtectionState? state, CustomResourceOptions? opts = null)
    public static AdvancedThreatProtection get(String name, Output<String> id, AdvancedThreatProtectionState 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:
    Enabled bool
    Should Advanced Threat Protection be enabled on this resource?
    TargetResourceId string
    The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
    Enabled bool
    Should Advanced Threat Protection be enabled on this resource?
    TargetResourceId string
    The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
    enabled Boolean
    Should Advanced Threat Protection be enabled on this resource?
    targetResourceId String
    The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
    enabled boolean
    Should Advanced Threat Protection be enabled on this resource?
    targetResourceId string
    The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
    enabled bool
    Should Advanced Threat Protection be enabled on this resource?
    target_resource_id str
    The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.
    enabled Boolean
    Should Advanced Threat Protection be enabled on this resource?
    targetResourceId String
    The ID of the Azure Resource which to enable Advanced Threat Protection on. Changing this forces a new resource to be created.

    Import

    Advanced Threat Protection can be imported using the resource id, e.g.

    $ pulumi import azure:securitycenter/advancedThreatProtection:AdvancedThreatProtection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/exampleResourceGroup/providers/Microsoft.Storage/storageAccounts/exampleaccount/providers/Microsoft.Security/advancedThreatProtectionSettings/default
    

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

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi