"use strict";
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getListingsOutput = exports.getListings = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
 * This data source provides the list of Listings in Oracle Cloud Infrastructure Marketplace service.
 *
 * Gets a list of listings from Oracle Cloud Infrastructure Marketplace by searching keywords and
 * filtering according to listing attributes.
 *
 * If you plan to launch an instance from an image listing, you must first subscribe to the listing. When
 * you launch the instance, you also need to provide the image ID of the listing resource version that you want.
 *
 * Subscribing to the listing requires you to first get a signature from the terms of use agreement for the
 * listing resource version. To get the signature, issue a [GetAppCatalogListingAgreements](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersionAgreements/GetAppCatalogListingAgreements) API call.
 * The [AppCatalogListingResourceVersionAgreements](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersionAgreements) object, including
 * its signature, is returned in the response. With the signature for the terms of use agreement for the desired
 * listing resource version, create a subscription by issuing a
 * [CreateAppCatalogSubscription](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogSubscription/CreateAppCatalogSubscription) API call.
 *
 * To get the image ID to launch an instance, issue a [GetAppCatalogListingResourceVersion](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersion/GetAppCatalogListingResourceVersion) API call.
 * Lastly, to launch the instance, use the image ID of the listing resource version to issue a [LaunchInstance](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/Instance/LaunchInstance) API call.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testListings = oci.marketplace.getListings({
 *     categories: listingCategory,
 *     compartmentId: compartmentId,
 *     imageId: testImage.id,
 *     isFeatured: listingIsFeatured === "true",
 *     listingId: testListing.id,
 *     listingTypes: listingListingTypes,
 *     names: listingName,
 *     operatingSystems: listingOperatingSystems,
 *     packageType: listingPackageType,
 *     pricings: listingPricing,
 *     publisherId: testPublisher.id,
 * });
 * ```
 */
function getListings(args, opts) {
    args = args || {};
    opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
    return pulumi.runtime.invoke("oci:Marketplace/getListings:getListings", {
        "categories": args.categories,
        "compartmentId": args.compartmentId,
        "filters": args.filters,
        "imageId": args.imageId,
        "isFeatured": args.isFeatured,
        "listingId": args.listingId,
        "listingTypes": args.listingTypes,
        "names": args.names,
        "operatingSystems": args.operatingSystems,
        "packageType": args.packageType,
        "pricings": args.pricings,
        "publisherId": args.publisherId,
    }, opts);
}
exports.getListings = getListings;
/**
 * This data source provides the list of Listings in Oracle Cloud Infrastructure Marketplace service.
 *
 * Gets a list of listings from Oracle Cloud Infrastructure Marketplace by searching keywords and
 * filtering according to listing attributes.
 *
 * If you plan to launch an instance from an image listing, you must first subscribe to the listing. When
 * you launch the instance, you also need to provide the image ID of the listing resource version that you want.
 *
 * Subscribing to the listing requires you to first get a signature from the terms of use agreement for the
 * listing resource version. To get the signature, issue a [GetAppCatalogListingAgreements](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersionAgreements/GetAppCatalogListingAgreements) API call.
 * The [AppCatalogListingResourceVersionAgreements](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersionAgreements) object, including
 * its signature, is returned in the response. With the signature for the terms of use agreement for the desired
 * listing resource version, create a subscription by issuing a
 * [CreateAppCatalogSubscription](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogSubscription/CreateAppCatalogSubscription) API call.
 *
 * To get the image ID to launch an instance, issue a [GetAppCatalogListingResourceVersion](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/AppCatalogListingResourceVersion/GetAppCatalogListingResourceVersion) API call.
 * Lastly, to launch the instance, use the image ID of the listing resource version to issue a [LaunchInstance](https://docs.cloud.oracle.com/en-us/iaas/api/#/en/iaas/latest/Instance/LaunchInstance) API call.
 *
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as oci from "@pulumi/oci";
 *
 * const testListings = oci.marketplace.getListings({
 *     categories: listingCategory,
 *     compartmentId: compartmentId,
 *     imageId: testImage.id,
 *     isFeatured: listingIsFeatured === "true",
 *     listingId: testListing.id,
 *     listingTypes: listingListingTypes,
 *     names: listingName,
 *     operatingSystems: listingOperatingSystems,
 *     packageType: listingPackageType,
 *     pricings: listingPricing,
 *     publisherId: testPublisher.id,
 * });
 * ```
 */
function getListingsOutput(args, opts) {
    args = args || {};
    opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
    return pulumi.runtime.invokeOutput("oci:Marketplace/getListings:getListings", {
        "categories": args.categories,
        "compartmentId": args.compartmentId,
        "filters": args.filters,
        "imageId": args.imageId,
        "isFeatured": args.isFeatured,
        "listingId": args.listingId,
        "listingTypes": args.listingTypes,
        "names": args.names,
        "operatingSystems": args.operatingSystems,
        "packageType": args.packageType,
        "pricings": args.pricings,
        "publisherId": args.publisherId,
    }, opts);
}
exports.getListingsOutput = getListingsOutput;
//# sourceMappingURL=getListings.js.map