sdwan.CentralizedPolicy
Explore with Pulumi AI
This resource can manage a Centralized Policy .
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sdwan from "@pulumi/sdwan";
const example = new sdwan.CentralizedPolicy("example", {
name: "Example",
description: "My description",
definitions: [{
id: "2081c2f4-3f9f-4fee-8078-dcc8904e368d",
type: "data",
entries: [{
siteListIds: ["2081c2f4-3f9f-4fee-8078-dcc8904e368d"],
vpnListIds: ["7d0c2444-8743-4414-add0-866945ea9f70"],
direction: "service",
}],
}],
});
import pulumi
import pulumi_sdwan as sdwan
example = sdwan.CentralizedPolicy("example",
name="Example",
description="My description",
definitions=[sdwan.CentralizedPolicyDefinitionArgs(
id="2081c2f4-3f9f-4fee-8078-dcc8904e368d",
type="data",
entries=[sdwan.CentralizedPolicyDefinitionEntryArgs(
site_list_ids=["2081c2f4-3f9f-4fee-8078-dcc8904e368d"],
vpn_list_ids=["7d0c2444-8743-4414-add0-866945ea9f70"],
direction="service",
)],
)])
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.NewCentralizedPolicy(ctx, "example", &sdwan.CentralizedPolicyArgs{
Name: pulumi.String("Example"),
Description: pulumi.String("My description"),
Definitions: sdwan.CentralizedPolicyDefinitionArray{
&sdwan.CentralizedPolicyDefinitionArgs{
Id: pulumi.String("2081c2f4-3f9f-4fee-8078-dcc8904e368d"),
Type: pulumi.String("data"),
Entries: sdwan.CentralizedPolicyDefinitionEntryArray{
&sdwan.CentralizedPolicyDefinitionEntryArgs{
SiteListIds: pulumi.StringArray{
pulumi.String("2081c2f4-3f9f-4fee-8078-dcc8904e368d"),
},
VpnListIds: pulumi.StringArray{
pulumi.String("7d0c2444-8743-4414-add0-866945ea9f70"),
},
Direction: pulumi.String("service"),
},
},
},
},
})
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.CentralizedPolicy("example", new()
{
Name = "Example",
Description = "My description",
Definitions = new[]
{
new Sdwan.Inputs.CentralizedPolicyDefinitionArgs
{
Id = "2081c2f4-3f9f-4fee-8078-dcc8904e368d",
Type = "data",
Entries = new[]
{
new Sdwan.Inputs.CentralizedPolicyDefinitionEntryArgs
{
SiteListIds = new[]
{
"2081c2f4-3f9f-4fee-8078-dcc8904e368d",
},
VpnListIds = new[]
{
"7d0c2444-8743-4414-add0-866945ea9f70",
},
Direction = "service",
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sdwan.CentralizedPolicy;
import com.pulumi.sdwan.CentralizedPolicyArgs;
import com.pulumi.sdwan.inputs.CentralizedPolicyDefinitionArgs;
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 CentralizedPolicy("example", CentralizedPolicyArgs.builder()
.name("Example")
.description("My description")
.definitions(CentralizedPolicyDefinitionArgs.builder()
.id("2081c2f4-3f9f-4fee-8078-dcc8904e368d")
.type("data")
.entries(CentralizedPolicyDefinitionEntryArgs.builder()
.siteListIds("2081c2f4-3f9f-4fee-8078-dcc8904e368d")
.vpnListIds("7d0c2444-8743-4414-add0-866945ea9f70")
.direction("service")
.build())
.build())
.build());
}
}
resources:
example:
type: sdwan:CentralizedPolicy
properties:
name: Example
description: My description
definitions:
- id: 2081c2f4-3f9f-4fee-8078-dcc8904e368d
type: data
entries:
- siteListIds:
- 2081c2f4-3f9f-4fee-8078-dcc8904e368d
vpnListIds:
- 7d0c2444-8743-4414-add0-866945ea9f70
direction: service
Create CentralizedPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CentralizedPolicy(name: string, args: CentralizedPolicyArgs, opts?: CustomResourceOptions);
@overload
def CentralizedPolicy(resource_name: str,
args: CentralizedPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CentralizedPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
definitions: Optional[Sequence[CentralizedPolicyDefinitionArgs]] = None,
name: Optional[str] = None)
func NewCentralizedPolicy(ctx *Context, name string, args CentralizedPolicyArgs, opts ...ResourceOption) (*CentralizedPolicy, error)
public CentralizedPolicy(string name, CentralizedPolicyArgs args, CustomResourceOptions? opts = null)
public CentralizedPolicy(String name, CentralizedPolicyArgs args)
public CentralizedPolicy(String name, CentralizedPolicyArgs args, CustomResourceOptions options)
type: sdwan:CentralizedPolicy
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 CentralizedPolicyArgs
- 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 CentralizedPolicyArgs
- 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 CentralizedPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CentralizedPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CentralizedPolicyArgs
- 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 centralizedPolicyResource = new Sdwan.CentralizedPolicy("centralizedPolicyResource", new()
{
Description = "string",
Definitions = new[]
{
new Sdwan.Inputs.CentralizedPolicyDefinitionArgs
{
Id = "string",
Type = "string",
Entries = new[]
{
new Sdwan.Inputs.CentralizedPolicyDefinitionEntryArgs
{
Direction = "string",
RegionIds = new[]
{
"string",
},
RegionListIds = new[]
{
"string",
},
RegionListVersions = new[]
{
"string",
},
SiteListIds = new[]
{
"string",
},
SiteListVersions = new[]
{
"string",
},
VpnListIds = new[]
{
"string",
},
VpnListVersions = new[]
{
"string",
},
},
},
Version = 0,
},
},
Name = "string",
});
example, err := sdwan.NewCentralizedPolicy(ctx, "centralizedPolicyResource", &sdwan.CentralizedPolicyArgs{
Description: pulumi.String("string"),
Definitions: sdwan.CentralizedPolicyDefinitionArray{
&sdwan.CentralizedPolicyDefinitionArgs{
Id: pulumi.String("string"),
Type: pulumi.String("string"),
Entries: sdwan.CentralizedPolicyDefinitionEntryArray{
&sdwan.CentralizedPolicyDefinitionEntryArgs{
Direction: pulumi.String("string"),
RegionIds: pulumi.StringArray{
pulumi.String("string"),
},
RegionListIds: pulumi.StringArray{
pulumi.String("string"),
},
RegionListVersions: pulumi.StringArray{
pulumi.String("string"),
},
SiteListIds: pulumi.StringArray{
pulumi.String("string"),
},
SiteListVersions: pulumi.StringArray{
pulumi.String("string"),
},
VpnListIds: pulumi.StringArray{
pulumi.String("string"),
},
VpnListVersions: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Version: pulumi.Int(0),
},
},
Name: pulumi.String("string"),
})
var centralizedPolicyResource = new CentralizedPolicy("centralizedPolicyResource", CentralizedPolicyArgs.builder()
.description("string")
.definitions(CentralizedPolicyDefinitionArgs.builder()
.id("string")
.type("string")
.entries(CentralizedPolicyDefinitionEntryArgs.builder()
.direction("string")
.regionIds("string")
.regionListIds("string")
.regionListVersions("string")
.siteListIds("string")
.siteListVersions("string")
.vpnListIds("string")
.vpnListVersions("string")
.build())
.version(0)
.build())
.name("string")
.build());
centralized_policy_resource = sdwan.CentralizedPolicy("centralizedPolicyResource",
description="string",
definitions=[sdwan.CentralizedPolicyDefinitionArgs(
id="string",
type="string",
entries=[sdwan.CentralizedPolicyDefinitionEntryArgs(
direction="string",
region_ids=["string"],
region_list_ids=["string"],
region_list_versions=["string"],
site_list_ids=["string"],
site_list_versions=["string"],
vpn_list_ids=["string"],
vpn_list_versions=["string"],
)],
version=0,
)],
name="string")
const centralizedPolicyResource = new sdwan.CentralizedPolicy("centralizedPolicyResource", {
description: "string",
definitions: [{
id: "string",
type: "string",
entries: [{
direction: "string",
regionIds: ["string"],
regionListIds: ["string"],
regionListVersions: ["string"],
siteListIds: ["string"],
siteListVersions: ["string"],
vpnListIds: ["string"],
vpnListVersions: ["string"],
}],
version: 0,
}],
name: "string",
});
type: sdwan:CentralizedPolicy
properties:
definitions:
- entries:
- direction: string
regionIds:
- string
regionListIds:
- string
regionListVersions:
- string
siteListIds:
- string
siteListVersions:
- string
vpnListIds:
- string
vpnListVersions:
- string
id: string
type: string
version: 0
description: string
name: string
CentralizedPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The CentralizedPolicy resource accepts the following input properties:
- Description string
- The description of the centralized policy
- Definitions
List<Centralized
Policy Definition> - List of policy definitions
- Name string
- The name of the centralized policy
- Description string
- The description of the centralized policy
- Definitions
[]Centralized
Policy Definition Args - List of policy definitions
- Name string
- The name of the centralized policy
- description String
- The description of the centralized policy
- definitions
List<Centralized
Policy Definition> - List of policy definitions
- name String
- The name of the centralized policy
- description string
- The description of the centralized policy
- definitions
Centralized
Policy Definition[] - List of policy definitions
- name string
- The name of the centralized policy
- description str
- The description of the centralized policy
- definitions
Sequence[Centralized
Policy Definition Args] - List of policy definitions
- name str
- The name of the centralized policy
- description String
- The description of the centralized policy
- definitions List<Property Map>
- List of policy definitions
- name String
- The name of the centralized policy
Outputs
All input properties are implicitly available as output properties. Additionally, the CentralizedPolicy resource produces the following output properties:
Look up Existing CentralizedPolicy Resource
Get an existing CentralizedPolicy 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?: CentralizedPolicyState, opts?: CustomResourceOptions): CentralizedPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
definitions: Optional[Sequence[CentralizedPolicyDefinitionArgs]] = None,
description: Optional[str] = None,
name: Optional[str] = None,
version: Optional[int] = None) -> CentralizedPolicy
func GetCentralizedPolicy(ctx *Context, name string, id IDInput, state *CentralizedPolicyState, opts ...ResourceOption) (*CentralizedPolicy, error)
public static CentralizedPolicy Get(string name, Input<string> id, CentralizedPolicyState? state, CustomResourceOptions? opts = null)
public static CentralizedPolicy get(String name, Output<String> id, CentralizedPolicyState 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.
- Definitions
List<Centralized
Policy Definition> - List of policy definitions
- Description string
- The description of the centralized policy
- Name string
- The name of the centralized policy
- Version int
- The version of the object
- Definitions
[]Centralized
Policy Definition Args - List of policy definitions
- Description string
- The description of the centralized policy
- Name string
- The name of the centralized policy
- Version int
- The version of the object
- definitions
List<Centralized
Policy Definition> - List of policy definitions
- description String
- The description of the centralized policy
- name String
- The name of the centralized policy
- version Integer
- The version of the object
- definitions
Centralized
Policy Definition[] - List of policy definitions
- description string
- The description of the centralized policy
- name string
- The name of the centralized policy
- version number
- The version of the object
- definitions
Sequence[Centralized
Policy Definition Args] - List of policy definitions
- description str
- The description of the centralized policy
- name str
- The name of the centralized policy
- version int
- The version of the object
- definitions List<Property Map>
- List of policy definitions
- description String
- The description of the centralized policy
- name String
- The name of the centralized policy
- version Number
- The version of the object
Supporting Types
CentralizedPolicyDefinition, CentralizedPolicyDefinitionArgs
- Id string
- Policy definition ID
- Type string
- Policy definition type
- Choices:
hubAndSpoke
,mesh
,control
,vpnMembershipGroup
,appRoute
,cflowd
,data
- Choices:
- Entries
List<Centralized
Policy Definition Entry> - List of entries
- Version int
- Policy definition version
- Id string
- Policy definition ID
- Type string
- Policy definition type
- Choices:
hubAndSpoke
,mesh
,control
,vpnMembershipGroup
,appRoute
,cflowd
,data
- Choices:
- Entries
[]Centralized
Policy Definition Entry - List of entries
- Version int
- Policy definition version
- id String
- Policy definition ID
- type String
- Policy definition type
- Choices:
hubAndSpoke
,mesh
,control
,vpnMembershipGroup
,appRoute
,cflowd
,data
- Choices:
- entries
List<Centralized
Policy Definition Entry> - List of entries
- version Integer
- Policy definition version
- id string
- Policy definition ID
- type string
- Policy definition type
- Choices:
hubAndSpoke
,mesh
,control
,vpnMembershipGroup
,appRoute
,cflowd
,data
- Choices:
- entries
Centralized
Policy Definition Entry[] - List of entries
- version number
- Policy definition version
- id str
- Policy definition ID
- type str
- Policy definition type
- Choices:
hubAndSpoke
,mesh
,control
,vpnMembershipGroup
,appRoute
,cflowd
,data
- Choices:
- entries
Sequence[Centralized
Policy Definition Entry] - List of entries
- version int
- Policy definition version
- id String
- Policy definition ID
- type String
- Policy definition type
- Choices:
hubAndSpoke
,mesh
,control
,vpnMembershipGroup
,appRoute
,cflowd
,data
- Choices:
- entries List<Property Map>
- List of entries
- version Number
- Policy definition version
CentralizedPolicyDefinitionEntry, CentralizedPolicyDefinitionEntryArgs
- Direction string
- Direction
- Choices:
service
,tunnel
,all
,in
,out
- Choices:
- Region
Ids List<string> - List of region IDs
- Region
List List<string>Ids - List of region list IDs
- Region
List List<string>Versions - List of region list versions
- Site
List List<string>Ids - List of site list IDs
- Site
List List<string>Versions - List of site list versions
- Vpn
List List<string>Ids - List of VPN list IDs
- Vpn
List List<string>Versions - List of VPN list versions
- Direction string
- Direction
- Choices:
service
,tunnel
,all
,in
,out
- Choices:
- Region
Ids []string - List of region IDs
- Region
List []stringIds - List of region list IDs
- Region
List []stringVersions - List of region list versions
- Site
List []stringIds - List of site list IDs
- Site
List []stringVersions - List of site list versions
- Vpn
List []stringIds - List of VPN list IDs
- Vpn
List []stringVersions - List of VPN list versions
- direction String
- Direction
- Choices:
service
,tunnel
,all
,in
,out
- Choices:
- region
Ids List<String> - List of region IDs
- region
List List<String>Ids - List of region list IDs
- region
List List<String>Versions - List of region list versions
- site
List List<String>Ids - List of site list IDs
- site
List List<String>Versions - List of site list versions
- vpn
List List<String>Ids - List of VPN list IDs
- vpn
List List<String>Versions - List of VPN list versions
- direction string
- Direction
- Choices:
service
,tunnel
,all
,in
,out
- Choices:
- region
Ids string[] - List of region IDs
- region
List string[]Ids - List of region list IDs
- region
List string[]Versions - List of region list versions
- site
List string[]Ids - List of site list IDs
- site
List string[]Versions - List of site list versions
- vpn
List string[]Ids - List of VPN list IDs
- vpn
List string[]Versions - List of VPN list versions
- direction str
- Direction
- Choices:
service
,tunnel
,all
,in
,out
- Choices:
- region_
ids Sequence[str] - List of region IDs
- region_
list_ Sequence[str]ids - List of region list IDs
- region_
list_ Sequence[str]versions - List of region list versions
- site_
list_ Sequence[str]ids - List of site list IDs
- site_
list_ Sequence[str]versions - List of site list versions
- vpn_
list_ Sequence[str]ids - List of VPN list IDs
- vpn_
list_ Sequence[str]versions - List of VPN list versions
- direction String
- Direction
- Choices:
service
,tunnel
,all
,in
,out
- Choices:
- region
Ids List<String> - List of region IDs
- region
List List<String>Ids - List of region list IDs
- region
List List<String>Versions - List of region list versions
- site
List List<String>Ids - List of site list IDs
- site
List List<String>Versions - List of site list versions
- vpn
List List<String>Ids - List of VPN list IDs
- vpn
List List<String>Versions - List of VPN list versions
Import
$ pulumi import sdwan:index/centralizedPolicy:CentralizedPolicy 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.