Files
pulumi-incus/sdk/nodejs/getNetwork.ts
2025-12-08 10:47:09 -05:00

199 lines
5.5 KiB
TypeScript
Generated

// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "./utilities";
/**
* ## # incus.Network
*
* Provides information about an Incus network.
* See Incus network [configuration reference](https://linuxcontainers.org/incus/docs/main/explanation/networks/) for more details.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as incus from "@kiterun/incus";
*
* const _this = incus.getNetwork({
* name: "default",
* });
* export const networkName = _this.then(_this => _this.name);
* ```
*/
export function getNetwork(args: GetNetworkArgs, opts?: pulumi.InvokeOptions): Promise<GetNetworkResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("incus:index/getNetwork:getNetwork", {
"description": args.description,
"locations": args.locations,
"managed": args.managed,
"name": args.name,
"project": args.project,
"remote": args.remote,
"status": args.status,
"target": args.target,
"type": args.type,
}, opts);
}
/**
* A collection of arguments for invoking getNetwork.
*/
export interface GetNetworkArgs {
/**
* Description of the network.
*/
description?: string;
/**
* Locations of the network.
*/
locations?: string[];
/**
* Whether the network is managed by Incus.
*/
managed?: boolean;
/**
* **Required** - Name of the network.
*/
name: string;
/**
* *Optional* - Name of the project where the network is be stored.
*/
project?: string;
/**
* *Optional* - The remote in which the resource was created. If
* not provided, the provider's default remote will be used.
*/
remote?: string;
/**
* Status of the network.
*/
status?: string;
/**
* *Optional* - Specify a target node in a cluster.
*/
target?: string;
/**
* Network type.
* [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types)
*/
type?: string;
}
/**
* A collection of values returned by getNetwork.
*/
export interface GetNetworkResult {
/**
* Map of key/value pairs of config settings.
* [network config settings](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types)
*/
readonly config: {[key: string]: string};
/**
* Description of the network.
*/
readonly description: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* Locations of the network.
*/
readonly locations: string[];
/**
* Whether the network is managed by Incus.
*/
readonly managed: boolean;
readonly name: string;
readonly project?: string;
readonly remote?: string;
/**
* Status of the network.
*/
readonly status: string;
readonly target?: string;
/**
* Network type.
* [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types)
*/
readonly type: string;
}
/**
* ## # incus.Network
*
* Provides information about an Incus network.
* See Incus network [configuration reference](https://linuxcontainers.org/incus/docs/main/explanation/networks/) for more details.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as incus from "@kiterun/incus";
*
* const _this = incus.getNetwork({
* name: "default",
* });
* export const networkName = _this.then(_this => _this.name);
* ```
*/
export function getNetworkOutput(args: GetNetworkOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetNetworkResult> {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("incus:index/getNetwork:getNetwork", {
"description": args.description,
"locations": args.locations,
"managed": args.managed,
"name": args.name,
"project": args.project,
"remote": args.remote,
"status": args.status,
"target": args.target,
"type": args.type,
}, opts);
}
/**
* A collection of arguments for invoking getNetwork.
*/
export interface GetNetworkOutputArgs {
/**
* Description of the network.
*/
description?: pulumi.Input<string>;
/**
* Locations of the network.
*/
locations?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Whether the network is managed by Incus.
*/
managed?: pulumi.Input<boolean>;
/**
* **Required** - Name of the network.
*/
name: pulumi.Input<string>;
/**
* *Optional* - Name of the project where the network is be stored.
*/
project?: pulumi.Input<string>;
/**
* *Optional* - The remote in which the resource was created. If
* not provided, the provider's default remote will be used.
*/
remote?: pulumi.Input<string>;
/**
* Status of the network.
*/
status?: pulumi.Input<string>;
/**
* *Optional* - Specify a target node in a cluster.
*/
target?: pulumi.Input<string>;
/**
* Network type.
* [network type documentation](https://linuxcontainers.org/incus/docs/main/howto/network_create/#network-types)
*/
type?: pulumi.Input<string>;
}