Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getCommitments

This data source provides the list of Commitments in Oracle Cloud Infrastructure Onesubscription service.

This list API returns all commitments for a particular Subscribed Service

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testCommitments = Oci.OneSubsription.GetCommitments.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        SubscribedServiceId = oci_onesubscription_subscribed_service.Test_subscribed_service.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/OneSubsription"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := OneSubsription.GetCommitments(ctx, &onesubsription.GetCommitmentsArgs{
			CompartmentId:       _var.Compartment_id,
			SubscribedServiceId: oci_onesubscription_subscribed_service.Test_subscribed_service.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.OneSubsription.OneSubsriptionFunctions;
import com.pulumi.oci.OneSubsription.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 = OneSubsriptionFunctions.getCommitments(GetCommitmentsArgs.builder()
            .compartmentId(var_.compartment_id())
            .subscribedServiceId(oci_onesubscription_subscribed_service.test_subscribed_service().id())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_commitments = oci.OneSubsription.get_commitments(compartment_id=var["compartment_id"],
    subscribed_service_id=oci_onesubscription_subscribed_service["test_subscribed_service"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testCommitments = oci.OneSubsription.getCommitments({
    compartmentId: _var.compartment_id,
    subscribedServiceId: oci_onesubscription_subscribed_service.test_subscribed_service.id,
});
variables:
  testCommitments:
    Fn::Invoke:
      Function: oci:OneSubsription:getCommitments
      Arguments:
        compartmentId: ${var.compartment_id}
        subscribedServiceId: ${oci_onesubscription_subscribed_service.test_subscribed_service.id}

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[_onesubsription.GetCommitmentsFilter]] = None,
                    subscribed_service_id: 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[_onesubsription.GetCommitmentsFilterArgs]]]] = None,
                    subscribed_service_id: 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)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: oci:OneSubsription/getCommitments:getCommitments
  Arguments:
    # Arguments dictionary

The following arguments are supported:

CompartmentId string

The OCID of the root compartment.

SubscribedServiceId string

This param is used to get the commitments for a particular subscribed service

Filters List<GetCommitmentsFilter>
CompartmentId string

The OCID of the root compartment.

SubscribedServiceId string

This param is used to get the commitments for a particular subscribed service

Filters []GetCommitmentsFilter
compartmentId String

The OCID of the root compartment.

subscribedServiceId String

This param is used to get the commitments for a particular subscribed service

filters List<GetCommitmentsFilter>
compartmentId string

The OCID of the root compartment.

subscribedServiceId string

This param is used to get the commitments for a particular subscribed service

filters GetCommitmentsFilter[]
compartment_id str

The OCID of the root compartment.

subscribed_service_id str

This param is used to get the commitments for a particular subscribed service

filters GetCommitmentsFilter]
compartmentId String

The OCID of the root compartment.

subscribedServiceId String

This param is used to get the commitments for a particular subscribed service

filters List<Property Map>

getCommitments Result

The following output properties are available:

Commitments List<GetCommitmentsCommitment>

The list of commitments.

CompartmentId string
Id string

The provider-assigned unique ID for this managed resource.

SubscribedServiceId string

SPM internal Subscribed Service ID

Filters List<GetCommitmentsFilter>
Commitments []GetCommitmentsCommitment

The list of commitments.

CompartmentId string
Id string

The provider-assigned unique ID for this managed resource.

SubscribedServiceId string

SPM internal Subscribed Service ID

Filters []GetCommitmentsFilter
commitments List<GetCommitmentsCommitment>

The list of commitments.

compartmentId String
id String

The provider-assigned unique ID for this managed resource.

subscribedServiceId String

SPM internal Subscribed Service ID

filters List<GetCommitmentsFilter>
commitments GetCommitmentsCommitment[]

The list of commitments.

compartmentId string
id string

The provider-assigned unique ID for this managed resource.

subscribedServiceId string

SPM internal Subscribed Service ID

filters GetCommitmentsFilter[]
commitments GetCommitmentsCommitment]

The list of commitments.

compartment_id str
id str

The provider-assigned unique ID for this managed resource.

subscribed_service_id str

SPM internal Subscribed Service ID

filters GetCommitmentsFilter]
commitments List<Property Map>

The list of commitments.

compartmentId String
id String

The provider-assigned unique ID for this managed resource.

subscribedServiceId String

SPM internal Subscribed Service ID

filters List<Property Map>

Supporting Types

GetCommitmentsCommitment

AvailableAmount string

Commitment available amount

FundedAllocationValue string

Funded Allocation line value example: 12000.00

Id string

SPM internal Commitment ID

Quantity string

Commitment quantity

SubscribedServiceId string

This param is used to get the commitments for a particular subscribed service

TimeEnd string

Commitment end date

TimeStart string

Commitment start date

UsedAmount string

Commitment used amount

AvailableAmount string

Commitment available amount

FundedAllocationValue string

Funded Allocation line value example: 12000.00

Id string

SPM internal Commitment ID

Quantity string

Commitment quantity

SubscribedServiceId string

This param is used to get the commitments for a particular subscribed service

TimeEnd string

Commitment end date

TimeStart string

Commitment start date

UsedAmount string

Commitment used amount

availableAmount String

Commitment available amount

fundedAllocationValue String

Funded Allocation line value example: 12000.00

id String

SPM internal Commitment ID

quantity String

Commitment quantity

subscribedServiceId String

This param is used to get the commitments for a particular subscribed service

timeEnd String

Commitment end date

timeStart String

Commitment start date

usedAmount String

Commitment used amount

availableAmount string

Commitment available amount

fundedAllocationValue string

Funded Allocation line value example: 12000.00

id string

SPM internal Commitment ID

quantity string

Commitment quantity

subscribedServiceId string

This param is used to get the commitments for a particular subscribed service

timeEnd string

Commitment end date

timeStart string

Commitment start date

usedAmount string

Commitment used amount

available_amount str

Commitment available amount

funded_allocation_value str

Funded Allocation line value example: 12000.00

id str

SPM internal Commitment ID

quantity str

Commitment quantity

subscribed_service_id str

This param is used to get the commitments for a particular subscribed service

time_end str

Commitment end date

time_start str

Commitment start date

used_amount str

Commitment used amount

availableAmount String

Commitment available amount

fundedAllocationValue String

Funded Allocation line value example: 12000.00

id String

SPM internal Commitment ID

quantity String

Commitment quantity

subscribedServiceId String

This param is used to get the commitments for a particular subscribed service

timeEnd String

Commitment end date

timeStart String

Commitment start date

usedAmount String

Commitment used amount

GetCommitmentsFilter

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

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.