1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. OsubSubscription
  5. getCommitment
Oracle Cloud Infrastructure v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

oci.OsubSubscription.getCommitment

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

    This data source provides details about a specific Commitment resource in Oracle Cloud Infrastructure Osub Subscription service.

    This API returns the commitment details corresponding to the id provided

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testCommitment = oci.OsubSubscription.getCommitment({
        commitmentId: testCommitmentOciOsubSubscriptionCommitment.id,
        xOneGatewaySubscriptionId: commitmentXOneGatewaySubscriptionId,
        xOneOriginRegion: commitmentXOneOriginRegion,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_commitment = oci.OsubSubscription.get_commitment(commitment_id=test_commitment_oci_osub_subscription_commitment["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/go/oci/OsubSubscription"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := OsubSubscription.GetCommitment(ctx, &osubsubscription.GetCommitmentArgs{
    			CommitmentId:              testCommitmentOciOsubSubscriptionCommitment.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 testCommitment = Oci.OsubSubscription.GetCommitment.Invoke(new()
        {
            CommitmentId = testCommitmentOciOsubSubscriptionCommitment.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.GetCommitmentArgs;
    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 testCommitment = OsubSubscriptionFunctions.getCommitment(GetCommitmentArgs.builder()
                .commitmentId(testCommitmentOciOsubSubscriptionCommitment.id())
                .xOneGatewaySubscriptionId(commitmentXOneGatewaySubscriptionId)
                .xOneOriginRegion(commitmentXOneOriginRegion)
                .build());
    
        }
    }
    
    variables:
      testCommitment:
        fn::invoke:
          Function: oci:OsubSubscription:getCommitment
          Arguments:
            commitmentId: ${testCommitmentOciOsubSubscriptionCommitment.id}
            xOneGatewaySubscriptionId: ${commitmentXOneGatewaySubscriptionId}
            xOneOriginRegion: ${commitmentXOneOriginRegion}
    

    Using getCommitment

    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 getCommitment(args: GetCommitmentArgs, opts?: InvokeOptions): Promise<GetCommitmentResult>
    function getCommitmentOutput(args: GetCommitmentOutputArgs, opts?: InvokeOptions): Output<GetCommitmentResult>
    def get_commitment(commitment_id: Optional[str] = None,
                       x_one_gateway_subscription_id: Optional[str] = None,
                       x_one_origin_region: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetCommitmentResult
    def get_commitment_output(commitment_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[GetCommitmentResult]
    func GetCommitment(ctx *Context, args *GetCommitmentArgs, opts ...InvokeOption) (*GetCommitmentResult, error)
    func GetCommitmentOutput(ctx *Context, args *GetCommitmentOutputArgs, opts ...InvokeOption) GetCommitmentResultOutput

    > Note: This function is named GetCommitment in the Go SDK.

    public static class GetCommitment 
    {
        public static Task<GetCommitmentResult> InvokeAsync(GetCommitmentArgs args, InvokeOptions? opts = null)
        public static Output<GetCommitmentResult> Invoke(GetCommitmentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCommitmentResult> getCommitment(GetCommitmentArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:OsubSubscription/getCommitment:getCommitment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CommitmentId string
    The Commitment Id
    XOneGatewaySubscriptionId string
    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.
    XOneOriginRegion string
    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.
    CommitmentId string
    The Commitment Id
    XOneGatewaySubscriptionId string
    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.
    XOneOriginRegion string
    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.
    commitmentId String
    The Commitment Id
    xOneGatewaySubscriptionId String
    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.
    xOneOriginRegion String
    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.
    commitmentId string
    The Commitment Id
    xOneGatewaySubscriptionId string
    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.
    xOneOriginRegion string
    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.
    commitment_id str
    The Commitment Id
    x_one_gateway_subscription_id str
    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_origin_region str
    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.
    commitmentId String
    The Commitment Id
    xOneGatewaySubscriptionId String
    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.
    xOneOriginRegion String
    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.

    getCommitment Result

    The following output properties are available:

    AvailableAmount string
    Commitment available amount
    CommitmentId string
    FundedAllocationValue string
    Funded Allocation line value example: 12000.00
    Id string
    The provider-assigned unique ID for this managed resource.
    Quantity string
    Commitment quantity
    TimeEnd string
    Commitment end date
    TimeStart string
    Commitment start date
    UsedAmount string
    Commitment used amount
    XOneGatewaySubscriptionId string
    XOneOriginRegion string
    AvailableAmount string
    Commitment available amount
    CommitmentId string
    FundedAllocationValue string
    Funded Allocation line value example: 12000.00
    Id string
    The provider-assigned unique ID for this managed resource.
    Quantity string
    Commitment quantity
    TimeEnd string
    Commitment end date
    TimeStart string
    Commitment start date
    UsedAmount string
    Commitment used amount
    XOneGatewaySubscriptionId string
    XOneOriginRegion string
    availableAmount String
    Commitment available amount
    commitmentId String
    fundedAllocationValue String
    Funded Allocation line value example: 12000.00
    id String
    The provider-assigned unique ID for this managed resource.
    quantity String
    Commitment quantity
    timeEnd String
    Commitment end date
    timeStart String
    Commitment start date
    usedAmount String
    Commitment used amount
    xOneGatewaySubscriptionId String
    xOneOriginRegion String
    availableAmount string
    Commitment available amount
    commitmentId string
    fundedAllocationValue string
    Funded Allocation line value example: 12000.00
    id string
    The provider-assigned unique ID for this managed resource.
    quantity string
    Commitment quantity
    timeEnd string
    Commitment end date
    timeStart string
    Commitment start date
    usedAmount string
    Commitment used amount
    xOneGatewaySubscriptionId string
    xOneOriginRegion string
    available_amount str
    Commitment available amount
    commitment_id str
    funded_allocation_value str
    Funded Allocation line value example: 12000.00
    id str
    The provider-assigned unique ID for this managed resource.
    quantity str
    Commitment quantity
    time_end str
    Commitment end date
    time_start str
    Commitment start date
    used_amount str
    Commitment used amount
    x_one_gateway_subscription_id str
    x_one_origin_region str
    availableAmount String
    Commitment available amount
    commitmentId String
    fundedAllocationValue String
    Funded Allocation line value example: 12000.00
    id String
    The provider-assigned unique ID for this managed resource.
    quantity String
    Commitment quantity
    timeEnd String
    Commitment end date
    timeStart String
    Commitment start date
    usedAmount String
    Commitment used amount
    xOneGatewaySubscriptionId String
    xOneOriginRegion String

    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 v1.40.0 published on Wednesday, Jun 12, 2024 by Pulumi