Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.UsageProxy.getUsagelimits
Explore with Pulumi AI
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,
});
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)
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
	})
}
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,
    });
});
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());
    }
}
variables:
  testUsagelimits:
    fn::invoke:
      function: oci:UsageProxy:getUsagelimits
      arguments:
        compartmentId: ${compartmentId}
        subscriptionId: ${testSubscription.id}
        limitType: ${usagelimitLimitType}
        resourceType: ${usagelimitResourceType}
        serviceType: ${usagelimitServiceType}
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>def get_usagelimits(compartment_id: Optional[str] = None,
                    filters: Optional[Sequence[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[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]func GetUsagelimits(ctx *Context, args *GetUsagelimitsArgs, opts ...InvokeOption) (*GetUsagelimitsResult, error)
func GetUsagelimitsOutput(ctx *Context, args *GetUsagelimitsOutputArgs, opts ...InvokeOption) GetUsagelimitsResultOutput> 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)
}public static CompletableFuture<GetUsagelimitsResult> getUsagelimits(GetUsagelimitsArgs args, InvokeOptions options)
public static Output<GetUsagelimitsResult> getUsagelimits(GetUsagelimitsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:UsageProxy/getUsagelimits:getUsagelimits
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the root compartment.
- SubscriptionId string
- The subscription ID for which rewards information is requested for.
- Filters
List<GetUsagelimits Filter> 
- LimitType string
- Hard or soft limit. Hard limits lead to breaches, soft to alerts.
- ResourceType string
- Resource Name.
- ServiceType string
- Service Name.
- CompartmentId string
- The OCID of the root compartment.
- SubscriptionId string
- The subscription ID for which rewards information is requested for.
- Filters
[]GetUsagelimits Filter 
- LimitType string
- Hard or soft limit. Hard limits lead to breaches, soft to alerts.
- ResourceType string
- Resource Name.
- ServiceType string
- Service Name.
- compartmentId String
- The OCID of the root compartment.
- subscriptionId String
- The subscription ID for which rewards information is requested for.
- filters
List<GetUsagelimits Filter> 
- limitType String
- Hard or soft limit. Hard limits lead to breaches, soft to alerts.
- resourceType String
- Resource Name.
- serviceType String
- Service Name.
- compartmentId string
- The OCID of the root compartment.
- subscriptionId string
- The subscription ID for which rewards information is requested for.
- filters
GetUsagelimits Filter[] 
- limitType string
- Hard or soft limit. Hard limits lead to breaches, soft to alerts.
- resourceType string
- Resource Name.
- serviceType string
- Service Name.
- compartment_id str
- The OCID of the root compartment.
- subscription_id str
- The subscription ID for which rewards information is requested for.
- filters
Sequence[GetUsagelimits Filter] 
- 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 String
- The OCID of the root compartment.
- subscriptionId String
- The subscription ID for which rewards information is requested for.
- filters 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
- UsageLimit List<GetCollections Usagelimits Usage Limit Collection> 
- The list of usage_limit_collection.
- Filters
List<GetUsagelimits Filter> 
- 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
- UsageLimit []GetCollections Usagelimits Usage Limit Collection 
- The list of usage_limit_collection.
- Filters
[]GetUsagelimits Filter 
- 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
- usageLimit List<GetCollections Usagelimits Usage Limit Collection> 
- The list of usage_limit_collection.
- filters
List<GetUsagelimits Filter> 
- 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
- usageLimit GetCollections Usagelimits Usage Limit Collection[] 
- The list of usage_limit_collection.
- filters
GetUsagelimits Filter[] 
- 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_ Sequence[Getcollections Usagelimits Usage Limit Collection] 
- The list of usage_limit_collection.
- filters
Sequence[GetUsagelimits Filter] 
- 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
- usageLimit List<Property Map>Collections 
- 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  
GetUsagelimitsUsageLimitCollection    
- Items
List<GetUsagelimits Usage Limit Collection Item> 
- The list of usage limits.
- Items
[]GetUsagelimits Usage Limit Collection Item 
- The list of usage limits.
- items
List<GetUsagelimits Usage Limit Collection Item> 
- The list of usage limits.
- items
GetUsagelimits Usage Limit Collection Item[] 
- The list of usage limits.
- items
Sequence[GetUsagelimits Usage Limit Collection Item] 
- The list of usage limits.
- items List<Property Map>
- The list of usage limits.
GetUsagelimitsUsageLimitCollectionItem     
- Action string
- The action when usage limit is hit
- AlertLevel double
- The alert level of the usage limit
- CreatedBy string
- The user who created the limit
- EntitlementId string
- Entitlement ID of the usage limit
- Id string
- The usage limit ID
- Limit string
- LimitType string
- Hard or soft limit. Hard limits lead to breaches, soft to alerts.
- MaxHard stringLimit 
- The maximum hard limit set for the usage limit
- ModifiedBy string
- The user who modified the limit
- ResourceName string
- The resource for which the limit is defined
- ServiceName string
- The service for which the limit is defined
- SkuPart stringId 
- The SKU for which the usage limit is set
- State string
- The usage limit lifecycle state.
- TimeCreated string
- Time when the usage limit was created
- TimeModified string
- Time when the usage limit was modified
- ValueType string
- The value type of the usage limit
- Action string
- The action when usage limit is hit
- AlertLevel float64
- The alert level of the usage limit
- CreatedBy string
- The user who created the limit
- EntitlementId string
- Entitlement ID of the usage limit
- Id string
- The usage limit ID
- Limit string
- LimitType string
- Hard or soft limit. Hard limits lead to breaches, soft to alerts.
- MaxHard stringLimit 
- The maximum hard limit set for the usage limit
- ModifiedBy string
- The user who modified the limit
- ResourceName string
- The resource for which the limit is defined
- ServiceName string
- The service for which the limit is defined
- SkuPart stringId 
- The SKU for which the usage limit is set
- State string
- The usage limit lifecycle state.
- TimeCreated string
- Time when the usage limit was created
- TimeModified string
- Time when the usage limit was modified
- ValueType string
- The value type of the usage limit
- action String
- The action when usage limit is hit
- alertLevel Double
- The alert level of the usage limit
- createdBy String
- The user who created the limit
- entitlementId String
- Entitlement ID of the usage limit
- id String
- The usage limit ID
- limit String
- limitType String
- Hard or soft limit. Hard limits lead to breaches, soft to alerts.
- maxHard StringLimit 
- The maximum hard limit set for the usage limit
- modifiedBy String
- The user who modified the limit
- resourceName String
- The resource for which the limit is defined
- serviceName String
- The service for which the limit is defined
- skuPart StringId 
- The SKU for which the usage limit is set
- state String
- The usage limit lifecycle state.
- timeCreated String
- Time when the usage limit was created
- timeModified String
- Time when the usage limit was modified
- valueType String
- The value type of the usage limit
- action string
- The action when usage limit is hit
- alertLevel number
- The alert level of the usage limit
- createdBy string
- The user who created the limit
- entitlementId string
- Entitlement ID of the usage limit
- id string
- The usage limit ID
- limit string
- limitType string
- Hard or soft limit. Hard limits lead to breaches, soft to alerts.
- maxHard stringLimit 
- The maximum hard limit set for the usage limit
- modifiedBy string
- The user who modified the limit
- resourceName string
- The resource for which the limit is defined
- serviceName string
- The service for which the limit is defined
- skuPart stringId 
- The SKU for which the usage limit is set
- state string
- The usage limit lifecycle state.
- timeCreated string
- Time when the usage limit was created
- timeModified string
- Time when the usage limit was modified
- valueType string
- The value type of the usage limit
- action str
- The action when usage limit is hit
- alert_level float
- The alert level of the usage limit
- created_by str
- The user who created the limit
- entitlement_id str
- Entitlement ID of the usage limit
- id str
- The usage limit ID
- limit str
- limit_type str
- Hard or soft limit. Hard limits lead to breaches, soft to alerts.
- max_hard_ strlimit 
- The maximum hard limit set for the usage limit
- modified_by str
- The user who modified the limit
- resource_name str
- The resource for which the limit is defined
- service_name str
- The service for which the limit is defined
- sku_part_ strid 
- The SKU for which the usage limit is set
- state str
- The usage limit lifecycle state.
- time_created str
- Time when the usage limit was created
- time_modified str
- Time when the usage limit was modified
- value_type str
- The value type of the usage limit
- action String
- The action when usage limit is hit
- alertLevel Number
- The alert level of the usage limit
- createdBy String
- The user who created the limit
- entitlementId String
- Entitlement ID of the usage limit
- id String
- The usage limit ID
- limit String
- limitType String
- Hard or soft limit. Hard limits lead to breaches, soft to alerts.
- maxHard StringLimit 
- The maximum hard limit set for the usage limit
- modifiedBy String
- The user who modified the limit
- resourceName String
- The resource for which the limit is defined
- serviceName String
- The service for which the limit is defined
- skuPart StringId 
- The SKU for which the usage limit is set
- state String
- The usage limit lifecycle state.
- timeCreated String
- Time when the usage limit was created
- timeModified String
- Time when the usage limit was modified
- valueType 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 ociTerraform Provider.