1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. UsageProxy
  5. getResources
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.UsageProxy.getResources

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 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,
    });
    
    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/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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:UsageProxy/getResources:getResources
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the root compartment.
    ServiceName string
    Service Name.
    EntitlementId string
    Subscription or entitlement Id.
    Filters List<GetResourcesFilter>
    CompartmentId string
    The OCID of the root compartment.
    ServiceName string
    Service Name.
    EntitlementId string
    Subscription or entitlement Id.
    Filters []GetResourcesFilter
    compartmentId String
    The OCID of the root compartment.
    serviceName String
    Service Name.
    entitlementId String
    Subscription or entitlement Id.
    filters List<GetResourcesFilter>
    compartmentId string
    The OCID of the root compartment.
    serviceName string
    Service Name.
    entitlementId string
    Subscription or entitlement Id.
    filters GetResourcesFilter[]
    compartment_id str
    The OCID of the root compartment.
    service_name str
    Service Name.
    entitlement_id str
    Subscription or entitlement Id.
    filters Sequence[usageproxy.GetResourcesFilter]
    compartmentId String
    The OCID of the root compartment.
    serviceName String
    Service Name.
    entitlementId String
    Subscription or entitlement Id.
    filters 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 string
    Name of the resource.
    Values List<string>
    Regex bool
    Name string
    Name of the resource.
    Values []string
    Regex bool
    name String
    Name of the resource.
    values List<String>
    regex Boolean
    name string
    Name of the resource.
    values string[]
    regex boolean
    name str
    Name of the resource.
    values Sequence[str]
    regex bool
    name String
    Name of the resource.
    values List<String>
    regex Boolean

    GetResourcesResourcesCollection

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

    GetResourcesResourcesCollectionItem

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

    GetResourcesResourcesCollectionItemSkus

    CloudCreditType string
    The cloud credit type for the resource.
    SkuId string
    The Sku Id for the resource.
    SkuType string
    The Sku type for the resource.
    CloudCreditType string
    The cloud credit type for the resource.
    SkuId string
    The Sku Id for the resource.
    SkuType string
    The Sku type for the resource.
    cloudCreditType String
    The cloud credit type for the resource.
    skuId String
    The Sku Id for the resource.
    skuType String
    The Sku type for the resource.
    cloudCreditType string
    The cloud credit type for the resource.
    skuId string
    The Sku Id for the resource.
    skuType string
    The Sku type for the resource.
    cloud_credit_type str
    The cloud credit type for the resource.
    sku_id str
    The Sku Id for the resource.
    sku_type str
    The Sku type for the resource.
    cloudCreditType String
    The cloud credit type for the resource.
    skuId String
    The Sku Id for the resource.
    skuType 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.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi