Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi
oci.UsageProxy.getResources
Explore with Pulumi AI
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,
});
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"])
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
})
}
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,
});
});
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());
}
}
variables:
testResources:
fn::invoke:
function: oci:UsageProxy:getResources
arguments:
compartmentId: ${compartmentId}
serviceName: ${testService.name}
entitlementId: ${testEntitlement.id}
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>
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]
func GetResources(ctx *Context, args *GetResourcesArgs, opts ...InvokeOption) (*GetResourcesResult, error)
func GetResourcesOutput(ctx *Context, args *GetResourcesOutputArgs, opts ...InvokeOption) GetResourcesResultOutput
> 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)
}
public static CompletableFuture<GetResourcesResult> getResources(GetResourcesArgs args, InvokeOptions options)
public static Output<GetResourcesResult> getResources(GetResourcesArgs args, InvokeOptions options)
fn::invoke:
function: oci:UsageProxy/getResources:getResources
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id This property is required. string - The OCID of the root compartment.
- Service
Name This property is required. string - Service Name.
- Entitlement
Id string - Subscription or entitlement Id.
- Filters
Changes to this property will trigger replacement.
Resources Filter>
- Compartment
Id This property is required. string - The OCID of the root compartment.
- Service
Name This property is required. string - Service Name.
- Entitlement
Id string - Subscription or entitlement Id.
- Filters
Changes to this property will trigger replacement.
Resources Filter
- compartment
Id This property is required. String - The OCID of the root compartment.
- service
Name This property is required. String - Service Name.
- entitlement
Id String - Subscription or entitlement Id.
- filters
Changes to this property will trigger replacement.
Resources Filter>
- compartment
Id This property is required. string - The OCID of the root compartment.
- service
Name This property is required. string - Service Name.
- entitlement
Id string - Subscription or entitlement Id.
- filters
Changes to this property will trigger replacement.
Resources Filter[]
- 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.
Get Resources Filter]
- compartment
Id This property is required. String - The OCID of the root compartment.
- service
Name This property is required. String - Service Name.
- entitlement
Id String - Subscription or entitlement Id.
- filters
Changes to this property will trigger replacement.
getResources Result
The following output properties are available:
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Resources
Collections List<GetResources Resources Collection> - The list of resources_collection.
- Service
Name string - Entitlement
Id string - Filters
List<Get
Resources Filter>
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Resources
Collections []GetResources Resources Collection - The list of resources_collection.
- Service
Name string - Entitlement
Id string - Filters
[]Get
Resources Filter
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- resources
Collections List<GetResources Resources Collection> - The list of resources_collection.
- service
Name String - entitlement
Id String - filters
List<Get
Resources Filter>
- compartment
Id string - id string
- The provider-assigned unique ID for this managed resource.
- resources
Collections GetResources Resources Collection[] - The list of resources_collection.
- service
Name string - entitlement
Id string - filters
Get
Resources Filter[]
- compartment_
id str - id str
- The provider-assigned unique ID for this managed resource.
- resources_
collections Sequence[usageproxy.Get Resources Resources Collection] - The list of resources_collection.
- service_
name str - entitlement_
id str - filters
Sequence[usageproxy.
Get Resources Filter]
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- resources
Collections List<Property Map> - The list of resources_collection.
- service
Name String - entitlement
Id String - filters List<Property Map>
Supporting Types
GetResourcesFilter
GetResourcesResourcesCollection
- Items
This property is required. List<GetResources Resources Collection Item> - The list of resource details for a service.
- Items
This property is required. []GetResources Resources Collection Item - The list of resource details for a service.
- items
This property is required. List<GetResources Resources Collection Item> - The list of resource details for a service.
- items
This property is required. GetResources Resources Collection Item[] - The list of resource details for a service.
- items
This property is required. Sequence[usageproxy.Get Resources Resources Collection Item] - 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
- Child
Resources This property is required. List<string> - The details of any child resources.
- Daily
Unit Display Name This property is required. string - Units to be used for daily aggregated data.
- Description
This property is required. string - Description of the resource.
- Hourly
Unit Display Name This property is required. string - Units to be used for hourly aggregated data.
- Instance
Type This property is required. string - Instance type for the resource.
- Is
Purchased This property is required. bool - Indicates if the SKU was purchased
- Name
This property is required. string - Name of the resource.
- Raw
Unit Display Name 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<GetResources Resources Collection Item Skus> - The details of resource Skus.
- Usage
Data Type This property is required. string - Usage data type of the resource.
- Child
Resources This property is required. []string - The details of any child resources.
- Daily
Unit Display Name This property is required. string - Units to be used for daily aggregated data.
- Description
This property is required. string - Description of the resource.
- Hourly
Unit Display Name This property is required. string - Units to be used for hourly aggregated data.
- Instance
Type This property is required. string - Instance type for the resource.
- Is
Purchased This property is required. bool - Indicates if the SKU was purchased
- Name
This property is required. string - Name of the resource.
- Raw
Unit Display Name 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. []GetResources Resources Collection Item Skus - The details of resource Skus.
- Usage
Data Type This property is required. string - Usage data type of the resource.
- child
Resources This property is required. List<String> - The details of any child resources.
- daily
Unit Display Name This property is required. String - Units to be used for daily aggregated data.
- description
This property is required. String - Description of the resource.
- hourly
Unit Display Name This property is required. String - Units to be used for hourly aggregated data.
- instance
Type This property is required. String - Instance type for the resource.
- is
Purchased This property is required. Boolean - Indicates if the SKU was purchased
- name
This property is required. String - Name of the resource.
- raw
Unit Display Name 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<GetResources Resources Collection Item Skus> - The details of resource Skus.
- usage
Data Type This property is required. String - Usage data type of the resource.
- child
Resources This property is required. string[] - The details of any child resources.
- daily
Unit Display Name This property is required. string - Units to be used for daily aggregated data.
- description
This property is required. string - Description of the resource.
- hourly
Unit Display Name This property is required. string - Units to be used for hourly aggregated data.
- instance
Type This property is required. string - Instance type for the resource.
- is
Purchased This property is required. boolean - Indicates if the SKU was purchased
- name
This property is required. string - Name of the resource.
- raw
Unit Display Name 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. GetResources Resources Collection Item Skus[] - The details of resource Skus.
- usage
Data Type 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.Get Resources Resources Collection Item Skus] - The details of resource Skus.
- usage_
data_ type This property is required. str - Usage data type of the resource.
- child
Resources This property is required. List<String> - The details of any child resources.
- daily
Unit Display Name This property is required. String - Units to be used for daily aggregated data.
- description
This property is required. String - Description of the resource.
- hourly
Unit Display Name This property is required. String - Units to be used for hourly aggregated data.
- instance
Type This property is required. String - Instance type for the resource.
- is
Purchased This property is required. Boolean - Indicates if the SKU was purchased
- name
This property is required. String - Name of the resource.
- raw
Unit Display Name 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.
- usage
Data Type This property is required. String - Usage data type of the resource.
GetResourcesResourcesCollectionItemSkus
- Cloud
Credit Type This property is required. string - The cloud credit type for the resource.
- Sku
Id This property is required. string - The Sku Id for the resource.
- Sku
Type This property is required. string - The Sku type for the resource.
- Cloud
Credit Type This property is required. string - The cloud credit type for the resource.
- Sku
Id This property is required. string - The Sku Id for the resource.
- Sku
Type This property is required. string - The Sku type for the resource.
- cloud
Credit Type This property is required. String - The cloud credit type for the resource.
- sku
Id This property is required. String - The Sku Id for the resource.
- sku
Type This property is required. String - The Sku type for the resource.
- cloud
Credit Type This property is required. string - The cloud credit type for the resource.
- sku
Id This property is required. string - The Sku Id for the resource.
- sku
Type 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.
- cloud
Credit Type This property is required. String - The cloud credit type for the resource.
- sku
Id This property is required. String - The Sku Id for the resource.
- sku
Type 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.