oci logo
Oracle Cloud Infrastructure v0.19.0, May 26 23

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

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 = @var.Compartment_id,
        AcceptedAgreementId = oci_marketplace_accepted_agreement.Test_accepted_agreement.Id,
        DisplayName = @var.Accepted_agreement_display_name,
        ListingId = oci_marketplace_listing.Test_listing.Id,
        PackageVersion = @var.Accepted_agreement_package_version,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/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:       _var.Compartment_id,
			AcceptedAgreementId: pulumi.StringRef(oci_marketplace_accepted_agreement.Test_accepted_agreement.Id),
			DisplayName:         pulumi.StringRef(_var.Accepted_agreement_display_name),
			ListingId:           pulumi.StringRef(oci_marketplace_listing.Test_listing.Id),
			PackageVersion:      pulumi.StringRef(_var.Accepted_agreement_package_version),
		}, 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.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(var_.compartment_id())
            .acceptedAgreementId(oci_marketplace_accepted_agreement.test_accepted_agreement().id())
            .displayName(var_.accepted_agreement_display_name())
            .listingId(oci_marketplace_listing.test_listing().id())
            .packageVersion(var_.accepted_agreement_package_version())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_accepted_agreements = oci.Marketplace.get_accepted_agreements(compartment_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    accepted_agreement_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    display_name=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    listing_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
    package_version=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testAcceptedAgreements = oci.Marketplace.getAcceptedAgreements({
    compartmentId: _var.compartment_id,
    acceptedAgreementId: oci_marketplace_accepted_agreement.test_accepted_agreement.id,
    displayName: _var.accepted_agreement_display_name,
    listingId: oci_marketplace_listing.test_listing.id,
    packageVersion: _var.accepted_agreement_package_version,
});
variables:
  testAcceptedAgreements:
    fn::invoke:
      Function: oci:Marketplace:getAcceptedAgreements
      Arguments:
        compartmentId: ${var.compartment_id}
        acceptedAgreementId: ${oci_marketplace_accepted_agreement.test_accepted_agreement.id}
        displayName: ${var.accepted_agreement_display_name}
        listingId: ${oci_marketplace_listing.test_listing.id}
        packageVersion: ${var.accepted_agreement_package_version}

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

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

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]interface{}

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]interface{}

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

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

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]: any}

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]: any}

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, Any]

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, Any]

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

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

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.