azure-native.network.ServiceEndpointPolicyDefinition

Explore with Pulumi AI

Service Endpoint policy definitions. API Version: 2020-11-01.

Example Usage

Create service endpoint policy definition

using System.Collections.Generic;
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 (
	network "github.com/pulumi/pulumi-azure-native/sdk/go/azure/network"
	"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

new ServiceEndpointPolicyDefinition(name: string, args: ServiceEndpointPolicyDefinitionArgs, opts?: CustomResourceOptions);
@overload
def ServiceEndpointPolicyDefinition(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    description: Optional[str] = None,
                                    id: Optional[str] = None,
                                    name: Optional[str] = None,
                                    resource_group_name: Optional[str] = None,
                                    service: Optional[str] = None,
                                    service_endpoint_policy_definition_name: Optional[str] = None,
                                    service_endpoint_policy_name: Optional[str] = None,
                                    service_resources: Optional[Sequence[str]] = None)
@overload
def ServiceEndpointPolicyDefinition(resource_name: str,
                                    args: ServiceEndpointPolicyDefinitionInitArgs,
                                    opts: Optional[ResourceOptions] = 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.

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.

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.

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.

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.

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.

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.

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.

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/subid/resourceGroups/rg1/providers/Microsoft.Network/serviceEndpointPolicies/testPolicy/serviceEndpointPolicyDefinitions/testDefinition 

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0