We recommend using Azure Native.
azure.securitycenter.SubscriptionPricing
Explore with Pulumi AI
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/v6/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=[
{
"name": "ContainerRegistriesVulnerabilityAssessments",
},
{
"name": "AgentlessVmScanning",
"additional_extension_properties": {
"exclusion_tags": "[]",
},
},
{
"name": "AgentlessDiscoveryForKubernetes",
},
{
"name": "SensitiveDataDiscovery",
},
])
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/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
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SubscriptionPricing(name: string, args: SubscriptionPricingArgs, opts?: CustomResourceOptions);
@overload
def SubscriptionPricing(resource_name: str,
args: SubscriptionPricingArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SubscriptionPricing(resource_name: str,
opts: Optional[ResourceOptions] = None,
tier: Optional[str] = None,
extensions: Optional[Sequence[SubscriptionPricingExtensionArgs]] = None,
resource_type: Optional[str] = None,
subplan: Optional[str] = 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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var subscriptionPricingResource = new Azure.SecurityCenter.SubscriptionPricing("subscriptionPricingResource", new()
{
Tier = "string",
Extensions = new[]
{
new Azure.SecurityCenter.Inputs.SubscriptionPricingExtensionArgs
{
Name = "string",
AdditionalExtensionProperties =
{
{ "string", "string" },
},
},
},
ResourceType = "string",
Subplan = "string",
});
example, err := securitycenter.NewSubscriptionPricing(ctx, "subscriptionPricingResource", &securitycenter.SubscriptionPricingArgs{
Tier: pulumi.String("string"),
Extensions: securitycenter.SubscriptionPricingExtensionArray{
&securitycenter.SubscriptionPricingExtensionArgs{
Name: pulumi.String("string"),
AdditionalExtensionProperties: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
},
ResourceType: pulumi.String("string"),
Subplan: pulumi.String("string"),
})
var subscriptionPricingResource = new SubscriptionPricing("subscriptionPricingResource", SubscriptionPricingArgs.builder()
.tier("string")
.extensions(SubscriptionPricingExtensionArgs.builder()
.name("string")
.additionalExtensionProperties(Map.of("string", "string"))
.build())
.resourceType("string")
.subplan("string")
.build());
subscription_pricing_resource = azure.securitycenter.SubscriptionPricing("subscriptionPricingResource",
tier="string",
extensions=[{
"name": "string",
"additionalExtensionProperties": {
"string": "string",
},
}],
resource_type="string",
subplan="string")
const subscriptionPricingResource = new azure.securitycenter.SubscriptionPricing("subscriptionPricingResource", {
tier: "string",
extensions: [{
name: "string",
additionalExtensionProperties: {
string: "string",
},
}],
resourceType: "string",
subplan: "string",
});
type: azure:securitycenter:SubscriptionPricing
properties:
extensions:
- additionalExtensionProperties:
string: string
name: string
resourceType: string
subplan: string
tier: string
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
andStandard
. - Extensions
List<Subscription
Pricing Extension> - One or more
extension
blocks as defined below. - Resource
Type string - The resource type this setting affects. Possible values are
Api
,AppServices
,ContainerRegistry
,KeyVaults
,KubernetesService
,SqlServers
,SqlServerVirtualMachines
,StorageAccounts
,VirtualMachines
,Arm
,Dns
,OpenSourceRelationalDatabases
,Containers
,CosmosDbs
andCloudPosture
. Defaults toVirtualMachines
- Subplan string
- Resource type pricing subplan. Contact your MSFT representative for possible values.
- Tier string
- The pricing tier to use. Possible values are
Free
andStandard
. - Extensions
[]Subscription
Pricing Extension Args - One or more
extension
blocks as defined below. - Resource
Type string - The resource type this setting affects. Possible values are
Api
,AppServices
,ContainerRegistry
,KeyVaults
,KubernetesService
,SqlServers
,SqlServerVirtualMachines
,StorageAccounts
,VirtualMachines
,Arm
,Dns
,OpenSourceRelationalDatabases
,Containers
,CosmosDbs
andCloudPosture
. Defaults toVirtualMachines
- Subplan string
- Resource type pricing subplan. Contact your MSFT representative for possible values.
- tier String
- The pricing tier to use. Possible values are
Free
andStandard
. - extensions
List<Subscription
Pricing Extension> - One or more
extension
blocks as defined below. - resource
Type String - The resource type this setting affects. Possible values are
Api
,AppServices
,ContainerRegistry
,KeyVaults
,KubernetesService
,SqlServers
,SqlServerVirtualMachines
,StorageAccounts
,VirtualMachines
,Arm
,Dns
,OpenSourceRelationalDatabases
,Containers
,CosmosDbs
andCloudPosture
. Defaults toVirtualMachines
- subplan String
- Resource type pricing subplan. Contact your MSFT representative for possible values.
- tier string
- The pricing tier to use. Possible values are
Free
andStandard
. - extensions
Subscription
Pricing Extension[] - One or more
extension
blocks as defined below. - resource
Type string - The resource type this setting affects. Possible values are
Api
,AppServices
,ContainerRegistry
,KeyVaults
,KubernetesService
,SqlServers
,SqlServerVirtualMachines
,StorageAccounts
,VirtualMachines
,Arm
,Dns
,OpenSourceRelationalDatabases
,Containers
,CosmosDbs
andCloudPosture
. Defaults toVirtualMachines
- subplan string
- Resource type pricing subplan. Contact your MSFT representative for possible values.
- tier str
- The pricing tier to use. Possible values are
Free
andStandard
. - extensions
Sequence[Subscription
Pricing Extension Args] - 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
andCloudPosture
. Defaults toVirtualMachines
- subplan str
- Resource type pricing subplan. Contact your MSFT representative for possible values.
- tier String
- The pricing tier to use. Possible values are
Free
andStandard
. - extensions List<Property Map>
- One or more
extension
blocks as defined below. - resource
Type String - The resource type this setting affects. Possible values are
Api
,AppServices
,ContainerRegistry
,KeyVaults
,KubernetesService
,SqlServers
,SqlServerVirtualMachines
,StorageAccounts
,VirtualMachines
,Arm
,Dns
,OpenSourceRelationalDatabases
,Containers
,CosmosDbs
andCloudPosture
. Defaults toVirtualMachines
- 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.
- Extensions
List<Subscription
Pricing Extension> - One or more
extension
blocks as defined below. - Resource
Type string - The resource type this setting affects. Possible values are
Api
,AppServices
,ContainerRegistry
,KeyVaults
,KubernetesService
,SqlServers
,SqlServerVirtualMachines
,StorageAccounts
,VirtualMachines
,Arm
,Dns
,OpenSourceRelationalDatabases
,Containers
,CosmosDbs
andCloudPosture
. Defaults toVirtualMachines
- Subplan string
- Resource type pricing subplan. Contact your MSFT representative for possible values.
- Tier string
- The pricing tier to use. Possible values are
Free
andStandard
.
- Extensions
[]Subscription
Pricing Extension Args - One or more
extension
blocks as defined below. - Resource
Type string - The resource type this setting affects. Possible values are
Api
,AppServices
,ContainerRegistry
,KeyVaults
,KubernetesService
,SqlServers
,SqlServerVirtualMachines
,StorageAccounts
,VirtualMachines
,Arm
,Dns
,OpenSourceRelationalDatabases
,Containers
,CosmosDbs
andCloudPosture
. Defaults toVirtualMachines
- Subplan string
- Resource type pricing subplan. Contact your MSFT representative for possible values.
- Tier string
- The pricing tier to use. Possible values are
Free
andStandard
.
- extensions
List<Subscription
Pricing Extension> - One or more
extension
blocks as defined below. - resource
Type String - The resource type this setting affects. Possible values are
Api
,AppServices
,ContainerRegistry
,KeyVaults
,KubernetesService
,SqlServers
,SqlServerVirtualMachines
,StorageAccounts
,VirtualMachines
,Arm
,Dns
,OpenSourceRelationalDatabases
,Containers
,CosmosDbs
andCloudPosture
. Defaults toVirtualMachines
- subplan String
- Resource type pricing subplan. Contact your MSFT representative for possible values.
- tier String
- The pricing tier to use. Possible values are
Free
andStandard
.
- extensions
Subscription
Pricing Extension[] - One or more
extension
blocks as defined below. - resource
Type string - The resource type this setting affects. Possible values are
Api
,AppServices
,ContainerRegistry
,KeyVaults
,KubernetesService
,SqlServers
,SqlServerVirtualMachines
,StorageAccounts
,VirtualMachines
,Arm
,Dns
,OpenSourceRelationalDatabases
,Containers
,CosmosDbs
andCloudPosture
. Defaults toVirtualMachines
- subplan string
- Resource type pricing subplan. Contact your MSFT representative for possible values.
- tier string
- The pricing tier to use. Possible values are
Free
andStandard
.
- extensions
Sequence[Subscription
Pricing Extension Args] - 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
andCloudPosture
. Defaults toVirtualMachines
- subplan str
- Resource type pricing subplan. Contact your MSFT representative for possible values.
- tier str
- The pricing tier to use. Possible values are
Free
andStandard
.
- extensions List<Property Map>
- One or more
extension
blocks as defined below. - resource
Type String - The resource type this setting affects. Possible values are
Api
,AppServices
,ContainerRegistry
,KeyVaults
,KubernetesService
,SqlServers
,SqlServerVirtualMachines
,StorageAccounts
,VirtualMachines
,Arm
,Dns
,OpenSourceRelationalDatabases
,Containers
,CosmosDbs
andCloudPosture
. Defaults toVirtualMachines
- subplan String
- Resource type pricing subplan. Contact your MSFT representative for possible values.
- tier String
- The pricing tier to use. Possible values are
Free
andStandard
.
Supporting Types
SubscriptionPricingExtension, SubscriptionPricingExtensionArgs
- Name string
- The name of extension.
- Additional
Extension Dictionary<string, string>Properties 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.
- Additional
Extension map[string]stringProperties 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.
- additional
Extension Map<String,String>Properties 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.
- additional
Extension {[key: string]: string}Properties 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_ Mapping[str, str]properties 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.
- additional
Extension Map<String>Properties 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>
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.