UNPKG

@pulumiverse/fortios

Version:

A Pulumi package for creating and managing Fortios resources. Based on terraform-provider-fortios: version v1.16.0

139 lines (138 loc) 3.82 kB
import * as pulumi from "@pulumi/pulumi"; /** * Convert IP/Mask to CIDR * * ## Example Usage * * ### Example1 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fortios from "@pulumi/fortios"; * * const trnameInterface = fortios.system.getInterface({ * name: "port3", * }); * const trnameCidr = trnameInterface.then(trnameInterface => fortios.ipmask.getCidr({ * ipmask: trnameInterface.ip, * })); * export const output1 = trnameCidr.then(trnameCidr => trnameCidr.cidr); * ``` * * ### Example2 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fortios from "@pulumi/fortios"; * * const trnameInterface = fortios.system.getInterface({ * name: "port3", * }); * const trnameCidr = trnameInterface.then(trnameInterface => fortios.ipmask.getCidr({ * ipmask: trnameInterface.ip, * ipmasklists: [ * "21.1.1.1 255.255.255.0", * "22.1.1.1 255.255.255.240", * "23.1.1.1 255.255.255.224", * ], * })); * export const outputConv1 = trnameCidr.then(trnameCidr => trnameCidr.cidr); * export const outputConv2 = trnameCidr.then(trnameCidr => trnameCidr.cidrlists); * export const outputOrignal = trnameInterface.then(trnameInterface => trnameInterface.ip); * ``` */ export declare function getCidr(args?: GetCidrArgs, opts?: pulumi.InvokeOptions): Promise<GetCidrResult>; /** * A collection of arguments for invoking getCidr. */ export interface GetCidrArgs { /** * Specify IP/MASK. */ ipmask?: string; /** * Specify IP/MASK list. */ ipmasklists?: string[]; } /** * A collection of values returned by getCidr. */ export interface GetCidrResult { /** * Classless Inter-Domain Routing of the IP/MASK. */ readonly cidr: string; /** * Classless Inter-Domain Routing list converted from the IP/MASK list. */ readonly cidrlists: string[]; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * IP/MASK. */ readonly ipmask?: string; /** * IP/MASK list. */ readonly ipmasklists?: string[]; } /** * Convert IP/Mask to CIDR * * ## Example Usage * * ### Example1 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fortios from "@pulumi/fortios"; * * const trnameInterface = fortios.system.getInterface({ * name: "port3", * }); * const trnameCidr = trnameInterface.then(trnameInterface => fortios.ipmask.getCidr({ * ipmask: trnameInterface.ip, * })); * export const output1 = trnameCidr.then(trnameCidr => trnameCidr.cidr); * ``` * * ### Example2 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fortios from "@pulumi/fortios"; * * const trnameInterface = fortios.system.getInterface({ * name: "port3", * }); * const trnameCidr = trnameInterface.then(trnameInterface => fortios.ipmask.getCidr({ * ipmask: trnameInterface.ip, * ipmasklists: [ * "21.1.1.1 255.255.255.0", * "22.1.1.1 255.255.255.240", * "23.1.1.1 255.255.255.224", * ], * })); * export const outputConv1 = trnameCidr.then(trnameCidr => trnameCidr.cidr); * export const outputConv2 = trnameCidr.then(trnameCidr => trnameCidr.cidrlists); * export const outputOrignal = trnameInterface.then(trnameInterface => trnameInterface.ip); * ``` */ export declare function getCidrOutput(args?: GetCidrOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetCidrResult>; /** * A collection of arguments for invoking getCidr. */ export interface GetCidrOutputArgs { /** * Specify IP/MASK. */ ipmask?: pulumi.Input<string>; /** * Specify IP/MASK list. */ ipmasklists?: pulumi.Input<pulumi.Input<string>[]>; }