@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
130 lines • 4.37 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* This data source fetches information from a provided Artifact Registry repository, based on a the latest version of the package and optional version.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const pythonRepo = new gcp.artifactregistry.Repository("python_repo", {
* location: "us-central1",
* repositoryId: "my-python-repo",
* format: "PYTHON",
* });
* const latest = gcp.artifactregistry.getPythonPackageOutput({
* location: pythonRepo.location,
* repositoryId: pythonRepo.repositoryId,
* packageName: "example_pkg",
* });
* const withVersion = gcp.artifactregistry.getPythonPackageOutput({
* location: pythonRepo.location,
* repositoryId: pythonRepo.repositoryId,
* packageName: "example_pkg:1.0.0",
* });
* ```
*/
export declare function getPythonPackage(args: GetPythonPackageArgs, opts?: pulumi.InvokeOptions): Promise<GetPythonPackageResult>;
/**
* A collection of arguments for invoking getPythonPackage.
*/
export interface GetPythonPackageArgs {
/**
* The location of the Artifact Registry repository.
*/
location: string;
/**
* The name of the package to fetch. Can optionally include a specific version (e.g., `my_pkg:1.2.3`). If no version is provided, the latest version is used.
*/
packageName: string;
/**
* The ID of the project that owns the repository. If not provided, the provider-level project is used.
*/
project?: string;
/**
* The ID of the repository containing the Python package.
*/
repositoryId: string;
}
/**
* A collection of values returned by getPythonPackage.
*/
export interface GetPythonPackageResult {
/**
* The time the package was created.
*/
readonly createTime: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly location: string;
/**
* The fully qualified name of the fetched package. Format:
* ```
* projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/pythonPackages/{{package}}:{{version}}
* ```
*/
readonly name: string;
readonly packageName: string;
readonly project?: string;
readonly repositoryId: string;
/**
* The time the package was last updated.
*/
readonly updateTime: string;
/**
* The version of the Python package.
*/
readonly version: string;
}
/**
* This data source fetches information from a provided Artifact Registry repository, based on a the latest version of the package and optional version.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const pythonRepo = new gcp.artifactregistry.Repository("python_repo", {
* location: "us-central1",
* repositoryId: "my-python-repo",
* format: "PYTHON",
* });
* const latest = gcp.artifactregistry.getPythonPackageOutput({
* location: pythonRepo.location,
* repositoryId: pythonRepo.repositoryId,
* packageName: "example_pkg",
* });
* const withVersion = gcp.artifactregistry.getPythonPackageOutput({
* location: pythonRepo.location,
* repositoryId: pythonRepo.repositoryId,
* packageName: "example_pkg:1.0.0",
* });
* ```
*/
export declare function getPythonPackageOutput(args: GetPythonPackageOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetPythonPackageResult>;
/**
* A collection of arguments for invoking getPythonPackage.
*/
export interface GetPythonPackageOutputArgs {
/**
* The location of the Artifact Registry repository.
*/
location: pulumi.Input<string>;
/**
* The name of the package to fetch. Can optionally include a specific version (e.g., `my_pkg:1.2.3`). If no version is provided, the latest version is used.
*/
packageName: pulumi.Input<string>;
/**
* The ID of the project that owns the repository. If not provided, the provider-level project is used.
*/
project?: pulumi.Input<string | undefined>;
/**
* The ID of the repository containing the Python package.
*/
repositoryId: pulumi.Input<string>;
}
//# sourceMappingURL=getPythonPackage.d.ts.map