sdwan.PolicyGroup
Explore with Pulumi AI
This resource can manage a Policy Group .
- Minimum SD-WAN Manager version:
20.12.0
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sdwan from "@pulumi/sdwan";
const example = new sdwan.PolicyGroup("example", {
name: "PG_1",
description: "My policy group 1",
solution: "sdwan",
featureProfileIds: ["f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac"],
devices: [{
id: "C8K-40C0CCFD-9EA8-2B2E-E73B-32C5924EC79B",
}],
});
import pulumi
import pulumi_sdwan as sdwan
example = sdwan.PolicyGroup("example",
name="PG_1",
description="My policy group 1",
solution="sdwan",
feature_profile_ids=["f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac"],
devices=[{
"id": "C8K-40C0CCFD-9EA8-2B2E-E73B-32C5924EC79B",
}])
package main
import (
"github.com/pulumi/pulumi-sdwan/sdk/go/sdwan"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sdwan.NewPolicyGroup(ctx, "example", &sdwan.PolicyGroupArgs{
Name: pulumi.String("PG_1"),
Description: pulumi.String("My policy group 1"),
Solution: pulumi.String("sdwan"),
FeatureProfileIds: pulumi.StringArray{
pulumi.String("f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac"),
},
Devices: sdwan.PolicyGroupDeviceArray{
&sdwan.PolicyGroupDeviceArgs{
Id: pulumi.String("C8K-40C0CCFD-9EA8-2B2E-E73B-32C5924EC79B"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sdwan = Pulumi.Sdwan;
return await Deployment.RunAsync(() =>
{
var example = new Sdwan.PolicyGroup("example", new()
{
Name = "PG_1",
Description = "My policy group 1",
Solution = "sdwan",
FeatureProfileIds = new[]
{
"f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac",
},
Devices = new[]
{
new Sdwan.Inputs.PolicyGroupDeviceArgs
{
Id = "C8K-40C0CCFD-9EA8-2B2E-E73B-32C5924EC79B",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sdwan.PolicyGroup;
import com.pulumi.sdwan.PolicyGroupArgs;
import com.pulumi.sdwan.inputs.PolicyGroupDeviceArgs;
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 example = new PolicyGroup("example", PolicyGroupArgs.builder()
.name("PG_1")
.description("My policy group 1")
.solution("sdwan")
.featureProfileIds("f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac")
.devices(PolicyGroupDeviceArgs.builder()
.id("C8K-40C0CCFD-9EA8-2B2E-E73B-32C5924EC79B")
.build())
.build());
}
}
resources:
example:
type: sdwan:PolicyGroup
properties:
name: PG_1
description: My policy group 1
solution: sdwan
featureProfileIds:
- f6dd22c8-0b4f-496c-9a0b-6813d1f8b8ac
devices:
- id: C8K-40C0CCFD-9EA8-2B2E-E73B-32C5924EC79B
Create PolicyGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PolicyGroup(name: string, args: PolicyGroupArgs, opts?: CustomResourceOptions);
@overload
def PolicyGroup(resource_name: str,
args: PolicyGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PolicyGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
solution: Optional[str] = None,
devices: Optional[Sequence[PolicyGroupDeviceArgs]] = None,
feature_profile_ids: Optional[Sequence[str]] = None,
name: Optional[str] = None,
policy_versions: Optional[Sequence[str]] = None)
func NewPolicyGroup(ctx *Context, name string, args PolicyGroupArgs, opts ...ResourceOption) (*PolicyGroup, error)
public PolicyGroup(string name, PolicyGroupArgs args, CustomResourceOptions? opts = null)
public PolicyGroup(String name, PolicyGroupArgs args)
public PolicyGroup(String name, PolicyGroupArgs args, CustomResourceOptions options)
type: sdwan:PolicyGroup
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 PolicyGroupArgs
- 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 PolicyGroupArgs
- 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 PolicyGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicyGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PolicyGroupArgs
- 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 policyGroupResource = new Sdwan.PolicyGroup("policyGroupResource", new()
{
Description = "string",
Solution = "string",
Devices = new[]
{
new Sdwan.Inputs.PolicyGroupDeviceArgs
{
Deploy = false,
Id = "string",
Variables = new[]
{
new Sdwan.Inputs.PolicyGroupDeviceVariableArgs
{
Name = "string",
ListValues = new[]
{
"string",
},
Value = "string",
},
},
},
},
FeatureProfileIds = new[]
{
"string",
},
Name = "string",
PolicyVersions = new[]
{
"string",
},
});
example, err := sdwan.NewPolicyGroup(ctx, "policyGroupResource", &sdwan.PolicyGroupArgs{
Description: pulumi.String("string"),
Solution: pulumi.String("string"),
Devices: sdwan.PolicyGroupDeviceArray{
&sdwan.PolicyGroupDeviceArgs{
Deploy: pulumi.Bool(false),
Id: pulumi.String("string"),
Variables: sdwan.PolicyGroupDeviceVariableArray{
&sdwan.PolicyGroupDeviceVariableArgs{
Name: pulumi.String("string"),
ListValues: pulumi.StringArray{
pulumi.String("string"),
},
Value: pulumi.String("string"),
},
},
},
},
FeatureProfileIds: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
PolicyVersions: pulumi.StringArray{
pulumi.String("string"),
},
})
var policyGroupResource = new PolicyGroup("policyGroupResource", PolicyGroupArgs.builder()
.description("string")
.solution("string")
.devices(PolicyGroupDeviceArgs.builder()
.deploy(false)
.id("string")
.variables(PolicyGroupDeviceVariableArgs.builder()
.name("string")
.listValues("string")
.value("string")
.build())
.build())
.featureProfileIds("string")
.name("string")
.policyVersions("string")
.build());
policy_group_resource = sdwan.PolicyGroup("policyGroupResource",
description="string",
solution="string",
devices=[{
"deploy": False,
"id": "string",
"variables": [{
"name": "string",
"list_values": ["string"],
"value": "string",
}],
}],
feature_profile_ids=["string"],
name="string",
policy_versions=["string"])
const policyGroupResource = new sdwan.PolicyGroup("policyGroupResource", {
description: "string",
solution: "string",
devices: [{
deploy: false,
id: "string",
variables: [{
name: "string",
listValues: ["string"],
value: "string",
}],
}],
featureProfileIds: ["string"],
name: "string",
policyVersions: ["string"],
});
type: sdwan:PolicyGroup
properties:
description: string
devices:
- deploy: false
id: string
variables:
- listValues:
- string
name: string
value: string
featureProfileIds:
- string
name: string
policyVersions:
- string
solution: string
PolicyGroup 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 PolicyGroup resource accepts the following input properties:
- Description string
- Description
- Solution string
- Type of solution - Choices:
sdwan
- Devices
List<Policy
Group Device> - List of devices
- Feature
Profile List<string>Ids - List of feature profile IDs
- Name string
- The name of the policy group
- Policy
Versions List<string> - List of all associated policy versions
- Description string
- Description
- Solution string
- Type of solution - Choices:
sdwan
- Devices
[]Policy
Group Device Args - List of devices
- Feature
Profile []stringIds - List of feature profile IDs
- Name string
- The name of the policy group
- Policy
Versions []string - List of all associated policy versions
- description String
- Description
- solution String
- Type of solution - Choices:
sdwan
- devices
List<Policy
Group Device> - List of devices
- feature
Profile List<String>Ids - List of feature profile IDs
- name String
- The name of the policy group
- policy
Versions List<String> - List of all associated policy versions
- description string
- Description
- solution string
- Type of solution - Choices:
sdwan
- devices
Policy
Group Device[] - List of devices
- feature
Profile string[]Ids - List of feature profile IDs
- name string
- The name of the policy group
- policy
Versions string[] - List of all associated policy versions
- description str
- Description
- solution str
- Type of solution - Choices:
sdwan
- devices
Sequence[Policy
Group Device Args] - List of devices
- feature_
profile_ Sequence[str]ids - List of feature profile IDs
- name str
- The name of the policy group
- policy_
versions Sequence[str] - List of all associated policy versions
- description String
- Description
- solution String
- Type of solution - Choices:
sdwan
- devices List<Property Map>
- List of devices
- feature
Profile List<String>Ids - List of feature profile IDs
- name String
- The name of the policy group
- policy
Versions List<String> - List of all associated policy versions
Outputs
All input properties are implicitly available as output properties. Additionally, the PolicyGroup 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 PolicyGroup Resource
Get an existing PolicyGroup 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?: PolicyGroupState, opts?: CustomResourceOptions): PolicyGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
devices: Optional[Sequence[PolicyGroupDeviceArgs]] = None,
feature_profile_ids: Optional[Sequence[str]] = None,
name: Optional[str] = None,
policy_versions: Optional[Sequence[str]] = None,
solution: Optional[str] = None) -> PolicyGroup
func GetPolicyGroup(ctx *Context, name string, id IDInput, state *PolicyGroupState, opts ...ResourceOption) (*PolicyGroup, error)
public static PolicyGroup Get(string name, Input<string> id, PolicyGroupState? state, CustomResourceOptions? opts = null)
public static PolicyGroup get(String name, Output<String> id, PolicyGroupState state, CustomResourceOptions options)
resources: _: type: sdwan:PolicyGroup 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.
- Description string
- Description
- Devices
List<Policy
Group Device> - List of devices
- Feature
Profile List<string>Ids - List of feature profile IDs
- Name string
- The name of the policy group
- Policy
Versions List<string> - List of all associated policy versions
- Solution string
- Type of solution - Choices:
sdwan
- Description string
- Description
- Devices
[]Policy
Group Device Args - List of devices
- Feature
Profile []stringIds - List of feature profile IDs
- Name string
- The name of the policy group
- Policy
Versions []string - List of all associated policy versions
- Solution string
- Type of solution - Choices:
sdwan
- description String
- Description
- devices
List<Policy
Group Device> - List of devices
- feature
Profile List<String>Ids - List of feature profile IDs
- name String
- The name of the policy group
- policy
Versions List<String> - List of all associated policy versions
- solution String
- Type of solution - Choices:
sdwan
- description string
- Description
- devices
Policy
Group Device[] - List of devices
- feature
Profile string[]Ids - List of feature profile IDs
- name string
- The name of the policy group
- policy
Versions string[] - List of all associated policy versions
- solution string
- Type of solution - Choices:
sdwan
- description str
- Description
- devices
Sequence[Policy
Group Device Args] - List of devices
- feature_
profile_ Sequence[str]ids - List of feature profile IDs
- name str
- The name of the policy group
- policy_
versions Sequence[str] - List of all associated policy versions
- solution str
- Type of solution - Choices:
sdwan
- description String
- Description
- devices List<Property Map>
- List of devices
- feature
Profile List<String>Ids - List of feature profile IDs
- name String
- The name of the policy group
- policy
Versions List<String> - List of all associated policy versions
- solution String
- Type of solution - Choices:
sdwan
Supporting Types
PolicyGroupDevice, PolicyGroupDeviceArgs
- Deploy bool
- Deploy to device if enabled.
- Default value:
false
- Default value:
- Id string
- Device ID
- Variables
List<Policy
Group Device Variable> - List of variables
- Deploy bool
- Deploy to device if enabled.
- Default value:
false
- Default value:
- Id string
- Device ID
- Variables
[]Policy
Group Device Variable - List of variables
- deploy Boolean
- Deploy to device if enabled.
- Default value:
false
- Default value:
- id String
- Device ID
- variables
List<Policy
Group Device Variable> - List of variables
- deploy boolean
- Deploy to device if enabled.
- Default value:
false
- Default value:
- id string
- Device ID
- variables
Policy
Group Device Variable[] - List of variables
- deploy bool
- Deploy to device if enabled.
- Default value:
false
- Default value:
- id str
- Device ID
- variables
Sequence[Policy
Group Device Variable] - List of variables
- deploy Boolean
- Deploy to device if enabled.
- Default value:
false
- Default value:
- id String
- Device ID
- variables List<Property Map>
- List of variables
PolicyGroupDeviceVariable, PolicyGroupDeviceVariableArgs
- Name string
- Variable name
- List
Values List<string> - Use this instead of
value
in case value is of typeList
. - Value string
- Variable value
- Name string
- Variable name
- List
Values []string - Use this instead of
value
in case value is of typeList
. - Value string
- Variable value
- name String
- Variable name
- list
Values List<String> - Use this instead of
value
in case value is of typeList
. - value String
- Variable value
- name string
- Variable name
- list
Values string[] - Use this instead of
value
in case value is of typeList
. - value string
- Variable value
- name str
- Variable name
- list_
values Sequence[str] - Use this instead of
value
in case value is of typeList
. - value str
- Variable value
- name String
- Variable name
- list
Values List<String> - Use this instead of
value
in case value is of typeList
. - value String
- Variable value
Import
The pulumi import
command can be used, for example:
$ pulumi import sdwan:index/policyGroup:PolicyGroup example "f6b2c44c-693c-4763-b010-895aa3d236bd"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- sdwan pulumi/pulumi-sdwan
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
sdwan
Terraform Provider.