Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
This data source provides the Resource Manager Control Policy Attachments of the current Alibaba Cloud user.
NOTE: Available in v1.120.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = alicloud.resourcemanager.getControlPolicyAttachments({
targetId: "example_value",
});
export const firstResourceManagerControlPolicyAttachmentId = example.then(example => example.attachments?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.resourcemanager.get_control_policy_attachments(target_id="example_value")
pulumi.export("firstResourceManagerControlPolicyAttachmentId", example.attachments[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := resourcemanager.GetControlPolicyAttachments(ctx, &resourcemanager.GetControlPolicyAttachmentsArgs{
TargetId: "example_value",
}, nil)
if err != nil {
return err
}
ctx.Export("firstResourceManagerControlPolicyAttachmentId", example.Attachments[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = AliCloud.ResourceManager.GetControlPolicyAttachments.Invoke(new()
{
TargetId = "example_value",
});
return new Dictionary<string, object?>
{
["firstResourceManagerControlPolicyAttachmentId"] = example.Apply(getControlPolicyAttachmentsResult => getControlPolicyAttachmentsResult.Attachments[0]?.Id),
};
});
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.GetControlPolicyAttachmentsArgs;
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.getControlPolicyAttachments(GetControlPolicyAttachmentsArgs.builder()
.targetId("example_value")
.build());
ctx.export("firstResourceManagerControlPolicyAttachmentId", example.attachments()[0].id());
}
}
variables:
example:
fn::invoke:
function: alicloud:resourcemanager:getControlPolicyAttachments
arguments:
targetId: example_value
outputs:
firstResourceManagerControlPolicyAttachmentId: ${example.attachments[0].id}
Using getControlPolicyAttachments
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 getControlPolicyAttachments(args: GetControlPolicyAttachmentsArgs, opts?: InvokeOptions): Promise<GetControlPolicyAttachmentsResult>
function getControlPolicyAttachmentsOutput(args: GetControlPolicyAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetControlPolicyAttachmentsResult>def get_control_policy_attachments(language: Optional[str] = None,
output_file: Optional[str] = None,
policy_type: Optional[str] = None,
target_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetControlPolicyAttachmentsResult
def get_control_policy_attachments_output(language: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
policy_type: Optional[pulumi.Input[str]] = None,
target_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetControlPolicyAttachmentsResult]func GetControlPolicyAttachments(ctx *Context, args *GetControlPolicyAttachmentsArgs, opts ...InvokeOption) (*GetControlPolicyAttachmentsResult, error)
func GetControlPolicyAttachmentsOutput(ctx *Context, args *GetControlPolicyAttachmentsOutputArgs, opts ...InvokeOption) GetControlPolicyAttachmentsResultOutput> Note: This function is named GetControlPolicyAttachments in the Go SDK.
public static class GetControlPolicyAttachments
{
public static Task<GetControlPolicyAttachmentsResult> InvokeAsync(GetControlPolicyAttachmentsArgs args, InvokeOptions? opts = null)
public static Output<GetControlPolicyAttachmentsResult> Invoke(GetControlPolicyAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetControlPolicyAttachmentsResult> getControlPolicyAttachments(GetControlPolicyAttachmentsArgs args, InvokeOptions options)
public static Output<GetControlPolicyAttachmentsResult> getControlPolicyAttachments(GetControlPolicyAttachmentsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:resourcemanager/getControlPolicyAttachments:getControlPolicyAttachments
arguments:
# arguments dictionaryThe following arguments are supported:
- Target
Id string - The Id of target.
- Language string
- The language. Valid value
zh-CN,en, andja. Default valuezh-CN - Output
File string - File name where to save data source results (after running
pulumi preview). - Policy
Type string - The policy type of control policy. Valid values:
CustomandSystem.
- Target
Id string - The Id of target.
- Language string
- The language. Valid value
zh-CN,en, andja. Default valuezh-CN - Output
File string - File name where to save data source results (after running
pulumi preview). - Policy
Type string - The policy type of control policy. Valid values:
CustomandSystem.
- target
Id String - The Id of target.
- language String
- The language. Valid value
zh-CN,en, andja. Default valuezh-CN - output
File String - File name where to save data source results (after running
pulumi preview). - policy
Type String - The policy type of control policy. Valid values:
CustomandSystem.
- target
Id string - The Id of target.
- language string
- The language. Valid value
zh-CN,en, andja. Default valuezh-CN - output
File string - File name where to save data source results (after running
pulumi preview). - policy
Type string - The policy type of control policy. Valid values:
CustomandSystem.
- target_
id str - The Id of target.
- language str
- The language. Valid value
zh-CN,en, andja. Default valuezh-CN - output_
file str - File name where to save data source results (after running
pulumi preview). - policy_
type str - The policy type of control policy. Valid values:
CustomandSystem.
- target
Id String - The Id of target.
- language String
- The language. Valid value
zh-CN,en, andja. Default valuezh-CN - output
File String - File name where to save data source results (after running
pulumi preview). - policy
Type String - The policy type of control policy. Valid values:
CustomandSystem.
getControlPolicyAttachments Result
The following output properties are available:
- Attachments
List<Pulumi.
Ali Cloud. Resource Manager. Outputs. Get Control Policy Attachments Attachment> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Target
Id string - Language string
- Output
File string - Policy
Type string
- Attachments
[]Get
Control Policy Attachments Attachment - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Target
Id string - Language string
- Output
File string - Policy
Type string
- attachments
List<Get
Control Policy Attachments Attachment> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- target
Id String - language String
- output
File String - policy
Type String
- attachments
Get
Control Policy Attachments Attachment[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- target
Id string - language string
- output
File string - policy
Type string
- attachments
Sequence[Get
Control Policy Attachments Attachment] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- target_
id str - language str
- output_
file str - policy_
type str
- attachments List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- target
Id String - language String
- output
File String - policy
Type String
Supporting Types
GetControlPolicyAttachmentsAttachment
- Attach
Date string - The attach date.
- Description string
- The description of policy.
- Id string
- The ID of the Control Policy Attachment.
- Policy
Id string - The ID of policy.
- Policy
Name string - The name of policy.
- Policy
Type string - The type of policy.
- Attach
Date string - The attach date.
- Description string
- The description of policy.
- Id string
- The ID of the Control Policy Attachment.
- Policy
Id string - The ID of policy.
- Policy
Name string - The name of policy.
- Policy
Type string - The type of policy.
- attach
Date String - The attach date.
- description String
- The description of policy.
- id String
- The ID of the Control Policy Attachment.
- policy
Id String - The ID of policy.
- policy
Name String - The name of policy.
- policy
Type String - The type of policy.
- attach
Date string - The attach date.
- description string
- The description of policy.
- id string
- The ID of the Control Policy Attachment.
- policy
Id string - The ID of policy.
- policy
Name string - The name of policy.
- policy
Type string - The type of policy.
- attach_
date str - The attach date.
- description str
- The description of policy.
- id str
- The ID of the Control Policy Attachment.
- policy_
id str - The ID of policy.
- policy_
name str - The name of policy.
- policy_
type str - The type of policy.
- attach
Date String - The attach date.
- description String
- The description of policy.
- id String
- The ID of the Control Policy Attachment.
- policy
Id String - The ID of policy.
- policy
Name String - The name of policy.
- policy
Type String - The type of policy.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
