# 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 Union
from .. import utilities, tables

class GetDefinitionResult:
    """
    A collection of values returned by getDefinition.
    """
    def __init__(__self__, description=None, display_name=None, id=None, last_modified=None, name=None, scope_id=None, target_scope=None, time_created=None, versions=None):
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        __self__.description = description
        """
        The description of the Blueprint Definition.
        """
        if display_name and not isinstance(display_name, str):
            raise TypeError("Expected argument 'display_name' to be a str")
        __self__.display_name = display_name
        """
        The display name of the Blueprint Definition.
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        The provider-assigned unique ID for this managed resource.
        """
        if last_modified and not isinstance(last_modified, str):
            raise TypeError("Expected argument 'last_modified' to be a str")
        __self__.last_modified = last_modified
        """
        The timestamp of when this last modification was saved to the Blueprint Definition.
        """
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        __self__.name = name
        if scope_id and not isinstance(scope_id, str):
            raise TypeError("Expected argument 'scope_id' to be a str")
        __self__.scope_id = scope_id
        if target_scope and not isinstance(target_scope, str):
            raise TypeError("Expected argument 'target_scope' to be a str")
        __self__.target_scope = target_scope
        """
        The target scope.
        """
        if time_created and not isinstance(time_created, str):
            raise TypeError("Expected argument 'time_created' to be a str")
        __self__.time_created = time_created
        """
        The timestamp of when this Blueprint Definition was created.
        """
        if versions and not isinstance(versions, list):
            raise TypeError("Expected argument 'versions' to be a list")
        __self__.versions = versions
        """
        A list of versions published for this Blueprint Definition.
        """
class AwaitableGetDefinitionResult(GetDefinitionResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDefinitionResult(
            description=self.description,
            display_name=self.display_name,
            id=self.id,
            last_modified=self.last_modified,
            name=self.name,
            scope_id=self.scope_id,
            target_scope=self.target_scope,
            time_created=self.time_created,
            versions=self.versions)

def get_definition(name=None,scope_id=None,opts=None):
    """
    Use this data source to access information about an existing Azure Blueprint Definition

    > **NOTE:** Azure Blueprints are in Preview and potentially subject to breaking change without notice.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_azure as azure

    current = azure.core.get_client_config()
    root = azure.management.get_group(name=current.tenant_id)
    example = azure.blueprint.get_definition(name="exampleManagementGroupBP",
        scope_id=root.id)
    ```


    :param str name: The name of the Blueprint
    :param str scope_id: The Resource ID of the scope at which the blueprint definition is stored. This will be with either a Subscription ID or Management Group ID.
    """
    __args__ = dict()


    __args__['name'] = name
    __args__['scopeId'] = scope_id
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('azure:blueprint/getDefinition:getDefinition', __args__, opts=opts).value

    return AwaitableGetDefinitionResult(
        description=__ret__.get('description'),
        display_name=__ret__.get('displayName'),
        id=__ret__.get('id'),
        last_modified=__ret__.get('lastModified'),
        name=__ret__.get('name'),
        scope_id=__ret__.get('scopeId'),
        target_scope=__ret__.get('targetScope'),
        time_created=__ret__.get('timeCreated'),
        versions=__ret__.get('versions'))
