Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.nas.getAutoSnapshotPolicies
Explore with Pulumi AI
This data source provides Auto Snapshot Policies available to the user.
NOTE: Available in v1.153.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.nas.getAutoSnapshotPolicies({
ids: ["example_value"],
});
export const nasAutoSnapshotPoliciesId1 = ids.then(ids => ids.policies?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.nas.get_auto_snapshot_policies(ids=["example_value"])
pulumi.export("nasAutoSnapshotPoliciesId1", ids.policies[0].id)
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 {
ids, err := nas.GetAutoSnapshotPolicies(ctx, &nas.GetAutoSnapshotPoliciesArgs{
Ids: []string{
"example_value",
},
}, nil)
if err != nil {
return err
}
ctx.Export("nasAutoSnapshotPoliciesId1", ids.Policies[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Nas.GetAutoSnapshotPolicies.Invoke(new()
{
Ids = new[]
{
"example_value",
},
});
return new Dictionary<string, object?>
{
["nasAutoSnapshotPoliciesId1"] = ids.Apply(getAutoSnapshotPoliciesResult => getAutoSnapshotPoliciesResult.Policies[0]?.Id),
};
});
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.GetAutoSnapshotPoliciesArgs;
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 ids = NasFunctions.getAutoSnapshotPolicies(GetAutoSnapshotPoliciesArgs.builder()
.ids("example_value")
.build());
ctx.export("nasAutoSnapshotPoliciesId1", ids.applyValue(getAutoSnapshotPoliciesResult -> getAutoSnapshotPoliciesResult.policies()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:nas:getAutoSnapshotPolicies
Arguments:
ids:
- example_value
outputs:
nasAutoSnapshotPoliciesId1: ${ids.policies[0].id}
Using getAutoSnapshotPolicies
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 getAutoSnapshotPolicies(args: GetAutoSnapshotPoliciesArgs, opts?: InvokeOptions): Promise<GetAutoSnapshotPoliciesResult>
function getAutoSnapshotPoliciesOutput(args: GetAutoSnapshotPoliciesOutputArgs, opts?: InvokeOptions): Output<GetAutoSnapshotPoliciesResult>
def get_auto_snapshot_policies(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAutoSnapshotPoliciesResult
def get_auto_snapshot_policies_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAutoSnapshotPoliciesResult]
func GetAutoSnapshotPolicies(ctx *Context, args *GetAutoSnapshotPoliciesArgs, opts ...InvokeOption) (*GetAutoSnapshotPoliciesResult, error)
func GetAutoSnapshotPoliciesOutput(ctx *Context, args *GetAutoSnapshotPoliciesOutputArgs, opts ...InvokeOption) GetAutoSnapshotPoliciesResultOutput
> Note: This function is named GetAutoSnapshotPolicies
in the Go SDK.
public static class GetAutoSnapshotPolicies
{
public static Task<GetAutoSnapshotPoliciesResult> InvokeAsync(GetAutoSnapshotPoliciesArgs args, InvokeOptions? opts = null)
public static Output<GetAutoSnapshotPoliciesResult> Invoke(GetAutoSnapshotPoliciesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAutoSnapshotPoliciesResult> getAutoSnapshotPolicies(GetAutoSnapshotPoliciesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:nas/getAutoSnapshotPolicies:getAutoSnapshotPolicies
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Auto Snapshot Policies IDs.
- Name
Regex string - A regex string to filter results by Auto Snapshot Policy name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the automatic snapshot policy. Valid values:
Creating
,Available
.
- Ids []string
- A list of Auto Snapshot Policies IDs.
- Name
Regex string - A regex string to filter results by Auto Snapshot Policy name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Status string
- The status of the automatic snapshot policy. Valid values:
Creating
,Available
.
- ids List<String>
- A list of Auto Snapshot Policies IDs.
- name
Regex String - A regex string to filter results by Auto Snapshot Policy name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of the automatic snapshot policy. Valid values:
Creating
,Available
.
- ids string[]
- A list of Auto Snapshot Policies IDs.
- name
Regex string - A regex string to filter results by Auto Snapshot Policy name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - status string
- The status of the automatic snapshot policy. Valid values:
Creating
,Available
.
- ids Sequence[str]
- A list of Auto Snapshot Policies IDs.
- name_
regex str - A regex string to filter results by Auto Snapshot Policy name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - status str
- The status of the automatic snapshot policy. Valid values:
Creating
,Available
.
- ids List<String>
- A list of Auto Snapshot Policies IDs.
- name
Regex String - A regex string to filter results by Auto Snapshot Policy name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - status String
- The status of the automatic snapshot policy. Valid values:
Creating
,Available
.
getAutoSnapshotPolicies Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- A list of Auto Snapshot Policy names.
- Policies
List<Pulumi.
Ali Cloud. Nas. Outputs. Get Auto Snapshot Policies Policy> - A list of Auto Snapshot Policies. Each element contains the following attributes:
- Name
Regex string - Output
File string - Status string
- The status of the automatic snapshot policy.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- A list of Auto Snapshot Policy names.
- Policies
[]Get
Auto Snapshot Policies Policy - A list of Auto Snapshot Policies. Each element contains the following attributes:
- Name
Regex string - Output
File string - Status string
- The status of the automatic snapshot policy.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Auto Snapshot Policy names.
- policies
List<Get
Auto Snapshot Policies Policy> - A list of Auto Snapshot Policies. Each element contains the following attributes:
- name
Regex String - output
File String - status String
- The status of the automatic snapshot policy.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- A list of Auto Snapshot Policy names.
- policies
Get
Auto Snapshot Policies Policy[] - A list of Auto Snapshot Policies. Each element contains the following attributes:
- name
Regex string - output
File string - status string
- The status of the automatic snapshot policy.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- A list of Auto Snapshot Policy names.
- policies
Sequence[Get
Auto Snapshot Policies Policy] - A list of Auto Snapshot Policies. Each element contains the following attributes:
- name_
regex str - output_
file str - status str
- The status of the automatic snapshot policy.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Auto Snapshot Policy names.
- policies List<Property Map>
- A list of Auto Snapshot Policies. Each element contains the following attributes:
- name
Regex String - output
File String - status String
- The status of the automatic snapshot policy.
Supporting Types
GetAutoSnapshotPoliciesPolicy
- Auto
Snapshot stringPolicy Id - The ID of the automatic snapshot policy.
- Auto
Snapshot stringPolicy Name - The name of the automatic snapshot policy.
- Create
Time string - The time when the automatic snapshot policy was created.
- File
System intNums - The number of file systems to which the automatic snapshot policy applies.
- Id string
- ID of the Auto Snapshot Policy.
- Repeat
Weekdays List<string> - The day on which an auto snapshot was created.
- Retention
Days int - The number of days for which you want to retain auto snapshots.
- Status string
- The status of the automatic snapshot policy. Valid values:
Creating
,Available
. - Time
Points List<string> - The point in time at which an auto snapshot was created. Unit: hours.
- Auto
Snapshot stringPolicy Id - The ID of the automatic snapshot policy.
- Auto
Snapshot stringPolicy Name - The name of the automatic snapshot policy.
- Create
Time string - The time when the automatic snapshot policy was created.
- File
System intNums - The number of file systems to which the automatic snapshot policy applies.
- Id string
- ID of the Auto Snapshot Policy.
- Repeat
Weekdays []string - The day on which an auto snapshot was created.
- Retention
Days int - The number of days for which you want to retain auto snapshots.
- Status string
- The status of the automatic snapshot policy. Valid values:
Creating
,Available
. - Time
Points []string - The point in time at which an auto snapshot was created. Unit: hours.
- auto
Snapshot StringPolicy Id - The ID of the automatic snapshot policy.
- auto
Snapshot StringPolicy Name - The name of the automatic snapshot policy.
- create
Time String - The time when the automatic snapshot policy was created.
- file
System IntegerNums - The number of file systems to which the automatic snapshot policy applies.
- id String
- ID of the Auto Snapshot Policy.
- repeat
Weekdays List<String> - The day on which an auto snapshot was created.
- retention
Days Integer - The number of days for which you want to retain auto snapshots.
- status String
- The status of the automatic snapshot policy. Valid values:
Creating
,Available
. - time
Points List<String> - The point in time at which an auto snapshot was created. Unit: hours.
- auto
Snapshot stringPolicy Id - The ID of the automatic snapshot policy.
- auto
Snapshot stringPolicy Name - The name of the automatic snapshot policy.
- create
Time string - The time when the automatic snapshot policy was created.
- file
System numberNums - The number of file systems to which the automatic snapshot policy applies.
- id string
- ID of the Auto Snapshot Policy.
- repeat
Weekdays string[] - The day on which an auto snapshot was created.
- retention
Days number - The number of days for which you want to retain auto snapshots.
- status string
- The status of the automatic snapshot policy. Valid values:
Creating
,Available
. - time
Points string[] - The point in time at which an auto snapshot was created. Unit: hours.
- auto_
snapshot_ strpolicy_ id - The ID of the automatic snapshot policy.
- auto_
snapshot_ strpolicy_ name - The name of the automatic snapshot policy.
- create_
time str - The time when the automatic snapshot policy was created.
- file_
system_ intnums - The number of file systems to which the automatic snapshot policy applies.
- id str
- ID of the Auto Snapshot Policy.
- repeat_
weekdays Sequence[str] - The day on which an auto snapshot was created.
- retention_
days int - The number of days for which you want to retain auto snapshots.
- status str
- The status of the automatic snapshot policy. Valid values:
Creating
,Available
. - time_
points Sequence[str] - The point in time at which an auto snapshot was created. Unit: hours.
- auto
Snapshot StringPolicy Id - The ID of the automatic snapshot policy.
- auto
Snapshot StringPolicy Name - The name of the automatic snapshot policy.
- create
Time String - The time when the automatic snapshot policy was created.
- file
System NumberNums - The number of file systems to which the automatic snapshot policy applies.
- id String
- ID of the Auto Snapshot Policy.
- repeat
Weekdays List<String> - The day on which an auto snapshot was created.
- retention
Days Number - The number of days for which you want to retain auto snapshots.
- status String
- The status of the automatic snapshot policy. Valid values:
Creating
,Available
. - time
Points List<String> - The point in time at which an auto snapshot was created. Unit: hours.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.