1. Packages
  2. Cisco Catalyst SD-WAN Provider
  3. API Docs
  4. HubAndSpokeTopologyPolicyDefinition
Cisco Catalyst SD-WAN v0.3.0 published on Friday, Mar 28, 2025 by Pulumi

sdwan.HubAndSpokeTopologyPolicyDefinition

Explore with Pulumi AI

This resource can manage a Hub and Spoke Topology Policy Definition .

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.sdwan.HubAndSpokeTopologyPolicyDefinition;
import com.pulumi.sdwan.HubAndSpokeTopologyPolicyDefinitionArgs;
import com.pulumi.sdwan.inputs.HubAndSpokeTopologyPolicyDefinitionTopologyArgs;
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 HubAndSpokeTopologyPolicyDefinition("example", HubAndSpokeTopologyPolicyDefinitionArgs.builder()
            .name("Example")
            .description("My description")
            .vpnListId("04fcbb0b-efbf-43d2-a04b-847d3a7b104e")
            .topologies(HubAndSpokeTopologyPolicyDefinitionTopologyArgs.builder()
                .name("Topology1")
                .all_hubs_are_equal(false)
                .advertise_hub_tlocs(true)
                .tloc_list_id("b326e448-bf33-47e4-83e7-f947e6981382")
                .spokes(HubAndSpokeTopologyPolicyDefinitionTopologySpokeArgs.builder()
                    .siteListId("e858e1c4-6aa8-4de7-99df-c3adbf80290d")
                    .hubs(HubAndSpokeTopologyPolicyDefinitionTopologySpokeHubArgs.builder()
                        .siteListId("e858e1c4-6aa8-4de7-99df-c3adbf80290d")
                        .preference("30")
                        .build())
                    .build())
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: sdwan:HubAndSpokeTopologyPolicyDefinition
    properties:
      name: Example
      description: My description
      vpnListId: 04fcbb0b-efbf-43d2-a04b-847d3a7b104e
      topologies:
        - name: Topology1
          all_hubs_are_equal: false
          advertise_hub_tlocs: true
          tloc_list_id: b326e448-bf33-47e4-83e7-f947e6981382
          spokes:
            - siteListId: e858e1c4-6aa8-4de7-99df-c3adbf80290d
              hubs:
                - siteListId: e858e1c4-6aa8-4de7-99df-c3adbf80290d
                  preference: '30'
Copy

Create HubAndSpokeTopologyPolicyDefinition Resource

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

Constructor syntax

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

@overload
def HubAndSpokeTopologyPolicyDefinition(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        description: Optional[str] = None,
                                        topologies: Optional[Sequence[HubAndSpokeTopologyPolicyDefinitionTopologyArgs]] = None,
                                        name: Optional[str] = None,
                                        vpn_list_id: Optional[str] = None,
                                        vpn_list_version: Optional[int] = None)
func NewHubAndSpokeTopologyPolicyDefinition(ctx *Context, name string, args HubAndSpokeTopologyPolicyDefinitionArgs, opts ...ResourceOption) (*HubAndSpokeTopologyPolicyDefinition, error)
public HubAndSpokeTopologyPolicyDefinition(string name, HubAndSpokeTopologyPolicyDefinitionArgs args, CustomResourceOptions? opts = null)
public HubAndSpokeTopologyPolicyDefinition(String name, HubAndSpokeTopologyPolicyDefinitionArgs args)
public HubAndSpokeTopologyPolicyDefinition(String name, HubAndSpokeTopologyPolicyDefinitionArgs args, CustomResourceOptions options)
type: sdwan:HubAndSpokeTopologyPolicyDefinition
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. HubAndSpokeTopologyPolicyDefinitionArgs
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. HubAndSpokeTopologyPolicyDefinitionArgs
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. HubAndSpokeTopologyPolicyDefinitionArgs
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. HubAndSpokeTopologyPolicyDefinitionArgs
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. HubAndSpokeTopologyPolicyDefinitionArgs
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 hubAndSpokeTopologyPolicyDefinitionResource = new Sdwan.HubAndSpokeTopologyPolicyDefinition("hubAndSpokeTopologyPolicyDefinitionResource", new()
{
    Description = "string",
    Topologies = new[]
    {
        new Sdwan.Inputs.HubAndSpokeTopologyPolicyDefinitionTopologyArgs
        {
            Name = "string",
            AdvertiseHubTlocs = false,
            AllHubsAreEqual = false,
            Spokes = new[]
            {
                new Sdwan.Inputs.HubAndSpokeTopologyPolicyDefinitionTopologySpokeArgs
                {
                    Hubs = new[]
                    {
                        new Sdwan.Inputs.HubAndSpokeTopologyPolicyDefinitionTopologySpokeHubArgs
                        {
                            Ipv4PrefixListIds = new[]
                            {
                                "string",
                            },
                            Ipv6PrefixListIds = new[]
                            {
                                "string",
                            },
                            Preference = "string",
                            SiteListId = "string",
                            SiteListVersion = 0,
                        },
                    },
                    SiteListId = "string",
                    SiteListVersion = 0,
                },
            },
            TlocListId = "string",
        },
    },
    Name = "string",
    VpnListId = "string",
    VpnListVersion = 0,
});
Copy
example, err := sdwan.NewHubAndSpokeTopologyPolicyDefinition(ctx, "hubAndSpokeTopologyPolicyDefinitionResource", &sdwan.HubAndSpokeTopologyPolicyDefinitionArgs{
	Description: pulumi.String("string"),
	Topologies: sdwan.HubAndSpokeTopologyPolicyDefinitionTopologyArray{
		&sdwan.HubAndSpokeTopologyPolicyDefinitionTopologyArgs{
			Name:              pulumi.String("string"),
			AdvertiseHubTlocs: pulumi.Bool(false),
			AllHubsAreEqual:   pulumi.Bool(false),
			Spokes: sdwan.HubAndSpokeTopologyPolicyDefinitionTopologySpokeArray{
				&sdwan.HubAndSpokeTopologyPolicyDefinitionTopologySpokeArgs{
					Hubs: sdwan.HubAndSpokeTopologyPolicyDefinitionTopologySpokeHubArray{
						&sdwan.HubAndSpokeTopologyPolicyDefinitionTopologySpokeHubArgs{
							Ipv4PrefixListIds: pulumi.StringArray{
								pulumi.String("string"),
							},
							Ipv6PrefixListIds: pulumi.StringArray{
								pulumi.String("string"),
							},
							Preference:      pulumi.String("string"),
							SiteListId:      pulumi.String("string"),
							SiteListVersion: pulumi.Int(0),
						},
					},
					SiteListId:      pulumi.String("string"),
					SiteListVersion: pulumi.Int(0),
				},
			},
			TlocListId: pulumi.String("string"),
		},
	},
	Name:           pulumi.String("string"),
	VpnListId:      pulumi.String("string"),
	VpnListVersion: pulumi.Int(0),
})
Copy
var hubAndSpokeTopologyPolicyDefinitionResource = new HubAndSpokeTopologyPolicyDefinition("hubAndSpokeTopologyPolicyDefinitionResource", HubAndSpokeTopologyPolicyDefinitionArgs.builder()
    .description("string")
    .topologies(HubAndSpokeTopologyPolicyDefinitionTopologyArgs.builder()
        .name("string")
        .advertiseHubTlocs(false)
        .allHubsAreEqual(false)
        .spokes(HubAndSpokeTopologyPolicyDefinitionTopologySpokeArgs.builder()
            .hubs(HubAndSpokeTopologyPolicyDefinitionTopologySpokeHubArgs.builder()
                .ipv4PrefixListIds("string")
                .ipv6PrefixListIds("string")
                .preference("string")
                .siteListId("string")
                .siteListVersion(0)
                .build())
            .siteListId("string")
            .siteListVersion(0)
            .build())
        .tlocListId("string")
        .build())
    .name("string")
    .vpnListId("string")
    .vpnListVersion(0)
    .build());
Copy
hub_and_spoke_topology_policy_definition_resource = sdwan.HubAndSpokeTopologyPolicyDefinition("hubAndSpokeTopologyPolicyDefinitionResource",
    description="string",
    topologies=[{
        "name": "string",
        "advertise_hub_tlocs": False,
        "all_hubs_are_equal": False,
        "spokes": [{
            "hubs": [{
                "ipv4_prefix_list_ids": ["string"],
                "ipv6_prefix_list_ids": ["string"],
                "preference": "string",
                "site_list_id": "string",
                "site_list_version": 0,
            }],
            "site_list_id": "string",
            "site_list_version": 0,
        }],
        "tloc_list_id": "string",
    }],
    name="string",
    vpn_list_id="string",
    vpn_list_version=0)
Copy
const hubAndSpokeTopologyPolicyDefinitionResource = new sdwan.HubAndSpokeTopologyPolicyDefinition("hubAndSpokeTopologyPolicyDefinitionResource", {
    description: "string",
    topologies: [{
        name: "string",
        advertiseHubTlocs: false,
        allHubsAreEqual: false,
        spokes: [{
            hubs: [{
                ipv4PrefixListIds: ["string"],
                ipv6PrefixListIds: ["string"],
                preference: "string",
                siteListId: "string",
                siteListVersion: 0,
            }],
            siteListId: "string",
            siteListVersion: 0,
        }],
        tlocListId: "string",
    }],
    name: "string",
    vpnListId: "string",
    vpnListVersion: 0,
});
Copy
type: sdwan:HubAndSpokeTopologyPolicyDefinition
properties:
    description: string
    name: string
    topologies:
        - advertiseHubTlocs: false
          allHubsAreEqual: false
          name: string
          spokes:
            - hubs:
                - ipv4PrefixListIds:
                    - string
                  ipv6PrefixListIds:
                    - string
                  preference: string
                  siteListId: string
                  siteListVersion: 0
              siteListId: string
              siteListVersion: 0
          tlocListId: string
    vpnListId: string
    vpnListVersion: 0
Copy

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

Description This property is required. string
The description of the policy definition
Topologies This property is required. List<HubAndSpokeTopologyPolicyDefinitionTopology>
List of topologies
Name string
The name of the policy definition
VpnListId string
VPN list ID
VpnListVersion int
VPN list version
Description This property is required. string
The description of the policy definition
Topologies This property is required. []HubAndSpokeTopologyPolicyDefinitionTopologyArgs
List of topologies
Name string
The name of the policy definition
VpnListId string
VPN list ID
VpnListVersion int
VPN list version
description This property is required. String
The description of the policy definition
topologies This property is required. List<HubAndSpokeTopologyPolicyDefinitionTopology>
List of topologies
name String
The name of the policy definition
vpnListId String
VPN list ID
vpnListVersion Integer
VPN list version
description This property is required. string
The description of the policy definition
topologies This property is required. HubAndSpokeTopologyPolicyDefinitionTopology[]
List of topologies
name string
The name of the policy definition
vpnListId string
VPN list ID
vpnListVersion number
VPN list version
description This property is required. str
The description of the policy definition
topologies This property is required. Sequence[HubAndSpokeTopologyPolicyDefinitionTopologyArgs]
List of topologies
name str
The name of the policy definition
vpn_list_id str
VPN list ID
vpn_list_version int
VPN list version
description This property is required. String
The description of the policy definition
topologies This property is required. List<Property Map>
List of topologies
name String
The name of the policy definition
vpnListId String
VPN list ID
vpnListVersion Number
VPN list version

Outputs

All input properties are implicitly available as output properties. Additionally, the HubAndSpokeTopologyPolicyDefinition resource produces the following output properties:

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

Look up Existing HubAndSpokeTopologyPolicyDefinition Resource

Get an existing HubAndSpokeTopologyPolicyDefinition 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?: HubAndSpokeTopologyPolicyDefinitionState, opts?: CustomResourceOptions): HubAndSpokeTopologyPolicyDefinition
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        topologies: Optional[Sequence[HubAndSpokeTopologyPolicyDefinitionTopologyArgs]] = None,
        type: Optional[str] = None,
        version: Optional[int] = None,
        vpn_list_id: Optional[str] = None,
        vpn_list_version: Optional[int] = None) -> HubAndSpokeTopologyPolicyDefinition
func GetHubAndSpokeTopologyPolicyDefinition(ctx *Context, name string, id IDInput, state *HubAndSpokeTopologyPolicyDefinitionState, opts ...ResourceOption) (*HubAndSpokeTopologyPolicyDefinition, error)
public static HubAndSpokeTopologyPolicyDefinition Get(string name, Input<string> id, HubAndSpokeTopologyPolicyDefinitionState? state, CustomResourceOptions? opts = null)
public static HubAndSpokeTopologyPolicyDefinition get(String name, Output<String> id, HubAndSpokeTopologyPolicyDefinitionState state, CustomResourceOptions options)
resources:  _:    type: sdwan:HubAndSpokeTopologyPolicyDefinition    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:
Description string
The description of the policy definition
Name string
The name of the policy definition
Topologies List<HubAndSpokeTopologyPolicyDefinitionTopology>
List of topologies
Type string
Type
Version int
The version of the object
VpnListId string
VPN list ID
VpnListVersion int
VPN list version
Description string
The description of the policy definition
Name string
The name of the policy definition
Topologies []HubAndSpokeTopologyPolicyDefinitionTopologyArgs
List of topologies
Type string
Type
Version int
The version of the object
VpnListId string
VPN list ID
VpnListVersion int
VPN list version
description String
The description of the policy definition
name String
The name of the policy definition
topologies List<HubAndSpokeTopologyPolicyDefinitionTopology>
List of topologies
type String
Type
version Integer
The version of the object
vpnListId String
VPN list ID
vpnListVersion Integer
VPN list version
description string
The description of the policy definition
name string
The name of the policy definition
topologies HubAndSpokeTopologyPolicyDefinitionTopology[]
List of topologies
type string
Type
version number
The version of the object
vpnListId string
VPN list ID
vpnListVersion number
VPN list version
description str
The description of the policy definition
name str
The name of the policy definition
topologies Sequence[HubAndSpokeTopologyPolicyDefinitionTopologyArgs]
List of topologies
type str
Type
version int
The version of the object
vpn_list_id str
VPN list ID
vpn_list_version int
VPN list version
description String
The description of the policy definition
name String
The name of the policy definition
topologies List<Property Map>
List of topologies
type String
Type
version Number
The version of the object
vpnListId String
VPN list ID
vpnListVersion Number
VPN list version

Supporting Types

HubAndSpokeTopologyPolicyDefinitionTopology
, HubAndSpokeTopologyPolicyDefinitionTopologyArgs

Name This property is required. string
Topology name
AdvertiseHubTlocs bool
Advertise Hub TLOCs
AllHubsAreEqual bool
All hubs are equal (All Spokes Sites connect to all Hubs)
Spokes List<HubAndSpokeTopologyPolicyDefinitionTopologySpoke>
List of spokes
TlocListId string
TLOC list ID (required when advertise_hub_tlocs is 'true')
Name This property is required. string
Topology name
AdvertiseHubTlocs bool
Advertise Hub TLOCs
AllHubsAreEqual bool
All hubs are equal (All Spokes Sites connect to all Hubs)
Spokes []HubAndSpokeTopologyPolicyDefinitionTopologySpoke
List of spokes
TlocListId string
TLOC list ID (required when advertise_hub_tlocs is 'true')
name This property is required. String
Topology name
advertiseHubTlocs Boolean
Advertise Hub TLOCs
allHubsAreEqual Boolean
All hubs are equal (All Spokes Sites connect to all Hubs)
spokes List<HubAndSpokeTopologyPolicyDefinitionTopologySpoke>
List of spokes
tlocListId String
TLOC list ID (required when advertise_hub_tlocs is 'true')
name This property is required. string
Topology name
advertiseHubTlocs boolean
Advertise Hub TLOCs
allHubsAreEqual boolean
All hubs are equal (All Spokes Sites connect to all Hubs)
spokes HubAndSpokeTopologyPolicyDefinitionTopologySpoke[]
List of spokes
tlocListId string
TLOC list ID (required when advertise_hub_tlocs is 'true')
name This property is required. str
Topology name
bool
Advertise Hub TLOCs
all_hubs_are_equal bool
All hubs are equal (All Spokes Sites connect to all Hubs)
spokes Sequence[HubAndSpokeTopologyPolicyDefinitionTopologySpoke]
List of spokes
tloc_list_id str
TLOC list ID (required when advertise_hub_tlocs is 'true')
name This property is required. String
Topology name
advertiseHubTlocs Boolean
Advertise Hub TLOCs
allHubsAreEqual Boolean
All hubs are equal (All Spokes Sites connect to all Hubs)
spokes List<Property Map>
List of spokes
tlocListId String
TLOC list ID (required when advertise_hub_tlocs is 'true')

HubAndSpokeTopologyPolicyDefinitionTopologySpoke
, HubAndSpokeTopologyPolicyDefinitionTopologySpokeArgs

hubs HubAndSpokeTopologyPolicyDefinitionTopologySpokeHub[]
List of hubs
siteListId string
Site list ID
siteListVersion number
Site list version
hubs List<Property Map>
List of hubs
siteListId String
Site list ID
siteListVersion Number
Site list version

HubAndSpokeTopologyPolicyDefinitionTopologySpokeHub
, HubAndSpokeTopologyPolicyDefinitionTopologySpokeHubArgs

Ipv4PrefixListIds List<string>
List of IPv4 prefix list IDs
Ipv6PrefixListIds List<string>
List of IPv6 prefix list IDs
Preference string
Preference, multiple of 10 (for example 70, 80, 90, 100). The higher the value the higher the priority of the associated hub (required when all_hubs_are_equal is 'false')
SiteListId string
Site list ID
SiteListVersion int
Site list version
Ipv4PrefixListIds []string
List of IPv4 prefix list IDs
Ipv6PrefixListIds []string
List of IPv6 prefix list IDs
Preference string
Preference, multiple of 10 (for example 70, 80, 90, 100). The higher the value the higher the priority of the associated hub (required when all_hubs_are_equal is 'false')
SiteListId string
Site list ID
SiteListVersion int
Site list version
ipv4PrefixListIds List<String>
List of IPv4 prefix list IDs
ipv6PrefixListIds List<String>
List of IPv6 prefix list IDs
preference String
Preference, multiple of 10 (for example 70, 80, 90, 100). The higher the value the higher the priority of the associated hub (required when all_hubs_are_equal is 'false')
siteListId String
Site list ID
siteListVersion Integer
Site list version
ipv4PrefixListIds string[]
List of IPv4 prefix list IDs
ipv6PrefixListIds string[]
List of IPv6 prefix list IDs
preference string
Preference, multiple of 10 (for example 70, 80, 90, 100). The higher the value the higher the priority of the associated hub (required when all_hubs_are_equal is 'false')
siteListId string
Site list ID
siteListVersion number
Site list version
ipv4_prefix_list_ids Sequence[str]
List of IPv4 prefix list IDs
ipv6_prefix_list_ids Sequence[str]
List of IPv6 prefix list IDs
preference str
Preference, multiple of 10 (for example 70, 80, 90, 100). The higher the value the higher the priority of the associated hub (required when all_hubs_are_equal is 'false')
site_list_id str
Site list ID
site_list_version int
Site list version
ipv4PrefixListIds List<String>
List of IPv4 prefix list IDs
ipv6PrefixListIds List<String>
List of IPv6 prefix list IDs
preference String
Preference, multiple of 10 (for example 70, 80, 90, 100). The higher the value the higher the priority of the associated hub (required when all_hubs_are_equal is 'false')
siteListId String
Site list ID
siteListVersion Number
Site list version

Import

$ pulumi import sdwan:index/hubAndSpokeTopologyPolicyDefinition:HubAndSpokeTopologyPolicyDefinition example "f6b2c44c-693c-4763-b010-895aa3d236bd"
Copy

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.