AdvancedThreatProtection

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 = "northeurope",
        });
        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/v3/go/azure/core"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/securitycenter"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/storage"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err = core.NewResourceGroup(ctx, "rg", &core.ResourceGroupArgs{
            Location: pulumi.String("northeurope"),
        })
        if err != nil {
            return err
        }
        exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
            ResourceGroupName:      pulumi.String(azurerm_resource_group.Example.Name),
            Location:               pulumi.String(azurerm_resource_group.Example.Location),
            AccountTier:            pulumi.String("Standard"),
            AccountReplicationType: pulumi.String("LRS"),
            Tags: pulumi.Map{
                "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
    })
}
import pulumi
import pulumi_azure as azure

rg = azure.core.ResourceGroup("rg", location="northeurope")
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)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const rg = new azure.core.ResourceGroup("rg", {location: "northeurope"});
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,
});

Create a AdvancedThreatProtection Resource

def AdvancedThreatProtection(resource_name, opts=None, enabled=None, target_resource_id=None, __props__=None);
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.
opts ResourceOptions
A bag of options that control this 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.

AdvancedThreatProtection Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model 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 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.

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 str
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.

static get(resource_name, id, opts=None, enabled=None, target_resource_id=None, __props__=None);
func GetAdvancedThreatProtection(ctx *Context, name string, id IDInput, state *AdvancedThreatProtectionState, opts ...ResourceOption) (*AdvancedThreatProtection, error)
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.

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

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.