1. Packages
  2. Volcengine
  3. API Docs
  4. iam
  5. getPolicies
Viewing docs for Volcengine v0.0.46
published on Friday, Feb 27, 2026 by Volcengine
volcengine logo
Viewing docs for Volcengine v0.0.46
published on Friday, Feb 27, 2026 by Volcengine

    Use this data source to query detailed information of iam policies

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const default = volcengine.iam.getPolicies({
        scope: "Custom",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    default = volcengine.iam.get_policies(scope="Custom")
    
    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.GetPolicies(ctx, &iam.GetPoliciesArgs{
    			Scope: pulumi.StringRef("Custom"),
    		}, 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.GetPolicies.Invoke(new()
        {
            Scope = "Custom",
        });
    
    });
    
    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.GetPoliciesArgs;
    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.getPolicies(GetPoliciesArgs.builder()
                .scope("Custom")
                .build());
    
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: volcengine:iam:getPolicies
          Arguments:
            scope: Custom
    

    Using getPolicies

    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 getPolicies(args: GetPoliciesArgs, opts?: InvokeOptions): Promise<GetPoliciesResult>
    function getPoliciesOutput(args: GetPoliciesOutputArgs, opts?: InvokeOptions): Output<GetPoliciesResult>
    def get_policies(output_file: Optional[str] = None,
                     scope: Optional[str] = None,
                     with_service_role_policy: Optional[int] = None,
                     opts: Optional[InvokeOptions] = None) -> GetPoliciesResult
    def get_policies_output(output_file: Optional[pulumi.Input[str]] = None,
                     scope: Optional[pulumi.Input[str]] = None,
                     with_service_role_policy: Optional[pulumi.Input[int]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetPoliciesResult]
    func GetPolicies(ctx *Context, args *GetPoliciesArgs, opts ...InvokeOption) (*GetPoliciesResult, error)
    func GetPoliciesOutput(ctx *Context, args *GetPoliciesOutputArgs, opts ...InvokeOption) GetPoliciesResultOutput

    > Note: This function is named GetPolicies in the Go SDK.

    public static class GetPolicies 
    {
        public static Task<GetPoliciesResult> InvokeAsync(GetPoliciesArgs args, InvokeOptions? opts = null)
        public static Output<GetPoliciesResult> Invoke(GetPoliciesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPoliciesResult> getPolicies(GetPoliciesArgs args, InvokeOptions options)
    public static Output<GetPoliciesResult> getPolicies(GetPoliciesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:iam/getPolicies:getPolicies
      arguments:
        # arguments dictionary

    The following arguments are supported:

    OutputFile string
    File name where to save data source results.
    Scope string
    The scope of the Policy.
    WithServiceRolePolicy int
    Whether to return the service role policy.
    OutputFile string
    File name where to save data source results.
    Scope string
    The scope of the Policy.
    WithServiceRolePolicy int
    Whether to return the service role policy.
    outputFile String
    File name where to save data source results.
    scope String
    The scope of the Policy.
    withServiceRolePolicy Integer
    Whether to return the service role policy.
    outputFile string
    File name where to save data source results.
    scope string
    The scope of the Policy.
    withServiceRolePolicy number
    Whether to return the service role policy.
    output_file str
    File name where to save data source results.
    scope str
    The scope of the Policy.
    with_service_role_policy int
    Whether to return the service role policy.
    outputFile String
    File name where to save data source results.
    scope String
    The scope of the Policy.
    withServiceRolePolicy Number
    Whether to return the service role policy.

    getPolicies Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Policies List<GetPoliciesPolicy>
    The collection of Policy query.
    TotalCount int
    The total count of Policy query.
    OutputFile string
    Scope string
    WithServiceRolePolicy int
    Id string
    The provider-assigned unique ID for this managed resource.
    Policies []GetPoliciesPolicy
    The collection of Policy query.
    TotalCount int
    The total count of Policy query.
    OutputFile string
    Scope string
    WithServiceRolePolicy int
    id String
    The provider-assigned unique ID for this managed resource.
    policies List<GetPoliciesPolicy>
    The collection of Policy query.
    totalCount Integer
    The total count of Policy query.
    outputFile String
    scope String
    withServiceRolePolicy Integer
    id string
    The provider-assigned unique ID for this managed resource.
    policies GetPoliciesPolicy[]
    The collection of Policy query.
    totalCount number
    The total count of Policy query.
    outputFile string
    scope string
    withServiceRolePolicy number
    id str
    The provider-assigned unique ID for this managed resource.
    policies Sequence[GetPoliciesPolicy]
    The collection of Policy query.
    total_count int
    The total count of Policy query.
    output_file str
    scope str
    with_service_role_policy int
    id String
    The provider-assigned unique ID for this managed resource.
    policies List<Property Map>
    The collection of Policy query.
    totalCount Number
    The total count of Policy query.
    outputFile String
    scope String
    withServiceRolePolicy Number

    Supporting Types

    GetPoliciesPolicy

    AttachmentCount int
    The attachment count of the Policy.
    Category string
    The category of the Policy.
    CreateDate string
    The create time of the Policy.
    Description string
    The description of the Policy.
    Id string
    The ID of the Policy.
    IsServiceRolePolicy int
    Whether the Policy is a service role policy.
    PolicyDocument string
    The document of the Policy.
    PolicyName string
    The name of the Policy.
    PolicyTrn string
    The resource name of the Policy.
    PolicyType string
    The type of the Policy.
    UpdateDate string
    The update time of the Policy.
    AttachmentCount int
    The attachment count of the Policy.
    Category string
    The category of the Policy.
    CreateDate string
    The create time of the Policy.
    Description string
    The description of the Policy.
    Id string
    The ID of the Policy.
    IsServiceRolePolicy int
    Whether the Policy is a service role policy.
    PolicyDocument string
    The document of the Policy.
    PolicyName string
    The name of the Policy.
    PolicyTrn string
    The resource name of the Policy.
    PolicyType string
    The type of the Policy.
    UpdateDate string
    The update time of the Policy.
    attachmentCount Integer
    The attachment count of the Policy.
    category String
    The category of the Policy.
    createDate String
    The create time of the Policy.
    description String
    The description of the Policy.
    id String
    The ID of the Policy.
    isServiceRolePolicy Integer
    Whether the Policy is a service role policy.
    policyDocument String
    The document of the Policy.
    policyName String
    The name of the Policy.
    policyTrn String
    The resource name of the Policy.
    policyType String
    The type of the Policy.
    updateDate String
    The update time of the Policy.
    attachmentCount number
    The attachment count of the Policy.
    category string
    The category of the Policy.
    createDate string
    The create time of the Policy.
    description string
    The description of the Policy.
    id string
    The ID of the Policy.
    isServiceRolePolicy number
    Whether the Policy is a service role policy.
    policyDocument string
    The document of the Policy.
    policyName string
    The name of the Policy.
    policyTrn string
    The resource name of the Policy.
    policyType string
    The type of the Policy.
    updateDate string
    The update time of the Policy.
    attachment_count int
    The attachment count of the Policy.
    category str
    The category of the Policy.
    create_date str
    The create time of the Policy.
    description str
    The description of the Policy.
    id str
    The ID of the Policy.
    is_service_role_policy int
    Whether the Policy is a service role policy.
    policy_document str
    The document of the Policy.
    policy_name str
    The name of the Policy.
    policy_trn str
    The resource name of the Policy.
    policy_type str
    The type of the Policy.
    update_date str
    The update time of the Policy.
    attachmentCount Number
    The attachment count of the Policy.
    category String
    The category of the Policy.
    createDate String
    The create time of the Policy.
    description String
    The description of the Policy.
    id String
    The ID of the Policy.
    isServiceRolePolicy Number
    Whether the Policy is a service role policy.
    policyDocument String
    The document of the Policy.
    policyName String
    The name of the Policy.
    policyTrn String
    The resource name of the Policy.
    policyType String
    The type of the Policy.
    updateDate String
    The update time of the Policy.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Viewing docs for Volcengine v0.0.46
    published on Friday, Feb 27, 2026 by Volcengine
      Try Pulumi Cloud free. Your team will thank you.