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:

PolicyName string

The name of the policy.

PolicyType string

The type of the policy. Valid values:Custom and System.

Ids List<string>

A list of policy version IDs.

OutputFile string
PolicyName string

The name of the policy.

PolicyType string

The type of the policy. Valid values:Custom and System.

Ids []string

A list of policy version IDs.

OutputFile string
policyName string

The name of the policy.

policyType string

The type of the policy. Valid values:Custom and System.

ids string[]

A list of policy version IDs.

outputFile string
policy_name str

The name of the policy.

policy_type str

The type of the policy. Valid values:Custom and System.

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.

PolicyName string
PolicyType string
Versions List<Pulumi.AliCloud.ResourceManager.Outputs.GetPolicyVersionsVersion>

A list of policy versions. Each element contains the following attributes:

OutputFile string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string

A list of policy version IDs.

PolicyName string
PolicyType string
Versions []GetPolicyVersionsVersion

A list of policy versions. Each element contains the following attributes:

OutputFile string
id string

The provider-assigned unique ID for this managed resource.

ids string[]

A list of policy version IDs.

policyName string
policyType string
versions GetPolicyVersionsVersion[]

A list of policy versions. Each element contains the following attributes:

outputFile 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[GetPolicyVersionsVersion]

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.

CreateDate 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.

IsDefaultVersion bool
VersionId string
CreateDate 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.

IsDefaultVersion bool
VersionId string
createDate 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.

isDefaultVersion boolean
versionId 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_version bool
version_id str

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.