NS1 v3.4.6 published on Friday, Oct 18, 2024 by Pulumi
ns1.getNetworks
Explore with Pulumi AI
Provides details about NS1 Networks. Use this if you would simply like to read information from NS1 into your configurations. For read/write operations, you should use a resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ns1 from "@pulumi/ns1";
// Get details about NS1 Networks.
const example = ns1.getNetworks({});
import pulumi
import pulumi_ns1 as ns1
# Get details about NS1 Networks.
example = ns1.get_networks()
package main
import (
"github.com/pulumi/pulumi-ns1/sdk/v3/go/ns1"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Get details about NS1 Networks.
_, err := ns1.GetNetworks(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ns1 = Pulumi.Ns1;
return await Deployment.RunAsync(() =>
{
// Get details about NS1 Networks.
var example = Ns1.GetNetworks.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ns1.Ns1Functions;
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) {
// Get details about NS1 Networks.
final var example = Ns1Functions.getNetworks();
}
}
variables:
# Get details about NS1 Networks.
example:
fn::invoke:
Function: ns1:getNetworks
Arguments: {}
Using getNetworks
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getNetworks(opts?: InvokeOptions): Promise<GetNetworksResult>
function getNetworksOutput(opts?: InvokeOptions): Output<GetNetworksResult>
def get_networks(opts: Optional[InvokeOptions] = None) -> GetNetworksResult
def get_networks_output(opts: Optional[InvokeOptions] = None) -> Output[GetNetworksResult]
func GetNetworks(ctx *Context, opts ...InvokeOption) (*GetNetworksResult, error)
func GetNetworksOutput(ctx *Context, opts ...InvokeOption) GetNetworksResultOutput
> Note: This function is named GetNetworks
in the Go SDK.
public static class GetNetworks
{
public static Task<GetNetworksResult> InvokeAsync(InvokeOptions? opts = null)
public static Output<GetNetworksResult> Invoke(InvokeOptions? opts = null)
}
public static CompletableFuture<GetNetworksResult> getNetworks(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: ns1:index/getNetworks:getNetworks
arguments:
# arguments dictionary
getNetworks Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Networks
List<Get
Networks Network> - A set of the available networks. Networks is documented below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Networks
[]Get
Networks Network - A set of the available networks. Networks is documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- networks
List<Get
Networks Network> - A set of the available networks. Networks is documented below.
- id string
- The provider-assigned unique ID for this managed resource.
- networks
Get
Networks Network[] - A set of the available networks. Networks is documented below.
- id str
- The provider-assigned unique ID for this managed resource.
- networks
Sequence[Get
Networks Network] - A set of the available networks. Networks is documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- networks List<Property Map>
- A set of the available networks. Networks is documented below.
Supporting Types
GetNetworksNetwork
- label str
- Label associated with the network.
- name str
- Name of the network.
- network_
id int - network ID (
int
). Default is network 0, the primary NS1 Managed DNS Network.
Package Details
- Repository
- NS1 pulumi/pulumi-ns1
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ns1
Terraform Provider.