1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. UsageProxy
  5. getResources
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.UsageProxy.getResources

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides the list of Resources in Oracle Cloud Infrastructure Usage Proxy service.

Returns the resource details for a service

Important: Calls to this API will only succeed against the endpoint in the home region.

Example Usage

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

const testResources = oci.UsageProxy.getResources({
    compartmentId: compartmentId,
    serviceName: testService.name,
    entitlementId: testEntitlement.id,
});
Copy
import pulumi
import pulumi_oci as oci

test_resources = oci.UsageProxy.get_resources(compartment_id=compartment_id,
    service_name=test_service["name"],
    entitlement_id=test_entitlement["id"])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := usageproxy.GetResources(ctx, &usageproxy.GetResourcesArgs{
			CompartmentId: compartmentId,
			ServiceName:   testService.Name,
			EntitlementId: pulumi.StringRef(testEntitlement.Id),
		}, 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 testResources = Oci.UsageProxy.GetResources.Invoke(new()
    {
        CompartmentId = compartmentId,
        ServiceName = testService.Name,
        EntitlementId = testEntitlement.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.UsageProxy.UsageProxyFunctions;
import com.pulumi.oci.UsageProxy.inputs.GetResourcesArgs;
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 testResources = UsageProxyFunctions.getResources(GetResourcesArgs.builder()
            .compartmentId(compartmentId)
            .serviceName(testService.name())
            .entitlementId(testEntitlement.id())
            .build());

    }
}
Copy
variables:
  testResources:
    fn::invoke:
      function: oci:UsageProxy:getResources
      arguments:
        compartmentId: ${compartmentId}
        serviceName: ${testService.name}
        entitlementId: ${testEntitlement.id}
Copy

Using getResources

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 getResources(args: GetResourcesArgs, opts?: InvokeOptions): Promise<GetResourcesResult>
function getResourcesOutput(args: GetResourcesOutputArgs, opts?: InvokeOptions): Output<GetResourcesResult>
Copy
def get_resources(compartment_id: Optional[str] = None,
                  entitlement_id: Optional[str] = None,
                  filters: Optional[Sequence[_usageproxy.GetResourcesFilter]] = None,
                  service_name: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetResourcesResult
def get_resources_output(compartment_id: Optional[pulumi.Input[str]] = None,
                  entitlement_id: Optional[pulumi.Input[str]] = None,
                  filters: Optional[pulumi.Input[Sequence[pulumi.Input[_usageproxy.GetResourcesFilterArgs]]]] = None,
                  service_name: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetResourcesResult]
Copy
func GetResources(ctx *Context, args *GetResourcesArgs, opts ...InvokeOption) (*GetResourcesResult, error)
func GetResourcesOutput(ctx *Context, args *GetResourcesOutputArgs, opts ...InvokeOption) GetResourcesResultOutput
Copy

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

public static class GetResources 
{
    public static Task<GetResourcesResult> InvokeAsync(GetResourcesArgs args, InvokeOptions? opts = null)
    public static Output<GetResourcesResult> Invoke(GetResourcesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetResourcesResult> getResources(GetResourcesArgs args, InvokeOptions options)
public static Output<GetResourcesResult> getResources(GetResourcesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:UsageProxy/getResources:getResources
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
The OCID of the root compartment.
ServiceName This property is required. string
Service Name.
EntitlementId string
Subscription or entitlement Id.
Filters Changes to this property will trigger replacement. List<GetResourcesFilter>
CompartmentId This property is required. string
The OCID of the root compartment.
ServiceName This property is required. string
Service Name.
EntitlementId string
Subscription or entitlement Id.
Filters Changes to this property will trigger replacement. []GetResourcesFilter
compartmentId This property is required. String
The OCID of the root compartment.
serviceName This property is required. String
Service Name.
entitlementId String
Subscription or entitlement Id.
filters Changes to this property will trigger replacement. List<GetResourcesFilter>
compartmentId This property is required. string
The OCID of the root compartment.
serviceName This property is required. string
Service Name.
entitlementId string
Subscription or entitlement Id.
filters Changes to this property will trigger replacement. GetResourcesFilter[]
compartment_id This property is required. str
The OCID of the root compartment.
service_name This property is required. str
Service Name.
entitlement_id str
Subscription or entitlement Id.
filters Changes to this property will trigger replacement. Sequence[usageproxy.GetResourcesFilter]
compartmentId This property is required. String
The OCID of the root compartment.
serviceName This property is required. String
Service Name.
entitlementId String
Subscription or entitlement Id.
filters Changes to this property will trigger replacement. List<Property Map>

getResources Result

The following output properties are available:

CompartmentId string
Id string
The provider-assigned unique ID for this managed resource.
ResourcesCollections List<GetResourcesResourcesCollection>
The list of resources_collection.
ServiceName string
EntitlementId string
Filters List<GetResourcesFilter>
CompartmentId string
Id string
The provider-assigned unique ID for this managed resource.
ResourcesCollections []GetResourcesResourcesCollection
The list of resources_collection.
ServiceName string
EntitlementId string
Filters []GetResourcesFilter
compartmentId String
id String
The provider-assigned unique ID for this managed resource.
resourcesCollections List<GetResourcesResourcesCollection>
The list of resources_collection.
serviceName String
entitlementId String
filters List<GetResourcesFilter>
compartmentId string
id string
The provider-assigned unique ID for this managed resource.
resourcesCollections GetResourcesResourcesCollection[]
The list of resources_collection.
serviceName string
entitlementId string
filters GetResourcesFilter[]
compartment_id str
id str
The provider-assigned unique ID for this managed resource.
resources_collections Sequence[usageproxy.GetResourcesResourcesCollection]
The list of resources_collection.
service_name str
entitlement_id str
filters Sequence[usageproxy.GetResourcesFilter]
compartmentId String
id String
The provider-assigned unique ID for this managed resource.
resourcesCollections List<Property Map>
The list of resources_collection.
serviceName String
entitlementId String
filters List<Property Map>

Supporting Types

GetResourcesFilter

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

GetResourcesResourcesCollection

Items This property is required. List<GetResourcesResourcesCollectionItem>
The list of resource details for a service.
Items This property is required. []GetResourcesResourcesCollectionItem
The list of resource details for a service.
items This property is required. List<GetResourcesResourcesCollectionItem>
The list of resource details for a service.
items This property is required. GetResourcesResourcesCollectionItem[]
The list of resource details for a service.
items This property is required. Sequence[usageproxy.GetResourcesResourcesCollectionItem]
The list of resource details for a service.
items This property is required. List<Property Map>
The list of resource details for a service.

GetResourcesResourcesCollectionItem

ChildResources This property is required. List<string>
The details of any child resources.
DailyUnitDisplayName This property is required. string
Units to be used for daily aggregated data.
Description This property is required. string
Description of the resource.
HourlyUnitDisplayName This property is required. string
Units to be used for hourly aggregated data.
InstanceType This property is required. string
Instance type for the resource.
IsPurchased This property is required. bool
Indicates if the SKU was purchased
Name This property is required. string
Name of the resource.
RawUnitDisplayName This property is required. string
Default units to use when unspecified.
Servicename This property is required. string
Name of the service.
Skuses This property is required. List<GetResourcesResourcesCollectionItemSkus>
The details of resource Skus.
UsageDataType This property is required. string
Usage data type of the resource.
ChildResources This property is required. []string
The details of any child resources.
DailyUnitDisplayName This property is required. string
Units to be used for daily aggregated data.
Description This property is required. string
Description of the resource.
HourlyUnitDisplayName This property is required. string
Units to be used for hourly aggregated data.
InstanceType This property is required. string
Instance type for the resource.
IsPurchased This property is required. bool
Indicates if the SKU was purchased
Name This property is required. string
Name of the resource.
RawUnitDisplayName This property is required. string
Default units to use when unspecified.
Servicename This property is required. string
Name of the service.
Skuses This property is required. []GetResourcesResourcesCollectionItemSkus
The details of resource Skus.
UsageDataType This property is required. string
Usage data type of the resource.
childResources This property is required. List<String>
The details of any child resources.
dailyUnitDisplayName This property is required. String
Units to be used for daily aggregated data.
description This property is required. String
Description of the resource.
hourlyUnitDisplayName This property is required. String
Units to be used for hourly aggregated data.
instanceType This property is required. String
Instance type for the resource.
isPurchased This property is required. Boolean
Indicates if the SKU was purchased
name This property is required. String
Name of the resource.
rawUnitDisplayName This property is required. String
Default units to use when unspecified.
servicename This property is required. String
Name of the service.
skuses This property is required. List<GetResourcesResourcesCollectionItemSkus>
The details of resource Skus.
usageDataType This property is required. String
Usage data type of the resource.
childResources This property is required. string[]
The details of any child resources.
dailyUnitDisplayName This property is required. string
Units to be used for daily aggregated data.
description This property is required. string
Description of the resource.
hourlyUnitDisplayName This property is required. string
Units to be used for hourly aggregated data.
instanceType This property is required. string
Instance type for the resource.
isPurchased This property is required. boolean
Indicates if the SKU was purchased
name This property is required. string
Name of the resource.
rawUnitDisplayName This property is required. string
Default units to use when unspecified.
servicename This property is required. string
Name of the service.
skuses This property is required. GetResourcesResourcesCollectionItemSkus[]
The details of resource Skus.
usageDataType This property is required. string
Usage data type of the resource.
child_resources This property is required. Sequence[str]
The details of any child resources.
daily_unit_display_name This property is required. str
Units to be used for daily aggregated data.
description This property is required. str
Description of the resource.
hourly_unit_display_name This property is required. str
Units to be used for hourly aggregated data.
instance_type This property is required. str
Instance type for the resource.
is_purchased This property is required. bool
Indicates if the SKU was purchased
name This property is required. str
Name of the resource.
raw_unit_display_name This property is required. str
Default units to use when unspecified.
servicename This property is required. str
Name of the service.
skuses This property is required. Sequence[usageproxy.GetResourcesResourcesCollectionItemSkus]
The details of resource Skus.
usage_data_type This property is required. str
Usage data type of the resource.
childResources This property is required. List<String>
The details of any child resources.
dailyUnitDisplayName This property is required. String
Units to be used for daily aggregated data.
description This property is required. String
Description of the resource.
hourlyUnitDisplayName This property is required. String
Units to be used for hourly aggregated data.
instanceType This property is required. String
Instance type for the resource.
isPurchased This property is required. Boolean
Indicates if the SKU was purchased
name This property is required. String
Name of the resource.
rawUnitDisplayName This property is required. String
Default units to use when unspecified.
servicename This property is required. String
Name of the service.
skuses This property is required. List<Property Map>
The details of resource Skus.
usageDataType This property is required. String
Usage data type of the resource.

GetResourcesResourcesCollectionItemSkus

CloudCreditType This property is required. string
The cloud credit type for the resource.
SkuId This property is required. string
The Sku Id for the resource.
SkuType This property is required. string
The Sku type for the resource.
CloudCreditType This property is required. string
The cloud credit type for the resource.
SkuId This property is required. string
The Sku Id for the resource.
SkuType This property is required. string
The Sku type for the resource.
cloudCreditType This property is required. String
The cloud credit type for the resource.
skuId This property is required. String
The Sku Id for the resource.
skuType This property is required. String
The Sku type for the resource.
cloudCreditType This property is required. string
The cloud credit type for the resource.
skuId This property is required. string
The Sku Id for the resource.
skuType This property is required. string
The Sku type for the resource.
cloud_credit_type This property is required. str
The cloud credit type for the resource.
sku_id This property is required. str
The Sku Id for the resource.
sku_type This property is required. str
The Sku type for the resource.
cloudCreditType This property is required. String
The cloud credit type for the resource.
skuId This property is required. String
The Sku Id for the resource.
skuType This property is required. String
The Sku type for the resource.

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.31.0 published on Thursday, Apr 17, 2025 by Pulumi