We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages a resources Advanced Threat Protection setting.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var rg = new Azure.Core.ResourceGroup("rg", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
{
ResourceGroupName = azurerm_resource_group.Example.Name,
Location = azurerm_resource_group.Example.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
Tags =
{
{ "environment", "example" },
},
});
var exampleAdvancedThreatProtection = new Azure.SecurityCenter.AdvancedThreatProtection("exampleAdvancedThreatProtection", new Azure.SecurityCenter.AdvancedThreatProtectionArgs
{
TargetResourceId = exampleAccount.Id,
Enabled = true,
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/securitycenter"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := core.NewResourceGroup(ctx, "rg", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
ResourceGroupName: pulumi.Any(azurerm_resource_group.Example.Name),
Location: pulumi.Any(azurerm_resource_group.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, "exampleAdvancedThreatProtection", &securitycenter.AdvancedThreatProtectionArgs{
TargetResourceId: exampleAccount.ID(),
Enabled: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const rg = new azure.core.ResourceGroup("rg", {location: "West Europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: azurerm_resource_group.example.name,
location: azurerm_resource_group.example.location,
accountTier: "Standard",
accountReplicationType: "LRS",
tags: {
environment: "example",
},
});
const exampleAdvancedThreatProtection = new azure.securitycenter.AdvancedThreatProtection("exampleAdvancedThreatProtection", {
targetResourceId: exampleAccount.id,
enabled: true,
});
import pulumi
import pulumi_azure as azure
rg = azure.core.ResourceGroup("rg", location="West Europe")
example_account = azure.storage.Account("exampleAccount",
resource_group_name=azurerm_resource_group["example"]["name"],
location=azurerm_resource_group["example"]["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)
Example coming soon!
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AdvancedThreatProtection resource accepts the following input properties:
- Enabled bool
- Should Advanced Threat Protection be enabled on this resource?
- Target
Resource stringId - 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 stringId - 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?
- target
Resource StringId - 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?
- target
Resource stringId - 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_ strid - 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?
- target
Resource StringId - 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) -> AdvancedThreatProtectionfunc 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)resources: _: type: azure:securitycenter:AdvancedThreatProtection 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.
- Enabled bool
- Should Advanced Threat Protection be enabled on this resource?
- Target
Resource stringId - 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 stringId - 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?
- target
Resource StringId - 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?
- target
Resource stringId - 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_ strid - 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?
- target
Resource StringId - 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
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi