1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. UsageProxy
  5. getUsagelimits
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.UsageProxy.getUsagelimits

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 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,
    });
    
    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[_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]
    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:UsageProxy/getUsagelimits:getUsagelimits
      arguments:
        # arguments dictionary

    The 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<GetUsagelimitsFilter>
    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 []GetUsagelimitsFilter
    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<GetUsagelimitsFilter>
    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 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 str
    The OCID of the root compartment.
    subscription_id str
    The subscription ID for which rewards information is requested for.
    filters 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 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
    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 string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetUsagelimitsUsageLimitCollection

    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.
    MaxHardLimit string
    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
    SkuPartId string
    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.
    MaxHardLimit string
    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
    SkuPartId string
    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.
    maxHardLimit String
    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
    skuPartId String
    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.
    maxHardLimit string
    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
    skuPartId string
    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_limit str
    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_id str
    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.
    maxHardLimit String
    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
    skuPartId String
    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 oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi