1. Packages
  2. Sonarqube Provider
  3. API Docs
  4. getQualitygate
sonarqube 0.16.14 published on Monday, Apr 14, 2025 by jdamata

sonarqube.getQualitygate

Explore with Pulumi AI

sonarqube logo
sonarqube 0.16.14 published on Monday, Apr 14, 2025 by jdamata

    Use this data source to get a Sonarqube qualitygate resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sonarqube from "@pulumi/sonarqube";
    
    const main = sonarqube.getQualitygate({
        name: "example",
    });
    
    import pulumi
    import pulumi_sonarqube as sonarqube
    
    main = sonarqube.get_qualitygate(name="example")
    
    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.LookupQualitygate(ctx, &sonarqube.LookupQualitygateArgs{
    			Name: "example",
    		}, 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 main = Sonarqube.GetQualitygate.Invoke(new()
        {
            Name = "example",
        });
    
    });
    
    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.GetQualitygateArgs;
    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 main = SonarqubeFunctions.getQualitygate(GetQualitygateArgs.builder()
                .name("example")
                .build());
    
        }
    }
    
    variables:
      main:
        fn::invoke:
          function: sonarqube:getQualitygate
          arguments:
            name: example
    

    Using getQualitygate

    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 getQualitygate(args: GetQualitygateArgs, opts?: InvokeOptions): Promise<GetQualitygateResult>
    function getQualitygateOutput(args: GetQualitygateOutputArgs, opts?: InvokeOptions): Output<GetQualitygateResult>
    def get_qualitygate(id: Optional[str] = None,
                        name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetQualitygateResult
    def get_qualitygate_output(id: Optional[pulumi.Input[str]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetQualitygateResult]
    func LookupQualitygate(ctx *Context, args *LookupQualitygateArgs, opts ...InvokeOption) (*LookupQualitygateResult, error)
    func LookupQualitygateOutput(ctx *Context, args *LookupQualitygateOutputArgs, opts ...InvokeOption) LookupQualitygateResultOutput

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

    public static class GetQualitygate 
    {
        public static Task<GetQualitygateResult> InvokeAsync(GetQualitygateArgs args, InvokeOptions? opts = null)
        public static Output<GetQualitygateResult> Invoke(GetQualitygateInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetQualitygateResult> getQualitygate(GetQualitygateArgs args, InvokeOptions options)
    public static Output<GetQualitygateResult> getQualitygate(GetQualitygateArgs args, InvokeOptions options)
    
    fn::invoke:
      function: sonarqube:index/getQualitygate:getQualitygate
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Quality Gate.
    Id string
    The ID of this resource.
    Name string
    The name of the Quality Gate.
    Id string
    The ID of this resource.
    name String
    The name of the Quality Gate.
    id String
    The ID of this resource.
    name string
    The name of the Quality Gate.
    id string
    The ID of this resource.
    name str
    The name of the Quality Gate.
    id str
    The ID of this resource.
    name String
    The name of the Quality Gate.
    id String
    The ID of this resource.

    getQualitygate Result

    The following output properties are available:

    Conditions List<GetQualitygateCondition>
    List of Quality Gate conditions.
    CopyFrom string
    Origin of the Quality Gate
    Id string
    The ID of this resource.
    IsDefault bool
    Quality Gate default.
    Name string
    The name of the Quality Gate.
    Conditions []GetQualitygateCondition
    List of Quality Gate conditions.
    CopyFrom string
    Origin of the Quality Gate
    Id string
    The ID of this resource.
    IsDefault bool
    Quality Gate default.
    Name string
    The name of the Quality Gate.
    conditions List<GetQualitygateCondition>
    List of Quality Gate conditions.
    copyFrom String
    Origin of the Quality Gate
    id String
    The ID of this resource.
    isDefault Boolean
    Quality Gate default.
    name String
    The name of the Quality Gate.
    conditions GetQualitygateCondition[]
    List of Quality Gate conditions.
    copyFrom string
    Origin of the Quality Gate
    id string
    The ID of this resource.
    isDefault boolean
    Quality Gate default.
    name string
    The name of the Quality Gate.
    conditions Sequence[GetQualitygateCondition]
    List of Quality Gate conditions.
    copy_from str
    Origin of the Quality Gate
    id str
    The ID of this resource.
    is_default bool
    Quality Gate default.
    name str
    The name of the Quality Gate.
    conditions List<Property Map>
    List of Quality Gate conditions.
    copyFrom String
    Origin of the Quality Gate
    id String
    The ID of this resource.
    isDefault Boolean
    Quality Gate default.
    name String
    The name of the Quality Gate.

    Supporting Types

    GetQualitygateCondition

    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.14 published on Monday, Apr 14, 2025 by jdamata