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

oci.Marketplace.getAcceptedAgreements

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 Accepted Agreements in Oracle Cloud Infrastructure Marketplace service.

    Lists the terms of use agreements that have been accepted in the specified compartment. You can filter results by specifying query parameters.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAcceptedAgreements = oci.Marketplace.getAcceptedAgreements({
        compartmentId: compartmentId,
        acceptedAgreementId: testAcceptedAgreement.id,
        displayName: acceptedAgreementDisplayName,
        listingId: testListing.id,
        packageVersion: acceptedAgreementPackageVersion,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_accepted_agreements = oci.Marketplace.get_accepted_agreements(compartment_id=compartment_id,
        accepted_agreement_id=test_accepted_agreement["id"],
        display_name=accepted_agreement_display_name,
        listing_id=test_listing["id"],
        package_version=accepted_agreement_package_version)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Marketplace"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Marketplace.GetAcceptedAgreements(ctx, &marketplace.GetAcceptedAgreementsArgs{
    			CompartmentId:       compartmentId,
    			AcceptedAgreementId: pulumi.StringRef(testAcceptedAgreement.Id),
    			DisplayName:         pulumi.StringRef(acceptedAgreementDisplayName),
    			ListingId:           pulumi.StringRef(testListing.Id),
    			PackageVersion:      pulumi.StringRef(acceptedAgreementPackageVersion),
    		}, 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 testAcceptedAgreements = Oci.Marketplace.GetAcceptedAgreements.Invoke(new()
        {
            CompartmentId = compartmentId,
            AcceptedAgreementId = testAcceptedAgreement.Id,
            DisplayName = acceptedAgreementDisplayName,
            ListingId = testListing.Id,
            PackageVersion = acceptedAgreementPackageVersion,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Marketplace.MarketplaceFunctions;
    import com.pulumi.oci.Marketplace.inputs.GetAcceptedAgreementsArgs;
    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 testAcceptedAgreements = MarketplaceFunctions.getAcceptedAgreements(GetAcceptedAgreementsArgs.builder()
                .compartmentId(compartmentId)
                .acceptedAgreementId(testAcceptedAgreement.id())
                .displayName(acceptedAgreementDisplayName)
                .listingId(testListing.id())
                .packageVersion(acceptedAgreementPackageVersion)
                .build());
    
        }
    }
    
    variables:
      testAcceptedAgreements:
        fn::invoke:
          Function: oci:Marketplace:getAcceptedAgreements
          Arguments:
            compartmentId: ${compartmentId}
            acceptedAgreementId: ${testAcceptedAgreement.id}
            displayName: ${acceptedAgreementDisplayName}
            listingId: ${testListing.id}
            packageVersion: ${acceptedAgreementPackageVersion}
    

    Using getAcceptedAgreements

    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 getAcceptedAgreements(args: GetAcceptedAgreementsArgs, opts?: InvokeOptions): Promise<GetAcceptedAgreementsResult>
    function getAcceptedAgreementsOutput(args: GetAcceptedAgreementsOutputArgs, opts?: InvokeOptions): Output<GetAcceptedAgreementsResult>
    def get_accepted_agreements(accepted_agreement_id: Optional[str] = None,
                                compartment_id: Optional[str] = None,
                                display_name: Optional[str] = None,
                                filters: Optional[Sequence[_marketplace.GetAcceptedAgreementsFilter]] = None,
                                listing_id: Optional[str] = None,
                                package_version: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetAcceptedAgreementsResult
    def get_accepted_agreements_output(accepted_agreement_id: Optional[pulumi.Input[str]] = None,
                                compartment_id: Optional[pulumi.Input[str]] = None,
                                display_name: Optional[pulumi.Input[str]] = None,
                                filters: Optional[pulumi.Input[Sequence[pulumi.Input[_marketplace.GetAcceptedAgreementsFilterArgs]]]] = None,
                                listing_id: Optional[pulumi.Input[str]] = None,
                                package_version: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetAcceptedAgreementsResult]
    func GetAcceptedAgreements(ctx *Context, args *GetAcceptedAgreementsArgs, opts ...InvokeOption) (*GetAcceptedAgreementsResult, error)
    func GetAcceptedAgreementsOutput(ctx *Context, args *GetAcceptedAgreementsOutputArgs, opts ...InvokeOption) GetAcceptedAgreementsResultOutput

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

    public static class GetAcceptedAgreements 
    {
        public static Task<GetAcceptedAgreementsResult> InvokeAsync(GetAcceptedAgreementsArgs args, InvokeOptions? opts = null)
        public static Output<GetAcceptedAgreementsResult> Invoke(GetAcceptedAgreementsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAcceptedAgreementsResult> getAcceptedAgreements(GetAcceptedAgreementsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Marketplace/getAcceptedAgreements:getAcceptedAgreements
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The unique identifier for the compartment.
    AcceptedAgreementId string
    The unique identifier for the accepted terms of use agreement.
    DisplayName string
    The display name of the resource.
    Filters List<GetAcceptedAgreementsFilter>
    ListingId string
    The unique identifier for the listing.
    PackageVersion string
    The version of the package. Package versions are unique within a listing.
    CompartmentId string
    The unique identifier for the compartment.
    AcceptedAgreementId string
    The unique identifier for the accepted terms of use agreement.
    DisplayName string
    The display name of the resource.
    Filters []GetAcceptedAgreementsFilter
    ListingId string
    The unique identifier for the listing.
    PackageVersion string
    The version of the package. Package versions are unique within a listing.
    compartmentId String
    The unique identifier for the compartment.
    acceptedAgreementId String
    The unique identifier for the accepted terms of use agreement.
    displayName String
    The display name of the resource.
    filters List<GetAcceptedAgreementsFilter>
    listingId String
    The unique identifier for the listing.
    packageVersion String
    The version of the package. Package versions are unique within a listing.
    compartmentId string
    The unique identifier for the compartment.
    acceptedAgreementId string
    The unique identifier for the accepted terms of use agreement.
    displayName string
    The display name of the resource.
    filters GetAcceptedAgreementsFilter[]
    listingId string
    The unique identifier for the listing.
    packageVersion string
    The version of the package. Package versions are unique within a listing.
    compartment_id str
    The unique identifier for the compartment.
    accepted_agreement_id str
    The unique identifier for the accepted terms of use agreement.
    display_name str
    The display name of the resource.
    filters Sequence[marketplace.GetAcceptedAgreementsFilter]
    listing_id str
    The unique identifier for the listing.
    package_version str
    The version of the package. Package versions are unique within a listing.
    compartmentId String
    The unique identifier for the compartment.
    acceptedAgreementId String
    The unique identifier for the accepted terms of use agreement.
    displayName String
    The display name of the resource.
    filters List<Property Map>
    listingId String
    The unique identifier for the listing.
    packageVersion String
    The version of the package. Package versions are unique within a listing.

    getAcceptedAgreements Result

    The following output properties are available:

    AcceptedAgreements List<GetAcceptedAgreementsAcceptedAgreement>
    The list of accepted_agreements.
    CompartmentId string
    The unique identifier for the compartment where the agreement was accepted.
    Id string
    The provider-assigned unique ID for this managed resource.
    AcceptedAgreementId string
    DisplayName string
    A display name for the accepted agreement.
    Filters List<GetAcceptedAgreementsFilter>
    ListingId string
    The unique identifier for the listing associated with the agreement.
    PackageVersion string
    The package version associated with the agreement.
    AcceptedAgreements []GetAcceptedAgreementsAcceptedAgreement
    The list of accepted_agreements.
    CompartmentId string
    The unique identifier for the compartment where the agreement was accepted.
    Id string
    The provider-assigned unique ID for this managed resource.
    AcceptedAgreementId string
    DisplayName string
    A display name for the accepted agreement.
    Filters []GetAcceptedAgreementsFilter
    ListingId string
    The unique identifier for the listing associated with the agreement.
    PackageVersion string
    The package version associated with the agreement.
    acceptedAgreements List<GetAcceptedAgreementsAcceptedAgreement>
    The list of accepted_agreements.
    compartmentId String
    The unique identifier for the compartment where the agreement was accepted.
    id String
    The provider-assigned unique ID for this managed resource.
    acceptedAgreementId String
    displayName String
    A display name for the accepted agreement.
    filters List<GetAcceptedAgreementsFilter>
    listingId String
    The unique identifier for the listing associated with the agreement.
    packageVersion String
    The package version associated with the agreement.
    acceptedAgreements GetAcceptedAgreementsAcceptedAgreement[]
    The list of accepted_agreements.
    compartmentId string
    The unique identifier for the compartment where the agreement was accepted.
    id string
    The provider-assigned unique ID for this managed resource.
    acceptedAgreementId string
    displayName string
    A display name for the accepted agreement.
    filters GetAcceptedAgreementsFilter[]
    listingId string
    The unique identifier for the listing associated with the agreement.
    packageVersion string
    The package version associated with the agreement.
    accepted_agreements Sequence[marketplace.GetAcceptedAgreementsAcceptedAgreement]
    The list of accepted_agreements.
    compartment_id str
    The unique identifier for the compartment where the agreement was accepted.
    id str
    The provider-assigned unique ID for this managed resource.
    accepted_agreement_id str
    display_name str
    A display name for the accepted agreement.
    filters Sequence[marketplace.GetAcceptedAgreementsFilter]
    listing_id str
    The unique identifier for the listing associated with the agreement.
    package_version str
    The package version associated with the agreement.
    acceptedAgreements List<Property Map>
    The list of accepted_agreements.
    compartmentId String
    The unique identifier for the compartment where the agreement was accepted.
    id String
    The provider-assigned unique ID for this managed resource.
    acceptedAgreementId String
    displayName String
    A display name for the accepted agreement.
    filters List<Property Map>
    listingId String
    The unique identifier for the listing associated with the agreement.
    packageVersion String
    The package version associated with the agreement.

    Supporting Types

    GetAcceptedAgreementsAcceptedAgreement

    AgreementId string
    The unique identifier for the terms of use agreement itself.
    CompartmentId string
    The unique identifier for the compartment.
    DefinedTags Dictionary<string, string>
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    The display name of the resource.
    FreeformTags Dictionary<string, string>
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The unique identifier for the acceptance of the agreement within a specific compartment.
    ListingId string
    The unique identifier for the listing.
    PackageVersion string
    The version of the package. Package versions are unique within a listing.
    Signature string
    TimeAccepted string
    The time the agreement was accepted.
    AgreementId string
    The unique identifier for the terms of use agreement itself.
    CompartmentId string
    The unique identifier for the compartment.
    DefinedTags map[string]string
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    The display name of the resource.
    FreeformTags map[string]string
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The unique identifier for the acceptance of the agreement within a specific compartment.
    ListingId string
    The unique identifier for the listing.
    PackageVersion string
    The version of the package. Package versions are unique within a listing.
    Signature string
    TimeAccepted string
    The time the agreement was accepted.
    agreementId String
    The unique identifier for the terms of use agreement itself.
    compartmentId String
    The unique identifier for the compartment.
    definedTags Map<String,String>
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    The display name of the resource.
    freeformTags Map<String,String>
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The unique identifier for the acceptance of the agreement within a specific compartment.
    listingId String
    The unique identifier for the listing.
    packageVersion String
    The version of the package. Package versions are unique within a listing.
    signature String
    timeAccepted String
    The time the agreement was accepted.
    agreementId string
    The unique identifier for the terms of use agreement itself.
    compartmentId string
    The unique identifier for the compartment.
    definedTags {[key: string]: string}
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    The display name of the resource.
    freeformTags {[key: string]: string}
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id string
    The unique identifier for the acceptance of the agreement within a specific compartment.
    listingId string
    The unique identifier for the listing.
    packageVersion string
    The version of the package. Package versions are unique within a listing.
    signature string
    timeAccepted string
    The time the agreement was accepted.
    agreement_id str
    The unique identifier for the terms of use agreement itself.
    compartment_id str
    The unique identifier for the compartment.
    defined_tags Mapping[str, str]
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    The display name of the resource.
    freeform_tags Mapping[str, str]
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id str
    The unique identifier for the acceptance of the agreement within a specific compartment.
    listing_id str
    The unique identifier for the listing.
    package_version str
    The version of the package. Package versions are unique within a listing.
    signature str
    time_accepted str
    The time the agreement was accepted.
    agreementId String
    The unique identifier for the terms of use agreement itself.
    compartmentId String
    The unique identifier for the compartment.
    definedTags Map<String>
    The defined tags associated with this resource, if any. Each key is predefined and scoped to namespaces. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    The display name of the resource.
    freeformTags Map<String>
    The freeform tags associated with this resource, if any. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The unique identifier for the acceptance of the agreement within a specific compartment.
    listingId String
    The unique identifier for the listing.
    packageVersion String
    The version of the package. Package versions are unique within a listing.
    signature String
    timeAccepted String
    The time the agreement was accepted.

    GetAcceptedAgreementsFilter

    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
    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