GetPolicyVersions
This data source provides the Resource Manager Policy Versions of the current Alibaba Cloud user.
NOTE: Available in 1.85.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var @default = Output.Create(AliCloud.ResourceManager.GetPolicyVersions.InvokeAsync(new AliCloud.ResourceManager.GetPolicyVersionsArgs
{
PolicyName = "tftest",
PolicyType = "Custom",
}));
this.FirstPolicyVersionId = @default.Apply(@default => @default.Versions[0].Id);
}
[Output("firstPolicyVersionId")]
public Output<string> FirstPolicyVersionId { get; set; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.resourcemanager.get_policy_versions(policy_name="tftest",
policy_type="Custom")
pulumi.export("firstPolicyVersionId", default.versions[0]["id"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultPolicyVersions = pulumi.output(alicloud.resourcemanager.getPolicyVersions({
policyName: "tftest",
policyType: "Custom",
}, { async: true }));
export const firstPolicyVersionId = defaultPolicyVersions.versions[0].id;Using GetPolicyVersions
function getPolicyVersions(args: GetPolicyVersionsArgs, opts?: InvokeOptions): Promise<GetPolicyVersionsResult>function get_policy_versions(ids=None, output_file=None, policy_name=None, policy_type=None, opts=None)func GetPolicyVersions(ctx *Context, args *GetPolicyVersionsArgs, opts ...InvokeOption) (*GetPolicyVersionsResult, error)public static class GetPolicyVersions {
public static Task<GetPolicyVersionsResult> InvokeAsync(GetPolicyVersionsArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Policy
Name string The name of the policy.
- Policy
Type string The type of the policy. Valid values:
CustomandSystem.- Ids List<string>
A list of policy version IDs.
- Output
File string
- Policy
Name string The name of the policy.
- Policy
Type string The type of the policy. Valid values:
CustomandSystem.- Ids []string
A list of policy version IDs.
- Output
File string
- policy
Name string The name of the policy.
- policy
Type string The type of the policy. Valid values:
CustomandSystem.- ids string[]
A list of policy version IDs.
- output
File string
- policy_
name str The name of the policy.
- policy_
type str The type of the policy. Valid values:
CustomandSystem.- ids List[str]
A list of policy version IDs.
- output_
file str
GetPolicyVersions Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of policy version IDs.
- Policy
Name string - Policy
Type string - Versions
List<Pulumi.
Ali Cloud. Resource Manager. Outputs. Get Policy Versions Version> A list of policy versions. Each element contains the following attributes:
- Output
File string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of policy version IDs.
- Policy
Name string - Policy
Type string - Versions
[]Get
Policy Versions Version A list of policy versions. Each element contains the following attributes:
- Output
File string
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of policy version IDs.
- policy
Name string - policy
Type string - versions
Get
Policy Versions Version[] A list of policy versions. Each element contains the following attributes:
- output
File string
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of policy version IDs.
- policy_
name str - policy_
type str - versions
List[Get
Policy Versions Version] A list of policy versions. Each element contains the following attributes:
- output_
file str
Supporting Types
GetPolicyVersionsVersion
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Create
Date string - Id string
The ID of the resource, the value is
<policy_name>:<version_id>. *version_id- The ID of the policy version. *create_date- The time when the policy version was created. *is_default_version- Indicates whether the policy version is the default version.- Is
Default boolVersion - Version
Id string
- Create
Date string - Id string
The ID of the resource, the value is
<policy_name>:<version_id>. *version_id- The ID of the policy version. *create_date- The time when the policy version was created. *is_default_version- Indicates whether the policy version is the default version.- Is
Default boolVersion - Version
Id string
- create
Date string - id string
The ID of the resource, the value is
<policy_name>:<version_id>. *version_id- The ID of the policy version. *create_date- The time when the policy version was created. *is_default_version- Indicates whether the policy version is the default version.- is
Default booleanVersion - version
Id string
- create_
date str - id str
The ID of the resource, the value is
<policy_name>:<version_id>. *version_id- The ID of the policy version. *create_date- The time when the policy version was created. *is_default_version- Indicates whether the policy version is the default version.- is_
default_ boolversion - version_
id str
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.