# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = [
    'GetSubscriptionProductsResult',
    'AwaitableGetSubscriptionProductsResult',
    'get_subscription_products',
    'get_subscription_products_output',
]

@pulumi.output_type
class GetSubscriptionProductsResult:
    """
    A collection of values returned by getSubscriptionProducts.
    """
    def __init__(__self__, filters=None, id=None, product_collections=None, producttype=None, subscription_id=None, tenancy_id=None, usage_period_key=None):
        if filters and not isinstance(filters, list):
            raise TypeError("Expected argument 'filters' to be a list")
        pulumi.set(__self__, "filters", filters)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if product_collections and not isinstance(product_collections, list):
            raise TypeError("Expected argument 'product_collections' to be a list")
        pulumi.set(__self__, "product_collections", product_collections)
        if producttype and not isinstance(producttype, str):
            raise TypeError("Expected argument 'producttype' to be a str")
        pulumi.set(__self__, "producttype", producttype)
        if subscription_id and not isinstance(subscription_id, str):
            raise TypeError("Expected argument 'subscription_id' to be a str")
        pulumi.set(__self__, "subscription_id", subscription_id)
        if tenancy_id and not isinstance(tenancy_id, str):
            raise TypeError("Expected argument 'tenancy_id' to be a str")
        pulumi.set(__self__, "tenancy_id", tenancy_id)
        if usage_period_key and not isinstance(usage_period_key, str):
            raise TypeError("Expected argument 'usage_period_key' to be a str")
        pulumi.set(__self__, "usage_period_key", usage_period_key)

    @property
    @pulumi.getter
    def filters(self) -> Optional[Sequence['outputs.GetSubscriptionProductsFilterResult']]:
        return pulumi.get(self, "filters")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="productCollections")
    def product_collections(self) -> Sequence['outputs.GetSubscriptionProductsProductCollectionResult']:
        """
        The list of product_collection.
        """
        return pulumi.get(self, "product_collections")

    @property
    @pulumi.getter
    def producttype(self) -> Optional[str]:
        return pulumi.get(self, "producttype")

    @property
    @pulumi.getter(name="subscriptionId")
    def subscription_id(self) -> str:
        return pulumi.get(self, "subscription_id")

    @property
    @pulumi.getter(name="tenancyId")
    def tenancy_id(self) -> str:
        return pulumi.get(self, "tenancy_id")

    @property
    @pulumi.getter(name="usagePeriodKey")
    def usage_period_key(self) -> str:
        return pulumi.get(self, "usage_period_key")


class AwaitableGetSubscriptionProductsResult(GetSubscriptionProductsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetSubscriptionProductsResult(
            filters=self.filters,
            id=self.id,
            product_collections=self.product_collections,
            producttype=self.producttype,
            subscription_id=self.subscription_id,
            tenancy_id=self.tenancy_id,
            usage_period_key=self.usage_period_key)


def get_subscription_products(filters: Optional[Sequence[pulumi.InputType['GetSubscriptionProductsFilterArgs']]] = None,
                              producttype: Optional[str] = None,
                              subscription_id: Optional[str] = None,
                              tenancy_id: Optional[str] = None,
                              usage_period_key: Optional[str] = None,
                              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetSubscriptionProductsResult:
    """
    This data source provides the list of Subscription Products in Oracle Cloud Infrastructure Usage Proxy service.

    Provides product information that is specific to a reward usage period and its usage details.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_subscription_products = oci.UsageProxy.get_subscription_products(subscription_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        tenancy_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        usage_period_key=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        producttype=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str producttype: The field to specify the type of product.
    :param str subscription_id: The subscription ID for which rewards information is requested for.
    :param str tenancy_id: The OCID of the tenancy.
    :param str usage_period_key: The SPM Identifier for the usage period.
    """
    __args__ = dict()
    __args__['filters'] = filters
    __args__['producttype'] = producttype
    __args__['subscriptionId'] = subscription_id
    __args__['tenancyId'] = tenancy_id
    __args__['usagePeriodKey'] = usage_period_key
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('oci:UsageProxy/getSubscriptionProducts:getSubscriptionProducts', __args__, opts=opts, typ=GetSubscriptionProductsResult).value

    return AwaitableGetSubscriptionProductsResult(
        filters=__ret__.filters,
        id=__ret__.id,
        product_collections=__ret__.product_collections,
        producttype=__ret__.producttype,
        subscription_id=__ret__.subscription_id,
        tenancy_id=__ret__.tenancy_id,
        usage_period_key=__ret__.usage_period_key)


@_utilities.lift_output_func(get_subscription_products)
def get_subscription_products_output(filters: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetSubscriptionProductsFilterArgs']]]]] = None,
                                     producttype: Optional[pulumi.Input[Optional[str]]] = None,
                                     subscription_id: Optional[pulumi.Input[str]] = None,
                                     tenancy_id: Optional[pulumi.Input[str]] = None,
                                     usage_period_key: Optional[pulumi.Input[str]] = None,
                                     opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetSubscriptionProductsResult]:
    """
    This data source provides the list of Subscription Products in Oracle Cloud Infrastructure Usage Proxy service.

    Provides product information that is specific to a reward usage period and its usage details.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_oci as oci

    test_subscription_products = oci.UsageProxy.get_subscription_products(subscription_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        tenancy_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        usage_period_key=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
        producttype=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
    ```


    :param str producttype: The field to specify the type of product.
    :param str subscription_id: The subscription ID for which rewards information is requested for.
    :param str tenancy_id: The OCID of the tenancy.
    :param str usage_period_key: The SPM Identifier for the usage period.
    """
    ...
