azuredevops.getServiceEndpointGithub
Explore with Pulumi AI
Use this data source to access information about an existing GitHub service Endpoint.
Example Usage
By Service Endpoint ID
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
const sample = azuredevops.getProject({
    name: "Sample Project",
});
const serviceendpoint = sample.then(sample => azuredevops.getServiceEndpointGithub({
    projectId: sample.id,
    serviceEndpointId: "00000000-0000-0000-0000-000000000000",
}));
export const serviceEndpointName = serviceendpoint.then(serviceendpoint => serviceendpoint.serviceEndpointName);
import pulumi
import pulumi_azuredevops as azuredevops
sample = azuredevops.get_project(name="Sample Project")
serviceendpoint = azuredevops.get_service_endpoint_github(project_id=sample.id,
    service_endpoint_id="00000000-0000-0000-0000-000000000000")
pulumi.export("serviceEndpointName", serviceendpoint.service_endpoint_name)
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 {
		sample, err := azuredevops.LookupProject(ctx, &azuredevops.LookupProjectArgs{
			Name: pulumi.StringRef("Sample Project"),
		}, nil)
		if err != nil {
			return err
		}
		serviceendpoint, err := azuredevops.GetServiceEndpointGithub(ctx, &azuredevops.GetServiceEndpointGithubArgs{
			ProjectId:         sample.Id,
			ServiceEndpointId: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("serviceEndpointName", serviceendpoint.ServiceEndpointName)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
return await Deployment.RunAsync(() => 
{
    var sample = AzureDevOps.GetProject.Invoke(new()
    {
        Name = "Sample Project",
    });
    var serviceendpoint = AzureDevOps.GetServiceEndpointGithub.Invoke(new()
    {
        ProjectId = sample.Apply(getProjectResult => getProjectResult.Id),
        ServiceEndpointId = "00000000-0000-0000-0000-000000000000",
    });
    return new Dictionary<string, object?>
    {
        ["serviceEndpointName"] = serviceendpoint.Apply(getServiceEndpointGithubResult => getServiceEndpointGithubResult.ServiceEndpointName),
    };
});
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.GetServiceEndpointGithubArgs;
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 sample = AzuredevopsFunctions.getProject(GetProjectArgs.builder()
            .name("Sample Project")
            .build());
        final var serviceendpoint = AzuredevopsFunctions.getServiceEndpointGithub(GetServiceEndpointGithubArgs.builder()
            .projectId(sample.applyValue(getProjectResult -> getProjectResult.id()))
            .serviceEndpointId("00000000-0000-0000-0000-000000000000")
            .build());
        ctx.export("serviceEndpointName", serviceendpoint.applyValue(getServiceEndpointGithubResult -> getServiceEndpointGithubResult.serviceEndpointName()));
    }
}
variables:
  sample:
    fn::invoke:
      function: azuredevops:getProject
      arguments:
        name: Sample Project
  serviceendpoint:
    fn::invoke:
      function: azuredevops:getServiceEndpointGithub
      arguments:
        projectId: ${sample.id}
        serviceEndpointId: 00000000-0000-0000-0000-000000000000
outputs:
  serviceEndpointName: ${serviceendpoint.serviceEndpointName}
By Service Endpoint Name
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
const sample = azuredevops.getProject({
    name: "Sample Project",
});
const serviceendpoint = sample.then(sample => azuredevops.getServiceEndpointGithub({
    projectId: sample.id,
    serviceEndpointName: "Example-Service-Endpoint",
}));
export const serviceEndpointId = serviceendpoint.then(serviceendpoint => serviceendpoint.id);
import pulumi
import pulumi_azuredevops as azuredevops
sample = azuredevops.get_project(name="Sample Project")
serviceendpoint = azuredevops.get_service_endpoint_github(project_id=sample.id,
    service_endpoint_name="Example-Service-Endpoint")
pulumi.export("serviceEndpointId", serviceendpoint.id)
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 {
		sample, err := azuredevops.LookupProject(ctx, &azuredevops.LookupProjectArgs{
			Name: pulumi.StringRef("Sample Project"),
		}, nil)
		if err != nil {
			return err
		}
		serviceendpoint, err := azuredevops.GetServiceEndpointGithub(ctx, &azuredevops.GetServiceEndpointGithubArgs{
			ProjectId:           sample.Id,
			ServiceEndpointName: pulumi.StringRef("Example-Service-Endpoint"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("serviceEndpointId", serviceendpoint.Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
return await Deployment.RunAsync(() => 
{
    var sample = AzureDevOps.GetProject.Invoke(new()
    {
        Name = "Sample Project",
    });
    var serviceendpoint = AzureDevOps.GetServiceEndpointGithub.Invoke(new()
    {
        ProjectId = sample.Apply(getProjectResult => getProjectResult.Id),
        ServiceEndpointName = "Example-Service-Endpoint",
    });
    return new Dictionary<string, object?>
    {
        ["serviceEndpointId"] = serviceendpoint.Apply(getServiceEndpointGithubResult => getServiceEndpointGithubResult.Id),
    };
});
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.GetServiceEndpointGithubArgs;
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 sample = AzuredevopsFunctions.getProject(GetProjectArgs.builder()
            .name("Sample Project")
            .build());
        final var serviceendpoint = AzuredevopsFunctions.getServiceEndpointGithub(GetServiceEndpointGithubArgs.builder()
            .projectId(sample.applyValue(getProjectResult -> getProjectResult.id()))
            .serviceEndpointName("Example-Service-Endpoint")
            .build());
        ctx.export("serviceEndpointId", serviceendpoint.applyValue(getServiceEndpointGithubResult -> getServiceEndpointGithubResult.id()));
    }
}
variables:
  sample:
    fn::invoke:
      function: azuredevops:getProject
      arguments:
        name: Sample Project
  serviceendpoint:
    fn::invoke:
      function: azuredevops:getServiceEndpointGithub
      arguments:
        projectId: ${sample.id}
        serviceEndpointName: Example-Service-Endpoint
outputs:
  serviceEndpointId: ${serviceendpoint.id}
Using getServiceEndpointGithub
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 getServiceEndpointGithub(args: GetServiceEndpointGithubArgs, opts?: InvokeOptions): Promise<GetServiceEndpointGithubResult>
function getServiceEndpointGithubOutput(args: GetServiceEndpointGithubOutputArgs, opts?: InvokeOptions): Output<GetServiceEndpointGithubResult>def get_service_endpoint_github(project_id: Optional[str] = None,
                                service_endpoint_id: Optional[str] = None,
                                service_endpoint_name: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetServiceEndpointGithubResult
def get_service_endpoint_github_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[GetServiceEndpointGithubResult]func GetServiceEndpointGithub(ctx *Context, args *GetServiceEndpointGithubArgs, opts ...InvokeOption) (*GetServiceEndpointGithubResult, error)
func GetServiceEndpointGithubOutput(ctx *Context, args *GetServiceEndpointGithubOutputArgs, opts ...InvokeOption) GetServiceEndpointGithubResultOutput> Note: This function is named GetServiceEndpointGithub in the Go SDK.
public static class GetServiceEndpointGithub 
{
    public static Task<GetServiceEndpointGithubResult> InvokeAsync(GetServiceEndpointGithubArgs args, InvokeOptions? opts = null)
    public static Output<GetServiceEndpointGithubResult> Invoke(GetServiceEndpointGithubInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServiceEndpointGithubResult> getServiceEndpointGithub(GetServiceEndpointGithubArgs args, InvokeOptions options)
public static Output<GetServiceEndpointGithubResult> getServiceEndpointGithub(GetServiceEndpointGithubArgs args, InvokeOptions options)
fn::invoke:
  function: azuredevops:index/getServiceEndpointGithub:getServiceEndpointGithub
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ProjectId string
- The ID of the project.
- ServiceEndpoint stringId 
- the ID of the Service Endpoint.
- ServiceEndpoint stringName 
- the Name of the Service Endpoint. - NOTE: 1. One of either - service_endpoint_idor- service_endpoint_namemust be specified. 2. When supplying- service_endpoint_name, take care to ensure that this is a unique name.
- ProjectId string
- The ID of the project.
- ServiceEndpoint stringId 
- the ID of the Service Endpoint.
- ServiceEndpoint stringName 
- the Name of the Service Endpoint. - NOTE: 1. One of either - service_endpoint_idor- service_endpoint_namemust be specified. 2. When supplying- service_endpoint_name, take care to ensure that this is a unique name.
- projectId String
- The ID of the project.
- serviceEndpoint StringId 
- the ID of the Service Endpoint.
- serviceEndpoint StringName 
- the Name of the Service Endpoint. - NOTE: 1. One of either - service_endpoint_idor- service_endpoint_namemust be specified. 2. When supplying- service_endpoint_name, take care to ensure that this is a unique name.
- projectId string
- The ID of the project.
- serviceEndpoint stringId 
- the ID of the Service Endpoint.
- serviceEndpoint stringName 
- the Name of the Service Endpoint. - NOTE: 1. One of either - service_endpoint_idor- service_endpoint_namemust be specified. 2. When supplying- service_endpoint_name, take care to ensure that this is a unique name.
- project_id str
- The ID of the project.
- service_endpoint_ strid 
- the ID of the Service Endpoint.
- service_endpoint_ strname 
- the Name of the Service Endpoint. - NOTE: 1. One of either - service_endpoint_idor- service_endpoint_namemust be specified. 2. When supplying- service_endpoint_name, take care to ensure that this is a unique name.
- projectId String
- The ID of the project.
- serviceEndpoint StringId 
- the ID of the Service Endpoint.
- serviceEndpoint StringName 
- the Name of the Service Endpoint. - NOTE: 1. One of either - service_endpoint_idor- service_endpoint_namemust be specified. 2. When supplying- service_endpoint_name, take care to ensure that this is a unique name.
getServiceEndpointGithub Result
The following output properties are available:
- 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
- ServiceEndpoint stringId 
- ServiceEndpoint stringName 
- 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
- ServiceEndpoint stringId 
- ServiceEndpoint stringName 
- 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
- serviceEndpoint StringId 
- serviceEndpoint StringName 
- {[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
- serviceEndpoint stringId 
- serviceEndpoint stringName 
- 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_ strid 
- service_endpoint_ strname 
- 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
- serviceEndpoint StringId 
- serviceEndpoint StringName 
Package Details
- Repository
- Azure DevOps pulumi/pulumi-azuredevops
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azuredevopsTerraform Provider.