We recommend using Azure Native.
azure.webpubsub.NetworkAcl
Explore with Pulumi AI
Manages the Network ACL for a Web Pubsub.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: terraform-webpubsub
      location: east us
  exampleService:
    type: azure:webpubsub:Service
    name: example
    properties:
      name: tfex-webpubsub
      location: ${example.location}
      resourceGroupName: ${example.name}
      sku: Standard_S1
      capacity: 1
  exampleVirtualNetwork:
    type: azure:network:VirtualNetwork
    name: example
    properties:
      name: example-vnet
      resourceGroupName: ${example.name}
      location: ${example.location}
      addressSpaces:
        - 10.5.0.0/16
  exampleSubnet:
    type: azure:network:Subnet
    name: example
    properties:
      name: example-subnet
      resourceGroupName: ${example.name}
      virtualNetworkName: ${exampleVirtualNetwork.name}
      addressPrefixes:
        - 10.5.2.0/24
      enforcePrivateLinkEndpointNetworkPolicies: true
  exampleEndpoint:
    type: azure:privatelink:Endpoint
    name: example
    properties:
      name: example-privateendpoint
      resourceGroupName: ${example.name}
      location: ${example.location}
      subnetId: ${exampleSubnet.id}
      privateServiceConnection:
        name: psc-sig-test
        isManualConnection: false
        privateConnectionResourceId: ${exampleService.id}
        subresourceNames:
          - webpubsub
  exampleNetworkAcl:
    type: azure:webpubsub:NetworkAcl
    name: example
    properties:
      webPubsubId: ${exampleService.id}
      defaultAction: Allow
      publicNetwork:
        deniedRequestTypes:
          - ClientConnection
      privateEndpoints:
        - id: ${exampleEndpoint.id}
          deniedRequestTypes:
            - RESTAPI
            - ClientConnection
    options:
      dependsOn:
        - ${exampleEndpoint}
Create NetworkAcl Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkAcl(name: string, args: NetworkAclArgs, opts?: CustomResourceOptions);@overload
def NetworkAcl(resource_name: str,
               args: NetworkAclArgs,
               opts: Optional[ResourceOptions] = None)
@overload
def NetworkAcl(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               public_network: Optional[NetworkAclPublicNetworkArgs] = None,
               web_pubsub_id: Optional[str] = None,
               default_action: Optional[str] = None,
               private_endpoints: Optional[Sequence[NetworkAclPrivateEndpointArgs]] = None)func NewNetworkAcl(ctx *Context, name string, args NetworkAclArgs, opts ...ResourceOption) (*NetworkAcl, error)public NetworkAcl(string name, NetworkAclArgs args, CustomResourceOptions? opts = null)
public NetworkAcl(String name, NetworkAclArgs args)
public NetworkAcl(String name, NetworkAclArgs args, CustomResourceOptions options)
type: azure:webpubsub:NetworkAcl
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 NetworkAclArgs
- 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 NetworkAclArgs
- 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 NetworkAclArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkAclArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkAclArgs
- 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 networkAclResource = new Azure.WebPubSub.NetworkAcl("networkAclResource", new()
{
    PublicNetwork = new Azure.WebPubSub.Inputs.NetworkAclPublicNetworkArgs
    {
        AllowedRequestTypes = new[]
        {
            "string",
        },
        DeniedRequestTypes = new[]
        {
            "string",
        },
    },
    WebPubsubId = "string",
    DefaultAction = "string",
    PrivateEndpoints = new[]
    {
        new Azure.WebPubSub.Inputs.NetworkAclPrivateEndpointArgs
        {
            Id = "string",
            AllowedRequestTypes = new[]
            {
                "string",
            },
            DeniedRequestTypes = new[]
            {
                "string",
            },
        },
    },
});
example, err := webpubsub.NewNetworkAcl(ctx, "networkAclResource", &webpubsub.NetworkAclArgs{
	PublicNetwork: &webpubsub.NetworkAclPublicNetworkArgs{
		AllowedRequestTypes: pulumi.StringArray{
			pulumi.String("string"),
		},
		DeniedRequestTypes: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	WebPubsubId:   pulumi.String("string"),
	DefaultAction: pulumi.String("string"),
	PrivateEndpoints: webpubsub.NetworkAclPrivateEndpointArray{
		&webpubsub.NetworkAclPrivateEndpointArgs{
			Id: pulumi.String("string"),
			AllowedRequestTypes: pulumi.StringArray{
				pulumi.String("string"),
			},
			DeniedRequestTypes: pulumi.StringArray{
				pulumi.String("string"),
			},
		},
	},
})
var networkAclResource = new NetworkAcl("networkAclResource", NetworkAclArgs.builder()
    .publicNetwork(NetworkAclPublicNetworkArgs.builder()
        .allowedRequestTypes("string")
        .deniedRequestTypes("string")
        .build())
    .webPubsubId("string")
    .defaultAction("string")
    .privateEndpoints(NetworkAclPrivateEndpointArgs.builder()
        .id("string")
        .allowedRequestTypes("string")
        .deniedRequestTypes("string")
        .build())
    .build());
network_acl_resource = azure.webpubsub.NetworkAcl("networkAclResource",
    public_network={
        "allowed_request_types": ["string"],
        "denied_request_types": ["string"],
    },
    web_pubsub_id="string",
    default_action="string",
    private_endpoints=[{
        "id": "string",
        "allowed_request_types": ["string"],
        "denied_request_types": ["string"],
    }])
const networkAclResource = new azure.webpubsub.NetworkAcl("networkAclResource", {
    publicNetwork: {
        allowedRequestTypes: ["string"],
        deniedRequestTypes: ["string"],
    },
    webPubsubId: "string",
    defaultAction: "string",
    privateEndpoints: [{
        id: "string",
        allowedRequestTypes: ["string"],
        deniedRequestTypes: ["string"],
    }],
});
type: azure:webpubsub:NetworkAcl
properties:
    defaultAction: string
    privateEndpoints:
        - allowedRequestTypes:
            - string
          deniedRequestTypes:
            - string
          id: string
    publicNetwork:
        allowedRequestTypes:
            - string
        deniedRequestTypes:
            - string
    webPubsubId: string
NetworkAcl 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 NetworkAcl resource accepts the following input properties:
- PublicNetwork NetworkAcl Public Network 
- A public_networkblock as defined below.
- WebPubsub stringId 
- The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- DefaultAction string
- The default action to control the network access when no other rule matches. Possible values are AllowandDeny. Defaults toDeny.
- PrivateEndpoints List<NetworkAcl Private Endpoint> 
- A private_endpointblock as defined below.
- PublicNetwork NetworkAcl Public Network Args 
- A public_networkblock as defined below.
- WebPubsub stringId 
- The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- DefaultAction string
- The default action to control the network access when no other rule matches. Possible values are AllowandDeny. Defaults toDeny.
- PrivateEndpoints []NetworkAcl Private Endpoint Args 
- A private_endpointblock as defined below.
- publicNetwork NetworkAcl Public Network 
- A public_networkblock as defined below.
- webPubsub StringId 
- The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- defaultAction String
- The default action to control the network access when no other rule matches. Possible values are AllowandDeny. Defaults toDeny.
- privateEndpoints List<NetworkAcl Private Endpoint> 
- A private_endpointblock as defined below.
- publicNetwork NetworkAcl Public Network 
- A public_networkblock as defined below.
- webPubsub stringId 
- The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- defaultAction string
- The default action to control the network access when no other rule matches. Possible values are AllowandDeny. Defaults toDeny.
- privateEndpoints NetworkAcl Private Endpoint[] 
- A private_endpointblock as defined below.
- public_network NetworkAcl Public Network Args 
- A public_networkblock as defined below.
- web_pubsub_ strid 
- The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- default_action str
- The default action to control the network access when no other rule matches. Possible values are AllowandDeny. Defaults toDeny.
- private_endpoints Sequence[NetworkAcl Private Endpoint Args] 
- A private_endpointblock as defined below.
- publicNetwork Property Map
- A public_networkblock as defined below.
- webPubsub StringId 
- The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- defaultAction String
- The default action to control the network access when no other rule matches. Possible values are AllowandDeny. Defaults toDeny.
- privateEndpoints List<Property Map>
- A private_endpointblock as defined below.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkAcl resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing NetworkAcl Resource
Get an existing NetworkAcl resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: NetworkAclState, opts?: CustomResourceOptions): NetworkAcl@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        default_action: Optional[str] = None,
        private_endpoints: Optional[Sequence[NetworkAclPrivateEndpointArgs]] = None,
        public_network: Optional[NetworkAclPublicNetworkArgs] = None,
        web_pubsub_id: Optional[str] = None) -> NetworkAclfunc GetNetworkAcl(ctx *Context, name string, id IDInput, state *NetworkAclState, opts ...ResourceOption) (*NetworkAcl, error)public static NetworkAcl Get(string name, Input<string> id, NetworkAclState? state, CustomResourceOptions? opts = null)public static NetworkAcl get(String name, Output<String> id, NetworkAclState state, CustomResourceOptions options)resources:  _:    type: azure:webpubsub:NetworkAcl    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- DefaultAction string
- The default action to control the network access when no other rule matches. Possible values are AllowandDeny. Defaults toDeny.
- PrivateEndpoints List<NetworkAcl Private Endpoint> 
- A private_endpointblock as defined below.
- PublicNetwork NetworkAcl Public Network 
- A public_networkblock as defined below.
- WebPubsub stringId 
- The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- DefaultAction string
- The default action to control the network access when no other rule matches. Possible values are AllowandDeny. Defaults toDeny.
- PrivateEndpoints []NetworkAcl Private Endpoint Args 
- A private_endpointblock as defined below.
- PublicNetwork NetworkAcl Public Network Args 
- A public_networkblock as defined below.
- WebPubsub stringId 
- The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- defaultAction String
- The default action to control the network access when no other rule matches. Possible values are AllowandDeny. Defaults toDeny.
- privateEndpoints List<NetworkAcl Private Endpoint> 
- A private_endpointblock as defined below.
- publicNetwork NetworkAcl Public Network 
- A public_networkblock as defined below.
- webPubsub StringId 
- The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- defaultAction string
- The default action to control the network access when no other rule matches. Possible values are AllowandDeny. Defaults toDeny.
- privateEndpoints NetworkAcl Private Endpoint[] 
- A private_endpointblock as defined below.
- publicNetwork NetworkAcl Public Network 
- A public_networkblock as defined below.
- webPubsub stringId 
- The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- default_action str
- The default action to control the network access when no other rule matches. Possible values are AllowandDeny. Defaults toDeny.
- private_endpoints Sequence[NetworkAcl Private Endpoint Args] 
- A private_endpointblock as defined below.
- public_network NetworkAcl Public Network Args 
- A public_networkblock as defined below.
- web_pubsub_ strid 
- The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- defaultAction String
- The default action to control the network access when no other rule matches. Possible values are AllowandDeny. Defaults toDeny.
- privateEndpoints List<Property Map>
- A private_endpointblock as defined below.
- publicNetwork Property Map
- A public_networkblock as defined below.
- webPubsub StringId 
- The ID of the Web Pubsub service. Changing this forces a new resource to be created.
Supporting Types
NetworkAclPrivateEndpoint, NetworkAclPrivateEndpointArgs        
- Id string
- The ID of the Private Endpoint which is based on the Web Pubsub service.
- AllowedRequest List<string>Types 
- The allowed request types for the Private Endpoint Connection. Possible values are ClientConnection,ServerConnection,RESTAPIandTrace.
- DeniedRequest List<string>Types 
- The denied request types for the Private Endpoint Connection. Possible values are - ClientConnection,- ServerConnection,- RESTAPIand- Trace.- NOTE: When - default_actionis- Allow,- allowed_request_typescannot be set. When- default_actionis- Deny,- denied_request_typescannot be set.
- Id string
- The ID of the Private Endpoint which is based on the Web Pubsub service.
- AllowedRequest []stringTypes 
- The allowed request types for the Private Endpoint Connection. Possible values are ClientConnection,ServerConnection,RESTAPIandTrace.
- DeniedRequest []stringTypes 
- The denied request types for the Private Endpoint Connection. Possible values are - ClientConnection,- ServerConnection,- RESTAPIand- Trace.- NOTE: When - default_actionis- Allow,- allowed_request_typescannot be set. When- default_actionis- Deny,- denied_request_typescannot be set.
- id String
- The ID of the Private Endpoint which is based on the Web Pubsub service.
- allowedRequest List<String>Types 
- The allowed request types for the Private Endpoint Connection. Possible values are ClientConnection,ServerConnection,RESTAPIandTrace.
- deniedRequest List<String>Types 
- The denied request types for the Private Endpoint Connection. Possible values are - ClientConnection,- ServerConnection,- RESTAPIand- Trace.- NOTE: When - default_actionis- Allow,- allowed_request_typescannot be set. When- default_actionis- Deny,- denied_request_typescannot be set.
- id string
- The ID of the Private Endpoint which is based on the Web Pubsub service.
- allowedRequest string[]Types 
- The allowed request types for the Private Endpoint Connection. Possible values are ClientConnection,ServerConnection,RESTAPIandTrace.
- deniedRequest string[]Types 
- The denied request types for the Private Endpoint Connection. Possible values are - ClientConnection,- ServerConnection,- RESTAPIand- Trace.- NOTE: When - default_actionis- Allow,- allowed_request_typescannot be set. When- default_actionis- Deny,- denied_request_typescannot be set.
- id str
- The ID of the Private Endpoint which is based on the Web Pubsub service.
- allowed_request_ Sequence[str]types 
- The allowed request types for the Private Endpoint Connection. Possible values are ClientConnection,ServerConnection,RESTAPIandTrace.
- denied_request_ Sequence[str]types 
- The denied request types for the Private Endpoint Connection. Possible values are - ClientConnection,- ServerConnection,- RESTAPIand- Trace.- NOTE: When - default_actionis- Allow,- allowed_request_typescannot be set. When- default_actionis- Deny,- denied_request_typescannot be set.
- id String
- The ID of the Private Endpoint which is based on the Web Pubsub service.
- allowedRequest List<String>Types 
- The allowed request types for the Private Endpoint Connection. Possible values are ClientConnection,ServerConnection,RESTAPIandTrace.
- deniedRequest List<String>Types 
- The denied request types for the Private Endpoint Connection. Possible values are - ClientConnection,- ServerConnection,- RESTAPIand- Trace.- NOTE: When - default_actionis- Allow,- allowed_request_typescannot be set. When- default_actionis- Deny,- denied_request_typescannot be set.
NetworkAclPublicNetwork, NetworkAclPublicNetworkArgs        
- AllowedRequest List<string>Types 
- The allowed request types for the public network. Possible values are ClientConnection,ServerConnection,RESTAPIandTrace.
- DeniedRequest List<string>Types 
- The denied request types for the public network. Possible values are - ClientConnection,- ServerConnection,- RESTAPIand- Trace.- NOTE: When - default_actionis- Allow,- allowed_request_typescannot be set. When- default_actionis- Deny,- denied_request_typescannot be set.
- AllowedRequest []stringTypes 
- The allowed request types for the public network. Possible values are ClientConnection,ServerConnection,RESTAPIandTrace.
- DeniedRequest []stringTypes 
- The denied request types for the public network. Possible values are - ClientConnection,- ServerConnection,- RESTAPIand- Trace.- NOTE: When - default_actionis- Allow,- allowed_request_typescannot be set. When- default_actionis- Deny,- denied_request_typescannot be set.
- allowedRequest List<String>Types 
- The allowed request types for the public network. Possible values are ClientConnection,ServerConnection,RESTAPIandTrace.
- deniedRequest List<String>Types 
- The denied request types for the public network. Possible values are - ClientConnection,- ServerConnection,- RESTAPIand- Trace.- NOTE: When - default_actionis- Allow,- allowed_request_typescannot be set. When- default_actionis- Deny,- denied_request_typescannot be set.
- allowedRequest string[]Types 
- The allowed request types for the public network. Possible values are ClientConnection,ServerConnection,RESTAPIandTrace.
- deniedRequest string[]Types 
- The denied request types for the public network. Possible values are - ClientConnection,- ServerConnection,- RESTAPIand- Trace.- NOTE: When - default_actionis- Allow,- allowed_request_typescannot be set. When- default_actionis- Deny,- denied_request_typescannot be set.
- allowed_request_ Sequence[str]types 
- The allowed request types for the public network. Possible values are ClientConnection,ServerConnection,RESTAPIandTrace.
- denied_request_ Sequence[str]types 
- The denied request types for the public network. Possible values are - ClientConnection,- ServerConnection,- RESTAPIand- Trace.- NOTE: When - default_actionis- Allow,- allowed_request_typescannot be set. When- default_actionis- Deny,- denied_request_typescannot be set.
- allowedRequest List<String>Types 
- The allowed request types for the public network. Possible values are ClientConnection,ServerConnection,RESTAPIandTrace.
- deniedRequest List<String>Types 
- The denied request types for the public network. Possible values are - ClientConnection,- ServerConnection,- RESTAPIand- Trace.- NOTE: When - default_actionis- Allow,- allowed_request_typescannot be set. When- default_actionis- Deny,- denied_request_typescannot be set.
Import
Network ACLs for a Web Pubsub service can be imported using the resource id, e.g.
$ pulumi import azure:webpubsub/networkAcl:NetworkAcl example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/webPubSub/webpubsub1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.