Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.15.0 published on Wednesday, Aug 17, 2022 by Pulumi

AdvancedThreatProtection

Manages a resources Advanced Threat Protection setting.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
    {
        Location = "West Europe",
    });

    var exampleAccount = new Azure.Storage.Account("exampleAccount", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        Location = exampleResourceGroup.Location,
        AccountTier = "Standard",
        AccountReplicationType = "LRS",
        Tags = 
        {
            { "environment", "example" },
        },
    });

    var exampleAdvancedThreatProtection = new Azure.SecurityCenter.AdvancedThreatProtection("exampleAdvancedThreatProtection", new()
    {
        TargetResourceId = exampleAccount.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 {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
			ResourceGroupName:      exampleResourceGroup.Name,
			Location:               exampleResourceGroup.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, "exampleAdvancedThreatProtection", &securitycenter.AdvancedThreatProtectionArgs{
			TargetResourceId: exampleAccount.ID(),
			Enabled:          pulumi.Bool(true),
		})
		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.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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
            .location("West Europe")
            .build());

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .location(exampleResourceGroup.location())
            .accountTier("Standard")
            .accountReplicationType("LRS")
            .tags(Map.of("environment", "example"))
            .build());

        var exampleAdvancedThreatProtection = new AdvancedThreatProtection("exampleAdvancedThreatProtection", AdvancedThreatProtectionArgs.builder()        
            .targetResourceId(exampleAccount.id())
            .enabled(true)
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.storage.Account("exampleAccount",
    resource_group_name=example_resource_group.name,
    location=example_resource_group.location,
    account_tier="Standard",
    account_replication_type="LRS",
    tags={
        "environment": "example",
    })
example_advanced_threat_protection = azure.securitycenter.AdvancedThreatProtection("exampleAdvancedThreatProtection",
    target_resource_id=example_account.id,
    enabled=True)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
    resourceGroupName: exampleResourceGroup.name,
    location: exampleResourceGroup.location,
    accountTier: "Standard",
    accountReplicationType: "LRS",
    tags: {
        environment: "example",
    },
});
const exampleAdvancedThreatProtection = new azure.securitycenter.AdvancedThreatProtection("exampleAdvancedThreatProtection", {
    targetResourceId: exampleAccount.id,
    enabled: true,
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleAccount:
    type: azure:storage:Account
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      location: ${exampleResourceGroup.location}
      accountTier: Standard
      accountReplicationType: LRS
      tags:
        environment: example
  exampleAdvancedThreatProtection:
    type: azure:securitycenter:AdvancedThreatProtection
    properties:
      targetResourceId: ${exampleAccount.id}
      enabled: true

Create a AdvancedThreatProtection Resource

new AdvancedThreatProtection(name: string, args: AdvancedThreatProtectionArgs, opts?: CustomResourceOptions);
@overload
def AdvancedThreatProtection(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             enabled: Optional[bool] = None,
                             target_resource_id: Optional[str] = None)
@overload
def AdvancedThreatProtection(resource_name: str,
                             args: AdvancedThreatProtectionArgs,
                             opts: Optional[ResourceOptions] = 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.

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.

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 an 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

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.