# 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__ = [
    'GetProfileResult',
    'AwaitableGetProfileResult',
    'get_profile',
    'get_profile_output',
]

@pulumi.output_type
class GetProfileResult:
    """
    A collection of values returned by getProfile.
    """
    def __init__(__self__, created_at=None, description=None, external_region_id=None, filter=None, id=None, image_mappings=None, name=None, owner=None, region_id=None, updated_at=None):
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if external_region_id and not isinstance(external_region_id, str):
            raise TypeError("Expected argument 'external_region_id' to be a str")
        pulumi.set(__self__, "external_region_id", external_region_id)
        if filter and not isinstance(filter, str):
            raise TypeError("Expected argument 'filter' to be a str")
        pulumi.set(__self__, "filter", filter)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if image_mappings and not isinstance(image_mappings, list):
            raise TypeError("Expected argument 'image_mappings' to be a list")
        pulumi.set(__self__, "image_mappings", image_mappings)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if owner and not isinstance(owner, str):
            raise TypeError("Expected argument 'owner' to be a str")
        pulumi.set(__self__, "owner", owner)
        if region_id and not isinstance(region_id, str):
            raise TypeError("Expected argument 'region_id' to be a str")
        pulumi.set(__self__, "region_id", region_id)
        if updated_at and not isinstance(updated_at, str):
            raise TypeError("Expected argument 'updated_at' to be a str")
        pulumi.set(__self__, "updated_at", updated_at)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> str:
        """
        Date when the entity was created. The date is in ISO 6801 and UTC.
        """
        return pulumi.get(self, "created_at")

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

    @property
    @pulumi.getter(name="externalRegionId")
    def external_region_id(self) -> str:
        """
        The external regionId of the resource.
        """
        return pulumi.get(self, "external_region_id")

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

    @property
    @pulumi.getter
    def id(self) -> str:
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="imageMappings")
    def image_mappings(self) -> Optional[Sequence['outputs.GetProfileImageMappingResult']]:
        """
        Image mapping defined for the corresponding region.
        """
        return pulumi.get(self, "image_mappings")

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

    @property
    @pulumi.getter
    def owner(self) -> str:
        """
        Email of the user that owns the entity.
        """
        return pulumi.get(self, "owner")

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

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> str:
        """
        Date when the entity was last updated. The date is ISO 8601 and UTC.
        """
        return pulumi.get(self, "updated_at")


class AwaitableGetProfileResult(GetProfileResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetProfileResult(
            created_at=self.created_at,
            description=self.description,
            external_region_id=self.external_region_id,
            filter=self.filter,
            id=self.id,
            image_mappings=self.image_mappings,
            name=self.name,
            owner=self.owner,
            region_id=self.region_id,
            updated_at=self.updated_at)


def get_profile(description: Optional[str] = None,
                filter: Optional[str] = None,
                id: Optional[str] = None,
                image_mappings: Optional[Sequence[pulumi.InputType['GetProfileImageMappingArgs']]] = None,
                name: Optional[str] = None,
                region_id: Optional[str] = None,
                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetProfileResult:
    """
    ## Example Usage
    ### S
    This is an example of how to read an image profile as data source.

    **Image profile data source by its id:**

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.image.get_profile(filter="name eq 'foobar'")
    ```

    **Vra image profile data source filter by region id:**

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.image.get_profile(region_id=vra_image_profile["this"]["region_id"])
    ```

    An image profile data source supports the following arguments:


    :param str description: A human-friendly description.
    :param str filter: Filter query string that is supported by vRA multi-cloud IaaS API. Example: regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'.
    :param str id: The id of the image profile instance.
    :param Sequence[pulumi.InputType['GetProfileImageMappingArgs']] image_mappings: Image mapping defined for the corresponding region.
    :param str name: A human-friendly name used as an identifier in APIs that support this option.
    :param str region_id: The id of the region for which this profile is defined as in vRealize Automation(vRA).
    """
    __args__ = dict()
    __args__['description'] = description
    __args__['filter'] = filter
    __args__['id'] = id
    __args__['imageMappings'] = image_mappings
    __args__['name'] = name
    __args__['regionId'] = region_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vra:image/getProfile:getProfile', __args__, opts=opts, typ=GetProfileResult).value

    return AwaitableGetProfileResult(
        created_at=__ret__.created_at,
        description=__ret__.description,
        external_region_id=__ret__.external_region_id,
        filter=__ret__.filter,
        id=__ret__.id,
        image_mappings=__ret__.image_mappings,
        name=__ret__.name,
        owner=__ret__.owner,
        region_id=__ret__.region_id,
        updated_at=__ret__.updated_at)


@_utilities.lift_output_func(get_profile)
def get_profile_output(description: Optional[pulumi.Input[Optional[str]]] = None,
                       filter: Optional[pulumi.Input[Optional[str]]] = None,
                       id: Optional[pulumi.Input[Optional[str]]] = None,
                       image_mappings: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetProfileImageMappingArgs']]]]] = None,
                       name: Optional[pulumi.Input[Optional[str]]] = None,
                       region_id: Optional[pulumi.Input[Optional[str]]] = None,
                       opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetProfileResult]:
    """
    ## Example Usage
    ### S
    This is an example of how to read an image profile as data source.

    **Image profile data source by its id:**

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.image.get_profile(filter="name eq 'foobar'")
    ```

    **Vra image profile data source filter by region id:**

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.image.get_profile(region_id=vra_image_profile["this"]["region_id"])
    ```

    An image profile data source supports the following arguments:


    :param str description: A human-friendly description.
    :param str filter: Filter query string that is supported by vRA multi-cloud IaaS API. Example: regionId eq '<regionId>' and cloudAccountId eq '<cloudAccountId>'.
    :param str id: The id of the image profile instance.
    :param Sequence[pulumi.InputType['GetProfileImageMappingArgs']] image_mappings: Image mapping defined for the corresponding region.
    :param str name: A human-friendly name used as an identifier in APIs that support this option.
    :param str region_id: The id of the region for which this profile is defined as in vRealize Automation(vRA).
    """
    ...
