iosxe.MdtSubscription
Explore with Pulumi AI
This resource can manage the MDT Subscription configuration.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Iosxe = Lbrlabs.PulumiPackage.Iosxe;
return await Deployment.RunAsync(() =>
{
var example = new Iosxe.MdtSubscription("example", new()
{
Encoding = "encode-kvgpb",
FilterXpath = "/ios-events-ios-xe-oper:ospf-neighbor-state-change",
Receivers = new[]
{
new Iosxe.Inputs.MdtSubscriptionReceiverArgs
{
Address = "5.6.7.8",
Port = 57600,
Protocol = "grpc-tcp",
},
},
SourceAddress = "1.2.3.4",
SourceVrf = "Mgmt-vrf",
Stream = "yang-notif-native",
SubscriptionId = 101,
UpdatePolicyOnChange = true,
});
});
package main
import (
"github.com/lbrlabs/pulumi-iosxe/sdk/go/iosxe"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := iosxe.NewMdtSubscription(ctx, "example", &iosxe.MdtSubscriptionArgs{
Encoding: pulumi.String("encode-kvgpb"),
FilterXpath: pulumi.String("/ios-events-ios-xe-oper:ospf-neighbor-state-change"),
Receivers: iosxe.MdtSubscriptionReceiverArray{
&iosxe.MdtSubscriptionReceiverArgs{
Address: pulumi.String("5.6.7.8"),
Port: pulumi.Int(57600),
Protocol: pulumi.String("grpc-tcp"),
},
},
SourceAddress: pulumi.String("1.2.3.4"),
SourceVrf: pulumi.String("Mgmt-vrf"),
Stream: pulumi.String("yang-notif-native"),
SubscriptionId: pulumi.Int(101),
UpdatePolicyOnChange: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.iosxe.MdtSubscription;
import com.pulumi.iosxe.MdtSubscriptionArgs;
import com.pulumi.iosxe.inputs.MdtSubscriptionReceiverArgs;
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 MdtSubscription("example", MdtSubscriptionArgs.builder()
.encoding("encode-kvgpb")
.filterXpath("/ios-events-ios-xe-oper:ospf-neighbor-state-change")
.receivers(MdtSubscriptionReceiverArgs.builder()
.address("5.6.7.8")
.port(57600)
.protocol("grpc-tcp")
.build())
.sourceAddress("1.2.3.4")
.sourceVrf("Mgmt-vrf")
.stream("yang-notif-native")
.subscriptionId(101)
.updatePolicyOnChange(true)
.build());
}
}
import pulumi
import lbrlabs_pulumi_iosxe as iosxe
example = iosxe.MdtSubscription("example",
encoding="encode-kvgpb",
filter_xpath="/ios-events-ios-xe-oper:ospf-neighbor-state-change",
receivers=[iosxe.MdtSubscriptionReceiverArgs(
address="5.6.7.8",
port=57600,
protocol="grpc-tcp",
)],
source_address="1.2.3.4",
source_vrf="Mgmt-vrf",
stream="yang-notif-native",
subscription_id=101,
update_policy_on_change=True)
import * as pulumi from "@pulumi/pulumi";
import * as iosxe from "@lbrlabs/pulumi-iosxe";
const example = new iosxe.MdtSubscription("example", {
encoding: "encode-kvgpb",
filterXpath: "/ios-events-ios-xe-oper:ospf-neighbor-state-change",
receivers: [{
address: "5.6.7.8",
port: 57600,
protocol: "grpc-tcp",
}],
sourceAddress: "1.2.3.4",
sourceVrf: "Mgmt-vrf",
stream: "yang-notif-native",
subscriptionId: 101,
updatePolicyOnChange: true,
});
resources:
example:
type: iosxe:MdtSubscription
properties:
encoding: encode-kvgpb
filterXpath: /ios-events-ios-xe-oper:ospf-neighbor-state-change
receivers:
- address: 5.6.7.8
port: 57600
protocol: grpc-tcp
sourceAddress: 1.2.3.4
sourceVrf: Mgmt-vrf
stream: yang-notif-native
subscriptionId: 101
updatePolicyOnChange: true
Create MdtSubscription Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MdtSubscription(name: string, args: MdtSubscriptionArgs, opts?: CustomResourceOptions);
@overload
def MdtSubscription(resource_name: str,
args: MdtSubscriptionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MdtSubscription(resource_name: str,
opts: Optional[ResourceOptions] = None,
subscription_id: Optional[int] = None,
device: Optional[str] = None,
encoding: Optional[str] = None,
filter_xpath: Optional[str] = None,
receivers: Optional[Sequence[MdtSubscriptionReceiverArgs]] = None,
source_address: Optional[str] = None,
source_vrf: Optional[str] = None,
stream: Optional[str] = None,
update_policy_on_change: Optional[bool] = None,
update_policy_periodic: Optional[int] = None)
func NewMdtSubscription(ctx *Context, name string, args MdtSubscriptionArgs, opts ...ResourceOption) (*MdtSubscription, error)
public MdtSubscription(string name, MdtSubscriptionArgs args, CustomResourceOptions? opts = null)
public MdtSubscription(String name, MdtSubscriptionArgs args)
public MdtSubscription(String name, MdtSubscriptionArgs args, CustomResourceOptions options)
type: iosxe:MdtSubscription
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 MdtSubscriptionArgs
- 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 MdtSubscriptionArgs
- 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 MdtSubscriptionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MdtSubscriptionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MdtSubscriptionArgs
- 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 mdtSubscriptionResource = new Iosxe.MdtSubscription("mdtSubscriptionResource", new()
{
SubscriptionId = 0,
Device = "string",
Encoding = "string",
FilterXpath = "string",
Receivers = new[]
{
new Iosxe.Inputs.MdtSubscriptionReceiverArgs
{
Address = "string",
Port = 0,
Protocol = "string",
},
},
SourceAddress = "string",
SourceVrf = "string",
Stream = "string",
UpdatePolicyOnChange = false,
UpdatePolicyPeriodic = 0,
});
example, err := iosxe.NewMdtSubscription(ctx, "mdtSubscriptionResource", &iosxe.MdtSubscriptionArgs{
SubscriptionId: pulumi.Int(0),
Device: pulumi.String("string"),
Encoding: pulumi.String("string"),
FilterXpath: pulumi.String("string"),
Receivers: iosxe.MdtSubscriptionReceiverArray{
&iosxe.MdtSubscriptionReceiverArgs{
Address: pulumi.String("string"),
Port: pulumi.Int(0),
Protocol: pulumi.String("string"),
},
},
SourceAddress: pulumi.String("string"),
SourceVrf: pulumi.String("string"),
Stream: pulumi.String("string"),
UpdatePolicyOnChange: pulumi.Bool(false),
UpdatePolicyPeriodic: pulumi.Int(0),
})
var mdtSubscriptionResource = new MdtSubscription("mdtSubscriptionResource", MdtSubscriptionArgs.builder()
.subscriptionId(0)
.device("string")
.encoding("string")
.filterXpath("string")
.receivers(MdtSubscriptionReceiverArgs.builder()
.address("string")
.port(0)
.protocol("string")
.build())
.sourceAddress("string")
.sourceVrf("string")
.stream("string")
.updatePolicyOnChange(false)
.updatePolicyPeriodic(0)
.build());
mdt_subscription_resource = iosxe.MdtSubscription("mdtSubscriptionResource",
subscription_id=0,
device="string",
encoding="string",
filter_xpath="string",
receivers=[{
"address": "string",
"port": 0,
"protocol": "string",
}],
source_address="string",
source_vrf="string",
stream="string",
update_policy_on_change=False,
update_policy_periodic=0)
const mdtSubscriptionResource = new iosxe.MdtSubscription("mdtSubscriptionResource", {
subscriptionId: 0,
device: "string",
encoding: "string",
filterXpath: "string",
receivers: [{
address: "string",
port: 0,
protocol: "string",
}],
sourceAddress: "string",
sourceVrf: "string",
stream: "string",
updatePolicyOnChange: false,
updatePolicyPeriodic: 0,
});
type: iosxe:MdtSubscription
properties:
device: string
encoding: string
filterXpath: string
receivers:
- address: string
port: 0
protocol: string
sourceAddress: string
sourceVrf: string
stream: string
subscriptionId: 0
updatePolicyOnChange: false
updatePolicyPeriodic: 0
MdtSubscription 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 MdtSubscription resource accepts the following input properties:
- Subscription
Id int - Unique subscription identifier. - Range:
0
-2147483647
- Device string
- A device name from the provider configuration.
- Encoding string
- Update notification encoding
- Filter
Xpath string - XPath expression describing the set of objects wanted as part of the subscription
- Receivers
List<Lbrlabs.
Pulumi Package. Iosxe. Inputs. Mdt Subscription Receiver> - Configuration of receivers of configured subscriptions. Use of this is deprecated. Use mdt-receiver-names instead.
- Source
Address string - The source address for the notifications
- Source
Vrf string - Network instance name for the VRF
- Stream string
- The name of the event stream being subscribed to
- Update
Policy boolOn Change - If true, there is no initial update notification with the current value of all the data. NOT CURRENTLY SUPPORTED. If specified, must be false
- Update
Policy intPeriodic - Period of update notifications in hundredths of a second - Range:
0
-4294967295
- Subscription
Id int - Unique subscription identifier. - Range:
0
-2147483647
- Device string
- A device name from the provider configuration.
- Encoding string
- Update notification encoding
- Filter
Xpath string - XPath expression describing the set of objects wanted as part of the subscription
- Receivers
[]Mdt
Subscription Receiver Args - Configuration of receivers of configured subscriptions. Use of this is deprecated. Use mdt-receiver-names instead.
- Source
Address string - The source address for the notifications
- Source
Vrf string - Network instance name for the VRF
- Stream string
- The name of the event stream being subscribed to
- Update
Policy boolOn Change - If true, there is no initial update notification with the current value of all the data. NOT CURRENTLY SUPPORTED. If specified, must be false
- Update
Policy intPeriodic - Period of update notifications in hundredths of a second - Range:
0
-4294967295
- subscription
Id Integer - Unique subscription identifier. - Range:
0
-2147483647
- device String
- A device name from the provider configuration.
- encoding String
- Update notification encoding
- filter
Xpath String - XPath expression describing the set of objects wanted as part of the subscription
- receivers
List<Mdt
Subscription Receiver> - Configuration of receivers of configured subscriptions. Use of this is deprecated. Use mdt-receiver-names instead.
- source
Address String - The source address for the notifications
- source
Vrf String - Network instance name for the VRF
- stream String
- The name of the event stream being subscribed to
- update
Policy BooleanOn Change - If true, there is no initial update notification with the current value of all the data. NOT CURRENTLY SUPPORTED. If specified, must be false
- update
Policy IntegerPeriodic - Period of update notifications in hundredths of a second - Range:
0
-4294967295
- subscription
Id number - Unique subscription identifier. - Range:
0
-2147483647
- device string
- A device name from the provider configuration.
- encoding string
- Update notification encoding
- filter
Xpath string - XPath expression describing the set of objects wanted as part of the subscription
- receivers
Mdt
Subscription Receiver[] - Configuration of receivers of configured subscriptions. Use of this is deprecated. Use mdt-receiver-names instead.
- source
Address string - The source address for the notifications
- source
Vrf string - Network instance name for the VRF
- stream string
- The name of the event stream being subscribed to
- update
Policy booleanOn Change - If true, there is no initial update notification with the current value of all the data. NOT CURRENTLY SUPPORTED. If specified, must be false
- update
Policy numberPeriodic - Period of update notifications in hundredths of a second - Range:
0
-4294967295
- subscription_
id int - Unique subscription identifier. - Range:
0
-2147483647
- device str
- A device name from the provider configuration.
- encoding str
- Update notification encoding
- filter_
xpath str - XPath expression describing the set of objects wanted as part of the subscription
- receivers
Sequence[Mdt
Subscription Receiver Args] - Configuration of receivers of configured subscriptions. Use of this is deprecated. Use mdt-receiver-names instead.
- source_
address str - The source address for the notifications
- source_
vrf str - Network instance name for the VRF
- stream str
- The name of the event stream being subscribed to
- update_
policy_ boolon_ change - If true, there is no initial update notification with the current value of all the data. NOT CURRENTLY SUPPORTED. If specified, must be false
- update_
policy_ intperiodic - Period of update notifications in hundredths of a second - Range:
0
-4294967295
- subscription
Id Number - Unique subscription identifier. - Range:
0
-2147483647
- device String
- A device name from the provider configuration.
- encoding String
- Update notification encoding
- filter
Xpath String - XPath expression describing the set of objects wanted as part of the subscription
- receivers List<Property Map>
- Configuration of receivers of configured subscriptions. Use of this is deprecated. Use mdt-receiver-names instead.
- source
Address String - The source address for the notifications
- source
Vrf String - Network instance name for the VRF
- stream String
- The name of the event stream being subscribed to
- update
Policy BooleanOn Change - If true, there is no initial update notification with the current value of all the data. NOT CURRENTLY SUPPORTED. If specified, must be false
- update
Policy NumberPeriodic - Period of update notifications in hundredths of a second - Range:
0
-4294967295
Outputs
All input properties are implicitly available as output properties. Additionally, the MdtSubscription 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 MdtSubscription Resource
Get an existing MdtSubscription 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?: MdtSubscriptionState, opts?: CustomResourceOptions): MdtSubscription
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
device: Optional[str] = None,
encoding: Optional[str] = None,
filter_xpath: Optional[str] = None,
receivers: Optional[Sequence[MdtSubscriptionReceiverArgs]] = None,
source_address: Optional[str] = None,
source_vrf: Optional[str] = None,
stream: Optional[str] = None,
subscription_id: Optional[int] = None,
update_policy_on_change: Optional[bool] = None,
update_policy_periodic: Optional[int] = None) -> MdtSubscription
func GetMdtSubscription(ctx *Context, name string, id IDInput, state *MdtSubscriptionState, opts ...ResourceOption) (*MdtSubscription, error)
public static MdtSubscription Get(string name, Input<string> id, MdtSubscriptionState? state, CustomResourceOptions? opts = null)
public static MdtSubscription get(String name, Output<String> id, MdtSubscriptionState 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.
- Device string
- A device name from the provider configuration.
- Encoding string
- Update notification encoding
- Filter
Xpath string - XPath expression describing the set of objects wanted as part of the subscription
- Receivers
List<Lbrlabs.
Pulumi Package. Iosxe. Inputs. Mdt Subscription Receiver> - Configuration of receivers of configured subscriptions. Use of this is deprecated. Use mdt-receiver-names instead.
- Source
Address string - The source address for the notifications
- Source
Vrf string - Network instance name for the VRF
- Stream string
- The name of the event stream being subscribed to
- Subscription
Id int - Unique subscription identifier. - Range:
0
-2147483647
- Update
Policy boolOn Change - If true, there is no initial update notification with the current value of all the data. NOT CURRENTLY SUPPORTED. If specified, must be false
- Update
Policy intPeriodic - Period of update notifications in hundredths of a second - Range:
0
-4294967295
- Device string
- A device name from the provider configuration.
- Encoding string
- Update notification encoding
- Filter
Xpath string - XPath expression describing the set of objects wanted as part of the subscription
- Receivers
[]Mdt
Subscription Receiver Args - Configuration of receivers of configured subscriptions. Use of this is deprecated. Use mdt-receiver-names instead.
- Source
Address string - The source address for the notifications
- Source
Vrf string - Network instance name for the VRF
- Stream string
- The name of the event stream being subscribed to
- Subscription
Id int - Unique subscription identifier. - Range:
0
-2147483647
- Update
Policy boolOn Change - If true, there is no initial update notification with the current value of all the data. NOT CURRENTLY SUPPORTED. If specified, must be false
- Update
Policy intPeriodic - Period of update notifications in hundredths of a second - Range:
0
-4294967295
- device String
- A device name from the provider configuration.
- encoding String
- Update notification encoding
- filter
Xpath String - XPath expression describing the set of objects wanted as part of the subscription
- receivers
List<Mdt
Subscription Receiver> - Configuration of receivers of configured subscriptions. Use of this is deprecated. Use mdt-receiver-names instead.
- source
Address String - The source address for the notifications
- source
Vrf String - Network instance name for the VRF
- stream String
- The name of the event stream being subscribed to
- subscription
Id Integer - Unique subscription identifier. - Range:
0
-2147483647
- update
Policy BooleanOn Change - If true, there is no initial update notification with the current value of all the data. NOT CURRENTLY SUPPORTED. If specified, must be false
- update
Policy IntegerPeriodic - Period of update notifications in hundredths of a second - Range:
0
-4294967295
- device string
- A device name from the provider configuration.
- encoding string
- Update notification encoding
- filter
Xpath string - XPath expression describing the set of objects wanted as part of the subscription
- receivers
Mdt
Subscription Receiver[] - Configuration of receivers of configured subscriptions. Use of this is deprecated. Use mdt-receiver-names instead.
- source
Address string - The source address for the notifications
- source
Vrf string - Network instance name for the VRF
- stream string
- The name of the event stream being subscribed to
- subscription
Id number - Unique subscription identifier. - Range:
0
-2147483647
- update
Policy booleanOn Change - If true, there is no initial update notification with the current value of all the data. NOT CURRENTLY SUPPORTED. If specified, must be false
- update
Policy numberPeriodic - Period of update notifications in hundredths of a second - Range:
0
-4294967295
- device str
- A device name from the provider configuration.
- encoding str
- Update notification encoding
- filter_
xpath str - XPath expression describing the set of objects wanted as part of the subscription
- receivers
Sequence[Mdt
Subscription Receiver Args] - Configuration of receivers of configured subscriptions. Use of this is deprecated. Use mdt-receiver-names instead.
- source_
address str - The source address for the notifications
- source_
vrf str - Network instance name for the VRF
- stream str
- The name of the event stream being subscribed to
- subscription_
id int - Unique subscription identifier. - Range:
0
-2147483647
- update_
policy_ boolon_ change - If true, there is no initial update notification with the current value of all the data. NOT CURRENTLY SUPPORTED. If specified, must be false
- update_
policy_ intperiodic - Period of update notifications in hundredths of a second - Range:
0
-4294967295
- device String
- A device name from the provider configuration.
- encoding String
- Update notification encoding
- filter
Xpath String - XPath expression describing the set of objects wanted as part of the subscription
- receivers List<Property Map>
- Configuration of receivers of configured subscriptions. Use of this is deprecated. Use mdt-receiver-names instead.
- source
Address String - The source address for the notifications
- source
Vrf String - Network instance name for the VRF
- stream String
- The name of the event stream being subscribed to
- subscription
Id Number - Unique subscription identifier. - Range:
0
-2147483647
- update
Policy BooleanOn Change - If true, there is no initial update notification with the current value of all the data. NOT CURRENTLY SUPPORTED. If specified, must be false
- update
Policy NumberPeriodic - Period of update notifications in hundredths of a second - Range:
0
-4294967295
Supporting Types
MdtSubscriptionReceiver, MdtSubscriptionReceiverArgs
Import
$ pulumi import iosxe:index/mdtSubscription:MdtSubscription example "Cisco-IOS-XE-mdt-cfg:mdt-config-data/mdt-subscription=101"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- iosxe lbrlabs/pulumi-iosxe
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
iosxe
Terraform Provider.