1. Packages
  2. Sonarqube Provider
  3. API Docs
  4. getQualitygates
sonarqube 0.16.15 published on Sunday, May 18, 2025 by jdamata

sonarqube.getQualitygates

Explore with Pulumi AI

sonarqube logo
sonarqube 0.16.15 published on Sunday, May 18, 2025 by jdamata

    Use this data source to get Sonarqube quality gates resources

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sonarqube from "@pulumi/sonarqube";
    
    const qualitygates = sonarqube.getQualitygates({});
    const qualitygatesSonarway = sonarqube.getQualitygates({
        ignoreMissing: true,
        name: "Sonar way",
    });
    
    import pulumi
    import pulumi_sonarqube as sonarqube
    
    qualitygates = sonarqube.get_qualitygates()
    qualitygates_sonarway = sonarqube.get_qualitygates(ignore_missing=True,
        name="Sonar way")
    
    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.GetQualitygates(ctx, &sonarqube.GetQualitygatesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = sonarqube.GetQualitygates(ctx, &sonarqube.GetQualitygatesArgs{
    			IgnoreMissing: pulumi.BoolRef(true),
    			Name:          "Sonar way",
    		}, 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 qualitygates = Sonarqube.GetQualitygates.Invoke();
    
        var qualitygatesSonarway = Sonarqube.GetQualitygates.Invoke(new()
        {
            IgnoreMissing = true,
            Name = "Sonar way",
        });
    
    });
    
    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.GetQualitygatesArgs;
    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 qualitygates = SonarqubeFunctions.getQualitygates();
    
            final var qualitygatesSonarway = SonarqubeFunctions.getQualitygates(GetQualitygatesArgs.builder()
                .ignoreMissing(true)
                .name("Sonar way")
                .build());
    
        }
    }
    
    variables:
      qualitygates:
        fn::invoke:
          function: sonarqube:getQualitygates
          arguments: {}
      qualitygatesSonarway:
        fn::invoke:
          function: sonarqube:getQualitygates
          arguments:
            ignoreMissing: true
            name: Sonar way
    

    Using getQualitygates

    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 getQualitygates(args: GetQualitygatesArgs, opts?: InvokeOptions): Promise<GetQualitygatesResult>
    function getQualitygatesOutput(args: GetQualitygatesOutputArgs, opts?: InvokeOptions): Output<GetQualitygatesResult>
    def get_qualitygates(id: Optional[str] = None,
                         ignore_missing: Optional[bool] = None,
                         name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetQualitygatesResult
    def get_qualitygates_output(id: Optional[pulumi.Input[str]] = None,
                         ignore_missing: Optional[pulumi.Input[bool]] = None,
                         name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetQualitygatesResult]
    func GetQualitygates(ctx *Context, args *GetQualitygatesArgs, opts ...InvokeOption) (*GetQualitygatesResult, error)
    func GetQualitygatesOutput(ctx *Context, args *GetQualitygatesOutputArgs, opts ...InvokeOption) GetQualitygatesResultOutput

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

    public static class GetQualitygates 
    {
        public static Task<GetQualitygatesResult> InvokeAsync(GetQualitygatesArgs args, InvokeOptions? opts = null)
        public static Output<GetQualitygatesResult> Invoke(GetQualitygatesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetQualitygatesResult> getQualitygates(GetQualitygatesArgs args, InvokeOptions options)
    public static Output<GetQualitygatesResult> getQualitygates(GetQualitygatesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: sonarqube:index/getQualitygates:getQualitygates
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Search quality gates by name.
    Id string
    The ID of this resource.
    IgnoreMissing bool
    If set to true, the data source will not fail if the quality gate does not exist.
    Name string
    Search quality gates by name.
    Id string
    The ID of this resource.
    IgnoreMissing bool
    If set to true, the data source will not fail if the quality gate does not exist.
    name String
    Search quality gates by name.
    id String
    The ID of this resource.
    ignoreMissing Boolean
    If set to true, the data source will not fail if the quality gate does not exist.
    name string
    Search quality gates by name.
    id string
    The ID of this resource.
    ignoreMissing boolean
    If set to true, the data source will not fail if the quality gate does not exist.
    name str
    Search quality gates by name.
    id str
    The ID of this resource.
    ignore_missing bool
    If set to true, the data source will not fail if the quality gate does not exist.
    name String
    Search quality gates by name.
    id String
    The ID of this resource.
    ignoreMissing Boolean
    If set to true, the data source will not fail if the quality gate does not exist.

    getQualitygates Result

    The following output properties are available:

    Id string
    The ID of this resource.
    Name string
    Search quality gates by name.
    QualityGates List<GetQualitygatesQualityGate>
    The list of quality gates.
    IgnoreMissing bool
    If set to true, the data source will not fail if the quality gate does not exist.
    Id string
    The ID of this resource.
    Name string
    Search quality gates by name.
    QualityGates []GetQualitygatesQualityGate
    The list of quality gates.
    IgnoreMissing bool
    If set to true, the data source will not fail if the quality gate does not exist.
    id String
    The ID of this resource.
    name String
    Search quality gates by name.
    qualityGates List<GetQualitygatesQualityGate>
    The list of quality gates.
    ignoreMissing Boolean
    If set to true, the data source will not fail if the quality gate does not exist.
    id string
    The ID of this resource.
    name string
    Search quality gates by name.
    qualityGates GetQualitygatesQualityGate[]
    The list of quality gates.
    ignoreMissing boolean
    If set to true, the data source will not fail if the quality gate does not exist.
    id str
    The ID of this resource.
    name str
    Search quality gates by name.
    quality_gates Sequence[GetQualitygatesQualityGate]
    The list of quality gates.
    ignore_missing bool
    If set to true, the data source will not fail if the quality gate does not exist.
    id String
    The ID of this resource.
    name String
    Search quality gates by name.
    qualityGates List<Property Map>
    The list of quality gates.
    ignoreMissing Boolean
    If set to true, the data source will not fail if the quality gate does not exist.

    Supporting Types

    GetQualitygatesQualityGate

    GetQualitygatesQualityGateCondition

    Id string
    Metric string
    Op string
    Threshold string
    Id string
    Metric string
    Op string
    Threshold string
    id String
    metric String
    op String
    threshold String
    id string
    metric string
    op string
    threshold string
    id str
    metric str
    op str
    threshold str
    id String
    metric String
    op String
    threshold String

    Package Details

    Repository
    sonarqube jdamata/terraform-provider-sonarqube
    License
    Notes
    This Pulumi package is based on the sonarqube Terraform Provider.
    sonarqube logo
    sonarqube 0.16.15 published on Sunday, May 18, 2025 by jdamata