1. Packages
  2. Volcengine
  3. API Docs
  4. iam
  5. UserPolicyAttachments
Volcengine v0.0.45 published on Tuesday, Feb 10, 2026 by Volcengine
volcengine logo
Volcengine v0.0.45 published on Tuesday, Feb 10, 2026 by Volcengine
    Deprecated: volcengine.iam.UserPolicyAttachments has been deprecated in favor of volcengine.iam.getUserPolicyAttachments

    Use this data source to query detailed information of iam user policy attachments

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const default = volcengine.iam.getUserPolicyAttachments({
        userName: "jonny",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    default = volcengine.iam.get_user_policy_attachments(user_name="jonny")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/iam"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := iam.GetUserPolicyAttachments(ctx, &iam.GetUserPolicyAttachmentsArgs{
    			UserName: "jonny",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Volcengine.Iam.GetUserPolicyAttachments.Invoke(new()
        {
            UserName = "jonny",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.iam.IamFunctions;
    import com.pulumi.volcengine.iam.inputs.GetUserPolicyAttachmentsArgs;
    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 default = IamFunctions.getUserPolicyAttachments(GetUserPolicyAttachmentsArgs.builder()
                .userName("jonny")
                .build());
    
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: volcengine:iam:getUserPolicyAttachments
          Arguments:
            userName: jonny
    

    Using UserPolicyAttachments

    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 userPolicyAttachments(args: UserPolicyAttachmentsArgs, opts?: InvokeOptions): Promise<UserPolicyAttachmentsResult>
    function userPolicyAttachmentsOutput(args: UserPolicyAttachmentsOutputArgs, opts?: InvokeOptions): Output<UserPolicyAttachmentsResult>
    def user_policy_attachments(user_name: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> UserPolicyAttachmentsResult
    def user_policy_attachments_output(user_name: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[UserPolicyAttachmentsResult]
    func UserPolicyAttachments(ctx *Context, args *UserPolicyAttachmentsArgs, opts ...InvokeOption) (*UserPolicyAttachmentsResult, error)
    func UserPolicyAttachmentsOutput(ctx *Context, args *UserPolicyAttachmentsOutputArgs, opts ...InvokeOption) UserPolicyAttachmentsResultOutput
    public static class UserPolicyAttachments 
    {
        public static Task<UserPolicyAttachmentsResult> InvokeAsync(UserPolicyAttachmentsArgs args, InvokeOptions? opts = null)
        public static Output<UserPolicyAttachmentsResult> Invoke(UserPolicyAttachmentsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<UserPolicyAttachmentsResult> userPolicyAttachments(UserPolicyAttachmentsArgs args, InvokeOptions options)
    public static Output<UserPolicyAttachmentsResult> userPolicyAttachments(UserPolicyAttachmentsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:iam:UserPolicyAttachments
      arguments:
        # arguments dictionary

    The following arguments are supported:

    UserName string
    The name of the user.
    UserName string
    The name of the user.
    userName String
    The name of the user.
    userName string
    The name of the user.
    user_name str
    The name of the user.
    userName String
    The name of the user.

    UserPolicyAttachments Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Policies List<UserPolicyAttachmentsPolicy>
    The collection of policies.
    UserName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Policies []UserPolicyAttachmentsPolicy
    The collection of policies.
    UserName string
    id String
    The provider-assigned unique ID for this managed resource.
    policies List<UserPolicyAttachmentsPolicy>
    The collection of policies.
    userName String
    id string
    The provider-assigned unique ID for this managed resource.
    policies UserPolicyAttachmentsPolicy[]
    The collection of policies.
    userName string
    id str
    The provider-assigned unique ID for this managed resource.
    policies Sequence[UserPolicyAttachmentsPolicy]
    The collection of policies.
    user_name str
    id String
    The provider-assigned unique ID for this managed resource.
    policies List<Property Map>
    The collection of policies.
    userName String

    Supporting Types

    UserPolicyAttachmentsPolicy

    AttachDate string
    The attach date of the policy scope.
    Description string
    The description of the policy.
    PolicyName string
    The name of the policy.
    PolicyScopes List<UserPolicyAttachmentsPolicyPolicyScope>
    The scope of the policy.
    PolicyTrn string
    The trn of the policy.
    PolicyType string
    The type of the policy.
    AttachDate string
    The attach date of the policy scope.
    Description string
    The description of the policy.
    PolicyName string
    The name of the policy.
    PolicyScopes []UserPolicyAttachmentsPolicyPolicyScope
    The scope of the policy.
    PolicyTrn string
    The trn of the policy.
    PolicyType string
    The type of the policy.
    attachDate String
    The attach date of the policy scope.
    description String
    The description of the policy.
    policyName String
    The name of the policy.
    policyScopes List<UserPolicyAttachmentsPolicyPolicyScope>
    The scope of the policy.
    policyTrn String
    The trn of the policy.
    policyType String
    The type of the policy.
    attachDate string
    The attach date of the policy scope.
    description string
    The description of the policy.
    policyName string
    The name of the policy.
    policyScopes UserPolicyAttachmentsPolicyPolicyScope[]
    The scope of the policy.
    policyTrn string
    The trn of the policy.
    policyType string
    The type of the policy.
    attach_date str
    The attach date of the policy scope.
    description str
    The description of the policy.
    policy_name str
    The name of the policy.
    policy_scopes Sequence[UserPolicyAttachmentsPolicyPolicyScope]
    The scope of the policy.
    policy_trn str
    The trn of the policy.
    policy_type str
    The type of the policy.
    attachDate String
    The attach date of the policy scope.
    description String
    The description of the policy.
    policyName String
    The name of the policy.
    policyScopes List<Property Map>
    The scope of the policy.
    policyTrn String
    The trn of the policy.
    policyType String
    The type of the policy.

    UserPolicyAttachmentsPolicyPolicyScope

    AttachDate string
    The attach date of the policy scope.
    PolicyScopeType string
    The type of the policy scope.
    ProjectDisplayName string
    The display name of the project.
    ProjectName string
    The name of the project.
    AttachDate string
    The attach date of the policy scope.
    PolicyScopeType string
    The type of the policy scope.
    ProjectDisplayName string
    The display name of the project.
    ProjectName string
    The name of the project.
    attachDate String
    The attach date of the policy scope.
    policyScopeType String
    The type of the policy scope.
    projectDisplayName String
    The display name of the project.
    projectName String
    The name of the project.
    attachDate string
    The attach date of the policy scope.
    policyScopeType string
    The type of the policy scope.
    projectDisplayName string
    The display name of the project.
    projectName string
    The name of the project.
    attach_date str
    The attach date of the policy scope.
    policy_scope_type str
    The type of the policy scope.
    project_display_name str
    The display name of the project.
    project_name str
    The name of the project.
    attachDate String
    The attach date of the policy scope.
    policyScopeType String
    The type of the policy scope.
    projectDisplayName String
    The display name of the project.
    projectName String
    The name of the project.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.45 published on Tuesday, Feb 10, 2026 by Volcengine
      Meet Neo: Your AI Platform Teammate