1. Packages
  2. Azure DevOps Provider
  3. API Docs
  4. getServiceendpointSonarcloud
Azure DevOps v3.8.0 published on Monday, Mar 17, 2025 by Pulumi

azuredevops.getServiceendpointSonarcloud

Explore with Pulumi AI

Use this data source to access information about an existing Sonar Cloud Service Endpoint.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const example = azuredevops.getServiceendpointSonarcloud({
    projectId: exampleAzuredevopsProject.id,
    serviceEndpointName: "Example Sonar Cloud",
});
export const serviceEndpointId = example.then(example => example.id);
Copy
import pulumi
import pulumi_azuredevops as azuredevops

example = azuredevops.get_serviceendpoint_sonarcloud(project_id=example_azuredevops_project["id"],
    service_endpoint_name="Example Sonar Cloud")
pulumi.export("serviceEndpointId", example.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := azuredevops.GetServiceendpointSonarcloud(ctx, &azuredevops.GetServiceendpointSonarcloudArgs{
			ProjectId:           exampleAzuredevopsProject.Id,
			ServiceEndpointName: pulumi.StringRef("Example Sonar Cloud"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("serviceEndpointId", example.Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;

return await Deployment.RunAsync(() => 
{
    var example = AzureDevOps.GetServiceendpointSonarcloud.Invoke(new()
    {
        ProjectId = exampleAzuredevopsProject.Id,
        ServiceEndpointName = "Example Sonar Cloud",
    });

    return new Dictionary<string, object?>
    {
        ["serviceEndpointId"] = example.Apply(getServiceendpointSonarcloudResult => getServiceendpointSonarcloudResult.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuredevops.AzuredevopsFunctions;
import com.pulumi.azuredevops.inputs.GetServiceendpointSonarcloudArgs;
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 = AzuredevopsFunctions.getServiceendpointSonarcloud(GetServiceendpointSonarcloudArgs.builder()
            .projectId(exampleAzuredevopsProject.id())
            .serviceEndpointName("Example Sonar Cloud")
            .build());

        ctx.export("serviceEndpointId", example.applyValue(getServiceendpointSonarcloudResult -> getServiceendpointSonarcloudResult.id()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azuredevops:getServiceendpointSonarcloud
      arguments:
        projectId: ${exampleAzuredevopsProject.id}
        serviceEndpointName: Example Sonar Cloud
outputs:
  serviceEndpointId: ${example.id}
Copy

Using getServiceendpointSonarcloud

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 getServiceendpointSonarcloud(args: GetServiceendpointSonarcloudArgs, opts?: InvokeOptions): Promise<GetServiceendpointSonarcloudResult>
function getServiceendpointSonarcloudOutput(args: GetServiceendpointSonarcloudOutputArgs, opts?: InvokeOptions): Output<GetServiceendpointSonarcloudResult>
Copy
def get_serviceendpoint_sonarcloud(project_id: Optional[str] = None,
                                   service_endpoint_id: Optional[str] = None,
                                   service_endpoint_name: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetServiceendpointSonarcloudResult
def get_serviceendpoint_sonarcloud_output(project_id: Optional[pulumi.Input[str]] = None,
                                   service_endpoint_id: Optional[pulumi.Input[str]] = None,
                                   service_endpoint_name: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetServiceendpointSonarcloudResult]
Copy
func GetServiceendpointSonarcloud(ctx *Context, args *GetServiceendpointSonarcloudArgs, opts ...InvokeOption) (*GetServiceendpointSonarcloudResult, error)
func GetServiceendpointSonarcloudOutput(ctx *Context, args *GetServiceendpointSonarcloudOutputArgs, opts ...InvokeOption) GetServiceendpointSonarcloudResultOutput
Copy

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

public static class GetServiceendpointSonarcloud 
{
    public static Task<GetServiceendpointSonarcloudResult> InvokeAsync(GetServiceendpointSonarcloudArgs args, InvokeOptions? opts = null)
    public static Output<GetServiceendpointSonarcloudResult> Invoke(GetServiceendpointSonarcloudInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetServiceendpointSonarcloudResult> getServiceendpointSonarcloud(GetServiceendpointSonarcloudArgs args, InvokeOptions options)
public static Output<GetServiceendpointSonarcloudResult> getServiceendpointSonarcloud(GetServiceendpointSonarcloudArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azuredevops:index/getServiceendpointSonarcloud:getServiceendpointSonarcloud
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ProjectId This property is required. string
The ID of the project.
ServiceEndpointId string
the ID of the Service Endpoint.
ServiceEndpointName string

the Name of the Service Endpoint.

NOTE: One of either service_endpoint_id or service_endpoint_name must be specified.

ProjectId This property is required. string
The ID of the project.
ServiceEndpointId string
the ID of the Service Endpoint.
ServiceEndpointName string

the Name of the Service Endpoint.

NOTE: One of either service_endpoint_id or service_endpoint_name must be specified.

projectId This property is required. String
The ID of the project.
serviceEndpointId String
the ID of the Service Endpoint.
serviceEndpointName String

the Name of the Service Endpoint.

NOTE: One of either service_endpoint_id or service_endpoint_name must be specified.

projectId This property is required. string
The ID of the project.
serviceEndpointId string
the ID of the Service Endpoint.
serviceEndpointName string

the Name of the Service Endpoint.

NOTE: One of either service_endpoint_id or service_endpoint_name must be specified.

project_id This property is required. str
The ID of the project.
service_endpoint_id str
the ID of the Service Endpoint.
service_endpoint_name str

the Name of the Service Endpoint.

NOTE: One of either service_endpoint_id or service_endpoint_name must be specified.

projectId This property is required. String
The ID of the project.
serviceEndpointId String
the ID of the Service Endpoint.
serviceEndpointName String

the Name of the Service Endpoint.

NOTE: One of either service_endpoint_id or service_endpoint_name must be specified.

getServiceendpointSonarcloud Result

The following output properties are available:

Authorization Dictionary<string, string>
The Authorization scheme.
Description string
The description of the Service Endpoint.
Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
ServiceEndpointId string
ServiceEndpointName string
Authorization map[string]string
The Authorization scheme.
Description string
The description of the Service Endpoint.
Id string
The provider-assigned unique ID for this managed resource.
ProjectId string
ServiceEndpointId string
ServiceEndpointName string
authorization Map<String,String>
The Authorization scheme.
description String
The description of the Service Endpoint.
id String
The provider-assigned unique ID for this managed resource.
projectId String
serviceEndpointId String
serviceEndpointName String
authorization {[key: string]: string}
The Authorization scheme.
description string
The description of the Service Endpoint.
id string
The provider-assigned unique ID for this managed resource.
projectId string
serviceEndpointId string
serviceEndpointName string
authorization Mapping[str, str]
The Authorization scheme.
description str
The description of the Service Endpoint.
id str
The provider-assigned unique ID for this managed resource.
project_id str
service_endpoint_id str
service_endpoint_name str
authorization Map<String>
The Authorization scheme.
description String
The description of the Service Endpoint.
id String
The provider-assigned unique ID for this managed resource.
projectId String
serviceEndpointId String
serviceEndpointName String

Package Details

Repository
Azure DevOps pulumi/pulumi-azuredevops
License
Apache-2.0
Notes
This Pulumi package is based on the azuredevops Terraform Provider.