1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Marketplace
  5. getCategories
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

oci.Marketplace.getCategories

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi

This data source provides the list of Categories in Oracle Cloud Infrastructure Marketplace service.

Gets the list of all the categories for listings published to Oracle Cloud Infrastructure Marketplace. Categories apply to the software product provided by the listing.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testCategories = oci.Marketplace.getCategories({
    compartmentId: compartmentId,
});
Copy
import pulumi
import pulumi_oci as oci

test_categories = oci.Marketplace.get_categories(compartment_id=compartment_id)
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/marketplace"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := marketplace.GetCategories(ctx, &marketplace.GetCategoriesArgs{
			CompartmentId: pulumi.StringRef(compartmentId),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testCategories = Oci.Marketplace.GetCategories.Invoke(new()
    {
        CompartmentId = compartmentId,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Marketplace.MarketplaceFunctions;
import com.pulumi.oci.Marketplace.inputs.GetCategoriesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var testCategories = MarketplaceFunctions.getCategories(GetCategoriesArgs.builder()
            .compartmentId(compartmentId)
            .build());

    }
}
Copy
variables:
  testCategories:
    fn::invoke:
      function: oci:Marketplace:getCategories
      arguments:
        compartmentId: ${compartmentId}
Copy

Using getCategories

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getCategories(args: GetCategoriesArgs, opts?: InvokeOptions): Promise<GetCategoriesResult>
function getCategoriesOutput(args: GetCategoriesOutputArgs, opts?: InvokeOptions): Output<GetCategoriesResult>
Copy
def get_categories(compartment_id: Optional[str] = None,
                   filters: Optional[Sequence[_marketplace.GetCategoriesFilter]] = None,
                   opts: Optional[InvokeOptions] = None) -> GetCategoriesResult
def get_categories_output(compartment_id: Optional[pulumi.Input[str]] = None,
                   filters: Optional[pulumi.Input[Sequence[pulumi.Input[_marketplace.GetCategoriesFilterArgs]]]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetCategoriesResult]
Copy
func GetCategories(ctx *Context, args *GetCategoriesArgs, opts ...InvokeOption) (*GetCategoriesResult, error)
func GetCategoriesOutput(ctx *Context, args *GetCategoriesOutputArgs, opts ...InvokeOption) GetCategoriesResultOutput
Copy

> Note: This function is named GetCategories in the Go SDK.

public static class GetCategories 
{
    public static Task<GetCategoriesResult> InvokeAsync(GetCategoriesArgs args, InvokeOptions? opts = null)
    public static Output<GetCategoriesResult> Invoke(GetCategoriesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetCategoriesResult> getCategories(GetCategoriesArgs args, InvokeOptions options)
public static Output<GetCategoriesResult> getCategories(GetCategoriesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Marketplace/getCategories:getCategories
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId string
The unique identifier for the compartment.
Filters Changes to this property will trigger replacement. List<GetCategoriesFilter>
CompartmentId string
The unique identifier for the compartment.
Filters Changes to this property will trigger replacement. []GetCategoriesFilter
compartmentId String
The unique identifier for the compartment.
filters Changes to this property will trigger replacement. List<GetCategoriesFilter>
compartmentId string
The unique identifier for the compartment.
filters Changes to this property will trigger replacement. GetCategoriesFilter[]
compartment_id str
The unique identifier for the compartment.
filters Changes to this property will trigger replacement. Sequence[marketplace.GetCategoriesFilter]
compartmentId String
The unique identifier for the compartment.
filters Changes to this property will trigger replacement. List<Property Map>

getCategories Result

The following output properties are available:

Categories List<GetCategoriesCategory>
The list of categories.
Id string
The provider-assigned unique ID for this managed resource.
CompartmentId string
Filters List<GetCategoriesFilter>
Categories []GetCategoriesCategory
The list of categories.
Id string
The provider-assigned unique ID for this managed resource.
CompartmentId string
Filters []GetCategoriesFilter
categories List<GetCategoriesCategory>
The list of categories.
id String
The provider-assigned unique ID for this managed resource.
compartmentId String
filters List<GetCategoriesFilter>
categories GetCategoriesCategory[]
The list of categories.
id string
The provider-assigned unique ID for this managed resource.
compartmentId string
filters GetCategoriesFilter[]
categories Sequence[marketplace.GetCategoriesCategory]
The list of categories.
id str
The provider-assigned unique ID for this managed resource.
compartment_id str
filters Sequence[marketplace.GetCategoriesFilter]
categories List<Property Map>
The list of categories.
id String
The provider-assigned unique ID for this managed resource.
compartmentId String
filters List<Property Map>

Supporting Types

GetCategoriesCategory

Name This property is required. string
Name of the product category.
Name This property is required. string
Name of the product category.
name This property is required. String
Name of the product category.
name This property is required. string
Name of the product category.
name This property is required. str
Name of the product category.
name This property is required. String
Name of the product category.

GetCategoriesFilter

Name This property is required. string
Name of the product category.
Values This property is required. List<string>
Regex bool
Name This property is required. string
Name of the product category.
Values This property is required. []string
Regex bool
name This property is required. String
Name of the product category.
values This property is required. List<String>
regex Boolean
name This property is required. string
Name of the product category.
values This property is required. string[]
regex boolean
name This property is required. str
Name of the product category.
values This property is required. Sequence[str]
regex bool
name This property is required. String
Name of the product category.
values This property is required. List<String>
regex Boolean

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.29.0 published on Wednesday, Apr 9, 2025 by Pulumi