Alibaba Cloud
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
})
}
Coming soon!
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];
Coming soon!
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 - Zone
Id string String to filter results by zone id.
- Type string
The file system type. Valid Values:
Performance
andCapacity
.- Output
File string - Zone
Id string String to filter results by zone id.
- type String
The file system type. Valid Values:
Performance
andCapacity
.- output
File String - zone
Id String String to filter results by zone id.
- type string
The file system type. Valid Values:
Performance
andCapacity
.- output
File string - zone
Id string String to filter results by zone id.
- type str
The file system type. Valid Values:
Performance
andCapacity
.- output_
file str - zone_
id str String to filter results by zone id.
- type String
The file system type. Valid Values:
Performance
andCapacity
.- output
File String - 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
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
A list of supported protocol type..
- type String
- output
File String - zone
Id 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.