Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi
oci.Marketplace.getAcceptedAgreements
Explore with Pulumi AI
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)
public static Output<GetAcceptedAgreementsResult> getAcceptedAgreements(GetAcceptedAgreementsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Marketplace/getAcceptedAgreements:getAcceptedAgreements
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The unique identifier for the compartment.
- AcceptedAgreement stringId 
- The unique identifier for the accepted terms of use agreement.
- DisplayName string
- The display name of the resource.
- Filters
List<GetAccepted Agreements Filter> 
- 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.
- AcceptedAgreement stringId 
- The unique identifier for the accepted terms of use agreement.
- DisplayName string
- The display name of the resource.
- Filters
[]GetAccepted Agreements Filter 
- 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.
- acceptedAgreement StringId 
- The unique identifier for the accepted terms of use agreement.
- displayName String
- The display name of the resource.
- filters
List<GetAccepted Agreements Filter> 
- 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.
- acceptedAgreement stringId 
- The unique identifier for the accepted terms of use agreement.
- displayName string
- The display name of the resource.
- filters
GetAccepted Agreements Filter[] 
- 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_ strid 
- The unique identifier for the accepted terms of use agreement.
- display_name str
- The display name of the resource.
- filters
Sequence[marketplace.Get Accepted Agreements Filter] 
- 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.
- acceptedAgreement StringId 
- 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<GetAccepted Agreements Accepted Agreement> 
- 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.
- AcceptedAgreement stringId 
- DisplayName string
- A display name for the accepted agreement.
- Filters
List<GetAccepted Agreements Filter> 
- ListingId string
- The unique identifier for the listing associated with the agreement.
- PackageVersion string
- The package version associated with the agreement.
- AcceptedAgreements []GetAccepted Agreements Accepted Agreement 
- 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.
- AcceptedAgreement stringId 
- DisplayName string
- A display name for the accepted agreement.
- Filters
[]GetAccepted Agreements Filter 
- ListingId string
- The unique identifier for the listing associated with the agreement.
- PackageVersion string
- The package version associated with the agreement.
- acceptedAgreements List<GetAccepted Agreements Accepted Agreement> 
- 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.
- acceptedAgreement StringId 
- displayName String
- A display name for the accepted agreement.
- filters
List<GetAccepted Agreements Filter> 
- listingId String
- The unique identifier for the listing associated with the agreement.
- packageVersion String
- The package version associated with the agreement.
- acceptedAgreements GetAccepted Agreements Accepted Agreement[] 
- 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.
- acceptedAgreement stringId 
- displayName string
- A display name for the accepted agreement.
- filters
GetAccepted Agreements Filter[] 
- 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.Get Accepted Agreements Accepted Agreement] 
- 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_ strid 
- display_name str
- A display name for the accepted agreement.
- filters
Sequence[marketplace.Get Accepted Agreements Filter] 
- 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.
- acceptedAgreement StringId 
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- {[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.
- {[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.
- 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.
- 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.
- 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.
- 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   
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.