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

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

azure.securitycenter.SubscriptionPricing

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.70.0 published on Wednesday, Mar 27, 2024 by Pulumi

    Manages the Pricing Tier for Azure Security Center in the current subscription.

    NOTE: Deletion of this resource will reset the pricing tier to Free

    Example Usage

    Basic usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.securitycenter.SubscriptionPricing("example", {
        tier: "Standard",
        resourceType: "VirtualMachines",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.securitycenter.SubscriptionPricing("example",
        tier="Standard",
        resource_type="VirtualMachines")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/securitycenter"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := securitycenter.NewSubscriptionPricing(ctx, "example", &securitycenter.SubscriptionPricingArgs{
    			Tier:         pulumi.String("Standard"),
    			ResourceType: pulumi.String("VirtualMachines"),
    		})
    		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.SecurityCenter.SubscriptionPricing("example", new()
        {
            Tier = "Standard",
            ResourceType = "VirtualMachines",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.securitycenter.SubscriptionPricing;
    import com.pulumi.azure.securitycenter.SubscriptionPricingArgs;
    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 SubscriptionPricing("example", SubscriptionPricingArgs.builder()        
                .tier("Standard")
                .resourceType("VirtualMachines")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:securitycenter:SubscriptionPricing
        properties:
          tier: Standard
          resourceType: VirtualMachines
    

    Using Extensions with Defender CSPM

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example1 = new azure.securitycenter.SubscriptionPricing("example1", {
        tier: "Standard",
        resourceType: "CloudPosture",
        extensions: [
            {
                name: "ContainerRegistriesVulnerabilityAssessments",
            },
            {
                name: "AgentlessVmScanning",
                additionalExtensionProperties: {
                    ExclusionTags: "[]",
                },
            },
            {
                name: "AgentlessDiscoveryForKubernetes",
            },
            {
                name: "SensitiveDataDiscovery",
            },
        ],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example1 = azure.securitycenter.SubscriptionPricing("example1",
        tier="Standard",
        resource_type="CloudPosture",
        extensions=[
            azure.securitycenter.SubscriptionPricingExtensionArgs(
                name="ContainerRegistriesVulnerabilityAssessments",
            ),
            azure.securitycenter.SubscriptionPricingExtensionArgs(
                name="AgentlessVmScanning",
                additional_extension_properties={
                    "ExclusionTags": "[]",
                },
            ),
            azure.securitycenter.SubscriptionPricingExtensionArgs(
                name="AgentlessDiscoveryForKubernetes",
            ),
            azure.securitycenter.SubscriptionPricingExtensionArgs(
                name="SensitiveDataDiscovery",
            ),
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/securitycenter"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := securitycenter.NewSubscriptionPricing(ctx, "example1", &securitycenter.SubscriptionPricingArgs{
    			Tier:         pulumi.String("Standard"),
    			ResourceType: pulumi.String("CloudPosture"),
    			Extensions: securitycenter.SubscriptionPricingExtensionArray{
    				&securitycenter.SubscriptionPricingExtensionArgs{
    					Name: pulumi.String("ContainerRegistriesVulnerabilityAssessments"),
    				},
    				&securitycenter.SubscriptionPricingExtensionArgs{
    					Name: pulumi.String("AgentlessVmScanning"),
    					AdditionalExtensionProperties: pulumi.StringMap{
    						"ExclusionTags": pulumi.String("[]"),
    					},
    				},
    				&securitycenter.SubscriptionPricingExtensionArgs{
    					Name: pulumi.String("AgentlessDiscoveryForKubernetes"),
    				},
    				&securitycenter.SubscriptionPricingExtensionArgs{
    					Name: pulumi.String("SensitiveDataDiscovery"),
    				},
    			},
    		})
    		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 example1 = new Azure.SecurityCenter.SubscriptionPricing("example1", new()
        {
            Tier = "Standard",
            ResourceType = "CloudPosture",
            Extensions = new[]
            {
                new Azure.SecurityCenter.Inputs.SubscriptionPricingExtensionArgs
                {
                    Name = "ContainerRegistriesVulnerabilityAssessments",
                },
                new Azure.SecurityCenter.Inputs.SubscriptionPricingExtensionArgs
                {
                    Name = "AgentlessVmScanning",
                    AdditionalExtensionProperties = 
                    {
                        { "ExclusionTags", "[]" },
                    },
                },
                new Azure.SecurityCenter.Inputs.SubscriptionPricingExtensionArgs
                {
                    Name = "AgentlessDiscoveryForKubernetes",
                },
                new Azure.SecurityCenter.Inputs.SubscriptionPricingExtensionArgs
                {
                    Name = "SensitiveDataDiscovery",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.securitycenter.SubscriptionPricing;
    import com.pulumi.azure.securitycenter.SubscriptionPricingArgs;
    import com.pulumi.azure.securitycenter.inputs.SubscriptionPricingExtensionArgs;
    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 example1 = new SubscriptionPricing("example1", SubscriptionPricingArgs.builder()        
                .tier("Standard")
                .resourceType("CloudPosture")
                .extensions(            
                    SubscriptionPricingExtensionArgs.builder()
                        .name("ContainerRegistriesVulnerabilityAssessments")
                        .build(),
                    SubscriptionPricingExtensionArgs.builder()
                        .name("AgentlessVmScanning")
                        .additionalExtensionProperties(Map.of("ExclusionTags", "[]"))
                        .build(),
                    SubscriptionPricingExtensionArgs.builder()
                        .name("AgentlessDiscoveryForKubernetes")
                        .build(),
                    SubscriptionPricingExtensionArgs.builder()
                        .name("SensitiveDataDiscovery")
                        .build())
                .build());
    
        }
    }
    
    resources:
      example1:
        type: azure:securitycenter:SubscriptionPricing
        properties:
          tier: Standard
          resourceType: CloudPosture
          extensions:
            - name: ContainerRegistriesVulnerabilityAssessments
            - name: AgentlessVmScanning
              additionalExtensionProperties:
                ExclusionTags: '[]'
            - name: AgentlessDiscoveryForKubernetes
            - name: SensitiveDataDiscovery
    

    Create SubscriptionPricing Resource

    new SubscriptionPricing(name: string, args: SubscriptionPricingArgs, opts?: CustomResourceOptions);
    @overload
    def SubscriptionPricing(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            extensions: Optional[Sequence[SubscriptionPricingExtensionArgs]] = None,
                            resource_type: Optional[str] = None,
                            subplan: Optional[str] = None,
                            tier: Optional[str] = None)
    @overload
    def SubscriptionPricing(resource_name: str,
                            args: SubscriptionPricingArgs,
                            opts: Optional[ResourceOptions] = None)
    func NewSubscriptionPricing(ctx *Context, name string, args SubscriptionPricingArgs, opts ...ResourceOption) (*SubscriptionPricing, error)
    public SubscriptionPricing(string name, SubscriptionPricingArgs args, CustomResourceOptions? opts = null)
    public SubscriptionPricing(String name, SubscriptionPricingArgs args)
    public SubscriptionPricing(String name, SubscriptionPricingArgs args, CustomResourceOptions options)
    
    type: azure:securitycenter:SubscriptionPricing
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args SubscriptionPricingArgs
    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 SubscriptionPricingArgs
    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 SubscriptionPricingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SubscriptionPricingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SubscriptionPricingArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Tier string
    The pricing tier to use. Possible values are Free and Standard.
    Extensions List<SubscriptionPricingExtension>
    One or more extension blocks as defined below.
    ResourceType string
    The resource type this setting affects. Possible values are Api, AppServices, ContainerRegistry, KeyVaults, KubernetesService, SqlServers, SqlServerVirtualMachines, StorageAccounts, VirtualMachines, Arm, Dns, OpenSourceRelationalDatabases, Containers, CosmosDbs and CloudPosture. Defaults to VirtualMachines
    Subplan string
    Resource type pricing subplan. Contact your MSFT representative for possible values.
    Tier string
    The pricing tier to use. Possible values are Free and Standard.
    Extensions []SubscriptionPricingExtensionArgs
    One or more extension blocks as defined below.
    ResourceType string
    The resource type this setting affects. Possible values are Api, AppServices, ContainerRegistry, KeyVaults, KubernetesService, SqlServers, SqlServerVirtualMachines, StorageAccounts, VirtualMachines, Arm, Dns, OpenSourceRelationalDatabases, Containers, CosmosDbs and CloudPosture. Defaults to VirtualMachines
    Subplan string
    Resource type pricing subplan. Contact your MSFT representative for possible values.
    tier String
    The pricing tier to use. Possible values are Free and Standard.
    extensions List<SubscriptionPricingExtension>
    One or more extension blocks as defined below.
    resourceType String
    The resource type this setting affects. Possible values are Api, AppServices, ContainerRegistry, KeyVaults, KubernetesService, SqlServers, SqlServerVirtualMachines, StorageAccounts, VirtualMachines, Arm, Dns, OpenSourceRelationalDatabases, Containers, CosmosDbs and CloudPosture. Defaults to VirtualMachines
    subplan String
    Resource type pricing subplan. Contact your MSFT representative for possible values.
    tier string
    The pricing tier to use. Possible values are Free and Standard.
    extensions SubscriptionPricingExtension[]
    One or more extension blocks as defined below.
    resourceType string
    The resource type this setting affects. Possible values are Api, AppServices, ContainerRegistry, KeyVaults, KubernetesService, SqlServers, SqlServerVirtualMachines, StorageAccounts, VirtualMachines, Arm, Dns, OpenSourceRelationalDatabases, Containers, CosmosDbs and CloudPosture. Defaults to VirtualMachines
    subplan string
    Resource type pricing subplan. Contact your MSFT representative for possible values.
    tier str
    The pricing tier to use. Possible values are Free and Standard.
    extensions Sequence[SubscriptionPricingExtensionArgs]
    One or more extension blocks as defined below.
    resource_type str
    The resource type this setting affects. Possible values are Api, AppServices, ContainerRegistry, KeyVaults, KubernetesService, SqlServers, SqlServerVirtualMachines, StorageAccounts, VirtualMachines, Arm, Dns, OpenSourceRelationalDatabases, Containers, CosmosDbs and CloudPosture. Defaults to VirtualMachines
    subplan str
    Resource type pricing subplan. Contact your MSFT representative for possible values.
    tier String
    The pricing tier to use. Possible values are Free and Standard.
    extensions List<Property Map>
    One or more extension blocks as defined below.
    resourceType String
    The resource type this setting affects. Possible values are Api, AppServices, ContainerRegistry, KeyVaults, KubernetesService, SqlServers, SqlServerVirtualMachines, StorageAccounts, VirtualMachines, Arm, Dns, OpenSourceRelationalDatabases, Containers, CosmosDbs and CloudPosture. Defaults to VirtualMachines
    subplan String
    Resource type pricing subplan. Contact your MSFT representative for possible values.

    Outputs

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

    Get an existing SubscriptionPricing 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?: SubscriptionPricingState, opts?: CustomResourceOptions): SubscriptionPricing
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            extensions: Optional[Sequence[SubscriptionPricingExtensionArgs]] = None,
            resource_type: Optional[str] = None,
            subplan: Optional[str] = None,
            tier: Optional[str] = None) -> SubscriptionPricing
    func GetSubscriptionPricing(ctx *Context, name string, id IDInput, state *SubscriptionPricingState, opts ...ResourceOption) (*SubscriptionPricing, error)
    public static SubscriptionPricing Get(string name, Input<string> id, SubscriptionPricingState? state, CustomResourceOptions? opts = null)
    public static SubscriptionPricing get(String name, Output<String> id, SubscriptionPricingState 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:
    Extensions List<SubscriptionPricingExtension>
    One or more extension blocks as defined below.
    ResourceType string
    The resource type this setting affects. Possible values are Api, AppServices, ContainerRegistry, KeyVaults, KubernetesService, SqlServers, SqlServerVirtualMachines, StorageAccounts, VirtualMachines, Arm, Dns, OpenSourceRelationalDatabases, Containers, CosmosDbs and CloudPosture. Defaults to VirtualMachines
    Subplan string
    Resource type pricing subplan. Contact your MSFT representative for possible values.
    Tier string
    The pricing tier to use. Possible values are Free and Standard.
    Extensions []SubscriptionPricingExtensionArgs
    One or more extension blocks as defined below.
    ResourceType string
    The resource type this setting affects. Possible values are Api, AppServices, ContainerRegistry, KeyVaults, KubernetesService, SqlServers, SqlServerVirtualMachines, StorageAccounts, VirtualMachines, Arm, Dns, OpenSourceRelationalDatabases, Containers, CosmosDbs and CloudPosture. Defaults to VirtualMachines
    Subplan string
    Resource type pricing subplan. Contact your MSFT representative for possible values.
    Tier string
    The pricing tier to use. Possible values are Free and Standard.
    extensions List<SubscriptionPricingExtension>
    One or more extension blocks as defined below.
    resourceType String
    The resource type this setting affects. Possible values are Api, AppServices, ContainerRegistry, KeyVaults, KubernetesService, SqlServers, SqlServerVirtualMachines, StorageAccounts, VirtualMachines, Arm, Dns, OpenSourceRelationalDatabases, Containers, CosmosDbs and CloudPosture. Defaults to VirtualMachines
    subplan String
    Resource type pricing subplan. Contact your MSFT representative for possible values.
    tier String
    The pricing tier to use. Possible values are Free and Standard.
    extensions SubscriptionPricingExtension[]
    One or more extension blocks as defined below.
    resourceType string
    The resource type this setting affects. Possible values are Api, AppServices, ContainerRegistry, KeyVaults, KubernetesService, SqlServers, SqlServerVirtualMachines, StorageAccounts, VirtualMachines, Arm, Dns, OpenSourceRelationalDatabases, Containers, CosmosDbs and CloudPosture. Defaults to VirtualMachines
    subplan string
    Resource type pricing subplan. Contact your MSFT representative for possible values.
    tier string
    The pricing tier to use. Possible values are Free and Standard.
    extensions Sequence[SubscriptionPricingExtensionArgs]
    One or more extension blocks as defined below.
    resource_type str
    The resource type this setting affects. Possible values are Api, AppServices, ContainerRegistry, KeyVaults, KubernetesService, SqlServers, SqlServerVirtualMachines, StorageAccounts, VirtualMachines, Arm, Dns, OpenSourceRelationalDatabases, Containers, CosmosDbs and CloudPosture. Defaults to VirtualMachines
    subplan str
    Resource type pricing subplan. Contact your MSFT representative for possible values.
    tier str
    The pricing tier to use. Possible values are Free and Standard.
    extensions List<Property Map>
    One or more extension blocks as defined below.
    resourceType String
    The resource type this setting affects. Possible values are Api, AppServices, ContainerRegistry, KeyVaults, KubernetesService, SqlServers, SqlServerVirtualMachines, StorageAccounts, VirtualMachines, Arm, Dns, OpenSourceRelationalDatabases, Containers, CosmosDbs and CloudPosture. Defaults to VirtualMachines
    subplan String
    Resource type pricing subplan. Contact your MSFT representative for possible values.
    tier String
    The pricing tier to use. Possible values are Free and Standard.

    Supporting Types

    SubscriptionPricingExtension, SubscriptionPricingExtensionArgs

    Name string
    The name of extension.
    AdditionalExtensionProperties Dictionary<string, string>

    Key/Value pairs that are required for some extensions.

    NOTE: If an extension is not defined, it will not be enabled.

    NOTE: Changing the pricing tier to Standard affects all resources of the given type in the subscription and could be quite costly.

    Name string
    The name of extension.
    AdditionalExtensionProperties map[string]string

    Key/Value pairs that are required for some extensions.

    NOTE: If an extension is not defined, it will not be enabled.

    NOTE: Changing the pricing tier to Standard affects all resources of the given type in the subscription and could be quite costly.

    name String
    The name of extension.
    additionalExtensionProperties Map<String,String>

    Key/Value pairs that are required for some extensions.

    NOTE: If an extension is not defined, it will not be enabled.

    NOTE: Changing the pricing tier to Standard affects all resources of the given type in the subscription and could be quite costly.

    name string
    The name of extension.
    additionalExtensionProperties {[key: string]: string}

    Key/Value pairs that are required for some extensions.

    NOTE: If an extension is not defined, it will not be enabled.

    NOTE: Changing the pricing tier to Standard affects all resources of the given type in the subscription and could be quite costly.

    name str
    The name of extension.
    additional_extension_properties Mapping[str, str]

    Key/Value pairs that are required for some extensions.

    NOTE: If an extension is not defined, it will not be enabled.

    NOTE: Changing the pricing tier to Standard affects all resources of the given type in the subscription and could be quite costly.

    name String
    The name of extension.
    additionalExtensionProperties Map<String>

    Key/Value pairs that are required for some extensions.

    NOTE: If an extension is not defined, it will not be enabled.

    NOTE: Changing the pricing tier to Standard affects all resources of the given type in the subscription and could be quite costly.

    Import

    The pricing tier can be imported using the resource id, e.g.

    $ pulumi import azure:securitycenter/subscriptionPricing:SubscriptionPricing example /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Security/pricings/<resource_type>
    

    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.70.0 published on Wednesday, Mar 27, 2024 by Pulumi