get Policy Attachments
This data source provides the Resource Manager Policy Attachments of the current Alibaba Cloud user.
NOTE: Available in 1.93.0+.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetPolicyAttachmentsArgs;
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 example = ResourcemanagerFunctions.getPolicyAttachments();
ctx.export("firstAttachmentId", example.applyValue(getPolicyAttachmentsResult -> getPolicyAttachmentsResult.attachments()[0].id()));
}
}
Return
A collection of values returned by getPolicyAttachments.
Parameters
A collection of arguments for invoking getPolicyAttachments.
Return
A collection of values returned by getPolicyAttachments.
See also
Parameters
The language that is used to return the description of the system policy. Valid values:en
: English, zh-CN
: Chinese, ja
: Japanese.
File name where to save data source results (after running pulumi preview
).
The name of the policy. The name must be 1 to 128 characters in length and can contain letters, digits, and hyphens (-).
The type of the policy. Valid values: Custom
and System
.
The name of the object to which the policy is attached.
The type of the object to which the policy is attached. If you do not specify this parameter, the system lists all types of objects. Valid values: IMSUser
: RAM user, IMSGroup
: RAM user group, ServiceRole
: RAM role.
The ID of the resource group or the ID of the Alibaba Cloud account to which the resource group belongs. If you do not specify this parameter, the system lists all policy attachment records under the current account.
Return
A collection of values returned by getPolicyAttachments.
See also
Parameters
Builder for com.pulumi.alicloud.resourcemanager.kotlin.inputs.GetPolicyAttachmentsPlainArgs.