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

azuredevops.getServiceendpointBitbucket

Explore with Pulumi AI

Use this data source to access information about an existing Bitbucket service Endpoint.

Example Usage

By Service Endpoint ID

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

const example = azuredevops.getProject({
    name: "Example Project",
});
const exampleGetServiceendpointBitbucket = example.then(example => azuredevops.getServiceendpointBitbucket({
    projectId: example.id,
    serviceEndpointId: "00000000-0000-0000-0000-000000000000",
}));
export const serviceEndpointName = exampleGetServiceendpointBitbucket.then(exampleGetServiceendpointBitbucket => exampleGetServiceendpointBitbucket.serviceEndpointName);
Copy
import pulumi
import pulumi_azuredevops as azuredevops

example = azuredevops.get_project(name="Example Project")
example_get_serviceendpoint_bitbucket = azuredevops.get_serviceendpoint_bitbucket(project_id=example.id,
    service_endpoint_id="00000000-0000-0000-0000-000000000000")
pulumi.export("serviceEndpointName", example_get_serviceendpoint_bitbucket.service_endpoint_name)
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.LookupProject(ctx, &azuredevops.LookupProjectArgs{
			Name: pulumi.StringRef("Example Project"),
		}, nil)
		if err != nil {
			return err
		}
		exampleGetServiceendpointBitbucket, err := azuredevops.GetServiceendpointBitbucket(ctx, &azuredevops.GetServiceendpointBitbucketArgs{
			ProjectId:         example.Id,
			ServiceEndpointId: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("serviceEndpointName", exampleGetServiceendpointBitbucket.ServiceEndpointName)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;

return await Deployment.RunAsync(() => 
{
    var example = AzureDevOps.GetProject.Invoke(new()
    {
        Name = "Example Project",
    });

    var exampleGetServiceendpointBitbucket = AzureDevOps.GetServiceendpointBitbucket.Invoke(new()
    {
        ProjectId = example.Apply(getProjectResult => getProjectResult.Id),
        ServiceEndpointId = "00000000-0000-0000-0000-000000000000",
    });

    return new Dictionary<string, object?>
    {
        ["serviceEndpointName"] = exampleGetServiceendpointBitbucket.Apply(getServiceendpointBitbucketResult => getServiceendpointBitbucketResult.ServiceEndpointName),
    };
});
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.GetProjectArgs;
import com.pulumi.azuredevops.inputs.GetServiceendpointBitbucketArgs;
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.getProject(GetProjectArgs.builder()
            .name("Example Project")
            .build());

        final var exampleGetServiceendpointBitbucket = AzuredevopsFunctions.getServiceendpointBitbucket(GetServiceendpointBitbucketArgs.builder()
            .projectId(example.applyValue(getProjectResult -> getProjectResult.id()))
            .serviceEndpointId("00000000-0000-0000-0000-000000000000")
            .build());

        ctx.export("serviceEndpointName", exampleGetServiceendpointBitbucket.applyValue(getServiceendpointBitbucketResult -> getServiceendpointBitbucketResult.serviceEndpointName()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azuredevops:getProject
      arguments:
        name: Example Project
  exampleGetServiceendpointBitbucket:
    fn::invoke:
      function: azuredevops:getServiceendpointBitbucket
      arguments:
        projectId: ${example.id}
        serviceEndpointId: 00000000-0000-0000-0000-000000000000
outputs:
  serviceEndpointName: ${exampleGetServiceendpointBitbucket.serviceEndpointName}
Copy

By Service Endpoint Name

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

const example = azuredevops.getProject({
    name: "Example Project",
});
const exampleGetServiceendpointBitbucket = example.then(example => azuredevops.getServiceendpointBitbucket({
    projectId: example.id,
    serviceEndpointName: "Example",
}));
export const serviceEndpointId = exampleGetServiceendpointBitbucket.then(exampleGetServiceendpointBitbucket => exampleGetServiceendpointBitbucket.id);
Copy
import pulumi
import pulumi_azuredevops as azuredevops

example = azuredevops.get_project(name="Example Project")
example_get_serviceendpoint_bitbucket = azuredevops.get_serviceendpoint_bitbucket(project_id=example.id,
    service_endpoint_name="Example")
pulumi.export("serviceEndpointId", example_get_serviceendpoint_bitbucket.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.LookupProject(ctx, &azuredevops.LookupProjectArgs{
			Name: pulumi.StringRef("Example Project"),
		}, nil)
		if err != nil {
			return err
		}
		exampleGetServiceendpointBitbucket, err := azuredevops.GetServiceendpointBitbucket(ctx, &azuredevops.GetServiceendpointBitbucketArgs{
			ProjectId:           example.Id,
			ServiceEndpointName: pulumi.StringRef("Example"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("serviceEndpointId", exampleGetServiceendpointBitbucket.Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;

return await Deployment.RunAsync(() => 
{
    var example = AzureDevOps.GetProject.Invoke(new()
    {
        Name = "Example Project",
    });

    var exampleGetServiceendpointBitbucket = AzureDevOps.GetServiceendpointBitbucket.Invoke(new()
    {
        ProjectId = example.Apply(getProjectResult => getProjectResult.Id),
        ServiceEndpointName = "Example",
    });

    return new Dictionary<string, object?>
    {
        ["serviceEndpointId"] = exampleGetServiceendpointBitbucket.Apply(getServiceendpointBitbucketResult => getServiceendpointBitbucketResult.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.GetProjectArgs;
import com.pulumi.azuredevops.inputs.GetServiceendpointBitbucketArgs;
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.getProject(GetProjectArgs.builder()
            .name("Example Project")
            .build());

        final var exampleGetServiceendpointBitbucket = AzuredevopsFunctions.getServiceendpointBitbucket(GetServiceendpointBitbucketArgs.builder()
            .projectId(example.applyValue(getProjectResult -> getProjectResult.id()))
            .serviceEndpointName("Example")
            .build());

        ctx.export("serviceEndpointId", exampleGetServiceendpointBitbucket.applyValue(getServiceendpointBitbucketResult -> getServiceendpointBitbucketResult.id()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azuredevops:getProject
      arguments:
        name: Example Project
  exampleGetServiceendpointBitbucket:
    fn::invoke:
      function: azuredevops:getServiceendpointBitbucket
      arguments:
        projectId: ${example.id}
        serviceEndpointName: Example
outputs:
  serviceEndpointId: ${exampleGetServiceendpointBitbucket.id}
Copy

PAT Permissions Required

  • vso.serviceendpoint: Grants the ability to read service endpoints.

Using getServiceendpointBitbucket

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 getServiceendpointBitbucket(args: GetServiceendpointBitbucketArgs, opts?: InvokeOptions): Promise<GetServiceendpointBitbucketResult>
function getServiceendpointBitbucketOutput(args: GetServiceendpointBitbucketOutputArgs, opts?: InvokeOptions): Output<GetServiceendpointBitbucketResult>
Copy
def get_serviceendpoint_bitbucket(project_id: Optional[str] = None,
                                  service_endpoint_id: Optional[str] = None,
                                  service_endpoint_name: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetServiceendpointBitbucketResult
def get_serviceendpoint_bitbucket_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[GetServiceendpointBitbucketResult]
Copy
func GetServiceendpointBitbucket(ctx *Context, args *GetServiceendpointBitbucketArgs, opts ...InvokeOption) (*GetServiceendpointBitbucketResult, error)
func GetServiceendpointBitbucketOutput(ctx *Context, args *GetServiceendpointBitbucketOutputArgs, opts ...InvokeOption) GetServiceendpointBitbucketResultOutput
Copy

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

public static class GetServiceendpointBitbucket 
{
    public static Task<GetServiceendpointBitbucketResult> InvokeAsync(GetServiceendpointBitbucketArgs args, InvokeOptions? opts = null)
    public static Output<GetServiceendpointBitbucketResult> Invoke(GetServiceendpointBitbucketInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetServiceendpointBitbucketResult> getServiceendpointBitbucket(GetServiceendpointBitbucketArgs args, InvokeOptions options)
public static Output<GetServiceendpointBitbucketResult> getServiceendpointBitbucket(GetServiceendpointBitbucketArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azuredevops:index/getServiceendpointBitbucket:getServiceendpointBitbucket
  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: 1. One of either service_endpoint_id or service_endpoint_name must be specified. 2. When supplying service_endpoint_name, take care to ensure that this is a unique name.

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: 1. One of either service_endpoint_id or service_endpoint_name must be specified. 2. When supplying service_endpoint_name, take care to ensure that this is a unique name.

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: 1. One of either service_endpoint_id or service_endpoint_name must be specified. 2. When supplying service_endpoint_name, take care to ensure that this is a unique name.

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: 1. One of either service_endpoint_id or service_endpoint_name must be specified. 2. When supplying service_endpoint_name, take care to ensure that this is a unique name.

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: 1. One of either service_endpoint_id or service_endpoint_name must be specified. 2. When supplying service_endpoint_name, take care to ensure that this is a unique name.

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: 1. One of either service_endpoint_id or service_endpoint_name must be specified. 2. When supplying service_endpoint_name, take care to ensure that this is a unique name.

getServiceendpointBitbucket 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.