# 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 warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities
from . import outputs

__all__ = [
    'GetContractsResult',
    'AwaitableGetContractsResult',
    'get_contracts',
]

@pulumi.output_type
class GetContractsResult:
    """
    A collection of values returned by getContracts.
    """
    def __init__(__self__, contracts=None, id=None):
        if contracts and not isinstance(contracts, list):
            raise TypeError("Expected argument 'contracts' to be a list")
        pulumi.set(__self__, "contracts", contracts)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)

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

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


class AwaitableGetContractsResult(GetContractsResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetContractsResult(
            contracts=self.contracts,
            id=self.id)


def get_contracts(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetContractsResult:
    """
    Use the `getContracts` data source to list contracts associated with the [EdgeGrid API client token](https://developer.akamai.com/getting-started/edgegrid) you're using.

    ## Example Usage

    Return contracts associated with the EdgeGrid API client token currently used for authentication:

    ```python
    import pulumi

    pulumi.export("propertyMatch", data["akamai_contracts"]["my-example"])
    ```
    ## Argument reference

    There are no arguments available for this data source.

    ## Attributes reference

    This data source returns these attributes:

    * `contracts` - A list of supported contracts, with the following properties:
      * `contract_id` - The contract's unique ID, including the `ctr_` prefix.
      * `contract_type_name` - The type of contract, either `DIRECT_CUSTOMER`, `INDIRECT_CUSTOMER`, `PARENT_CUSTOMER`, `REFERRAL_PARTNER`, `TIER_1_RESELLER`, `VAR_CUSTOMER`, `VALUE_ADDED_RESELLER`, `PARTNER`, `PORTAL_PARTNER`, `STREAMING_RESELLER`, `AKAMAI_INTERNAL`, or `UNKNOWN`.
    """
    __args__ = dict()
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('akamai:index/getContracts:getContracts', __args__, opts=opts, typ=GetContractsResult).value

    return AwaitableGetContractsResult(
        contracts=__ret__.contracts,
        id=__ret__.id)
