azure-native.network.NetworkSecurityPerimeterAssociation
Explore with Pulumi AI
The NSP resource association resource Azure REST 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",
    });
});
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.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
	})
}
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());
    }
}
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",
});
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")
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
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 string
- The unique name of the resource.
- args NetworkSecurityPerimeterAssociationArgs
- 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 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 string
- The unique name of the resource.
- args NetworkSecurityPerimeterAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkSecurityPerimeterAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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" },
    },
});
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"),
	},
})
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());
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",
    })
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",
    },
});
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
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:
- NetworkSecurity stringPerimeter Name 
- The name of the network security perimeter.
- ResourceGroup stringName 
- The name of the resource group.
- AccessMode string | Pulumi.Azure Native. Network. Association Access Mode 
- Access mode on the association.
- AssociationName string
- The name of the NSP association.
- Id string
- Resource ID.
- Location string
- Resource location.
- PrivateLink Pulumi.Resource Azure Native. Network. Inputs. Sub Resource 
- The PaaS resource to be associated.
- Profile
Pulumi.Azure Native. Network. Inputs. Sub Resource 
- Profile id to which the PaaS resource is associated.
- Dictionary<string, string>
- Resource tags.
- NetworkSecurity stringPerimeter Name 
- The name of the network security perimeter.
- ResourceGroup stringName 
- The name of the resource group.
- AccessMode string | AssociationAccess Mode 
- Access mode on the association.
- AssociationName string
- The name of the NSP association.
- Id string
- Resource ID.
- Location string
- Resource location.
- PrivateLink SubResource Resource Args 
- The PaaS resource to be associated.
- Profile
SubResource Args 
- Profile id to which the PaaS resource is associated.
- map[string]string
- Resource tags.
- networkSecurity StringPerimeter Name 
- The name of the network security perimeter.
- resourceGroup StringName 
- The name of the resource group.
- accessMode String | AssociationAccess Mode 
- Access mode on the association.
- associationName String
- The name of the NSP association.
- id String
- Resource ID.
- location String
- Resource location.
- privateLink SubResource Resource 
- The PaaS resource to be associated.
- profile
SubResource 
- Profile id to which the PaaS resource is associated.
- Map<String,String>
- Resource tags.
- networkSecurity stringPerimeter Name 
- The name of the network security perimeter.
- resourceGroup stringName 
- The name of the resource group.
- accessMode string | AssociationAccess Mode 
- Access mode on the association.
- associationName string
- The name of the NSP association.
- id string
- Resource ID.
- location string
- Resource location.
- privateLink SubResource Resource 
- The PaaS resource to be associated.
- profile
SubResource 
- Profile id to which the PaaS resource is associated.
- {[key: string]: string}
- Resource tags.
- network_security_ strperimeter_ name 
- The name of the network security perimeter.
- resource_group_ strname 
- The name of the resource group.
- access_mode str | AssociationAccess Mode 
- Access mode on the association.
- association_name str
- The name of the NSP association.
- id str
- Resource ID.
- location str
- Resource location.
- private_link_ Subresource Resource Args 
- The PaaS resource to be associated.
- profile
SubResource Args 
- Profile id to which the PaaS resource is associated.
- Mapping[str, str]
- Resource tags.
- networkSecurity StringPerimeter Name 
- The name of the network security perimeter.
- resourceGroup StringName 
- The name of the resource group.
- accessMode String | "Learning" | "Enforced" | "Audit"
- Access mode on the association.
- associationName String
- The name of the NSP association.
- id String
- Resource ID.
- location String
- Resource location.
- privateLink Property MapResource 
- The PaaS resource to be associated.
- profile Property Map
- Profile id to which the PaaS resource is associated.
- Map<String>
- Resource tags.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkSecurityPerimeterAssociation resource produces the following output properties:
- HasProvisioning stringIssues 
- 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.
- HasProvisioning stringIssues 
- 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.
- hasProvisioning StringIssues 
- 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.
- hasProvisioning stringIssues 
- 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.
- has_provisioning_ strissues 
- 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.
- hasProvisioning StringIssues 
- 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
- AssociationAccess Mode Learning 
- Learning
- AssociationAccess Mode Enforced 
- Enforced
- AssociationAccess Mode Audit 
- 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} 
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0