@pulumi/github
Version:
A Pulumi package for creating and managing github cloud resources.
92 lines (91 loc) • 2.64 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Use this data source to generate a [GitHub App JWT](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
* import * as std from "@pulumi/std";
*
* const _this = std.file({
* input: "foo/bar.pem",
* }).then(invoke => github.getAppToken({
* appId: "123456",
* installationId: "78910",
* pemFile: invoke.result,
* }));
* ```
*/
export declare function getAppToken(args: GetAppTokenArgs, opts?: pulumi.InvokeOptions): Promise<GetAppTokenResult>;
/**
* A collection of arguments for invoking getAppToken.
*/
export interface GetAppTokenArgs {
/**
* This is the ID of the GitHub App.
*/
appId: string;
/**
* This is the ID of the GitHub App installation.
*/
installationId: string;
/**
* This is the contents of the GitHub App private key PEM file.
*/
pemFile: string;
}
/**
* A collection of values returned by getAppToken.
*/
export interface GetAppTokenResult {
readonly appId: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly installationId: string;
readonly pemFile: string;
/**
* The generated GitHub APP JWT.
*/
readonly token: string;
}
/**
* Use this data source to generate a [GitHub App JWT](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
* import * as std from "@pulumi/std";
*
* const _this = std.file({
* input: "foo/bar.pem",
* }).then(invoke => github.getAppToken({
* appId: "123456",
* installationId: "78910",
* pemFile: invoke.result,
* }));
* ```
*/
export declare function getAppTokenOutput(args: GetAppTokenOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetAppTokenResult>;
/**
* A collection of arguments for invoking getAppToken.
*/
export interface GetAppTokenOutputArgs {
/**
* This is the ID of the GitHub App.
*/
appId: pulumi.Input<string>;
/**
* This is the ID of the GitHub App installation.
*/
installationId: pulumi.Input<string>;
/**
* This is the contents of the GitHub App private key PEM file.
*/
pemFile: pulumi.Input<string>;
}