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

oci.UsageProxy.getUsagelimits

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 Usagelimits in Oracle Cloud Infrastructure Usage Proxy service.

Returns the list of usage limit for the subscription ID and tenant ID.

Example Usage

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

const testUsagelimits = oci.UsageProxy.getUsagelimits({
    compartmentId: compartmentId,
    subscriptionId: testSubscription.id,
    limitType: usagelimitLimitType,
    resourceType: usagelimitResourceType,
    serviceType: usagelimitServiceType,
});
Copy
import pulumi
import pulumi_oci as oci

test_usagelimits = oci.UsageProxy.get_usagelimits(compartment_id=compartment_id,
    subscription_id=test_subscription["id"],
    limit_type=usagelimit_limit_type,
    resource_type=usagelimit_resource_type,
    service_type=usagelimit_service_type)
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.GetUsagelimits(ctx, &usageproxy.GetUsagelimitsArgs{
			CompartmentId:  compartmentId,
			SubscriptionId: testSubscription.Id,
			LimitType:      pulumi.StringRef(usagelimitLimitType),
			ResourceType:   pulumi.StringRef(usagelimitResourceType),
			ServiceType:    pulumi.StringRef(usagelimitServiceType),
		}, 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 testUsagelimits = Oci.UsageProxy.GetUsagelimits.Invoke(new()
    {
        CompartmentId = compartmentId,
        SubscriptionId = testSubscription.Id,
        LimitType = usagelimitLimitType,
        ResourceType = usagelimitResourceType,
        ServiceType = usagelimitServiceType,
    });

});
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.GetUsagelimitsArgs;
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 testUsagelimits = UsageProxyFunctions.getUsagelimits(GetUsagelimitsArgs.builder()
            .compartmentId(compartmentId)
            .subscriptionId(testSubscription.id())
            .limitType(usagelimitLimitType)
            .resourceType(usagelimitResourceType)
            .serviceType(usagelimitServiceType)
            .build());

    }
}
Copy
variables:
  testUsagelimits:
    fn::invoke:
      function: oci:UsageProxy:getUsagelimits
      arguments:
        compartmentId: ${compartmentId}
        subscriptionId: ${testSubscription.id}
        limitType: ${usagelimitLimitType}
        resourceType: ${usagelimitResourceType}
        serviceType: ${usagelimitServiceType}
Copy

Using getUsagelimits

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 getUsagelimits(args: GetUsagelimitsArgs, opts?: InvokeOptions): Promise<GetUsagelimitsResult>
function getUsagelimitsOutput(args: GetUsagelimitsOutputArgs, opts?: InvokeOptions): Output<GetUsagelimitsResult>
Copy
def get_usagelimits(compartment_id: Optional[str] = None,
                    filters: Optional[Sequence[_usageproxy.GetUsagelimitsFilter]] = None,
                    limit_type: Optional[str] = None,
                    resource_type: Optional[str] = None,
                    service_type: Optional[str] = None,
                    subscription_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetUsagelimitsResult
def get_usagelimits_output(compartment_id: Optional[pulumi.Input[str]] = None,
                    filters: Optional[pulumi.Input[Sequence[pulumi.Input[_usageproxy.GetUsagelimitsFilterArgs]]]] = None,
                    limit_type: Optional[pulumi.Input[str]] = None,
                    resource_type: Optional[pulumi.Input[str]] = None,
                    service_type: Optional[pulumi.Input[str]] = None,
                    subscription_id: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetUsagelimitsResult]
Copy
func GetUsagelimits(ctx *Context, args *GetUsagelimitsArgs, opts ...InvokeOption) (*GetUsagelimitsResult, error)
func GetUsagelimitsOutput(ctx *Context, args *GetUsagelimitsOutputArgs, opts ...InvokeOption) GetUsagelimitsResultOutput
Copy

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

public static class GetUsagelimits 
{
    public static Task<GetUsagelimitsResult> InvokeAsync(GetUsagelimitsArgs args, InvokeOptions? opts = null)
    public static Output<GetUsagelimitsResult> Invoke(GetUsagelimitsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetUsagelimitsResult> getUsagelimits(GetUsagelimitsArgs args, InvokeOptions options)
public static Output<GetUsagelimitsResult> getUsagelimits(GetUsagelimitsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:UsageProxy/getUsagelimits:getUsagelimits
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

CompartmentId This property is required. string
The OCID of the root compartment.
SubscriptionId This property is required. string
The subscription ID for which rewards information is requested for.
Filters Changes to this property will trigger replacement. List<GetUsagelimitsFilter>
LimitType string
Hard or soft limit. Hard limits lead to breaches, soft to alerts.
ResourceType string
Resource Name.
ServiceType string
Service Name.
CompartmentId This property is required. string
The OCID of the root compartment.
SubscriptionId This property is required. string
The subscription ID for which rewards information is requested for.
Filters Changes to this property will trigger replacement. []GetUsagelimitsFilter
LimitType string
Hard or soft limit. Hard limits lead to breaches, soft to alerts.
ResourceType string
Resource Name.
ServiceType string
Service Name.
compartmentId This property is required. String
The OCID of the root compartment.
subscriptionId This property is required. String
The subscription ID for which rewards information is requested for.
filters Changes to this property will trigger replacement. List<GetUsagelimitsFilter>
limitType String
Hard or soft limit. Hard limits lead to breaches, soft to alerts.
resourceType String
Resource Name.
serviceType String
Service Name.
compartmentId This property is required. string
The OCID of the root compartment.
subscriptionId This property is required. string
The subscription ID for which rewards information is requested for.
filters Changes to this property will trigger replacement. GetUsagelimitsFilter[]
limitType string
Hard or soft limit. Hard limits lead to breaches, soft to alerts.
resourceType string
Resource Name.
serviceType string
Service Name.
compartment_id This property is required. str
The OCID of the root compartment.
subscription_id This property is required. str
The subscription ID for which rewards information is requested for.
filters Changes to this property will trigger replacement. Sequence[usageproxy.GetUsagelimitsFilter]
limit_type str
Hard or soft limit. Hard limits lead to breaches, soft to alerts.
resource_type str
Resource Name.
service_type str
Service Name.
compartmentId This property is required. String
The OCID of the root compartment.
subscriptionId This property is required. String
The subscription ID for which rewards information is requested for.
filters Changes to this property will trigger replacement. List<Property Map>
limitType String
Hard or soft limit. Hard limits lead to breaches, soft to alerts.
resourceType String
Resource Name.
serviceType String
Service Name.

getUsagelimits Result

The following output properties are available:

CompartmentId string
Id string
The provider-assigned unique ID for this managed resource.
SubscriptionId string
UsageLimitCollections List<GetUsagelimitsUsageLimitCollection>
The list of usage_limit_collection.
Filters List<GetUsagelimitsFilter>
LimitType string
The limit type of the usage limit
ResourceType string
ServiceType string
CompartmentId string
Id string
The provider-assigned unique ID for this managed resource.
SubscriptionId string
UsageLimitCollections []GetUsagelimitsUsageLimitCollection
The list of usage_limit_collection.
Filters []GetUsagelimitsFilter
LimitType string
The limit type of the usage limit
ResourceType string
ServiceType string
compartmentId String
id String
The provider-assigned unique ID for this managed resource.
subscriptionId String
usageLimitCollections List<GetUsagelimitsUsageLimitCollection>
The list of usage_limit_collection.
filters List<GetUsagelimitsFilter>
limitType String
The limit type of the usage limit
resourceType String
serviceType String
compartmentId string
id string
The provider-assigned unique ID for this managed resource.
subscriptionId string
usageLimitCollections GetUsagelimitsUsageLimitCollection[]
The list of usage_limit_collection.
filters GetUsagelimitsFilter[]
limitType string
The limit type of the usage limit
resourceType string
serviceType string
compartment_id str
id str
The provider-assigned unique ID for this managed resource.
subscription_id str
usage_limit_collections Sequence[usageproxy.GetUsagelimitsUsageLimitCollection]
The list of usage_limit_collection.
filters Sequence[usageproxy.GetUsagelimitsFilter]
limit_type str
The limit type of the usage limit
resource_type str
service_type str
compartmentId String
id String
The provider-assigned unique ID for this managed resource.
subscriptionId String
usageLimitCollections List<Property Map>
The list of usage_limit_collection.
filters List<Property Map>
limitType String
The limit type of the usage limit
resourceType String
serviceType String

Supporting Types

GetUsagelimitsFilter

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

GetUsagelimitsUsageLimitCollection

Items This property is required. List<GetUsagelimitsUsageLimitCollectionItem>
The list of usage limits.
Items This property is required. []GetUsagelimitsUsageLimitCollectionItem
The list of usage limits.
items This property is required. List<GetUsagelimitsUsageLimitCollectionItem>
The list of usage limits.
items This property is required. GetUsagelimitsUsageLimitCollectionItem[]
The list of usage limits.
items This property is required. Sequence[usageproxy.GetUsagelimitsUsageLimitCollectionItem]
The list of usage limits.
items This property is required. List<Property Map>
The list of usage limits.

GetUsagelimitsUsageLimitCollectionItem

Action This property is required. string
The action when usage limit is hit
AlertLevel This property is required. double
The alert level of the usage limit
CreatedBy This property is required. string
The user who created the limit
EntitlementId This property is required. string
Entitlement ID of the usage limit
Id This property is required. string
The usage limit ID
Limit This property is required. string
LimitType This property is required. string
Hard or soft limit. Hard limits lead to breaches, soft to alerts.
MaxHardLimit This property is required. string
The maximum hard limit set for the usage limit
ModifiedBy This property is required. string
The user who modified the limit
ResourceName This property is required. string
The resource for which the limit is defined
ServiceName This property is required. string
The service for which the limit is defined
SkuPartId This property is required. string
The SKU for which the usage limit is set
State This property is required. string
The usage limit lifecycle state.
TimeCreated This property is required. string
Time when the usage limit was created
TimeModified This property is required. string
Time when the usage limit was modified
ValueType This property is required. string
The value type of the usage limit
Action This property is required. string
The action when usage limit is hit
AlertLevel This property is required. float64
The alert level of the usage limit
CreatedBy This property is required. string
The user who created the limit
EntitlementId This property is required. string
Entitlement ID of the usage limit
Id This property is required. string
The usage limit ID
Limit This property is required. string
LimitType This property is required. string
Hard or soft limit. Hard limits lead to breaches, soft to alerts.
MaxHardLimit This property is required. string
The maximum hard limit set for the usage limit
ModifiedBy This property is required. string
The user who modified the limit
ResourceName This property is required. string
The resource for which the limit is defined
ServiceName This property is required. string
The service for which the limit is defined
SkuPartId This property is required. string
The SKU for which the usage limit is set
State This property is required. string
The usage limit lifecycle state.
TimeCreated This property is required. string
Time when the usage limit was created
TimeModified This property is required. string
Time when the usage limit was modified
ValueType This property is required. string
The value type of the usage limit
action This property is required. String
The action when usage limit is hit
alertLevel This property is required. Double
The alert level of the usage limit
createdBy This property is required. String
The user who created the limit
entitlementId This property is required. String
Entitlement ID of the usage limit
id This property is required. String
The usage limit ID
limit This property is required. String
limitType This property is required. String
Hard or soft limit. Hard limits lead to breaches, soft to alerts.
maxHardLimit This property is required. String
The maximum hard limit set for the usage limit
modifiedBy This property is required. String
The user who modified the limit
resourceName This property is required. String
The resource for which the limit is defined
serviceName This property is required. String
The service for which the limit is defined
skuPartId This property is required. String
The SKU for which the usage limit is set
state This property is required. String
The usage limit lifecycle state.
timeCreated This property is required. String
Time when the usage limit was created
timeModified This property is required. String
Time when the usage limit was modified
valueType This property is required. String
The value type of the usage limit
action This property is required. string
The action when usage limit is hit
alertLevel This property is required. number
The alert level of the usage limit
createdBy This property is required. string
The user who created the limit
entitlementId This property is required. string
Entitlement ID of the usage limit
id This property is required. string
The usage limit ID
limit This property is required. string
limitType This property is required. string
Hard or soft limit. Hard limits lead to breaches, soft to alerts.
maxHardLimit This property is required. string
The maximum hard limit set for the usage limit
modifiedBy This property is required. string
The user who modified the limit
resourceName This property is required. string
The resource for which the limit is defined
serviceName This property is required. string
The service for which the limit is defined
skuPartId This property is required. string
The SKU for which the usage limit is set
state This property is required. string
The usage limit lifecycle state.
timeCreated This property is required. string
Time when the usage limit was created
timeModified This property is required. string
Time when the usage limit was modified
valueType This property is required. string
The value type of the usage limit
action This property is required. str
The action when usage limit is hit
alert_level This property is required. float
The alert level of the usage limit
created_by This property is required. str
The user who created the limit
entitlement_id This property is required. str
Entitlement ID of the usage limit
id This property is required. str
The usage limit ID
limit This property is required. str
limit_type This property is required. str
Hard or soft limit. Hard limits lead to breaches, soft to alerts.
max_hard_limit This property is required. str
The maximum hard limit set for the usage limit
modified_by This property is required. str
The user who modified the limit
resource_name This property is required. str
The resource for which the limit is defined
service_name This property is required. str
The service for which the limit is defined
sku_part_id This property is required. str
The SKU for which the usage limit is set
state This property is required. str
The usage limit lifecycle state.
time_created This property is required. str
Time when the usage limit was created
time_modified This property is required. str
Time when the usage limit was modified
value_type This property is required. str
The value type of the usage limit
action This property is required. String
The action when usage limit is hit
alertLevel This property is required. Number
The alert level of the usage limit
createdBy This property is required. String
The user who created the limit
entitlementId This property is required. String
Entitlement ID of the usage limit
id This property is required. String
The usage limit ID
limit This property is required. String
limitType This property is required. String
Hard or soft limit. Hard limits lead to breaches, soft to alerts.
maxHardLimit This property is required. String
The maximum hard limit set for the usage limit
modifiedBy This property is required. String
The user who modified the limit
resourceName This property is required. String
The resource for which the limit is defined
serviceName This property is required. String
The service for which the limit is defined
skuPartId This property is required. String
The SKU for which the usage limit is set
state This property is required. String
The usage limit lifecycle state.
timeCreated This property is required. String
Time when the usage limit was created
timeModified This property is required. String
Time when the usage limit was modified
valueType This property is required. String
The value type of the usage limit

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