getProtocols

Provide a data source to retrieve the type of protocol used to create NAS file system.

NOTE: Available in 1.42.0

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.Nas.GetProtocols.InvokeAsync(new AliCloud.Nas.GetProtocolsArgs
        {
            OutputFile = "protocols.txt",
            Type = "Performance",
            ZoneId = "cn-beijing-e",
        }));
        this.NasProtocolsProtocol = @default.Apply(@default => @default.Protocols?[0]);
    }

    [Output("nasProtocolsProtocol")]
    public Output<string> NasProtocolsProtocol { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/nas"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := nas.GetProtocols(ctx, &nas.GetProtocolsArgs{
			OutputFile: pulumi.StringRef("protocols.txt"),
			Type:       "Performance",
			ZoneId:     pulumi.StringRef("cn-beijing-e"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("nasProtocolsProtocol", _default.Protocols[0])
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.nas.NasFunctions;
import com.pulumi.alicloud.nas.inputs.GetProtocolsArgs;
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) {
        final var default = NasFunctions.getProtocols(GetProtocolsArgs.builder()
            .outputFile("protocols.txt")
            .type("Performance")
            .zoneId("cn-beijing-e")
            .build());

        ctx.export("nasProtocolsProtocol", default_.protocols()[0]);
    }
}
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.nas.get_protocols(output_file="protocols.txt",
    type="Performance",
    zone_id="cn-beijing-e")
pulumi.export("nasProtocolsProtocol", default.protocols[0])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultProtocols = pulumi.output(alicloud.nas.getProtocols({
    outputFile: "protocols.txt",
    type: "Performance",
    zoneId: "cn-beijing-e",
}));

export const nasProtocolsProtocol = defaultProtocols.protocols[0];
variables:
  default:
    Fn::Invoke:
      Function: alicloud:nas:getProtocols
      Arguments:
        outputFile: protocols.txt
        type: Performance
        zoneId: cn-beijing-e
outputs:
  nasProtocolsProtocol: ${default.protocols[0]}

Using getProtocols

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 getProtocols(args: GetProtocolsArgs, opts?: InvokeOptions): Promise<GetProtocolsResult>
function getProtocolsOutput(args: GetProtocolsOutputArgs, opts?: InvokeOptions): Output<GetProtocolsResult>
def get_protocols(output_file: Optional[str] = None,
                  type: Optional[str] = None,
                  zone_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetProtocolsResult
def get_protocols_output(output_file: Optional[pulumi.Input[str]] = None,
                  type: Optional[pulumi.Input[str]] = None,
                  zone_id: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetProtocolsResult]
func GetProtocols(ctx *Context, args *GetProtocolsArgs, opts ...InvokeOption) (*GetProtocolsResult, error)
func GetProtocolsOutput(ctx *Context, args *GetProtocolsOutputArgs, opts ...InvokeOption) GetProtocolsResultOutput

> Note: This function is named GetProtocols in the Go SDK.

public static class GetProtocols 
{
    public static Task<GetProtocolsResult> InvokeAsync(GetProtocolsArgs args, InvokeOptions? opts = null)
    public static Output<GetProtocolsResult> Invoke(GetProtocolsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProtocolsResult> getProtocols(GetProtocolsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:nas/getProtocols:getProtocols
  arguments:
    # arguments dictionary

The following arguments are supported:

Type string

The file system type. Valid Values: Performance and Capacity.

OutputFile string
ZoneId string

String to filter results by zone id.

Type string

The file system type. Valid Values: Performance and Capacity.

OutputFile string
ZoneId string

String to filter results by zone id.

type String

The file system type. Valid Values: Performance and Capacity.

outputFile String
zoneId String

String to filter results by zone id.

type string

The file system type. Valid Values: Performance and Capacity.

outputFile string
zoneId string

String to filter results by zone id.

type str

The file system type. Valid Values: Performance and Capacity.

output_file str
zone_id str

String to filter results by zone id.

type String

The file system type. Valid Values: Performance and Capacity.

outputFile String
zoneId String

String to filter results by zone id.

getProtocols Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Protocols List<string>

A list of supported protocol type..

Type string
OutputFile string
ZoneId string
Id string

The provider-assigned unique ID for this managed resource.

Protocols []string

A list of supported protocol type..

Type string
OutputFile string
ZoneId string
id String

The provider-assigned unique ID for this managed resource.

protocols List<String>

A list of supported protocol type..

type String
outputFile String
zoneId String
id string

The provider-assigned unique ID for this managed resource.

protocols string[]

A list of supported protocol type..

type string
outputFile string
zoneId string
id str

The provider-assigned unique ID for this managed resource.

protocols Sequence[str]

A list of supported protocol type..

type str
output_file str
zone_id str
id String

The provider-assigned unique ID for this managed resource.

protocols List<String>

A list of supported protocol type..

type String
outputFile String
zoneId String

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.