Alibaba Cloud v3.69.0 published on Monday, Dec 9, 2024 by Pulumi
alicloud.nas.getProtocols
Explore with Pulumi AI
Provide a data source to retrieve the type of protocol used to create NAS file system.
NOTE: Available in 1.42.0
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const default = alicloud.nas.getProtocols({
type: "Performance",
zoneId: "cn-beijing-e",
outputFile: "protocols.txt",
});
export const nasProtocolsProtocol = _default.then(_default => _default.protocols?.[0]);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.nas.get_protocols(type="Performance",
zone_id="cn-beijing-e",
output_file="protocols.txt")
pulumi.export("nasProtocolsProtocol", default.protocols[0])
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{
Type: "Performance",
ZoneId: pulumi.StringRef("cn-beijing-e"),
OutputFile: pulumi.StringRef("protocols.txt"),
}, nil)
if err != nil {
return err
}
ctx.Export("nasProtocolsProtocol", _default.Protocols[0])
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Nas.GetProtocols.Invoke(new()
{
Type = "Performance",
ZoneId = "cn-beijing-e",
OutputFile = "protocols.txt",
});
return new Dictionary<string, object?>
{
["nasProtocolsProtocol"] = @default.Apply(@default => @default.Apply(getProtocolsResult => getProtocolsResult.Protocols[0])),
};
});
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()
.type("Performance")
.zoneId("cn-beijing-e")
.outputFile("protocols.txt")
.build());
ctx.export("nasProtocolsProtocol", default_.protocols()[0]);
}
}
variables:
default:
fn::invoke:
Function: alicloud:nas:getProtocols
Arguments:
type: Performance
zoneId: cn-beijing-e
outputFile: protocols.txt
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
andCapacity
. - Output
File string - File name where to save data source results (after running
pulumi preview
). - Zone
Id string - String to filter results by zone id.
- Type string
- The file system type. Valid Values:
Performance
andCapacity
. - Output
File string - File name where to save data source results (after running
pulumi preview
). - Zone
Id string - String to filter results by zone id.
- type String
- The file system type. Valid Values:
Performance
andCapacity
. - output
File String - File name where to save data source results (after running
pulumi preview
). - zone
Id String - String to filter results by zone id.
- type string
- The file system type. Valid Values:
Performance
andCapacity
. - output
File string - File name where to save data source results (after running
pulumi preview
). - zone
Id string - String to filter results by zone id.
- type str
- The file system type. Valid Values:
Performance
andCapacity
. - output_
file str - File name where to save data source results (after running
pulumi preview
). - zone_
id str - String to filter results by zone id.
- type String
- The file system type. Valid Values:
Performance
andCapacity
. - output
File String - File name where to save data source results (after running
pulumi preview
). - zone
Id 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
- Output
File string - Zone
Id string
- Id string
- The provider-assigned unique ID for this managed resource.
- Protocols []string
- A list of supported protocol type..
- Type string
- Output
File string - Zone
Id string
- id String
- The provider-assigned unique ID for this managed resource.
- protocols List<String>
- A list of supported protocol type..
- type String
- output
File String - zone
Id String
- id string
- The provider-assigned unique ID for this managed resource.
- protocols string[]
- A list of supported protocol type..
- type string
- output
File string - zone
Id 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
- output
File String - zone
Id String
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.