Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.OsubSubscription.getCommitments
Explore with Pulumi AI
This data source provides the list of Commitments in Oracle Cloud Infrastructure Osub Subscription service.
This list API returns all commitments for a particular Subscribed Service
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testCommitments = oci.OsubSubscription.getCommitments({
    compartmentId: compartmentId,
    subscribedServiceId: testService.id,
    xOneGatewaySubscriptionId: commitmentXOneGatewaySubscriptionId,
    xOneOriginRegion: commitmentXOneOriginRegion,
});
import pulumi
import pulumi_oci as oci
test_commitments = oci.OsubSubscription.get_commitments(compartment_id=compartment_id,
    subscribed_service_id=test_service["id"],
    x_one_gateway_subscription_id=commitment_x_one_gateway_subscription_id,
    x_one_origin_region=commitment_x_one_origin_region)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/osubsubscription"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := osubsubscription.GetCommitments(ctx, &osubsubscription.GetCommitmentsArgs{
			CompartmentId:             compartmentId,
			SubscribedServiceId:       testService.Id,
			XOneGatewaySubscriptionId: pulumi.StringRef(commitmentXOneGatewaySubscriptionId),
			XOneOriginRegion:          pulumi.StringRef(commitmentXOneOriginRegion),
		}, 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 testCommitments = Oci.OsubSubscription.GetCommitments.Invoke(new()
    {
        CompartmentId = compartmentId,
        SubscribedServiceId = testService.Id,
        XOneGatewaySubscriptionId = commitmentXOneGatewaySubscriptionId,
        XOneOriginRegion = commitmentXOneOriginRegion,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.OsubSubscription.OsubSubscriptionFunctions;
import com.pulumi.oci.OsubSubscription.inputs.GetCommitmentsArgs;
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 testCommitments = OsubSubscriptionFunctions.getCommitments(GetCommitmentsArgs.builder()
            .compartmentId(compartmentId)
            .subscribedServiceId(testService.id())
            .xOneGatewaySubscriptionId(commitmentXOneGatewaySubscriptionId)
            .xOneOriginRegion(commitmentXOneOriginRegion)
            .build());
    }
}
variables:
  testCommitments:
    fn::invoke:
      function: oci:OsubSubscription:getCommitments
      arguments:
        compartmentId: ${compartmentId}
        subscribedServiceId: ${testService.id}
        xOneGatewaySubscriptionId: ${commitmentXOneGatewaySubscriptionId}
        xOneOriginRegion: ${commitmentXOneOriginRegion}
Using getCommitments
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 getCommitments(args: GetCommitmentsArgs, opts?: InvokeOptions): Promise<GetCommitmentsResult>
function getCommitmentsOutput(args: GetCommitmentsOutputArgs, opts?: InvokeOptions): Output<GetCommitmentsResult>def get_commitments(compartment_id: Optional[str] = None,
                    filters: Optional[Sequence[GetCommitmentsFilter]] = None,
                    subscribed_service_id: Optional[str] = None,
                    x_one_gateway_subscription_id: Optional[str] = None,
                    x_one_origin_region: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetCommitmentsResult
def get_commitments_output(compartment_id: Optional[pulumi.Input[str]] = None,
                    filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetCommitmentsFilterArgs]]]] = None,
                    subscribed_service_id: Optional[pulumi.Input[str]] = None,
                    x_one_gateway_subscription_id: Optional[pulumi.Input[str]] = None,
                    x_one_origin_region: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetCommitmentsResult]func GetCommitments(ctx *Context, args *GetCommitmentsArgs, opts ...InvokeOption) (*GetCommitmentsResult, error)
func GetCommitmentsOutput(ctx *Context, args *GetCommitmentsOutputArgs, opts ...InvokeOption) GetCommitmentsResultOutput> Note: This function is named GetCommitments in the Go SDK.
public static class GetCommitments 
{
    public static Task<GetCommitmentsResult> InvokeAsync(GetCommitmentsArgs args, InvokeOptions? opts = null)
    public static Output<GetCommitmentsResult> Invoke(GetCommitmentsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCommitmentsResult> getCommitments(GetCommitmentsArgs args, InvokeOptions options)
public static Output<GetCommitmentsResult> getCommitments(GetCommitmentsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:OsubSubscription/getCommitments:getCommitments
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment.
- SubscribedService stringId 
- This param is used to get the commitments for a particular subscribed service
- Filters
List<GetCommitments Filter> 
- XOneGateway stringSubscription Id 
- This header is meant to be used only for internal purposes and will be ignored on any public request. The purpose of this header is to help on Gateway to API calls identification.
- XOneOrigin stringRegion 
- The Oracle Cloud Infrastructure home region name in case home region is not us-ashburn-1 (IAD), e.g. ap-mumbai-1, us-phoenix-1 etc.
- CompartmentId string
- The OCID of the compartment.
- SubscribedService stringId 
- This param is used to get the commitments for a particular subscribed service
- Filters
[]GetCommitments Filter 
- XOneGateway stringSubscription Id 
- This header is meant to be used only for internal purposes and will be ignored on any public request. The purpose of this header is to help on Gateway to API calls identification.
- XOneOrigin stringRegion 
- The Oracle Cloud Infrastructure home region name in case home region is not us-ashburn-1 (IAD), e.g. ap-mumbai-1, us-phoenix-1 etc.
- compartmentId String
- The OCID of the compartment.
- subscribedService StringId 
- This param is used to get the commitments for a particular subscribed service
- filters
List<GetCommitments Filter> 
- xOne StringGateway Subscription Id 
- This header is meant to be used only for internal purposes and will be ignored on any public request. The purpose of this header is to help on Gateway to API calls identification.
- xOne StringOrigin Region 
- The Oracle Cloud Infrastructure home region name in case home region is not us-ashburn-1 (IAD), e.g. ap-mumbai-1, us-phoenix-1 etc.
- compartmentId string
- The OCID of the compartment.
- subscribedService stringId 
- This param is used to get the commitments for a particular subscribed service
- filters
GetCommitments Filter[] 
- xOne stringGateway Subscription Id 
- This header is meant to be used only for internal purposes and will be ignored on any public request. The purpose of this header is to help on Gateway to API calls identification.
- xOne stringOrigin Region 
- The Oracle Cloud Infrastructure home region name in case home region is not us-ashburn-1 (IAD), e.g. ap-mumbai-1, us-phoenix-1 etc.
- compartment_id str
- The OCID of the compartment.
- subscribed_service_ strid 
- This param is used to get the commitments for a particular subscribed service
- filters
Sequence[GetCommitments Filter] 
- x_one_ strgateway_ subscription_ id 
- This header is meant to be used only for internal purposes and will be ignored on any public request. The purpose of this header is to help on Gateway to API calls identification.
- x_one_ strorigin_ region 
- The Oracle Cloud Infrastructure home region name in case home region is not us-ashburn-1 (IAD), e.g. ap-mumbai-1, us-phoenix-1 etc.
- compartmentId String
- The OCID of the compartment.
- subscribedService StringId 
- This param is used to get the commitments for a particular subscribed service
- filters List<Property Map>
- xOne StringGateway Subscription Id 
- This header is meant to be used only for internal purposes and will be ignored on any public request. The purpose of this header is to help on Gateway to API calls identification.
- xOne StringOrigin Region 
- The Oracle Cloud Infrastructure home region name in case home region is not us-ashburn-1 (IAD), e.g. ap-mumbai-1, us-phoenix-1 etc.
getCommitments Result
The following output properties are available:
- Commitments
List<GetCommitments Commitment> 
- The list of commitments.
- CompartmentId string
- Id string
- The provider-assigned unique ID for this managed resource.
- SubscribedService stringId 
- Filters
List<GetCommitments Filter> 
- XOneGateway stringSubscription Id 
- XOneOrigin stringRegion 
- Commitments
[]GetCommitments Commitment 
- The list of commitments.
- CompartmentId string
- Id string
- The provider-assigned unique ID for this managed resource.
- SubscribedService stringId 
- Filters
[]GetCommitments Filter 
- XOneGateway stringSubscription Id 
- XOneOrigin stringRegion 
- commitments
List<GetCommitments Commitment> 
- The list of commitments.
- compartmentId String
- id String
- The provider-assigned unique ID for this managed resource.
- subscribedService StringId 
- filters
List<GetCommitments Filter> 
- xOne StringGateway Subscription Id 
- xOne StringOrigin Region 
- commitments
GetCommitments Commitment[] 
- The list of commitments.
- compartmentId string
- id string
- The provider-assigned unique ID for this managed resource.
- subscribedService stringId 
- filters
GetCommitments Filter[] 
- xOne stringGateway Subscription Id 
- xOne stringOrigin Region 
- commitments
Sequence[GetCommitments Commitment] 
- The list of commitments.
- compartment_id str
- id str
- The provider-assigned unique ID for this managed resource.
- subscribed_service_ strid 
- filters
Sequence[GetCommitments Filter] 
- x_one_ strgateway_ subscription_ id 
- x_one_ strorigin_ region 
- commitments List<Property Map>
- The list of commitments.
- compartmentId String
- id String
- The provider-assigned unique ID for this managed resource.
- subscribedService StringId 
- filters List<Property Map>
- xOne StringGateway Subscription Id 
- xOne StringOrigin Region 
Supporting Types
GetCommitmentsCommitment  
- AvailableAmount string
- Commitment available amount
- FundedAllocation stringValue 
- Funded Allocation line value example: 12000.00
- Id string
- SPM internal Commitment ID
- Quantity string
- Commitment quantity
- TimeEnd string
- Commitment end date
- TimeStart string
- Commitment start date
- UsedAmount string
- Commitment used amount
- AvailableAmount string
- Commitment available amount
- FundedAllocation stringValue 
- Funded Allocation line value example: 12000.00
- Id string
- SPM internal Commitment ID
- Quantity string
- Commitment quantity
- TimeEnd string
- Commitment end date
- TimeStart string
- Commitment start date
- UsedAmount string
- Commitment used amount
- availableAmount String
- Commitment available amount
- fundedAllocation StringValue 
- Funded Allocation line value example: 12000.00
- id String
- SPM internal Commitment ID
- quantity String
- Commitment quantity
- timeEnd String
- Commitment end date
- timeStart String
- Commitment start date
- usedAmount String
- Commitment used amount
- availableAmount string
- Commitment available amount
- fundedAllocation stringValue 
- Funded Allocation line value example: 12000.00
- id string
- SPM internal Commitment ID
- quantity string
- Commitment quantity
- timeEnd string
- Commitment end date
- timeStart string
- Commitment start date
- usedAmount string
- Commitment used amount
- available_amount str
- Commitment available amount
- funded_allocation_ strvalue 
- Funded Allocation line value example: 12000.00
- id str
- SPM internal Commitment ID
- quantity str
- Commitment quantity
- time_end str
- Commitment end date
- time_start str
- Commitment start date
- used_amount str
- Commitment used amount
- availableAmount String
- Commitment available amount
- fundedAllocation StringValue 
- Funded Allocation line value example: 12000.00
- id String
- SPM internal Commitment ID
- quantity String
- Commitment quantity
- timeEnd String
- Commitment end date
- timeStart String
- Commitment start date
- usedAmount String
- Commitment used amount
GetCommitmentsFilter  
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.