1. Packages
  2. Juniper Mist Provider
  3. API Docs
  4. org
  5. Servicepolicy
Juniper Mist v0.2.4 published on Saturday, Mar 1, 2025 by Pulumi

junipermist.org.Servicepolicy

Explore with Pulumi AI

This resource manages WAN Assurance Service Policies (Application Policiess).

The Service Policies can be used in the service_policies object by referencing the Service Policy ID as the servicepolicy_id in:

  • the Gateway configuration (mist_device_gateway.service_policies)
  • the Gateway Templates (mist_org_gatewaytemplate.service_policies)
  • the HUB Profiles (mist_org_deviceprofile_gateway.service_policies) They can be used to manage common policies between multiples configurations

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.junipermist.org.Servicepolicy;
import com.pulumi.junipermist.org.ServicepolicyArgs;
import com.pulumi.junipermist.org.inputs.ServicepolicyIdpArgs;
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 servicepolicyOne = new Servicepolicy("servicepolicyOne", ServicepolicyArgs.builder()
            .orgId(terraformTest.id())
            .tenants("guest")
            .services("guest-internet")
            .action("allow")
            .idp(ServicepolicyIdpArgs.builder()
                .enabled(true)
                .profile("standard")
                .alert_only(true)
                .build())
            .name("Guest-IDP")
            .build());

    }
}
Copy
resources:
  servicepolicyOne:
    type: junipermist:org:Servicepolicy
    name: servicepolicy_one
    properties:
      orgId: ${terraformTest.id}
      tenants:
        - guest
      services:
        - guest-internet
      action: allow
      idp:
        enabled: true
        profile: standard
        alert_only: true
      name: Guest-IDP
Copy

Create Servicepolicy Resource

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

Constructor syntax

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

@overload
def Servicepolicy(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  org_id: Optional[str] = None,
                  action: Optional[str] = None,
                  antivirus: Optional[ServicepolicyAntivirusArgs] = None,
                  appqoe: Optional[ServicepolicyAppqoeArgs] = None,
                  ewfs: Optional[Sequence[ServicepolicyEwfArgs]] = None,
                  idp: Optional[ServicepolicyIdpArgs] = None,
                  local_routing: Optional[bool] = None,
                  name: Optional[str] = None,
                  path_preference: Optional[str] = None,
                  services: Optional[Sequence[str]] = None,
                  ssl_proxy: Optional[ServicepolicySslProxyArgs] = None,
                  tenants: Optional[Sequence[str]] = None)
func NewServicepolicy(ctx *Context, name string, args ServicepolicyArgs, opts ...ResourceOption) (*Servicepolicy, error)
public Servicepolicy(string name, ServicepolicyArgs args, CustomResourceOptions? opts = null)
public Servicepolicy(String name, ServicepolicyArgs args)
public Servicepolicy(String name, ServicepolicyArgs args, CustomResourceOptions options)
type: junipermist:org:Servicepolicy
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. ServicepolicyArgs
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. ServicepolicyArgs
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. ServicepolicyArgs
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. ServicepolicyArgs
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. ServicepolicyArgs
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 servicepolicyResource = new JuniperMist.Org.Servicepolicy("servicepolicyResource", new()
{
    OrgId = "string",
    Action = "string",
    Antivirus = new JuniperMist.Org.Inputs.ServicepolicyAntivirusArgs
    {
        AvprofileId = "string",
        Enabled = false,
        Profile = "string",
    },
    Appqoe = new JuniperMist.Org.Inputs.ServicepolicyAppqoeArgs
    {
        Enabled = false,
    },
    Ewfs = new[]
    {
        new JuniperMist.Org.Inputs.ServicepolicyEwfArgs
        {
            AlertOnly = false,
            BlockMessage = "string",
            Enabled = false,
            Profile = "string",
        },
    },
    Idp = new JuniperMist.Org.Inputs.ServicepolicyIdpArgs
    {
        AlertOnly = false,
        Enabled = false,
        IdpprofileId = "string",
        Profile = "string",
    },
    LocalRouting = false,
    Name = "string",
    PathPreference = "string",
    Services = new[]
    {
        "string",
    },
    SslProxy = new JuniperMist.Org.Inputs.ServicepolicySslProxyArgs
    {
        CiphersCategory = "string",
        Enabled = false,
    },
    Tenants = new[]
    {
        "string",
    },
});
Copy
example, err := org.NewServicepolicy(ctx, "servicepolicyResource", &org.ServicepolicyArgs{
	OrgId:  pulumi.String("string"),
	Action: pulumi.String("string"),
	Antivirus: &org.ServicepolicyAntivirusArgs{
		AvprofileId: pulumi.String("string"),
		Enabled:     pulumi.Bool(false),
		Profile:     pulumi.String("string"),
	},
	Appqoe: &org.ServicepolicyAppqoeArgs{
		Enabled: pulumi.Bool(false),
	},
	Ewfs: org.ServicepolicyEwfArray{
		&org.ServicepolicyEwfArgs{
			AlertOnly:    pulumi.Bool(false),
			BlockMessage: pulumi.String("string"),
			Enabled:      pulumi.Bool(false),
			Profile:      pulumi.String("string"),
		},
	},
	Idp: &org.ServicepolicyIdpArgs{
		AlertOnly:    pulumi.Bool(false),
		Enabled:      pulumi.Bool(false),
		IdpprofileId: pulumi.String("string"),
		Profile:      pulumi.String("string"),
	},
	LocalRouting:   pulumi.Bool(false),
	Name:           pulumi.String("string"),
	PathPreference: pulumi.String("string"),
	Services: pulumi.StringArray{
		pulumi.String("string"),
	},
	SslProxy: &org.ServicepolicySslProxyArgs{
		CiphersCategory: pulumi.String("string"),
		Enabled:         pulumi.Bool(false),
	},
	Tenants: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var servicepolicyResource = new Servicepolicy("servicepolicyResource", ServicepolicyArgs.builder()
    .orgId("string")
    .action("string")
    .antivirus(ServicepolicyAntivirusArgs.builder()
        .avprofileId("string")
        .enabled(false)
        .profile("string")
        .build())
    .appqoe(ServicepolicyAppqoeArgs.builder()
        .enabled(false)
        .build())
    .ewfs(ServicepolicyEwfArgs.builder()
        .alertOnly(false)
        .blockMessage("string")
        .enabled(false)
        .profile("string")
        .build())
    .idp(ServicepolicyIdpArgs.builder()
        .alertOnly(false)
        .enabled(false)
        .idpprofileId("string")
        .profile("string")
        .build())
    .localRouting(false)
    .name("string")
    .pathPreference("string")
    .services("string")
    .sslProxy(ServicepolicySslProxyArgs.builder()
        .ciphersCategory("string")
        .enabled(false)
        .build())
    .tenants("string")
    .build());
Copy
servicepolicy_resource = junipermist.org.Servicepolicy("servicepolicyResource",
    org_id="string",
    action="string",
    antivirus={
        "avprofile_id": "string",
        "enabled": False,
        "profile": "string",
    },
    appqoe={
        "enabled": False,
    },
    ewfs=[{
        "alert_only": False,
        "block_message": "string",
        "enabled": False,
        "profile": "string",
    }],
    idp={
        "alert_only": False,
        "enabled": False,
        "idpprofile_id": "string",
        "profile": "string",
    },
    local_routing=False,
    name="string",
    path_preference="string",
    services=["string"],
    ssl_proxy={
        "ciphers_category": "string",
        "enabled": False,
    },
    tenants=["string"])
Copy
const servicepolicyResource = new junipermist.org.Servicepolicy("servicepolicyResource", {
    orgId: "string",
    action: "string",
    antivirus: {
        avprofileId: "string",
        enabled: false,
        profile: "string",
    },
    appqoe: {
        enabled: false,
    },
    ewfs: [{
        alertOnly: false,
        blockMessage: "string",
        enabled: false,
        profile: "string",
    }],
    idp: {
        alertOnly: false,
        enabled: false,
        idpprofileId: "string",
        profile: "string",
    },
    localRouting: false,
    name: "string",
    pathPreference: "string",
    services: ["string"],
    sslProxy: {
        ciphersCategory: "string",
        enabled: false,
    },
    tenants: ["string"],
});
Copy
type: junipermist:org:Servicepolicy
properties:
    action: string
    antivirus:
        avprofileId: string
        enabled: false
        profile: string
    appqoe:
        enabled: false
    ewfs:
        - alertOnly: false
          blockMessage: string
          enabled: false
          profile: string
    idp:
        alertOnly: false
        enabled: false
        idpprofileId: string
        profile: string
    localRouting: false
    name: string
    orgId: string
    pathPreference: string
    services:
        - string
    sslProxy:
        ciphersCategory: string
        enabled: false
    tenants:
        - string
Copy

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

OrgId This property is required. string
Action string
enum: allow, deny
Antivirus Pulumi.JuniperMist.Org.Inputs.ServicepolicyAntivirus
For SRX-only
Appqoe Pulumi.JuniperMist.Org.Inputs.ServicepolicyAppqoe
For SRX Only
Ewfs List<Pulumi.JuniperMist.Org.Inputs.ServicepolicyEwf>
Idp Pulumi.JuniperMist.Org.Inputs.ServicepolicyIdp
LocalRouting bool
access within the same VRF
Name string
PathPreference string
By default, we derive all paths available and use them, optionally, you can customize by using path_preference
Services List<string>
SslProxy Pulumi.JuniperMist.Org.Inputs.ServicepolicySslProxy
For SRX-only
Tenants List<string>
OrgId This property is required. string
Action string
enum: allow, deny
Antivirus ServicepolicyAntivirusArgs
For SRX-only
Appqoe ServicepolicyAppqoeArgs
For SRX Only
Ewfs []ServicepolicyEwfArgs
Idp ServicepolicyIdpArgs
LocalRouting bool
access within the same VRF
Name string
PathPreference string
By default, we derive all paths available and use them, optionally, you can customize by using path_preference
Services []string
SslProxy ServicepolicySslProxyArgs
For SRX-only
Tenants []string
orgId This property is required. String
action String
enum: allow, deny
antivirus ServicepolicyAntivirus
For SRX-only
appqoe ServicepolicyAppqoe
For SRX Only
ewfs List<ServicepolicyEwf>
idp ServicepolicyIdp
localRouting Boolean
access within the same VRF
name String
pathPreference String
By default, we derive all paths available and use them, optionally, you can customize by using path_preference
services List<String>
sslProxy ServicepolicySslProxy
For SRX-only
tenants List<String>
orgId This property is required. string
action string
enum: allow, deny
antivirus ServicepolicyAntivirus
For SRX-only
appqoe ServicepolicyAppqoe
For SRX Only
ewfs ServicepolicyEwf[]
idp ServicepolicyIdp
localRouting boolean
access within the same VRF
name string
pathPreference string
By default, we derive all paths available and use them, optionally, you can customize by using path_preference
services string[]
sslProxy ServicepolicySslProxy
For SRX-only
tenants string[]
org_id This property is required. str
action str
enum: allow, deny
antivirus ServicepolicyAntivirusArgs
For SRX-only
appqoe ServicepolicyAppqoeArgs
For SRX Only
ewfs Sequence[ServicepolicyEwfArgs]
idp ServicepolicyIdpArgs
local_routing bool
access within the same VRF
name str
path_preference str
By default, we derive all paths available and use them, optionally, you can customize by using path_preference
services Sequence[str]
ssl_proxy ServicepolicySslProxyArgs
For SRX-only
tenants Sequence[str]
orgId This property is required. String
action String
enum: allow, deny
antivirus Property Map
For SRX-only
appqoe Property Map
For SRX Only
ewfs List<Property Map>
idp Property Map
localRouting Boolean
access within the same VRF
name String
pathPreference String
By default, we derive all paths available and use them, optionally, you can customize by using path_preference
services List<String>
sslProxy Property Map
For SRX-only
tenants List<String>

Outputs

All input properties are implicitly available as output properties. Additionally, the Servicepolicy 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 Servicepolicy Resource

Get an existing Servicepolicy 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?: ServicepolicyState, opts?: CustomResourceOptions): Servicepolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        action: Optional[str] = None,
        antivirus: Optional[ServicepolicyAntivirusArgs] = None,
        appqoe: Optional[ServicepolicyAppqoeArgs] = None,
        ewfs: Optional[Sequence[ServicepolicyEwfArgs]] = None,
        idp: Optional[ServicepolicyIdpArgs] = None,
        local_routing: Optional[bool] = None,
        name: Optional[str] = None,
        org_id: Optional[str] = None,
        path_preference: Optional[str] = None,
        services: Optional[Sequence[str]] = None,
        ssl_proxy: Optional[ServicepolicySslProxyArgs] = None,
        tenants: Optional[Sequence[str]] = None) -> Servicepolicy
func GetServicepolicy(ctx *Context, name string, id IDInput, state *ServicepolicyState, opts ...ResourceOption) (*Servicepolicy, error)
public static Servicepolicy Get(string name, Input<string> id, ServicepolicyState? state, CustomResourceOptions? opts = null)
public static Servicepolicy get(String name, Output<String> id, ServicepolicyState state, CustomResourceOptions options)
resources:  _:    type: junipermist:org:Servicepolicy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
Action string
enum: allow, deny
Antivirus Pulumi.JuniperMist.Org.Inputs.ServicepolicyAntivirus
For SRX-only
Appqoe Pulumi.JuniperMist.Org.Inputs.ServicepolicyAppqoe
For SRX Only
Ewfs List<Pulumi.JuniperMist.Org.Inputs.ServicepolicyEwf>
Idp Pulumi.JuniperMist.Org.Inputs.ServicepolicyIdp
LocalRouting bool
access within the same VRF
Name string
OrgId string
PathPreference string
By default, we derive all paths available and use them, optionally, you can customize by using path_preference
Services List<string>
SslProxy Pulumi.JuniperMist.Org.Inputs.ServicepolicySslProxy
For SRX-only
Tenants List<string>
Action string
enum: allow, deny
Antivirus ServicepolicyAntivirusArgs
For SRX-only
Appqoe ServicepolicyAppqoeArgs
For SRX Only
Ewfs []ServicepolicyEwfArgs
Idp ServicepolicyIdpArgs
LocalRouting bool
access within the same VRF
Name string
OrgId string
PathPreference string
By default, we derive all paths available and use them, optionally, you can customize by using path_preference
Services []string
SslProxy ServicepolicySslProxyArgs
For SRX-only
Tenants []string
action String
enum: allow, deny
antivirus ServicepolicyAntivirus
For SRX-only
appqoe ServicepolicyAppqoe
For SRX Only
ewfs List<ServicepolicyEwf>
idp ServicepolicyIdp
localRouting Boolean
access within the same VRF
name String
orgId String
pathPreference String
By default, we derive all paths available and use them, optionally, you can customize by using path_preference
services List<String>
sslProxy ServicepolicySslProxy
For SRX-only
tenants List<String>
action string
enum: allow, deny
antivirus ServicepolicyAntivirus
For SRX-only
appqoe ServicepolicyAppqoe
For SRX Only
ewfs ServicepolicyEwf[]
idp ServicepolicyIdp
localRouting boolean
access within the same VRF
name string
orgId string
pathPreference string
By default, we derive all paths available and use them, optionally, you can customize by using path_preference
services string[]
sslProxy ServicepolicySslProxy
For SRX-only
tenants string[]
action str
enum: allow, deny
antivirus ServicepolicyAntivirusArgs
For SRX-only
appqoe ServicepolicyAppqoeArgs
For SRX Only
ewfs Sequence[ServicepolicyEwfArgs]
idp ServicepolicyIdpArgs
local_routing bool
access within the same VRF
name str
org_id str
path_preference str
By default, we derive all paths available and use them, optionally, you can customize by using path_preference
services Sequence[str]
ssl_proxy ServicepolicySslProxyArgs
For SRX-only
tenants Sequence[str]
action String
enum: allow, deny
antivirus Property Map
For SRX-only
appqoe Property Map
For SRX Only
ewfs List<Property Map>
idp Property Map
localRouting Boolean
access within the same VRF
name String
orgId String
pathPreference String
By default, we derive all paths available and use them, optionally, you can customize by using path_preference
services List<String>
sslProxy Property Map
For SRX-only
tenants List<String>

Supporting Types

ServicepolicyAntivirus
, ServicepolicyAntivirusArgs

AvprofileId string
org-level AV Profile can be used, this takes precendence over 'profile'
Enabled bool
Profile string
Default / noftp / httponly / or keys from av_profiles
AvprofileId string
org-level AV Profile can be used, this takes precendence over 'profile'
Enabled bool
Profile string
Default / noftp / httponly / or keys from av_profiles
avprofileId String
org-level AV Profile can be used, this takes precendence over 'profile'
enabled Boolean
profile String
Default / noftp / httponly / or keys from av_profiles
avprofileId string
org-level AV Profile can be used, this takes precendence over 'profile'
enabled boolean
profile string
Default / noftp / httponly / or keys from av_profiles
avprofile_id str
org-level AV Profile can be used, this takes precendence over 'profile'
enabled bool
profile str
Default / noftp / httponly / or keys from av_profiles
avprofileId String
org-level AV Profile can be used, this takes precendence over 'profile'
enabled Boolean
profile String
Default / noftp / httponly / or keys from av_profiles

ServicepolicyAppqoe
, ServicepolicyAppqoeArgs

Enabled bool
Enabled bool
enabled Boolean
enabled boolean
enabled bool
enabled Boolean

ServicepolicyEwf
, ServicepolicyEwfArgs

AlertOnly bool
BlockMessage string
Enabled bool
Profile string
enum: critical, standard, strict
AlertOnly bool
BlockMessage string
Enabled bool
Profile string
enum: critical, standard, strict
alertOnly Boolean
blockMessage String
enabled Boolean
profile String
enum: critical, standard, strict
alertOnly boolean
blockMessage string
enabled boolean
profile string
enum: critical, standard, strict
alert_only bool
block_message str
enabled bool
profile str
enum: critical, standard, strict
alertOnly Boolean
blockMessage String
enabled Boolean
profile String
enum: critical, standard, strict

ServicepolicyIdp
, ServicepolicyIdpArgs

AlertOnly bool
Enabled bool
IdpprofileId string
org_level IDP Profile can be used, this takes precedence over profile
Profile string
enum: Custom, strict (default), standard or keys from idp_profiles
AlertOnly bool
Enabled bool
IdpprofileId string
org_level IDP Profile can be used, this takes precedence over profile
Profile string
enum: Custom, strict (default), standard or keys from idp_profiles
alertOnly Boolean
enabled Boolean
idpprofileId String
org_level IDP Profile can be used, this takes precedence over profile
profile String
enum: Custom, strict (default), standard or keys from idp_profiles
alertOnly boolean
enabled boolean
idpprofileId string
org_level IDP Profile can be used, this takes precedence over profile
profile string
enum: Custom, strict (default), standard or keys from idp_profiles
alert_only bool
enabled bool
idpprofile_id str
org_level IDP Profile can be used, this takes precedence over profile
profile str
enum: Custom, strict (default), standard or keys from idp_profiles
alertOnly Boolean
enabled Boolean
idpprofileId String
org_level IDP Profile can be used, this takes precedence over profile
profile String
enum: Custom, strict (default), standard or keys from idp_profiles

ServicepolicySslProxy
, ServicepolicySslProxyArgs

CiphersCategory string
enum: medium, strong, weak
Enabled bool
CiphersCategory string
enum: medium, strong, weak
Enabled bool
ciphersCategory String
enum: medium, strong, weak
enabled Boolean
ciphersCategory string
enum: medium, strong, weak
enabled boolean
ciphers_category str
enum: medium, strong, weak
enabled bool
ciphersCategory String
enum: medium, strong, weak
enabled Boolean

Import

Using pulumi import, import mist_org_servicepolicy with:

Org Service Policy can be imported by specifying the org_id and the servicepolicy_id

$ pulumi import junipermist:org/servicepolicy:Servicepolicy servicepolicy_one 17b46405-3a6d-4715-8bb4-6bb6d06f316a.d3c42998-9012-4859-9743-6b9bee475309
Copy

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

Package Details

Repository
junipermist pulumi/pulumi-junipermist
License
Apache-2.0
Notes
This Pulumi package is based on the mist Terraform Provider.