Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi
oci.Marketplace.getCategories
Explore with Pulumi AI
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,
});
import pulumi
import pulumi_oci as oci
test_categories = oci.Marketplace.get_categories(compartment_id=compartment_id)
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
})
}
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,
});
});
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());
}
}
variables:
testCategories:
fn::invoke:
Function: oci:Marketplace:getCategories
Arguments:
compartmentId: ${compartmentId}
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>
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]
func GetCategories(ctx *Context, args *GetCategoriesArgs, opts ...InvokeOption) (*GetCategoriesResult, error)
func GetCategoriesOutput(ctx *Context, args *GetCategoriesOutputArgs, opts ...InvokeOption) GetCategoriesResultOutput
> 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)
}
public static CompletableFuture<GetCategoriesResult> getCategories(GetCategoriesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Marketplace/getCategories:getCategories
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The unique identifier for the compartment.
- Filters
List<Get
Categories Filter>
- Compartment
Id string - The unique identifier for the compartment.
- Filters
[]Get
Categories Filter
- compartment
Id String - The unique identifier for the compartment.
- filters
List<Get
Categories Filter>
- compartment
Id string - The unique identifier for the compartment.
- filters
Get
Categories Filter[]
- compartment_
id str - The unique identifier for the compartment.
- filters
Sequence[marketplace.
Get Categories Filter]
- compartment
Id String - The unique identifier for the compartment.
- filters List<Property Map>
getCategories Result
The following output properties are available:
- Categories
List<Get
Categories Category> - The list of categories.
- Id string
- The provider-assigned unique ID for this managed resource.
- Compartment
Id string - Filters
List<Get
Categories Filter>
- Categories
[]Get
Categories Category - The list of categories.
- Id string
- The provider-assigned unique ID for this managed resource.
- Compartment
Id string - Filters
[]Get
Categories Filter
- categories
List<Get
Categories Category> - The list of categories.
- id String
- The provider-assigned unique ID for this managed resource.
- compartment
Id String - filters
List<Get
Categories Filter>
- categories
Get
Categories Category[] - The list of categories.
- id string
- The provider-assigned unique ID for this managed resource.
- compartment
Id string - filters
Get
Categories Filter[]
- categories
Sequence[marketplace.
Get Categories Category] - The list of categories.
- id str
- The provider-assigned unique ID for this managed resource.
- compartment_
id str - filters
Sequence[marketplace.
Get Categories Filter]
- categories List<Property Map>
- The list of categories.
- id String
- The provider-assigned unique ID for this managed resource.
- compartment
Id String - filters List<Property Map>
Supporting Types
GetCategoriesCategory
- Name string
- Name of the product category.
- Name string
- Name of the product category.
- name String
- Name of the product category.
- name string
- Name of the product category.
- name str
- Name of the product category.
- name String
- Name of the product category.
GetCategoriesFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.