import * as pulumi from "@pulumi/pulumi"; /** * Use this data source to retrieve information about a GitHub release asset. * * ## Example Usage * * To retrieve a specific release asset from a repository based on its ID: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const example = github.getReleaseAsset({ * repository: "example-repository", * owner: "example-owner", * assetId: 12345, * }); * ``` * * To retrieve a specific release asset from a repository, and download the file * into a `file` attribute on the data source: * * To retrieve the first release asset associated with the latest release in a repository: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const example = github.getRelease({ * repository: "example-repository", * owner: "example-owner", * retrieveBy: "latest", * }); * const exampleGetReleaseAsset = example.then(example => github.getReleaseAsset({ * repository: "example-repository", * owner: "example-owner", * assetId: example.assets?.[0]?.id, * })); * ``` * * To retrieve all release assets associated with the the latest release in a repository: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const example = github.getRelease({ * repository: "example-repository", * owner: "example-owner", * retrieveBy: "latest", * }); * const exampleGetReleaseAsset = .map(__index => (github.getReleaseAsset({ * repository: "example-repository", * owner: "example-owner", * assetId: _arg0_.assets[__index].id, * }))); * ``` */ export declare function getReleaseAsset(args: GetReleaseAssetArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getReleaseAsset. */ export interface GetReleaseAssetArgs { /** * ID of the release asset to retrieve */ assetId: number; /** * Whether to download the asset file content into the `fileContents` attribute (defaults to `false`) */ downloadFileContents?: boolean; /** * Owner of the repository */ owner: string; /** * Name of the repository to retrieve the release from */ repository: string; } /** * A collection of values returned by getReleaseAsset. */ export interface GetReleaseAssetResult { readonly assetId: number; /** * Browser URL from which the release asset can be downloaded */ readonly browserDownloadUrl: string; /** * MIME type of the asset */ readonly contentType: string; /** * Date the asset was created */ readonly createdAt: string; readonly downloadFileContents?: boolean; /** * The base64-encoded release asset file contents (requires `downloadFileContents` to be `true`) */ readonly fileContents: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * Label for the asset */ readonly label: string; /** * The file name of the asset */ readonly name: string; /** * Node ID of the asset */ readonly nodeId: string; readonly owner: string; readonly repository: string; /** * Asset size in bytes */ readonly size: number; /** * Date the asset was last updated */ readonly updatedAt: string; /** * URL of the asset */ readonly url: string; } /** * Use this data source to retrieve information about a GitHub release asset. * * ## Example Usage * * To retrieve a specific release asset from a repository based on its ID: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const example = github.getReleaseAsset({ * repository: "example-repository", * owner: "example-owner", * assetId: 12345, * }); * ``` * * To retrieve a specific release asset from a repository, and download the file * into a `file` attribute on the data source: * * To retrieve the first release asset associated with the latest release in a repository: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const example = github.getRelease({ * repository: "example-repository", * owner: "example-owner", * retrieveBy: "latest", * }); * const exampleGetReleaseAsset = example.then(example => github.getReleaseAsset({ * repository: "example-repository", * owner: "example-owner", * assetId: example.assets?.[0]?.id, * })); * ``` * * To retrieve all release assets associated with the the latest release in a repository: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as github from "@pulumi/github"; * * const example = github.getRelease({ * repository: "example-repository", * owner: "example-owner", * retrieveBy: "latest", * }); * const exampleGetReleaseAsset = .map(__index => (github.getReleaseAsset({ * repository: "example-repository", * owner: "example-owner", * assetId: _arg0_.assets[__index].id, * }))); * ``` */ export declare function getReleaseAssetOutput(args: GetReleaseAssetOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getReleaseAsset. */ export interface GetReleaseAssetOutputArgs { /** * ID of the release asset to retrieve */ assetId: pulumi.Input; /** * Whether to download the asset file content into the `fileContents` attribute (defaults to `false`) */ downloadFileContents?: pulumi.Input; /** * Owner of the repository */ owner: pulumi.Input; /** * Name of the repository to retrieve the release from */ repository: pulumi.Input; } //# sourceMappingURL=getReleaseAsset.d.ts.map