# 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 sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
from . import outputs

__all__ = [
    'GetOrganizationProjectResult',
    'AwaitableGetOrganizationProjectResult',
    'get_organization_project',
    'get_organization_project_output',
]

@pulumi.output_type
class GetOrganizationProjectResult:
    """
    A collection of values returned by getOrganizationProject.
    """
    def __init__(__self__, billing_group_id=None, id=None, organization_id=None, parent_id=None, project_id=None, tags=None, technical_emails=None):
        if billing_group_id and not isinstance(billing_group_id, str):
            raise TypeError("Expected argument 'billing_group_id' to be a str")
        pulumi.set(__self__, "billing_group_id", billing_group_id)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if organization_id and not isinstance(organization_id, str):
            raise TypeError("Expected argument 'organization_id' to be a str")
        pulumi.set(__self__, "organization_id", organization_id)
        if parent_id and not isinstance(parent_id, str):
            raise TypeError("Expected argument 'parent_id' to be a str")
        pulumi.set(__self__, "parent_id", parent_id)
        if project_id and not isinstance(project_id, str):
            raise TypeError("Expected argument 'project_id' to be a str")
        pulumi.set(__self__, "project_id", project_id)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if technical_emails and not isinstance(technical_emails, list):
            raise TypeError("Expected argument 'technical_emails' to be a list")
        pulumi.set(__self__, "technical_emails", technical_emails)

    @property
    @pulumi.getter(name="billingGroupId")
    def billing_group_id(self) -> str:
        """
        Billing group ID to assign to the project.
        """
        return pulumi.get(self, "billing_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(name="organizationId")
    def organization_id(self) -> str:
        """
        ID of an organization. Changing this property forces recreation of the resource.
        """
        return pulumi.get(self, "organization_id")

    @property
    @pulumi.getter(name="parentId")
    def parent_id(self) -> str:
        """
        Link a project to an [organization or organizational unit](https://aiven.io/docs/platform/concepts/orgs-units-projects) by using its ID. To set up proper dependencies please refer to this variable as a reference.
        """
        return pulumi.get(self, "parent_id")

    @property
    @pulumi.getter(name="projectId")
    def project_id(self) -> str:
        """
        Unique identifier for the project that also serves as the project name.
        """
        return pulumi.get(self, "project_id")

    @property
    @pulumi.getter
    def tags(self) -> Sequence['outputs.GetOrganizationProjectTagResult']:
        """
        Tags are key-value pairs that allow you to categorize projects.
        """
        return pulumi.get(self, "tags")

    @property
    @pulumi.getter(name="technicalEmails")
    def technical_emails(self) -> Sequence[str]:
        """
        The email addresses for [project contacts](https://aiven.io/docs/platform/howto/technical-emails), who will receive important alerts and updates about this project and its services. You can also set email contacts at the service level. It's good practice to keep these up-to-date to be aware of any potential issues with your project.
        """
        return pulumi.get(self, "technical_emails")


class AwaitableGetOrganizationProjectResult(GetOrganizationProjectResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetOrganizationProjectResult(
            billing_group_id=self.billing_group_id,
            id=self.id,
            organization_id=self.organization_id,
            parent_id=self.parent_id,
            project_id=self.project_id,
            tags=self.tags,
            technical_emails=self.technical_emails)


def get_organization_project(organization_id: Optional[str] = None,
                             project_id: Optional[str] = None,
                             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetOrganizationProjectResult:
    """
    Gets information about an Aiven project.

    **This resource is in the beta stage and may change without notice.** Set
    the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_aiven as aiven

    example = aiven.get_organization_project(project_id=foo["projectId"],
        organization_id=foo["organizationId"])
    ```


    :param str organization_id: ID of an organization. Changing this property forces recreation of the resource.
    :param str project_id: Unique identifier for the project that also serves as the project name.
    """
    __args__ = dict()
    __args__['organizationId'] = organization_id
    __args__['projectId'] = project_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('aiven:index/getOrganizationProject:getOrganizationProject', __args__, opts=opts, typ=GetOrganizationProjectResult).value

    return AwaitableGetOrganizationProjectResult(
        billing_group_id=pulumi.get(__ret__, 'billing_group_id'),
        id=pulumi.get(__ret__, 'id'),
        organization_id=pulumi.get(__ret__, 'organization_id'),
        parent_id=pulumi.get(__ret__, 'parent_id'),
        project_id=pulumi.get(__ret__, 'project_id'),
        tags=pulumi.get(__ret__, 'tags'),
        technical_emails=pulumi.get(__ret__, 'technical_emails'))
def get_organization_project_output(organization_id: Optional[pulumi.Input[str]] = None,
                                    project_id: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetOrganizationProjectResult]:
    """
    Gets information about an Aiven project.

    **This resource is in the beta stage and may change without notice.** Set
    the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_aiven as aiven

    example = aiven.get_organization_project(project_id=foo["projectId"],
        organization_id=foo["organizationId"])
    ```


    :param str organization_id: ID of an organization. Changing this property forces recreation of the resource.
    :param str project_id: Unique identifier for the project that also serves as the project name.
    """
    __args__ = dict()
    __args__['organizationId'] = organization_id
    __args__['projectId'] = project_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('aiven:index/getOrganizationProject:getOrganizationProject', __args__, opts=opts, typ=GetOrganizationProjectResult)
    return __ret__.apply(lambda __response__: GetOrganizationProjectResult(
        billing_group_id=pulumi.get(__response__, 'billing_group_id'),
        id=pulumi.get(__response__, 'id'),
        organization_id=pulumi.get(__response__, 'organization_id'),
        parent_id=pulumi.get(__response__, 'parent_id'),
        project_id=pulumi.get(__response__, 'project_id'),
        tags=pulumi.get(__response__, 'tags'),
        technical_emails=pulumi.get(__response__, 'technical_emails')))
