1. Packages
  2. Sonarqube Provider
  3. API Docs
  4. getQualityprofileActiveRules
Viewing docs for sonarqube 0.16.19
published on Friday, Mar 20, 2026 by jdamata
sonarqube logo
Viewing docs for sonarqube 0.16.19
published on Friday, Mar 20, 2026 by jdamata

    Use this data source to list active rules on a Sonarqube quality profile.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sonarqube from "@pulumi/sonarqube";
    
    const example = sonarqube.getQualityprofileActiveRules({
        key: "my-quality-profile-key",
    });
    
    import pulumi
    import pulumi_sonarqube as sonarqube
    
    example = sonarqube.get_qualityprofile_active_rules(key="my-quality-profile-key")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/sonarqube/sonarqube"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sonarqube.GetQualityprofileActiveRules(ctx, &sonarqube.GetQualityprofileActiveRulesArgs{
    			Key: "my-quality-profile-key",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Sonarqube = Pulumi.Sonarqube;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Sonarqube.GetQualityprofileActiveRules.Invoke(new()
        {
            Key = "my-quality-profile-key",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sonarqube.SonarqubeFunctions;
    import com.pulumi.sonarqube.inputs.GetQualityprofileActiveRulesArgs;
    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 = SonarqubeFunctions.getQualityprofileActiveRules(GetQualityprofileActiveRulesArgs.builder()
                .key("my-quality-profile-key")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: sonarqube:getQualityprofileActiveRules
          arguments:
            key: my-quality-profile-key
    

    Using getQualityprofileActiveRules

    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 getQualityprofileActiveRules(args: GetQualityprofileActiveRulesArgs, opts?: InvokeOptions): Promise<GetQualityprofileActiveRulesResult>
    function getQualityprofileActiveRulesOutput(args: GetQualityprofileActiveRulesOutputArgs, opts?: InvokeOptions): Output<GetQualityprofileActiveRulesResult>
    def get_qualityprofile_active_rules(id: Optional[str] = None,
                                        key: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetQualityprofileActiveRulesResult
    def get_qualityprofile_active_rules_output(id: Optional[pulumi.Input[str]] = None,
                                        key: Optional[pulumi.Input[str]] = None,
                                        opts: Optional[InvokeOptions] = None) -> Output[GetQualityprofileActiveRulesResult]
    func GetQualityprofileActiveRules(ctx *Context, args *GetQualityprofileActiveRulesArgs, opts ...InvokeOption) (*GetQualityprofileActiveRulesResult, error)
    func GetQualityprofileActiveRulesOutput(ctx *Context, args *GetQualityprofileActiveRulesOutputArgs, opts ...InvokeOption) GetQualityprofileActiveRulesResultOutput

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

    public static class GetQualityprofileActiveRules 
    {
        public static Task<GetQualityprofileActiveRulesResult> InvokeAsync(GetQualityprofileActiveRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetQualityprofileActiveRulesResult> Invoke(GetQualityprofileActiveRulesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetQualityprofileActiveRulesResult> getQualityprofileActiveRules(GetQualityprofileActiveRulesArgs args, InvokeOptions options)
    public static Output<GetQualityprofileActiveRulesResult> getQualityprofileActiveRules(GetQualityprofileActiveRulesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: sonarqube:index/getQualityprofileActiveRules:getQualityprofileActiveRules
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Key string
    Quality Profile key. Can be obtained through api/qualityprofiles/search.
    Id string
    The ID of this resource.
    Key string
    Quality Profile key. Can be obtained through api/qualityprofiles/search.
    Id string
    The ID of this resource.
    key String
    Quality Profile key. Can be obtained through api/qualityprofiles/search.
    id String
    The ID of this resource.
    key string
    Quality Profile key. Can be obtained through api/qualityprofiles/search.
    id string
    The ID of this resource.
    key str
    Quality Profile key. Can be obtained through api/qualityprofiles/search.
    id str
    The ID of this resource.
    key String
    Quality Profile key. Can be obtained through api/qualityprofiles/search.
    id String
    The ID of this resource.

    getQualityprofileActiveRules Result

    The following output properties are available:

    Id string
    The ID of this resource.
    Key string
    Quality Profile key. Can be obtained through api/qualityprofiles/search.
    Rules List<GetQualityprofileActiveRulesRule>
    List of active rules for the quality profile.
    Id string
    The ID of this resource.
    Key string
    Quality Profile key. Can be obtained through api/qualityprofiles/search.
    Rules []GetQualityprofileActiveRulesRule
    List of active rules for the quality profile.
    id String
    The ID of this resource.
    key String
    Quality Profile key. Can be obtained through api/qualityprofiles/search.
    rules List<GetQualityprofileActiveRulesRule>
    List of active rules for the quality profile.
    id string
    The ID of this resource.
    key string
    Quality Profile key. Can be obtained through api/qualityprofiles/search.
    rules GetQualityprofileActiveRulesRule[]
    List of active rules for the quality profile.
    id str
    The ID of this resource.
    key str
    Quality Profile key. Can be obtained through api/qualityprofiles/search.
    rules Sequence[GetQualityprofileActiveRulesRule]
    List of active rules for the quality profile.
    id String
    The ID of this resource.
    key String
    Quality Profile key. Can be obtained through api/qualityprofiles/search.
    rules List<Property Map>
    List of active rules for the quality profile.

    Supporting Types

    GetQualityprofileActiveRulesRule

    Key string
    Language string
    Name string
    Repo string
    Severity string
    Status string
    Type string
    Key string
    Language string
    Name string
    Repo string
    Severity string
    Status string
    Type string
    key String
    language String
    name String
    repo String
    severity String
    status String
    type String
    key string
    language string
    name string
    repo string
    severity string
    status string
    type string
    key str
    language str
    name str
    repo str
    severity str
    status str
    type str
    key String
    language String
    name String
    repo String
    severity String
    status String
    type String

    Package Details

    Repository
    sonarqube jdamata/terraform-provider-sonarqube
    License
    Notes
    This Pulumi package is based on the sonarqube Terraform Provider.
    sonarqube logo
    Viewing docs for sonarqube 0.16.19
    published on Friday, Mar 20, 2026 by jdamata
      Try Pulumi Cloud free. Your team will thank you.