1. Packages
  2. Azure Native
  3. API Docs
  4. network
  5. NetworkSecurityPerimeterAssociation
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

azure-native.network.NetworkSecurityPerimeterAssociation

Explore with Pulumi AI

The NSP resource association resource

Uses Azure REST API version 2024-06-01-preview. In version 2.x of the Azure Native provider, it used API version 2024-06-01-preview.

Example Usage

NspAssociationPut

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

return await Deployment.RunAsync(() => 
{
    var networkSecurityPerimeterAssociation = new AzureNative.Network.NetworkSecurityPerimeterAssociation("networkSecurityPerimeterAssociation", new()
    {
        AccessMode = AzureNative.Network.AssociationAccessMode.Enforced,
        AssociationName = "association1",
        NetworkSecurityPerimeterName = "nsp1",
        PrivateLinkResource = new AzureNative.Network.Inputs.SubResourceArgs
        {
            Id = "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}",
        },
        Profile = new AzureNative.Network.Inputs.SubResourceArgs
        {
            Id = "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}",
        },
        ResourceGroupName = "rg1",
    });

});
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := network.NewNetworkSecurityPerimeterAssociation(ctx, "networkSecurityPerimeterAssociation", &network.NetworkSecurityPerimeterAssociationArgs{
			AccessMode:                   pulumi.String(network.AssociationAccessModeEnforced),
			AssociationName:              pulumi.String("association1"),
			NetworkSecurityPerimeterName: pulumi.String("nsp1"),
			PrivateLinkResource: &network.SubResourceArgs{
				Id: pulumi.String("/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}"),
			},
			Profile: &network.SubResourceArgs{
				Id: pulumi.String("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}"),
			},
			ResourceGroupName: pulumi.String("rg1"),
		})
		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.NetworkSecurityPerimeterAssociation;
import com.pulumi.azurenative.network.NetworkSecurityPerimeterAssociationArgs;
import com.pulumi.azurenative.network.inputs.SubResourceArgs;
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 networkSecurityPerimeterAssociation = new NetworkSecurityPerimeterAssociation("networkSecurityPerimeterAssociation", NetworkSecurityPerimeterAssociationArgs.builder()
            .accessMode("Enforced")
            .associationName("association1")
            .networkSecurityPerimeterName("nsp1")
            .privateLinkResource(SubResourceArgs.builder()
                .id("/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}")
                .build())
            .profile(SubResourceArgs.builder()
                .id("/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}")
                .build())
            .resourceGroupName("rg1")
            .build());

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

const networkSecurityPerimeterAssociation = new azure_native.network.NetworkSecurityPerimeterAssociation("networkSecurityPerimeterAssociation", {
    accessMode: azure_native.network.AssociationAccessMode.Enforced,
    associationName: "association1",
    networkSecurityPerimeterName: "nsp1",
    privateLinkResource: {
        id: "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}",
    },
    profile: {
        id: "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}",
    },
    resourceGroupName: "rg1",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

network_security_perimeter_association = azure_native.network.NetworkSecurityPerimeterAssociation("networkSecurityPerimeterAssociation",
    access_mode=azure_native.network.AssociationAccessMode.ENFORCED,
    association_name="association1",
    network_security_perimeter_name="nsp1",
    private_link_resource={
        "id": "/subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}",
    },
    profile={
        "id": "/subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}",
    },
    resource_group_name="rg1")
Copy
resources:
  networkSecurityPerimeterAssociation:
    type: azure-native:network:NetworkSecurityPerimeterAssociation
    properties:
      accessMode: Enforced
      associationName: association1
      networkSecurityPerimeterName: nsp1
      privateLinkResource:
        id: /subscriptions/{paasSubscriptionId}/resourceGroups/{paasResourceGroupName}/providers/{providerName}/{resourceType}/{resourceName}
      profile:
        id: /subscriptions/subId/resourceGroups/rg1/providers/Microsoft.Network/networkSecurityPerimeters/nsp1/profiles/{profileName}
      resourceGroupName: rg1
Copy

Create NetworkSecurityPerimeterAssociation Resource

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

Constructor syntax

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

@overload
def NetworkSecurityPerimeterAssociation(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        network_security_perimeter_name: Optional[str] = None,
                                        resource_group_name: Optional[str] = None,
                                        access_mode: Optional[Union[str, AssociationAccessMode]] = None,
                                        association_name: Optional[str] = None,
                                        id: Optional[str] = None,
                                        location: Optional[str] = None,
                                        private_link_resource: Optional[SubResourceArgs] = None,
                                        profile: Optional[SubResourceArgs] = None,
                                        tags: Optional[Mapping[str, str]] = None)
func NewNetworkSecurityPerimeterAssociation(ctx *Context, name string, args NetworkSecurityPerimeterAssociationArgs, opts ...ResourceOption) (*NetworkSecurityPerimeterAssociation, error)
public NetworkSecurityPerimeterAssociation(string name, NetworkSecurityPerimeterAssociationArgs args, CustomResourceOptions? opts = null)
public NetworkSecurityPerimeterAssociation(String name, NetworkSecurityPerimeterAssociationArgs args)
public NetworkSecurityPerimeterAssociation(String name, NetworkSecurityPerimeterAssociationArgs args, CustomResourceOptions options)
type: azure-native:network:NetworkSecurityPerimeterAssociation
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. NetworkSecurityPerimeterAssociationArgs
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. NetworkSecurityPerimeterAssociationArgs
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. NetworkSecurityPerimeterAssociationArgs
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. NetworkSecurityPerimeterAssociationArgs
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. NetworkSecurityPerimeterAssociationArgs
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 networkSecurityPerimeterAssociationResource = new AzureNative.Network.NetworkSecurityPerimeterAssociation("networkSecurityPerimeterAssociationResource", new()
{
    NetworkSecurityPerimeterName = "string",
    ResourceGroupName = "string",
    AccessMode = "string",
    AssociationName = "string",
    Id = "string",
    Location = "string",
    PrivateLinkResource = new AzureNative.Network.Inputs.SubResourceArgs
    {
        Id = "string",
    },
    Profile = new AzureNative.Network.Inputs.SubResourceArgs
    {
        Id = "string",
    },
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := network.NewNetworkSecurityPerimeterAssociation(ctx, "networkSecurityPerimeterAssociationResource", &network.NetworkSecurityPerimeterAssociationArgs{
	NetworkSecurityPerimeterName: pulumi.String("string"),
	ResourceGroupName:            pulumi.String("string"),
	AccessMode:                   pulumi.String("string"),
	AssociationName:              pulumi.String("string"),
	Id:                           pulumi.String("string"),
	Location:                     pulumi.String("string"),
	PrivateLinkResource: &network.SubResourceArgs{
		Id: pulumi.String("string"),
	},
	Profile: &network.SubResourceArgs{
		Id: pulumi.String("string"),
	},
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var networkSecurityPerimeterAssociationResource = new NetworkSecurityPerimeterAssociation("networkSecurityPerimeterAssociationResource", NetworkSecurityPerimeterAssociationArgs.builder()
    .networkSecurityPerimeterName("string")
    .resourceGroupName("string")
    .accessMode("string")
    .associationName("string")
    .id("string")
    .location("string")
    .privateLinkResource(SubResourceArgs.builder()
        .id("string")
        .build())
    .profile(SubResourceArgs.builder()
        .id("string")
        .build())
    .tags(Map.of("string", "string"))
    .build());
Copy
network_security_perimeter_association_resource = azure_native.network.NetworkSecurityPerimeterAssociation("networkSecurityPerimeterAssociationResource",
    network_security_perimeter_name="string",
    resource_group_name="string",
    access_mode="string",
    association_name="string",
    id="string",
    location="string",
    private_link_resource={
        "id": "string",
    },
    profile={
        "id": "string",
    },
    tags={
        "string": "string",
    })
Copy
const networkSecurityPerimeterAssociationResource = new azure_native.network.NetworkSecurityPerimeterAssociation("networkSecurityPerimeterAssociationResource", {
    networkSecurityPerimeterName: "string",
    resourceGroupName: "string",
    accessMode: "string",
    associationName: "string",
    id: "string",
    location: "string",
    privateLinkResource: {
        id: "string",
    },
    profile: {
        id: "string",
    },
    tags: {
        string: "string",
    },
});
Copy
type: azure-native:network:NetworkSecurityPerimeterAssociation
properties:
    accessMode: string
    associationName: string
    id: string
    location: string
    networkSecurityPerimeterName: string
    privateLinkResource:
        id: string
    profile:
        id: string
    resourceGroupName: string
    tags:
        string: string
Copy

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

NetworkSecurityPerimeterName
This property is required.
Changes to this property will trigger replacement.
string
The name of the network security perimeter.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
AccessMode string | Pulumi.AzureNative.Network.AssociationAccessMode
Access mode on the association.
AssociationName Changes to this property will trigger replacement. string
The name of the NSP association.
Id string
Resource ID.
Location string
Resource location.
PrivateLinkResource Pulumi.AzureNative.Network.Inputs.SubResource
The PaaS resource to be associated.
Profile Pulumi.AzureNative.Network.Inputs.SubResource
Profile id to which the PaaS resource is associated.
Tags Dictionary<string, string>
Resource tags.
NetworkSecurityPerimeterName
This property is required.
Changes to this property will trigger replacement.
string
The name of the network security perimeter.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
AccessMode string | AssociationAccessMode
Access mode on the association.
AssociationName Changes to this property will trigger replacement. string
The name of the NSP association.
Id string
Resource ID.
Location string
Resource location.
PrivateLinkResource SubResourceArgs
The PaaS resource to be associated.
Profile SubResourceArgs
Profile id to which the PaaS resource is associated.
Tags map[string]string
Resource tags.
networkSecurityPerimeterName
This property is required.
Changes to this property will trigger replacement.
String
The name of the network security perimeter.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
accessMode String | AssociationAccessMode
Access mode on the association.
associationName Changes to this property will trigger replacement. String
The name of the NSP association.
id String
Resource ID.
location String
Resource location.
privateLinkResource SubResource
The PaaS resource to be associated.
profile SubResource
Profile id to which the PaaS resource is associated.
tags Map<String,String>
Resource tags.
networkSecurityPerimeterName
This property is required.
Changes to this property will trigger replacement.
string
The name of the network security perimeter.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
accessMode string | AssociationAccessMode
Access mode on the association.
associationName Changes to this property will trigger replacement. string
The name of the NSP association.
id string
Resource ID.
location string
Resource location.
privateLinkResource SubResource
The PaaS resource to be associated.
profile SubResource
Profile id to which the PaaS resource is associated.
tags {[key: string]: string}
Resource tags.
network_security_perimeter_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the network security perimeter.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
access_mode str | AssociationAccessMode
Access mode on the association.
association_name Changes to this property will trigger replacement. str
The name of the NSP association.
id str
Resource ID.
location str
Resource location.
private_link_resource SubResourceArgs
The PaaS resource to be associated.
profile SubResourceArgs
Profile id to which the PaaS resource is associated.
tags Mapping[str, str]
Resource tags.
networkSecurityPerimeterName
This property is required.
Changes to this property will trigger replacement.
String
The name of the network security perimeter.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
accessMode String | "Learning" | "Enforced" | "Audit"
Access mode on the association.
associationName Changes to this property will trigger replacement. String
The name of the NSP association.
id String
Resource ID.
location String
Resource location.
privateLinkResource Property Map
The PaaS resource to be associated.
profile Property Map
Profile id to which the PaaS resource is associated.
tags Map<String>
Resource tags.

Outputs

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

AzureApiVersion string
The Azure API version of the resource.
HasProvisioningIssues string
Specifies if there are provisioning issues
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
ProvisioningState string
The provisioning state of the resource association resource.
Type string
Resource type.
AzureApiVersion string
The Azure API version of the resource.
HasProvisioningIssues string
Specifies if there are provisioning issues
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name.
ProvisioningState string
The provisioning state of the resource association resource.
Type string
Resource type.
azureApiVersion String
The Azure API version of the resource.
hasProvisioningIssues String
Specifies if there are provisioning issues
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
provisioningState String
The provisioning state of the resource association resource.
type String
Resource type.
azureApiVersion string
The Azure API version of the resource.
hasProvisioningIssues string
Specifies if there are provisioning issues
id string
The provider-assigned unique ID for this managed resource.
name string
Resource name.
provisioningState string
The provisioning state of the resource association resource.
type string
Resource type.
azure_api_version str
The Azure API version of the resource.
has_provisioning_issues str
Specifies if there are provisioning issues
id str
The provider-assigned unique ID for this managed resource.
name str
Resource name.
provisioning_state str
The provisioning state of the resource association resource.
type str
Resource type.
azureApiVersion String
The Azure API version of the resource.
hasProvisioningIssues String
Specifies if there are provisioning issues
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name.
provisioningState String
The provisioning state of the resource association resource.
type String
Resource type.

Supporting Types

AssociationAccessMode
, AssociationAccessModeArgs

Learning
Learning
Enforced
Enforced
Audit
Audit
AssociationAccessModeLearning
Learning
AssociationAccessModeEnforced
Enforced
AssociationAccessModeAudit
Audit
Learning
Learning
Enforced
Enforced
Audit
Audit
Learning
Learning
Enforced
Enforced
Audit
Audit
LEARNING
Learning
ENFORCED
Enforced
AUDIT
Audit
"Learning"
Learning
"Enforced"
Enforced
"Audit"
Audit

SubResource
, SubResourceArgs

Id string
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
Id string
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
id String
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
id string
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
id str
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.
id String
Sub-resource ID. Both absolute resource ID and a relative resource ID are accepted. An absolute ID starts with /subscriptions/ and contains the entire ID of the parent resource and the ID of the sub-resource in the end. A relative ID replaces the ID of the parent resource with a token '$self', followed by the sub-resource ID itself. Example of a relative ID: $self/frontEndConfigurations/my-frontend.

SubResourceResponse
, SubResourceResponseArgs

Id string
Resource ID.
Id string
Resource ID.
id String
Resource ID.
id string
Resource ID.
id str
Resource ID.
id String
Resource ID.

Import

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

$ pulumi import azure-native:network:NetworkSecurityPerimeterAssociation association1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}/resourceAssociations/{associationName} 
Copy

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

Package Details

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