Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.OneSubsription.getCommitments
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testCommitments = oci.OneSubsription.getCommitments({
compartmentId: compartmentId,
subscribedServiceId: testSubscribedService.id,
});
import pulumi
import pulumi_oci as oci
test_commitments = oci.OneSubsription.get_commitments(compartment_id=compartment_id,
subscribed_service_id=test_subscribed_service["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/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: compartmentId,
SubscribedServiceId: testSubscribedService.Id,
}, 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.OneSubsription.GetCommitments.Invoke(new()
{
CompartmentId = compartmentId,
SubscribedServiceId = testSubscribedService.Id,
});
});
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(compartmentId)
.subscribedServiceId(testSubscribedService.id())
.build());
}
}
variables:
testCommitments:
fn::invoke:
Function: oci:OneSubsription:getCommitments
Arguments:
compartmentId: ${compartmentId}
subscribedServiceId: ${testSubscribedService.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:
- Compartment
Id string - The OCID of the root compartment.
- Subscribed
Service stringId - This param is used to get the commitments for a particular subscribed service
- Filters
List<Get
Commitments Filter>
- Compartment
Id string - The OCID of the root compartment.
- Subscribed
Service stringId - This param is used to get the commitments for a particular subscribed service
- Filters
[]Get
Commitments Filter
- compartment
Id String - The OCID of the root compartment.
- subscribed
Service StringId - This param is used to get the commitments for a particular subscribed service
- filters
List<Get
Commitments Filter>
- compartment
Id string - The OCID of the root compartment.
- subscribed
Service stringId - This param is used to get the commitments for a particular subscribed service
- filters
Get
Commitments Filter[]
- compartment_
id str - The OCID of the root compartment.
- subscribed_
service_ strid - This param is used to get the commitments for a particular subscribed service
- filters
Sequence[onesubsription.
Get Commitments Filter]
- compartment
Id String - The OCID of the root compartment.
- subscribed
Service StringId - 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<Get
Commitments Commitment> - The list of commitments.
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Subscribed
Service stringId - SPM internal Subscribed Service ID
- Filters
List<Get
Commitments Filter>
- Commitments
[]Get
Commitments Commitment - The list of commitments.
- Compartment
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Subscribed
Service stringId - SPM internal Subscribed Service ID
- Filters
[]Get
Commitments Filter
- commitments
List<Get
Commitments Commitment> - The list of commitments.
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- subscribed
Service StringId - SPM internal Subscribed Service ID
- filters
List<Get
Commitments Filter>
- commitments
Get
Commitments Commitment[] - The list of commitments.
- compartment
Id string - id string
- The provider-assigned unique ID for this managed resource.
- subscribed
Service stringId - SPM internal Subscribed Service ID
- filters
Get
Commitments Filter[]
- commitments
Sequence[onesubsription.
Get Commitments Commitment] - The list of commitments.
- compartment_
id str - id str
- The provider-assigned unique ID for this managed resource.
- subscribed_
service_ strid - SPM internal Subscribed Service ID
- filters
Sequence[onesubsription.
Get Commitments Filter]
- commitments List<Property Map>
- The list of commitments.
- compartment
Id String - id String
- The provider-assigned unique ID for this managed resource.
- subscribed
Service StringId - SPM internal Subscribed Service ID
- filters List<Property Map>
Supporting Types
GetCommitmentsCommitment
- Available
Amount string - Commitment available amount
- Funded
Allocation stringValue - Funded Allocation line value example: 12000.00
- Id string
- SPM internal Commitment ID
- Quantity string
- Commitment quantity
- Subscribed
Service stringId - This param is used to get the commitments for a particular subscribed service
- Time
End string - Commitment end date
- Time
Start string - Commitment start date
- Used
Amount string - Commitment used amount
- Available
Amount string - Commitment available amount
- Funded
Allocation stringValue - Funded Allocation line value example: 12000.00
- Id string
- SPM internal Commitment ID
- Quantity string
- Commitment quantity
- Subscribed
Service stringId - This param is used to get the commitments for a particular subscribed service
- Time
End string - Commitment end date
- Time
Start string - Commitment start date
- Used
Amount string - Commitment used amount
- available
Amount String - Commitment available amount
- funded
Allocation StringValue - Funded Allocation line value example: 12000.00
- id String
- SPM internal Commitment ID
- quantity String
- Commitment quantity
- subscribed
Service StringId - This param is used to get the commitments for a particular subscribed service
- time
End String - Commitment end date
- time
Start String - Commitment start date
- used
Amount String - Commitment used amount
- available
Amount string - Commitment available amount
- funded
Allocation stringValue - Funded Allocation line value example: 12000.00
- id string
- SPM internal Commitment ID
- quantity string
- Commitment quantity
- subscribed
Service stringId - This param is used to get the commitments for a particular subscribed service
- time
End string - Commitment end date
- time
Start string - Commitment start date
- used
Amount 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
- subscribed_
service_ strid - 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
- available
Amount String - Commitment available amount
- funded
Allocation StringValue - Funded Allocation line value example: 12000.00
- id String
- SPM internal Commitment ID
- quantity String
- Commitment quantity
- subscribed
Service StringId - This param is used to get the commitments for a particular subscribed service
- time
End String - Commitment end date
- time
Start String - Commitment start date
- used
Amount String - Commitment used amount
GetCommitmentsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.