1. Packages
  2. Cisco Catalyst SD-WAN
  3. API Docs
  4. CentralizedPolicy
Cisco Catalyst SD-WAN v0.1.1 published on Friday, May 31, 2024 by Pulumi

sdwan.CentralizedPolicy

Explore with Pulumi AI

sdwan logo
Cisco Catalyst SD-WAN v0.1.1 published on Friday, May 31, 2024 by Pulumi

    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.

    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<CentralizedPolicyDefinition>
    List of policy definitions
    Name string
    The name of the centralized policy
    Description string
    The description of the centralized policy
    Definitions []CentralizedPolicyDefinitionArgs
    List of policy definitions
    Name string
    The name of the centralized policy
    description String
    The description of the centralized policy
    definitions List<CentralizedPolicyDefinition>
    List of policy definitions
    name String
    The name of the centralized policy
    description string
    The description of the centralized policy
    definitions CentralizedPolicyDefinition[]
    List of policy definitions
    name string
    The name of the centralized policy
    description str
    The description of the centralized policy
    definitions Sequence[CentralizedPolicyDefinitionArgs]
    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:

    Id string
    The provider-assigned unique ID for this managed resource.
    Version int
    The version of the object
    Id string
    The provider-assigned unique ID for this managed resource.
    Version int
    The version of the object
    id String
    The provider-assigned unique ID for this managed resource.
    version Integer
    The version of the object
    id string
    The provider-assigned unique ID for this managed resource.
    version number
    The version of the object
    id str
    The provider-assigned unique ID for this managed resource.
    version int
    The version of the object
    id String
    The provider-assigned unique ID for this managed resource.
    version Number
    The version of the object

    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.
    The following state arguments are supported:
    Definitions List<CentralizedPolicyDefinition>
    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 []CentralizedPolicyDefinitionArgs
    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<CentralizedPolicyDefinition>
    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 CentralizedPolicyDefinition[]
    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[CentralizedPolicyDefinitionArgs]
    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
    Entries List<CentralizedPolicyDefinitionEntry>
    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
    Entries []CentralizedPolicyDefinitionEntry
    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
    entries List<CentralizedPolicyDefinitionEntry>
    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
    entries CentralizedPolicyDefinitionEntry[]
    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
    entries Sequence[CentralizedPolicyDefinitionEntry]
    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
    entries List<Property Map>
    List of entries
    version Number
    Policy definition version

    CentralizedPolicyDefinitionEntry, CentralizedPolicyDefinitionEntryArgs

    Direction string
    Direction

    • Choices: service, tunnel, all, in, out
    RegionIds List<string>
    List of region IDs
    RegionListIds List<string>
    List of region list IDs
    RegionListVersions List<string>
    List of region list versions
    SiteListIds List<string>
    List of site list IDs
    SiteListVersions List<string>
    List of site list versions
    VpnListIds List<string>
    List of VPN list IDs
    VpnListVersions List<string>
    List of VPN list versions
    Direction string
    Direction

    • Choices: service, tunnel, all, in, out
    RegionIds []string
    List of region IDs
    RegionListIds []string
    List of region list IDs
    RegionListVersions []string
    List of region list versions
    SiteListIds []string
    List of site list IDs
    SiteListVersions []string
    List of site list versions
    VpnListIds []string
    List of VPN list IDs
    VpnListVersions []string
    List of VPN list versions
    direction String
    Direction

    • Choices: service, tunnel, all, in, out
    regionIds List<String>
    List of region IDs
    regionListIds List<String>
    List of region list IDs
    regionListVersions List<String>
    List of region list versions
    siteListIds List<String>
    List of site list IDs
    siteListVersions List<String>
    List of site list versions
    vpnListIds List<String>
    List of VPN list IDs
    vpnListVersions List<String>
    List of VPN list versions
    direction string
    Direction

    • Choices: service, tunnel, all, in, out
    regionIds string[]
    List of region IDs
    regionListIds string[]
    List of region list IDs
    regionListVersions string[]
    List of region list versions
    siteListIds string[]
    List of site list IDs
    siteListVersions string[]
    List of site list versions
    vpnListIds string[]
    List of VPN list IDs
    vpnListVersions string[]
    List of VPN list versions
    direction str
    Direction

    • Choices: service, tunnel, all, in, out
    region_ids Sequence[str]
    List of region IDs
    region_list_ids Sequence[str]
    List of region list IDs
    region_list_versions Sequence[str]
    List of region list versions
    site_list_ids Sequence[str]
    List of site list IDs
    site_list_versions Sequence[str]
    List of site list versions
    vpn_list_ids Sequence[str]
    List of VPN list IDs
    vpn_list_versions Sequence[str]
    List of VPN list versions
    direction String
    Direction

    • Choices: service, tunnel, all, in, out
    regionIds List<String>
    List of region IDs
    regionListIds List<String>
    List of region list IDs
    regionListVersions List<String>
    List of region list versions
    siteListIds List<String>
    List of site list IDs
    siteListVersions List<String>
    List of site list versions
    vpnListIds List<String>
    List of VPN list IDs
    vpnListVersions List<String>
    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.
    sdwan logo
    Cisco Catalyst SD-WAN v0.1.1 published on Friday, May 31, 2024 by Pulumi