UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

140 lines (139 loc) 4.54 kB
import * as pulumi from "@pulumi/pulumi"; /** * Use this data source to access information about an existing GitHub service Endpoint. * * ## Example Usage * * ### By Service Endpoint ID * * ```typescript * 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); * ``` * * ### By Service Endpoint Name * * ```typescript * 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); * ``` */ export declare function getServiceEndpointGithub(args: GetServiceEndpointGithubArgs, opts?: pulumi.InvokeOptions): Promise<GetServiceEndpointGithubResult>; /** * A collection of arguments for invoking getServiceEndpointGithub. */ export interface GetServiceEndpointGithubArgs { /** * The ID of the project. */ projectId: string; /** * the ID of the Service Endpoint. */ serviceEndpointId?: string; /** * the Name of the Service Endpoint. * * > **NOTE:** 1. One of either `serviceEndpointId` or `serviceEndpointName` must be specified. * <br>2. When supplying `serviceEndpointName`, take care to ensure that this is a unique name. */ serviceEndpointName?: string; } /** * A collection of values returned by getServiceEndpointGithub. */ export interface GetServiceEndpointGithubResult { /** * The Authorization scheme. */ readonly authorization: { [key: string]: string; }; /** * The description of the Service Endpoint. */ readonly description: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly projectId: string; readonly serviceEndpointId: string; readonly serviceEndpointName: string; } /** * Use this data source to access information about an existing GitHub service Endpoint. * * ## Example Usage * * ### By Service Endpoint ID * * ```typescript * 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); * ``` * * ### By Service Endpoint Name * * ```typescript * 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); * ``` */ export declare function getServiceEndpointGithubOutput(args: GetServiceEndpointGithubOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetServiceEndpointGithubResult>; /** * A collection of arguments for invoking getServiceEndpointGithub. */ export interface GetServiceEndpointGithubOutputArgs { /** * The ID of the project. */ projectId: pulumi.Input<string>; /** * the ID of the Service Endpoint. */ serviceEndpointId?: pulumi.Input<string>; /** * the Name of the Service Endpoint. * * > **NOTE:** 1. One of either `serviceEndpointId` or `serviceEndpointName` must be specified. * <br>2. When supplying `serviceEndpointName`, take care to ensure that this is a unique name. */ serviceEndpointName?: pulumi.Input<string>; }