1. Packages
  2. Azure Native
  3. API Docs
  4. network
  5. ServiceEndpointPolicyDefinition
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.37.0 published on Monday, Apr 15, 2024 by Pulumi

azure-native.network.ServiceEndpointPolicyDefinition

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.37.0 published on Monday, Apr 15, 2024 by Pulumi

    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.

    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",
            },
        });
    
    });
    
    package main
    
    import (
    	"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
    	})
    }
    
    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());
    
        }
    }
    
    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",
        ])
    
    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",
        ],
    });
    
    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
    

    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 string
    The unique name of the resource.
    args ServiceEndpointPolicyDefinitionArgs
    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 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 string
    The unique name of the resource.
    args ServiceEndpointPolicyDefinitionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceEndpointPolicyDefinitionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceEndpointPolicyDefinitionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    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",
    });
    
    example, err := network.NewServiceEndpointPolicyDefinition(ctx, "serviceEndpointPolicyDefinitionResource", &network.ServiceEndpointPolicyDefinitionArgs{
    ResourceGroupName: pulumi.String("string"),
    ServiceEndpointPolicyName: pulumi.String("string"),
    Description: pulumi.String("string"),
    Id: pulumi.String("string"),
    Name: pulumi.String("string"),
    Service: pulumi.String("string"),
    ServiceEndpointPolicyDefinitionName: pulumi.String("string"),
    ServiceResources: pulumi.StringArray{
    pulumi.String("string"),
    },
    Type: pulumi.String("string"),
    })
    
    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());
    
    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")
    
    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",
    });
    
    type: azure-native:network:ServiceEndpointPolicyDefinition
    properties:
        description: string
        id: string
        name: string
        resourceGroupName: string
        service: string
        serviceEndpointPolicyDefinitionName: string
        serviceEndpointPolicyName: string
        serviceResources:
            - string
        type: string
    

    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

    The ServiceEndpointPolicyDefinition resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group.
    ServiceEndpointPolicyName 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 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 string
    The name of the resource group.
    ServiceEndpointPolicyName 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 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 String
    The name of the resource group.
    serviceEndpointPolicyName 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 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 string
    The name of the resource group.
    serviceEndpointPolicyName 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 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 str
    The name of the resource group.
    service_endpoint_policy_name 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 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 String
    The name of the resource group.
    serviceEndpointPolicyName 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 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} 
    

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

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.37.0 published on Monday, Apr 15, 2024 by Pulumi