import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Network Manager Admin Rule. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const current = azure.core.getSubscription({}); * const exampleNetworkManager = new azure.network.NetworkManager("example", { * name: "example-network-manager", * location: example.location, * resourceGroupName: example.name, * scope: { * subscriptionIds: [current.then(current => current.id)], * }, * scopeAccesses: [ * "Connectivity", * "SecurityAdmin", * ], * description: "example network manager", * }); * const exampleNetworkManagerNetworkGroup = new azure.network.NetworkManagerNetworkGroup("example", { * name: "example-network-group", * networkManagerId: exampleNetworkManager.id, * }); * const exampleNetworkManagerSecurityAdminConfiguration = new azure.network.NetworkManagerSecurityAdminConfiguration("example", { * name: "example-admin-conf", * networkManagerId: exampleNetworkManager.id, * }); * const exampleNetworkManagerAdminRuleCollection = new azure.network.NetworkManagerAdminRuleCollection("example", { * name: "example-admin-rule-collection", * securityAdminConfigurationId: exampleNetworkManagerSecurityAdminConfiguration.id, * networkGroupIds: [exampleNetworkManagerNetworkGroup.id], * }); * const exampleNetworkManagerAdminRule = new azure.network.NetworkManagerAdminRule("example", { * name: "example-admin-rule", * adminRuleCollectionId: exampleNetworkManagerAdminRuleCollection.id, * action: "Deny", * direction: "Outbound", * priority: 1, * protocol: "Tcp", * sourcePortRanges: [ * "80", * "1024-65535", * ], * destinationPortRanges: ["80"], * sources: [{ * addressPrefixType: "ServiceTag", * addressPrefix: "Internet", * }], * destinations: [ * { * addressPrefixType: "IPPrefix", * addressPrefix: "10.1.0.1", * }, * { * addressPrefixType: "IPPrefix", * addressPrefix: "10.0.0.0/24", * }, * ], * description: "example admin rule", * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Network` - 2025-01-01 * * ## Import * * Network Manager Admin Rule can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:network/networkManagerAdminRule:NetworkManagerAdminRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Network/networkManagers/networkManager1/securityAdminConfigurations/configuration1/ruleCollections/ruleCollection1/rules/rule1 * ``` */ export declare class NetworkManagerAdminRule extends pulumi.CustomResource { /** * Get an existing NetworkManagerAdminRule resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: NetworkManagerAdminRuleState, opts?: pulumi.CustomResourceOptions): NetworkManagerAdminRule; /** * Returns true if the given object is an instance of NetworkManagerAdminRule. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is NetworkManagerAdminRule; /** * Specifies the action allowed for this Network Manager Admin Rule. Possible values are `Allow`, `AlwaysAllow`, and `Deny`. */ readonly action: pulumi.Output; /** * Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created. */ readonly adminRuleCollectionId: pulumi.Output; /** * A description of the Network Manager Admin Rule. */ readonly description: pulumi.Output; /** * A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. */ readonly destinationPortRanges: pulumi.Output; /** * One or more `destination` blocks as defined below. */ readonly destinations: pulumi.Output; /** * Indicates if the traffic matched against the rule in inbound or outbound. Possible values are `Inbound` and `Outbound`. */ readonly direction: pulumi.Output; /** * Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created. */ readonly name: pulumi.Output; /** * The priority of the rule. Possible values are integers between `1` and `4096`. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ readonly priority: pulumi.Output; /** * Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are `Ah`, `Any`, `Esp`, `Icmp`, `Tcp`, and `Udp`. */ readonly protocol: pulumi.Output; /** * A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. */ readonly sourcePortRanges: pulumi.Output; /** * One or more `source` blocks as defined below. */ readonly sources: pulumi.Output; /** * Create a NetworkManagerAdminRule resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: NetworkManagerAdminRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering NetworkManagerAdminRule resources. */ export interface NetworkManagerAdminRuleState { /** * Specifies the action allowed for this Network Manager Admin Rule. Possible values are `Allow`, `AlwaysAllow`, and `Deny`. */ action?: pulumi.Input; /** * Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created. */ adminRuleCollectionId?: pulumi.Input; /** * A description of the Network Manager Admin Rule. */ description?: pulumi.Input; /** * A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. */ destinationPortRanges?: pulumi.Input[]>; /** * One or more `destination` blocks as defined below. */ destinations?: pulumi.Input[]>; /** * Indicates if the traffic matched against the rule in inbound or outbound. Possible values are `Inbound` and `Outbound`. */ direction?: pulumi.Input; /** * Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created. */ name?: pulumi.Input; /** * The priority of the rule. Possible values are integers between `1` and `4096`. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ priority?: pulumi.Input; /** * Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are `Ah`, `Any`, `Esp`, `Icmp`, `Tcp`, and `Udp`. */ protocol?: pulumi.Input; /** * A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. */ sourcePortRanges?: pulumi.Input[]>; /** * One or more `source` blocks as defined below. */ sources?: pulumi.Input[]>; } /** * The set of arguments for constructing a NetworkManagerAdminRule resource. */ export interface NetworkManagerAdminRuleArgs { /** * Specifies the action allowed for this Network Manager Admin Rule. Possible values are `Allow`, `AlwaysAllow`, and `Deny`. */ action: pulumi.Input; /** * Specifies the ID of the Network Manager Admin Rule Collection. Changing this forces a new Network Manager Admin Rule to be created. */ adminRuleCollectionId: pulumi.Input; /** * A description of the Network Manager Admin Rule. */ description?: pulumi.Input; /** * A list of string specifies the destination port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. */ destinationPortRanges?: pulumi.Input[]>; /** * One or more `destination` blocks as defined below. */ destinations?: pulumi.Input[]>; /** * Indicates if the traffic matched against the rule in inbound or outbound. Possible values are `Inbound` and `Outbound`. */ direction: pulumi.Input; /** * Specifies the name which should be used for this Network Manager Admin Rule. Changing this forces a new Network Manager Admin Rule to be created. */ name?: pulumi.Input; /** * The priority of the rule. Possible values are integers between `1` and `4096`. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. */ priority: pulumi.Input; /** * Specifies which network protocol this Network Manager Admin Rule applies to. Possible values are `Ah`, `Any`, `Esp`, `Icmp`, `Tcp`, and `Udp`. */ protocol: pulumi.Input; /** * A list of string specifies the source port ranges. Specify one or more single port number or port ranges such as `1024-65535`. Use `*` to specify any port. */ sourcePortRanges?: pulumi.Input[]>; /** * One or more `source` blocks as defined below. */ sources?: pulumi.Input[]>; }