1. Packages
  2. Azure Native v2
  3. API Docs
  4. network
  5. ServiceEndpointPolicyDefinition
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.network.ServiceEndpointPolicyDefinition

Explore with Pulumi AI

Service Endpoint policy definitions. Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.

Other available API versions: 2018-07-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01, 2024-05-01.

Example Usage

Create service endpoint policy definition

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var serviceEndpointPolicyDefinition = new AzureNative.Network.ServiceEndpointPolicyDefinition("serviceEndpointPolicyDefinition", new()
    {
        Description = "Storage Service EndpointPolicy Definition",
        ResourceGroupName = "rg1",
        Service = "Microsoft.Storage",
        ServiceEndpointPolicyDefinitionName = "testDefinition",
        ServiceEndpointPolicyName = "testPolicy",
        ServiceResources = new[]
        {
            "/subscriptions/subid1",
            "/subscriptions/subid1/resourceGroups/storageRg",
            "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount",
        },
    });

});
Copy
package main

import (
	network "github.com/pulumi/pulumi-azure-native-sdk/network/v2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewServiceEndpointPolicyDefinition(ctx, "serviceEndpointPolicyDefinition", &network.ServiceEndpointPolicyDefinitionArgs{
			Description:                         pulumi.String("Storage Service EndpointPolicy Definition"),
			ResourceGroupName:                   pulumi.String("rg1"),
			Service:                             pulumi.String("Microsoft.Storage"),
			ServiceEndpointPolicyDefinitionName: pulumi.String("testDefinition"),
			ServiceEndpointPolicyName:           pulumi.String("testPolicy"),
			ServiceResources: pulumi.StringArray{
				pulumi.String("/subscriptions/subid1"),
				pulumi.String("/subscriptions/subid1/resourceGroups/storageRg"),
				pulumi.String("/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.network.ServiceEndpointPolicyDefinition;
import com.pulumi.azurenative.network.ServiceEndpointPolicyDefinitionArgs;
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 serviceEndpointPolicyDefinition = new ServiceEndpointPolicyDefinition("serviceEndpointPolicyDefinition", ServiceEndpointPolicyDefinitionArgs.builder()
            .description("Storage Service EndpointPolicy Definition")
            .resourceGroupName("rg1")
            .service("Microsoft.Storage")
            .serviceEndpointPolicyDefinitionName("testDefinition")
            .serviceEndpointPolicyName("testPolicy")
            .serviceResources(            
                "/subscriptions/subid1",
                "/subscriptions/subid1/resourceGroups/storageRg",
                "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const serviceEndpointPolicyDefinition = new azure_native.network.ServiceEndpointPolicyDefinition("serviceEndpointPolicyDefinition", {
    description: "Storage Service EndpointPolicy Definition",
    resourceGroupName: "rg1",
    service: "Microsoft.Storage",
    serviceEndpointPolicyDefinitionName: "testDefinition",
    serviceEndpointPolicyName: "testPolicy",
    serviceResources: [
        "/subscriptions/subid1",
        "/subscriptions/subid1/resourceGroups/storageRg",
        "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount",
    ],
});
Copy
import pulumi
import pulumi_azure_native as azure_native

service_endpoint_policy_definition = azure_native.network.ServiceEndpointPolicyDefinition("serviceEndpointPolicyDefinition",
    description="Storage Service EndpointPolicy Definition",
    resource_group_name="rg1",
    service="Microsoft.Storage",
    service_endpoint_policy_definition_name="testDefinition",
    service_endpoint_policy_name="testPolicy",
    service_resources=[
        "/subscriptions/subid1",
        "/subscriptions/subid1/resourceGroups/storageRg",
        "/subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount",
    ])
Copy
resources:
  serviceEndpointPolicyDefinition:
    type: azure-native:network:ServiceEndpointPolicyDefinition
    properties:
      description: Storage Service EndpointPolicy Definition
      resourceGroupName: rg1
      service: Microsoft.Storage
      serviceEndpointPolicyDefinitionName: testDefinition
      serviceEndpointPolicyName: testPolicy
      serviceResources:
        - /subscriptions/subid1
        - /subscriptions/subid1/resourceGroups/storageRg
        - /subscriptions/subid1/resourceGroups/storageRg/providers/Microsoft.Storage/storageAccounts/stAccount
Copy

Create ServiceEndpointPolicyDefinition Resource

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

Constructor syntax

new ServiceEndpointPolicyDefinition(name: string, args: ServiceEndpointPolicyDefinitionArgs, opts?: CustomResourceOptions);
@overload
def ServiceEndpointPolicyDefinition(resource_name: str,
                                    args: ServiceEndpointPolicyDefinitionInitArgs,
                                    opts: Optional[ResourceOptions] = None)

@overload
def ServiceEndpointPolicyDefinition(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    resource_group_name: Optional[str] = None,
                                    service_endpoint_policy_name: Optional[str] = None,
                                    description: Optional[str] = None,
                                    id: Optional[str] = None,
                                    name: Optional[str] = None,
                                    service: Optional[str] = None,
                                    service_endpoint_policy_definition_name: Optional[str] = None,
                                    service_resources: Optional[Sequence[str]] = None,
                                    type: Optional[str] = None)
func NewServiceEndpointPolicyDefinition(ctx *Context, name string, args ServiceEndpointPolicyDefinitionArgs, opts ...ResourceOption) (*ServiceEndpointPolicyDefinition, error)
public ServiceEndpointPolicyDefinition(string name, ServiceEndpointPolicyDefinitionArgs args, CustomResourceOptions? opts = null)
public ServiceEndpointPolicyDefinition(String name, ServiceEndpointPolicyDefinitionArgs args)
public ServiceEndpointPolicyDefinition(String name, ServiceEndpointPolicyDefinitionArgs args, CustomResourceOptions options)
type: azure-native:network:ServiceEndpointPolicyDefinition
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ServiceEndpointPolicyDefinitionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ServiceEndpointPolicyDefinitionInitArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceEndpointPolicyDefinitionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ServiceEndpointPolicyDefinitionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ServiceEndpointPolicyDefinitionArgs
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 serviceEndpointPolicyDefinitionResource = new AzureNative.Network.ServiceEndpointPolicyDefinition("serviceEndpointPolicyDefinitionResource", new()
{
    ResourceGroupName = "string",
    ServiceEndpointPolicyName = "string",
    Description = "string",
    Id = "string",
    Name = "string",
    Service = "string",
    ServiceEndpointPolicyDefinitionName = "string",
    ServiceResources = new[]
    {
        "string",
    },
    Type = "string",
});
Copy
example, err := network.NewServiceEndpointPolicyDefinition(ctx, "serviceEndpointPolicyDefinitionResource", &network.ServiceEndpointPolicyDefinitionArgs{
	ResourceGroupName:                   "string",
	ServiceEndpointPolicyName:           "string",
	Description:                         "string",
	Id:                                  "string",
	Name:                                "string",
	Service:                             "string",
	ServiceEndpointPolicyDefinitionName: "string",
	ServiceResources: []string{
		"string",
	},
	Type: "string",
})
Copy
var serviceEndpointPolicyDefinitionResource = new ServiceEndpointPolicyDefinition("serviceEndpointPolicyDefinitionResource", ServiceEndpointPolicyDefinitionArgs.builder()
    .resourceGroupName("string")
    .serviceEndpointPolicyName("string")
    .description("string")
    .id("string")
    .name("string")
    .service("string")
    .serviceEndpointPolicyDefinitionName("string")
    .serviceResources("string")
    .type("string")
    .build());
Copy
service_endpoint_policy_definition_resource = azure_native.network.ServiceEndpointPolicyDefinition("serviceEndpointPolicyDefinitionResource",
    resource_group_name=string,
    service_endpoint_policy_name=string,
    description=string,
    id=string,
    name=string,
    service=string,
    service_endpoint_policy_definition_name=string,
    service_resources=[string],
    type=string)
Copy
const serviceEndpointPolicyDefinitionResource = new azure_native.network.ServiceEndpointPolicyDefinition("serviceEndpointPolicyDefinitionResource", {
    resourceGroupName: "string",
    serviceEndpointPolicyName: "string",
    description: "string",
    id: "string",
    name: "string",
    service: "string",
    serviceEndpointPolicyDefinitionName: "string",
    serviceResources: ["string"],
    type: "string",
});
Copy
type: azure-native:network:ServiceEndpointPolicyDefinition
properties:
    description: string
    id: string
    name: string
    resourceGroupName: string
    service: string
    serviceEndpointPolicyDefinitionName: string
    serviceEndpointPolicyName: string
    serviceResources:
        - string
    type: string
Copy

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

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
ServiceEndpointPolicyName
This property is required.
Changes to this property will trigger replacement.
string
The name of the service endpoint policy.
Description string
A description for this rule. Restricted to 140 chars.
Id string
Resource ID.
Name string
The name of the resource that is unique within a resource group. This name can be used to access the resource.
Service string
Service endpoint name.
ServiceEndpointPolicyDefinitionName Changes to this property will trigger replacement. string
The name of the service endpoint policy definition name.
ServiceResources List<string>
A list of service resources.
Type string
The type of the resource.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
ServiceEndpointPolicyName
This property is required.
Changes to this property will trigger replacement.
string
The name of the service endpoint policy.
Description string
A description for this rule. Restricted to 140 chars.
Id string
Resource ID.
Name string
The name of the resource that is unique within a resource group. This name can be used to access the resource.
Service string
Service endpoint name.
ServiceEndpointPolicyDefinitionName Changes to this property will trigger replacement. string
The name of the service endpoint policy definition name.
ServiceResources []string
A list of service resources.
Type string
The type of the resource.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
serviceEndpointPolicyName
This property is required.
Changes to this property will trigger replacement.
String
The name of the service endpoint policy.
description String
A description for this rule. Restricted to 140 chars.
id String
Resource ID.
name String
The name of the resource that is unique within a resource group. This name can be used to access the resource.
service String
Service endpoint name.
serviceEndpointPolicyDefinitionName Changes to this property will trigger replacement. String
The name of the service endpoint policy definition name.
serviceResources List<String>
A list of service resources.
type String
The type of the resource.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
serviceEndpointPolicyName
This property is required.
Changes to this property will trigger replacement.
string
The name of the service endpoint policy.
description string
A description for this rule. Restricted to 140 chars.
id string
Resource ID.
name string
The name of the resource that is unique within a resource group. This name can be used to access the resource.
service string
Service endpoint name.
serviceEndpointPolicyDefinitionName Changes to this property will trigger replacement. string
The name of the service endpoint policy definition name.
serviceResources string[]
A list of service resources.
type string
The type of the resource.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
service_endpoint_policy_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the service endpoint policy.
description str
A description for this rule. Restricted to 140 chars.
id str
Resource ID.
name str
The name of the resource that is unique within a resource group. This name can be used to access the resource.
service str
Service endpoint name.
service_endpoint_policy_definition_name Changes to this property will trigger replacement. str
The name of the service endpoint policy definition name.
service_resources Sequence[str]
A list of service resources.
type str
The type of the resource.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
serviceEndpointPolicyName
This property is required.
Changes to this property will trigger replacement.
String
The name of the service endpoint policy.
description String
A description for this rule. Restricted to 140 chars.
id String
Resource ID.
name String
The name of the resource that is unique within a resource group. This name can be used to access the resource.
service String
Service endpoint name.
serviceEndpointPolicyDefinitionName Changes to this property will trigger replacement. String
The name of the service endpoint policy definition name.
serviceResources List<String>
A list of service resources.
type String
The type of the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the ServiceEndpointPolicyDefinition resource produces the following output properties:

Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
ProvisioningState string
The provisioning state of the service endpoint policy definition resource.
Etag string
A unique read-only string that changes whenever the resource is updated.
Id string
The provider-assigned unique ID for this managed resource.
ProvisioningState string
The provisioning state of the service endpoint policy definition resource.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
provisioningState String
The provisioning state of the service endpoint policy definition resource.
etag string
A unique read-only string that changes whenever the resource is updated.
id string
The provider-assigned unique ID for this managed resource.
provisioningState string
The provisioning state of the service endpoint policy definition resource.
etag str
A unique read-only string that changes whenever the resource is updated.
id str
The provider-assigned unique ID for this managed resource.
provisioning_state str
The provisioning state of the service endpoint policy definition resource.
etag String
A unique read-only string that changes whenever the resource is updated.
id String
The provider-assigned unique ID for this managed resource.
provisioningState String
The provisioning state of the service endpoint policy definition resource.

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:network:ServiceEndpointPolicyDefinition testDefinition /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0