# 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__ = [
    'GetPropertiesResult',
    'AwaitableGetPropertiesResult',
    'get_properties',
]

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

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

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

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

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


class AwaitableGetPropertiesResult(GetPropertiesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetPropertiesResult(
            contract_id=self.contract_id,
            group_id=self.group_id,
            id=self.id,
            properties=self.properties)


def get_properties(contract_id: Optional[str] = None,
                   group_id: Optional[str] = None,
                   opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetPropertiesResult:
    """
    Use the `getProperties` data source to query and retrieve the list of properties for a group and contract
    based on the [EdgeGrid API client token](https://developer.akamai.com/getting-started/edgegrid) you're using.

    ## Example Usage

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

    ```python
    import pulumi

    pulumi.export("myPropertyList", data["akamai_properties"]["example"])
    ```
    ## Argument reference

    This data source supports these arguments:

    * `contract_id` - (Required) A contract's unique ID, including the `ctr_` prefix.
    * `group_id` - (Required) A group's unique ID, including the `grp_` prefix.

    ## Attributes reference

    This data source returns this attribute:

    * `properties` - A list of properties available for the contract and group IDs provided.
    """
    __args__ = dict()
    __args__['contractId'] = contract_id
    __args__['groupId'] = group_id
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = _utilities.get_version()
    __ret__ = pulumi.runtime.invoke('akamai:index/getProperties:getProperties', __args__, opts=opts, typ=GetPropertiesResult).value

    return AwaitableGetPropertiesResult(
        contract_id=__ret__.contract_id,
        group_id=__ret__.group_id,
        id=__ret__.id,
        properties=__ret__.properties)
