pspulumiyaml.azurenative.confidentialledger.psm1

using module pspulumiyaml
function Invoke-AzureNativeFunctionConfidentialledgerGetLedger
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='Name of the Confidential Ledger)')]
        [string]
        $ledgerName
    )

    process
    {
        $arguments = @{}
        $arguments["ledgerName"] = $ledgerName
        $arguments["resourceGroupName"] = $resourceGroupName

        $functionObject = Invoke-PulumiFunction -Name azure-native:confidentialledger:getLedger -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
class AADBasedSecurityPrincipal
{
    [string] $principalId
    [ArgumentCompletions('Reader', 'Contributor', 'Administrator')]
    [string] $ledgerRoleName
    [string] $tenantId
}
function New-AzureNativeTypeConfidentialledgerAADBasedSecurityPrincipal
{
    param (
        [parameter(mandatory=$False,HelpMessage='UUID/GUID based Principal Id of the Security Principal)')]
        [string]
        $principalId,
        [parameter(mandatory=$False,HelpMessage='LedgerRole associated with the Security Principal of Ledger)')]
        [string]
        [ValidateSet('Reader', 'Contributor', 'Administrator')]
        $ledgerRoleName,
        [parameter(mandatory=$False,HelpMessage='UUID/GUID based Tenant Id of the Security Principal)')]
        [string]
        $tenantId
    )

    process
    {
        return $([AADBasedSecurityPrincipal]$PSBoundParameters)
    }
}
class CertBasedSecurityPrincipal
{
    [ArgumentCompletions('Reader', 'Contributor', 'Administrator')]
    [string] $ledgerRoleName
    [string] $cert
}
function New-AzureNativeTypeConfidentialledgerCertBasedSecurityPrincipal
{
    param (
        [parameter(mandatory=$False,HelpMessage='LedgerRole associated with the Security Principal of Ledger)')]
        [string]
        [ValidateSet('Reader', 'Contributor', 'Administrator')]
        $ledgerRoleName,
        [parameter(mandatory=$False,HelpMessage='Public key of the user cert (.pem or .cer))')]
        [string]
        $cert
    )

    process
    {
        return $([CertBasedSecurityPrincipal]$PSBoundParameters)
    }
}
class LedgerProperties
{
    [AADBasedSecurityPrincipal[]] $aadBasedSecurityPrincipals
    [string] $ledgerStorageAccount
    [CertBasedSecurityPrincipal[]] $certBasedSecurityPrincipals
    [ArgumentCompletions('Unknown', 'Public', 'Private')]
    [string] $ledgerType
}
function New-AzureNativeTypeConfidentialledgerLedgerProperties
{
    param (
        [parameter(mandatory=$False,HelpMessage='Array of all AAD based Security Principals.)')]
        $aadBasedSecurityPrincipals,
        [parameter(mandatory=$False,HelpMessage='Name of the Blob Storage Account for saving ledger files)')]
        [string]
        $ledgerStorageAccount,
        [parameter(mandatory=$False,HelpMessage='Array of all cert based Security Principals.)')]
        $certBasedSecurityPrincipals,
        [parameter(mandatory=$False,HelpMessage='Type of Confidential Ledger)')]
        [string]
        [ValidateSet('Unknown', 'Public', 'Private')]
        $ledgerType
    )

    process
    {
        return $([LedgerProperties]$PSBoundParameters)
    }
}
function New-AzureNativeConfidentialledgerLedger
{
    [Alias('azure_native_confidentialledger_ledger')]
    param (
        [parameter(mandatory=$False,HelpMessage='Name of the Confidential Ledger)')]
        [string]
        $ledgerName,
        [parameter(mandatory=$False,HelpMessage='Properties of Confidential Ledger Resource.)')]
        [LedgerProperties]
        $properties,
        [parameter(mandatory=$False,HelpMessage='The Azure location where the Confidential Ledger is running.)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='Additional tags for Confidential Ledger)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')]
        [string]
        $pulumiid,
        [parameter(mandatory,HelpMessage='Pass in the resources you make to make this resource dependant on')]
        [object]
        $DependsOn
    )

    process
    {
        $resource = [pulumiresource]::new($pulumiid, "azure-native:confidentialledger:Ledger")

        foreach($Dependency in $DependsOn)
        {
            if($Dependency -is [pulumiresource])
            {
                $resource.dependson += $Dependency.Reference()
            } else
            {
                $resource.dependson += $Dependency
            }
        }
        $resource.properties["resourceGroupName"] = $resourceGroupName

        if($PSBoundParameters.Keys -icontains 'ledgerName')
        {
            $resource.properties["ledgerName"] = $ledgerName
        }

        if($PSBoundParameters.Keys -icontains 'properties')
        {
            $resource.properties["properties"] = $properties
        }

        if($PSBoundParameters.Keys -icontains 'location')
        {
            $resource.properties["location"] = $location
        }

        if($PSBoundParameters.Keys -icontains 'tags')
        {
            $resource.properties["tags"] = $tags
        }

        $global:pulumiresources += $resource
        return $resource
    }
}