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:
- Public
Network NetworkAcl Public Network - A
public_network
block as defined below. - Web
Pubsub stringId - The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- Default
Action string - The default action to control the network access when no other rule matches. Possible values are
Allow
andDeny
. Defaults toDeny
. - Private
Endpoints List<NetworkAcl Private Endpoint> - A
private_endpoint
block as defined below.
- Public
Network NetworkAcl Public Network Args - A
public_network
block as defined below. - Web
Pubsub stringId - The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- Default
Action string - The default action to control the network access when no other rule matches. Possible values are
Allow
andDeny
. Defaults toDeny
. - Private
Endpoints []NetworkAcl Private Endpoint Args - A
private_endpoint
block as defined below.
- public
Network NetworkAcl Public Network - A
public_network
block as defined below. - web
Pubsub StringId - The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- default
Action String - The default action to control the network access when no other rule matches. Possible values are
Allow
andDeny
. Defaults toDeny
. - private
Endpoints List<NetworkAcl Private Endpoint> - A
private_endpoint
block as defined below.
- public
Network NetworkAcl Public Network - A
public_network
block as defined below. - web
Pubsub stringId - The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- default
Action string - The default action to control the network access when no other rule matches. Possible values are
Allow
andDeny
. Defaults toDeny
. - private
Endpoints NetworkAcl Private Endpoint[] - A
private_endpoint
block as defined below.
- public_
network NetworkAcl Public Network Args - A
public_network
block 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
Allow
andDeny
. Defaults toDeny
. - private_
endpoints Sequence[NetworkAcl Private Endpoint Args] - A
private_endpoint
block as defined below.
- public
Network Property Map - A
public_network
block as defined below. - web
Pubsub StringId - The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- default
Action String - The default action to control the network access when no other rule matches. Possible values are
Allow
andDeny
. Defaults toDeny
. - private
Endpoints List<Property Map> - A
private_endpoint
block 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) -> NetworkAcl
func 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)
Resource lookup is not supported in YAML
- 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.
- Default
Action string - The default action to control the network access when no other rule matches. Possible values are
Allow
andDeny
. Defaults toDeny
. - Private
Endpoints List<NetworkAcl Private Endpoint> - A
private_endpoint
block as defined below. - Public
Network NetworkAcl Public Network - A
public_network
block as defined below. - Web
Pubsub stringId - The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- Default
Action string - The default action to control the network access when no other rule matches. Possible values are
Allow
andDeny
. Defaults toDeny
. - Private
Endpoints []NetworkAcl Private Endpoint Args - A
private_endpoint
block as defined below. - Public
Network NetworkAcl Public Network Args - A
public_network
block as defined below. - Web
Pubsub stringId - The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- default
Action String - The default action to control the network access when no other rule matches. Possible values are
Allow
andDeny
. Defaults toDeny
. - private
Endpoints List<NetworkAcl Private Endpoint> - A
private_endpoint
block as defined below. - public
Network NetworkAcl Public Network - A
public_network
block as defined below. - web
Pubsub StringId - The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- default
Action string - The default action to control the network access when no other rule matches. Possible values are
Allow
andDeny
. Defaults toDeny
. - private
Endpoints NetworkAcl Private Endpoint[] - A
private_endpoint
block as defined below. - public
Network NetworkAcl Public Network - A
public_network
block as defined below. - web
Pubsub 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
Allow
andDeny
. Defaults toDeny
. - private_
endpoints Sequence[NetworkAcl Private Endpoint Args] - A
private_endpoint
block as defined below. - public_
network NetworkAcl Public Network Args - A
public_network
block as defined below. - web_
pubsub_ strid - The ID of the Web Pubsub service. Changing this forces a new resource to be created.
- default
Action String - The default action to control the network access when no other rule matches. Possible values are
Allow
andDeny
. Defaults toDeny
. - private
Endpoints List<Property Map> - A
private_endpoint
block as defined below. - public
Network Property Map - A
public_network
block as defined below. - web
Pubsub 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.
- Allowed
Request List<string>Types - The allowed request types for the Private Endpoint Connection. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
. - Denied
Request List<string>Types The denied request types for the Private Endpoint Connection. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
.NOTE: When
default_action
isAllow
,allowed_request_types
cannot be set. Whendefault_action
isDeny
,denied_request_types
cannot be set.
- Id string
- The ID of the Private Endpoint which is based on the Web Pubsub service.
- Allowed
Request []stringTypes - The allowed request types for the Private Endpoint Connection. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
. - Denied
Request []stringTypes The denied request types for the Private Endpoint Connection. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
.NOTE: When
default_action
isAllow
,allowed_request_types
cannot be set. Whendefault_action
isDeny
,denied_request_types
cannot be set.
- id String
- The ID of the Private Endpoint which is based on the Web Pubsub service.
- allowed
Request List<String>Types - The allowed request types for the Private Endpoint Connection. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
. - denied
Request List<String>Types The denied request types for the Private Endpoint Connection. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
.NOTE: When
default_action
isAllow
,allowed_request_types
cannot be set. Whendefault_action
isDeny
,denied_request_types
cannot be set.
- id string
- The ID of the Private Endpoint which is based on the Web Pubsub service.
- allowed
Request string[]Types - The allowed request types for the Private Endpoint Connection. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
. - denied
Request string[]Types The denied request types for the Private Endpoint Connection. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
.NOTE: When
default_action
isAllow
,allowed_request_types
cannot be set. Whendefault_action
isDeny
,denied_request_types
cannot 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
,RESTAPI
andTrace
. - denied_
request_ Sequence[str]types The denied request types for the Private Endpoint Connection. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
.NOTE: When
default_action
isAllow
,allowed_request_types
cannot be set. Whendefault_action
isDeny
,denied_request_types
cannot be set.
- id String
- The ID of the Private Endpoint which is based on the Web Pubsub service.
- allowed
Request List<String>Types - The allowed request types for the Private Endpoint Connection. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
. - denied
Request List<String>Types The denied request types for the Private Endpoint Connection. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
.NOTE: When
default_action
isAllow
,allowed_request_types
cannot be set. Whendefault_action
isDeny
,denied_request_types
cannot be set.
NetworkAclPublicNetwork, NetworkAclPublicNetworkArgs
- Allowed
Request List<string>Types - The allowed request types for the public network. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
. - Denied
Request List<string>Types The denied request types for the public network. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
.NOTE: When
default_action
isAllow
,allowed_request_types
cannot be set. Whendefault_action
isDeny
,denied_request_types
cannot be set.
- Allowed
Request []stringTypes - The allowed request types for the public network. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
. - Denied
Request []stringTypes The denied request types for the public network. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
.NOTE: When
default_action
isAllow
,allowed_request_types
cannot be set. Whendefault_action
isDeny
,denied_request_types
cannot be set.
- allowed
Request List<String>Types - The allowed request types for the public network. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
. - denied
Request List<String>Types The denied request types for the public network. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
.NOTE: When
default_action
isAllow
,allowed_request_types
cannot be set. Whendefault_action
isDeny
,denied_request_types
cannot be set.
- allowed
Request string[]Types - The allowed request types for the public network. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
. - denied
Request string[]Types The denied request types for the public network. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
.NOTE: When
default_action
isAllow
,allowed_request_types
cannot be set. Whendefault_action
isDeny
,denied_request_types
cannot be set.
- allowed_
request_ Sequence[str]types - The allowed request types for the public network. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
. - denied_
request_ Sequence[str]types The denied request types for the public network. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
.NOTE: When
default_action
isAllow
,allowed_request_types
cannot be set. Whendefault_action
isDeny
,denied_request_types
cannot be set.
- allowed
Request List<String>Types - The allowed request types for the public network. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
. - denied
Request List<String>Types The denied request types for the public network. Possible values are
ClientConnection
,ServerConnection
,RESTAPI
andTrace
.NOTE: When
default_action
isAllow
,allowed_request_types
cannot be set. Whendefault_action
isDeny
,denied_request_types
cannot 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
azurerm
Terraform Provider.