Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.UsageProxy.getResources
Explore with Pulumi AI
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:
- Compartment
Id string - The OCID of the root compartment.
- Service
Name string - Service Name.
- Entitlement
Id string - Subscription or entitlement Id.
- Filters
List<Get
Resources Filter>
- Compartment
Id string - The OCID of the root compartment.
- Service
Name string - Service Name.
- Entitlement
Id string - Subscription or entitlement Id.
- Filters
[]Get
Resources Filter
- compartment
Id String - The OCID of the root compartment.
- service
Name String - Service Name.
- entitlement
Id String - Subscription or entitlement Id.
- filters
List<Get
Resources Filter>
- compartment
Id string - The OCID of the root compartment.
- service
Name string - Service Name.
- entitlement
Id string - Subscription or entitlement Id.
- filters
Get
Resources Filter[]
- compartment_
id str - The OCID of the root compartment.
- service_
name str - Service Name.
- entitlement_
id str - Subscription or entitlement Id.
- filters
Sequence[usageproxy.
Get Resources Filter]
- compartment
Id String - The OCID of the root compartment.
- service
Name String - Service Name.
- entitlement
Id String - Subscription or entitlement Id.
- filters List<Property Map>
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
List<Get
Resources Resources Collection Item> - The list of resource details for a service.
- Items
[]Get
Resources Resources Collection Item - The list of resource details for a service.
- items
List<Get
Resources Resources Collection Item> - The list of resource details for a service.
- items
Get
Resources Resources Collection Item[] - The list of resource details for a service.
- items
Sequence[usageproxy.
Get Resources Resources Collection Item] - The list of resource details for a service.
- items List<Property Map>
- The list of resource details for a service.
GetResourcesResourcesCollectionItem
- Child
Resources List<string> - The details of any child resources.
- Daily
Unit stringDisplay Name - Units to be used for daily aggregated data.
- Description string
- Description of the resource.
- Hourly
Unit stringDisplay Name - Units to be used for hourly aggregated data.
- Instance
Type string - Instance type for the resource.
- Is
Purchased bool - Indicates if the SKU was purchased
- Name string
- Name of the resource.
- Raw
Unit stringDisplay Name - Default units to use when unspecified.
- Servicename string
- Name of the service.
- Skuses
List<Get
Resources Resources Collection Item Skus> - The details of resource Skus.
- Usage
Data stringType - Usage data type of the resource.
- Child
Resources []string - The details of any child resources.
- Daily
Unit stringDisplay Name - Units to be used for daily aggregated data.
- Description string
- Description of the resource.
- Hourly
Unit stringDisplay Name - Units to be used for hourly aggregated data.
- Instance
Type string - Instance type for the resource.
- Is
Purchased bool - Indicates if the SKU was purchased
- Name string
- Name of the resource.
- Raw
Unit stringDisplay Name - Default units to use when unspecified.
- Servicename string
- Name of the service.
- Skuses
[]Get
Resources Resources Collection Item Skus - The details of resource Skus.
- Usage
Data stringType - Usage data type of the resource.
- child
Resources List<String> - The details of any child resources.
- daily
Unit StringDisplay Name - Units to be used for daily aggregated data.
- description String
- Description of the resource.
- hourly
Unit StringDisplay Name - Units to be used for hourly aggregated data.
- instance
Type String - Instance type for the resource.
- is
Purchased Boolean - Indicates if the SKU was purchased
- name String
- Name of the resource.
- raw
Unit StringDisplay Name - Default units to use when unspecified.
- servicename String
- Name of the service.
- skuses
List<Get
Resources Resources Collection Item Skus> - The details of resource Skus.
- usage
Data StringType - Usage data type of the resource.
- child
Resources string[] - The details of any child resources.
- daily
Unit stringDisplay Name - Units to be used for daily aggregated data.
- description string
- Description of the resource.
- hourly
Unit stringDisplay Name - Units to be used for hourly aggregated data.
- instance
Type string - Instance type for the resource.
- is
Purchased boolean - Indicates if the SKU was purchased
- name string
- Name of the resource.
- raw
Unit stringDisplay Name - Default units to use when unspecified.
- servicename string
- Name of the service.
- skuses
Get
Resources Resources Collection Item Skus[] - The details of resource Skus.
- usage
Data stringType - Usage data type of the resource.
- child_
resources Sequence[str] - The details of any child resources.
- daily_
unit_ strdisplay_ name - Units to be used for daily aggregated data.
- description str
- Description of the resource.
- hourly_
unit_ strdisplay_ name - 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_ strdisplay_ name - Default units to use when unspecified.
- servicename str
- Name of the service.
- skuses
Sequence[usageproxy.
Get Resources Resources Collection Item Skus] - The details of resource Skus.
- usage_
data_ strtype - Usage data type of the resource.
- child
Resources List<String> - The details of any child resources.
- daily
Unit StringDisplay Name - Units to be used for daily aggregated data.
- description String
- Description of the resource.
- hourly
Unit StringDisplay Name - Units to be used for hourly aggregated data.
- instance
Type String - Instance type for the resource.
- is
Purchased Boolean - Indicates if the SKU was purchased
- name String
- Name of the resource.
- raw
Unit StringDisplay Name - Default units to use when unspecified.
- servicename String
- Name of the service.
- skuses List<Property Map>
- The details of resource Skus.
- usage
Data StringType - Usage data type of the resource.
GetResourcesResourcesCollectionItemSkus
- Cloud
Credit stringType - The cloud credit type for the resource.
- Sku
Id string - The Sku Id for the resource.
- Sku
Type string - The Sku type for the resource.
- Cloud
Credit stringType - The cloud credit type for the resource.
- Sku
Id string - The Sku Id for the resource.
- Sku
Type string - The Sku type for the resource.
- cloud
Credit StringType - The cloud credit type for the resource.
- sku
Id String - The Sku Id for the resource.
- sku
Type String - The Sku type for the resource.
- cloud
Credit stringType - The cloud credit type for the resource.
- sku
Id string - The Sku Id for the resource.
- sku
Type string - The Sku type for the resource.
- cloud_
credit_ strtype - 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.
- cloud
Credit StringType - The cloud credit type for the resource.
- sku
Id String - The Sku Id for the resource.
- sku
Type 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 v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi