1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. SubnetServiceEndpointStoragePolicy

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages a Subnet Service Endpoint Storage Policy.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.Location,
                AccountTier = "Standard",
                AccountReplicationType = "GRS",
            });
            var exampleSubnetServiceEndpointStoragePolicy = new Azure.Network.SubnetServiceEndpointStoragePolicy("exampleSubnetServiceEndpointStoragePolicy", new Azure.Network.SubnetServiceEndpointStoragePolicyArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                Location = exampleResourceGroup.Location,
                Definition = new Azure.Network.Inputs.SubnetServiceEndpointStoragePolicyDefinitionArgs
                {
                    Name = "name1",
                    Description = "definition1",
                    ServiceResources = 
                    {
                        exampleResourceGroup.Id,
                        exampleAccount.Id,
                    },
                },
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/network"
    	"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 {
    		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("GRS"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewSubnetServiceEndpointStoragePolicy(ctx, "exampleSubnetServiceEndpointStoragePolicy", &network.SubnetServiceEndpointStoragePolicyArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			Location:          exampleResourceGroup.Location,
    			Definition: &network.SubnetServiceEndpointStoragePolicyDefinitionArgs{
    				Name:        pulumi.String("name1"),
    				Description: pulumi.String("definition1"),
    				ServiceResources: pulumi.StringArray{
    					exampleResourceGroup.ID(),
    					exampleAccount.ID(),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    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: "GRS",
    });
    const exampleSubnetServiceEndpointStoragePolicy = new azure.network.SubnetServiceEndpointStoragePolicy("exampleSubnetServiceEndpointStoragePolicy", {
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        definition: {
            name: "name1",
            description: "definition1",
            serviceResources: [
                exampleResourceGroup.id,
                exampleAccount.id,
            ],
        },
    });
    
    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="GRS")
    example_subnet_service_endpoint_storage_policy = azure.network.SubnetServiceEndpointStoragePolicy("exampleSubnetServiceEndpointStoragePolicy",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        definition=azure.network.SubnetServiceEndpointStoragePolicyDefinitionArgs(
            name="name1",
            description="definition1",
            service_resources=[
                example_resource_group.id,
                example_account.id,
            ],
        ))
    

    Example coming soon!

    Create SubnetServiceEndpointStoragePolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SubnetServiceEndpointStoragePolicy(name: string, args: SubnetServiceEndpointStoragePolicyArgs, opts?: CustomResourceOptions);
    @overload
    def SubnetServiceEndpointStoragePolicy(resource_name: str,
                                           args: SubnetServiceEndpointStoragePolicyArgs,
                                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def SubnetServiceEndpointStoragePolicy(resource_name: str,
                                           opts: Optional[ResourceOptions] = None,
                                           resource_group_name: Optional[str] = None,
                                           definition: Optional[SubnetServiceEndpointStoragePolicyDefinitionArgs] = None,
                                           location: Optional[str] = None,
                                           name: Optional[str] = None,
                                           tags: Optional[Mapping[str, str]] = None)
    func NewSubnetServiceEndpointStoragePolicy(ctx *Context, name string, args SubnetServiceEndpointStoragePolicyArgs, opts ...ResourceOption) (*SubnetServiceEndpointStoragePolicy, error)
    public SubnetServiceEndpointStoragePolicy(string name, SubnetServiceEndpointStoragePolicyArgs args, CustomResourceOptions? opts = null)
    public SubnetServiceEndpointStoragePolicy(String name, SubnetServiceEndpointStoragePolicyArgs args)
    public SubnetServiceEndpointStoragePolicy(String name, SubnetServiceEndpointStoragePolicyArgs args, CustomResourceOptions options)
    
    type: azure:network:SubnetServiceEndpointStoragePolicy
    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 SubnetServiceEndpointStoragePolicyArgs
    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 SubnetServiceEndpointStoragePolicyArgs
    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 SubnetServiceEndpointStoragePolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SubnetServiceEndpointStoragePolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SubnetServiceEndpointStoragePolicyArgs
    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 subnetServiceEndpointStoragePolicyResource = new Azure.Network.SubnetServiceEndpointStoragePolicy("subnetServiceEndpointStoragePolicyResource", new()
    {
        ResourceGroupName = "string",
        Definition = new Azure.Network.Inputs.SubnetServiceEndpointStoragePolicyDefinitionArgs
        {
            Name = "string",
            ServiceResources = new[]
            {
                "string",
            },
            Description = "string",
        },
        Location = "string",
        Name = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := network.NewSubnetServiceEndpointStoragePolicy(ctx, "subnetServiceEndpointStoragePolicyResource", &network.SubnetServiceEndpointStoragePolicyArgs{
    	ResourceGroupName: pulumi.String("string"),
    	Definition: &network.SubnetServiceEndpointStoragePolicyDefinitionArgs{
    		Name: pulumi.String("string"),
    		ServiceResources: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Description: pulumi.String("string"),
    	},
    	Location: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var subnetServiceEndpointStoragePolicyResource = new SubnetServiceEndpointStoragePolicy("subnetServiceEndpointStoragePolicyResource", SubnetServiceEndpointStoragePolicyArgs.builder()
        .resourceGroupName("string")
        .definition(SubnetServiceEndpointStoragePolicyDefinitionArgs.builder()
            .name("string")
            .serviceResources("string")
            .description("string")
            .build())
        .location("string")
        .name("string")
        .tags(Map.of("string", "string"))
        .build());
    
    subnet_service_endpoint_storage_policy_resource = azure.network.SubnetServiceEndpointStoragePolicy("subnetServiceEndpointStoragePolicyResource",
        resource_group_name="string",
        definition={
            "name": "string",
            "service_resources": ["string"],
            "description": "string",
        },
        location="string",
        name="string",
        tags={
            "string": "string",
        })
    
    const subnetServiceEndpointStoragePolicyResource = new azure.network.SubnetServiceEndpointStoragePolicy("subnetServiceEndpointStoragePolicyResource", {
        resourceGroupName: "string",
        definition: {
            name: "string",
            serviceResources: ["string"],
            description: "string",
        },
        location: "string",
        name: "string",
        tags: {
            string: "string",
        },
    });
    
    type: azure:network:SubnetServiceEndpointStoragePolicy
    properties:
        definition:
            description: string
            name: string
            serviceResources:
                - string
        location: string
        name: string
        resourceGroupName: string
        tags:
            string: string
    

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

    ResourceGroupName string
    The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    Definition SubnetServiceEndpointStoragePolicyDefinition
    A definition block as defined below
    Location string
    The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    Name string
    The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    Tags Dictionary<string, string>
    A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy.
    ResourceGroupName string
    The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    Definition SubnetServiceEndpointStoragePolicyDefinitionArgs
    A definition block as defined below
    Location string
    The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    Name string
    The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    Tags map[string]string
    A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy.
    resourceGroupName String
    The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    definition SubnetServiceEndpointStoragePolicyDefinition
    A definition block as defined below
    location String
    The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    name String
    The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    tags Map<String,String>
    A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy.
    resourceGroupName string
    The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    definition SubnetServiceEndpointStoragePolicyDefinition
    A definition block as defined below
    location string
    The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    name string
    The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    tags {[key: string]: string}
    A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy.
    resource_group_name str
    The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    definition SubnetServiceEndpointStoragePolicyDefinitionArgs
    A definition block as defined below
    location str
    The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    name str
    The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    tags Mapping[str, str]
    A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy.
    resourceGroupName String
    The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    definition Property Map
    A definition block as defined below
    location String
    The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    name String
    The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    tags Map<String>
    A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy.

    Outputs

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

    Get an existing SubnetServiceEndpointStoragePolicy 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?: SubnetServiceEndpointStoragePolicyState, opts?: CustomResourceOptions): SubnetServiceEndpointStoragePolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            definition: Optional[SubnetServiceEndpointStoragePolicyDefinitionArgs] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None) -> SubnetServiceEndpointStoragePolicy
    func GetSubnetServiceEndpointStoragePolicy(ctx *Context, name string, id IDInput, state *SubnetServiceEndpointStoragePolicyState, opts ...ResourceOption) (*SubnetServiceEndpointStoragePolicy, error)
    public static SubnetServiceEndpointStoragePolicy Get(string name, Input<string> id, SubnetServiceEndpointStoragePolicyState? state, CustomResourceOptions? opts = null)
    public static SubnetServiceEndpointStoragePolicy get(String name, Output<String> id, SubnetServiceEndpointStoragePolicyState state, CustomResourceOptions options)
    resources:  _:    type: azure:network:SubnetServiceEndpointStoragePolicy    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.
    The following state arguments are supported:
    Definition SubnetServiceEndpointStoragePolicyDefinition
    A definition block as defined below
    Location string
    The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    Name string
    The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    ResourceGroupName string
    The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    Tags Dictionary<string, string>
    A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy.
    Definition SubnetServiceEndpointStoragePolicyDefinitionArgs
    A definition block as defined below
    Location string
    The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    Name string
    The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    ResourceGroupName string
    The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    Tags map[string]string
    A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy.
    definition SubnetServiceEndpointStoragePolicyDefinition
    A definition block as defined below
    location String
    The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    name String
    The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    resourceGroupName String
    The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    tags Map<String,String>
    A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy.
    definition SubnetServiceEndpointStoragePolicyDefinition
    A definition block as defined below
    location string
    The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    name string
    The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    resourceGroupName string
    The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    tags {[key: string]: string}
    A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy.
    definition SubnetServiceEndpointStoragePolicyDefinitionArgs
    A definition block as defined below
    location str
    The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    name str
    The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    resource_group_name str
    The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    tags Mapping[str, str]
    A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy.
    definition Property Map
    A definition block as defined below
    location String
    The Azure Region where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    name String
    The name which should be used for this Subnet Service Endpoint Storage Policy. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    resourceGroupName String
    The name of the Resource Group where the Subnet Service Endpoint Storage Policy should exist. Changing this forces a new Subnet Service Endpoint Storage Policy to be created.
    tags Map<String>
    A mapping of tags which should be assigned to the Subnet Service Endpoint Storage Policy.

    Supporting Types

    SubnetServiceEndpointStoragePolicyDefinition, SubnetServiceEndpointStoragePolicyDefinitionArgs

    Name string
    The name which should be used for this Subnet Service Endpoint Storage Policy Definition.
    ServiceResources List<string>
    Specifies a list of resources that this Subnet Service Endpoint Storage Policy Definition applies to.
    Description string
    The description of this Subnet Service Endpoint Storage Policy Definition.
    Name string
    The name which should be used for this Subnet Service Endpoint Storage Policy Definition.
    ServiceResources []string
    Specifies a list of resources that this Subnet Service Endpoint Storage Policy Definition applies to.
    Description string
    The description of this Subnet Service Endpoint Storage Policy Definition.
    name String
    The name which should be used for this Subnet Service Endpoint Storage Policy Definition.
    serviceResources List<String>
    Specifies a list of resources that this Subnet Service Endpoint Storage Policy Definition applies to.
    description String
    The description of this Subnet Service Endpoint Storage Policy Definition.
    name string
    The name which should be used for this Subnet Service Endpoint Storage Policy Definition.
    serviceResources string[]
    Specifies a list of resources that this Subnet Service Endpoint Storage Policy Definition applies to.
    description string
    The description of this Subnet Service Endpoint Storage Policy Definition.
    name str
    The name which should be used for this Subnet Service Endpoint Storage Policy Definition.
    service_resources Sequence[str]
    Specifies a list of resources that this Subnet Service Endpoint Storage Policy Definition applies to.
    description str
    The description of this Subnet Service Endpoint Storage Policy Definition.
    name String
    The name which should be used for this Subnet Service Endpoint Storage Policy Definition.
    serviceResources List<String>
    Specifies a list of resources that this Subnet Service Endpoint Storage Policy Definition applies to.
    description String
    The description of this Subnet Service Endpoint Storage Policy Definition.

    Import

    Subnet Service Endpoint Policies can be imported using the resource id, e.g.

     $ pulumi import azure:network/subnetServiceEndpointStoragePolicy:SubnetServiceEndpointStoragePolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/serviceEndpointPolicies/policy1
    

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

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.