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

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",
});
Copy
import pulumi
import pulumi_sonarqube as sonarqube

main = sonarqube.get_qualitygate(name="example")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  main:
    fn::invoke:
      function: sonarqube:getQualitygate
      arguments:
        name: example
Copy

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>
Copy
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]
Copy
func LookupQualitygate(ctx *Context, args *LookupQualitygateArgs, opts ...InvokeOption) (*LookupQualitygateResult, error)
func LookupQualitygateOutput(ctx *Context, args *LookupQualitygateOutputArgs, opts ...InvokeOption) LookupQualitygateResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetQualitygateResult> getQualitygate(GetQualitygateArgs args, InvokeOptions options)
public static Output<GetQualitygateResult> getQualitygate(GetQualitygateArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: sonarqube:index/getQualitygate:getQualitygate
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the Quality Gate.
Id string
The ID of this resource.
Name This property is required. string
The name of the Quality Gate.
Id string
The ID of this resource.
name This property is required. String
The name of the Quality Gate.
id String
The ID of this resource.
name This property is required. string
The name of the Quality Gate.
id string
The ID of this resource.
name This property is required. str
The name of the Quality Gate.
id str
The ID of this resource.
name This property is required. 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 This property is required. string
Metric This property is required. string
Op This property is required. string
Threshold This property is required. string
Id This property is required. string
Metric This property is required. string
Op This property is required. string
Threshold This property is required. string
id This property is required. String
metric This property is required. String
op This property is required. String
threshold This property is required. String
id This property is required. string
metric This property is required. string
op This property is required. string
threshold This property is required. string
id This property is required. str
metric This property is required. str
op This property is required. str
threshold This property is required. str
id This property is required. String
metric This property is required. String
op This property is required. String
threshold This property is required. String

Package Details

Repository
sonarqube jdamata/terraform-provider-sonarqube
License
Notes
This Pulumi package is based on the sonarqube Terraform Provider.