pspulumiyaml.azurenative.alertsmanagement.psm1

using module pspulumiyaml
function Invoke-AzureNativeFunctionAlertsmanagementGetSmartDetectorAlertRule
{
    param (
        [parameter(mandatory=$False,HelpMessage='The name of the alert rule.)')]
        [string]
        $alertRuleName,
        [parameter(mandatory=$False,HelpMessage='Indicates if Smart Detector should be expanded.)')]
        [bool]
        $expandDetector,
        [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')]
        [string]
        $resourceGroupName
    )

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

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:alertsmanagement:getSmartDetectorAlertRule -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
function Invoke-AzureNativeFunctionAlertsmanagementGetActionRuleByName
{
    param (
        [parameter(mandatory=$False,HelpMessage='Resource group name where the resource is created.)')]
        [string]
        $resourceGroupName,
        [parameter(mandatory=$False,HelpMessage='The name of action rule that needs to be fetched)')]
        [string]
        $actionRuleName
    )

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

        $functionObject = Invoke-PulumiFunction -Name azure-native:alertsmanagement:getActionRuleByName -variableName $([guid]::NewGuid().Guid) -Arguments $arguments
        return $functionObject
    }
}
class Scope
{
    [ArgumentCompletions('ResourceGroup', 'Resource', 'Subscription')]
    [string] $scopeType
    [string[]] $values
}
function New-AzureNativeTypeAlertsmanagementScope
{
    param (
        [parameter(mandatory=$False,HelpMessage='type of target scope)')]
        [string]
        [ValidateSet('ResourceGroup', 'Resource', 'Subscription')]
        $scopeType,
        [parameter(mandatory=$False,HelpMessage='list of ARM IDs of the given scope type which will be the target of the given action rule.)')]
        [string[]]
        $values
    )

    process
    {
        return $([Scope]$PSBoundParameters)
    }
}
class Condition
{
    [ArgumentCompletions('Equals', 'NotEquals', 'Contains', 'DoesNotContain')]
    [string] $operator
    [string[]] $values
}
function New-AzureNativeTypeAlertsmanagementCondition
{
    param (
        [parameter(mandatory=$False,HelpMessage='operator for a given condition)')]
        [string]
        [ValidateSet('Equals', 'NotEquals', 'Contains', 'DoesNotContain')]
        $operator,
        [parameter(mandatory=$False,HelpMessage='list of values to match for a given condition.)')]
        [string[]]
        $values
    )

    process
    {
        return $([Condition]$PSBoundParameters)
    }
}
class Conditions
{
    [Condition] $alertRuleId
    [Condition] $description
    [Condition] $monitorCondition
    [Condition] $alertContext
    [Condition] $targetResourceType
    [Condition] $monitorService
    [Condition] $severity
}
function New-AzureNativeTypeAlertsmanagementConditions
{
    param (
        [parameter(mandatory=$False,HelpMessage='filter alerts by alert rule id)')]
        [Condition]
        $alertRuleId,
        [parameter(mandatory=$False,HelpMessage='filter alerts by alert rule description)')]
        [Condition]
        $description,
        [parameter(mandatory=$False,HelpMessage='filter alerts by monitor condition)')]
        [Condition]
        $monitorCondition,
        [parameter(mandatory=$False,HelpMessage='filter alerts by alert context (payload))')]
        [Condition]
        $alertContext,
        [parameter(mandatory=$False,HelpMessage='filter alerts by target resource type)')]
        [Condition]
        $targetResourceType,
        [parameter(mandatory=$False,HelpMessage='filter alerts by monitor service)')]
        [Condition]
        $monitorService,
        [parameter(mandatory=$False,HelpMessage='filter alerts by severity)')]
        [Condition]
        $severity
    )

    process
    {
        return $([Conditions]$PSBoundParameters)
    }
}
class SuppressionSchedule
{
    [int[]] $recurrenceValues
    [string] $endTime
    [string] $endDate
    [string] $startTime
    [string] $startDate
}
function New-AzureNativeTypeAlertsmanagementSuppressionSchedule
{
    param (
        [parameter(mandatory=$False,HelpMessage='Specifies the values for recurrence pattern)')]
        [int[]]
        $recurrenceValues,
        [parameter(mandatory=$False,HelpMessage='End date for suppression)')]
        [string]
        $endTime,
        [parameter(mandatory=$False,HelpMessage='End date for suppression)')]
        [string]
        $endDate,
        [parameter(mandatory=$False,HelpMessage='Start time for suppression)')]
        [string]
        $startTime,
        [parameter(mandatory=$False,HelpMessage='Start date for suppression)')]
        [string]
        $startDate
    )

    process
    {
        return $([SuppressionSchedule]$PSBoundParameters)
    }
}
class SuppressionConfig
{
    [ArgumentCompletions('Always', 'Once', 'Daily', 'Weekly', 'Monthly')]
    [string] $recurrenceType
    [SuppressionSchedule] $schedule
}
function New-AzureNativeTypeAlertsmanagementSuppressionConfig
{
    param (
        [parameter(mandatory=$False,HelpMessage='Specifies when the suppression should be applied)')]
        [string]
        [ValidateSet('Always', 'Once', 'Daily', 'Weekly', 'Monthly')]
        $recurrenceType,
        [parameter(mandatory=$False,HelpMessage='suppression schedule configuration)')]
        [SuppressionSchedule]
        $schedule
    )

    process
    {
        return $([SuppressionConfig]$PSBoundParameters)
    }
}
class Suppression
{
    [string] $type
    [string] $description
    [Scope] $scope
    [Conditions] $conditions
    [SuppressionConfig] $suppressionConfig
    [ArgumentCompletions('Enabled', 'Disabled')]
    [string] $status
}
function New-AzureNativeTypeAlertsmanagementSuppression
{
    param (
        [parameter(mandatory=$False,HelpMessage='Indicates type of action rule
Expected value is ''Suppression''.)'
)]
        [string]
        $type,
        [parameter(mandatory=$False,HelpMessage='Description of action rule)')]
        [string]
        $description,
        [parameter(mandatory=$False,HelpMessage='scope on which action rule will apply)')]
        [Scope]
        $scope,
        [parameter(mandatory=$False,HelpMessage='conditions on which alerts will be filtered)')]
        [Conditions]
        $conditions,
        [parameter(mandatory=$False,HelpMessage='suppression configuration for the action rule)')]
        [SuppressionConfig]
        $suppressionConfig,
        [parameter(mandatory=$False,HelpMessage='Indicates if the given action rule is enabled or disabled)')]
        [string]
        [ValidateSet('Enabled', 'Disabled')]
        $status
    )

    process
    {
        return $([Suppression]$PSBoundParameters)
    }
}
function New-AzureNativeAlertsmanagementActionRuleByName
{
    [Alias('azure_native_alertsmanagement_actionrulebyname')]
    param (
        [parameter(mandatory=$False,HelpMessage='The name of action rule that needs to be created/updated)')]
        [string]
        $actionRuleName,
        [parameter(mandatory=$False,HelpMessage='action rule properties)')]
        [Suppression]
        $properties,
        [parameter(mandatory=$False,HelpMessage='Resource location)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='Resource tags)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='Resource group name where the resource is created.)')]
        [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:alertsmanagement:ActionRuleByName")

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

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

        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
    }
}
class ThrottlingInformation
{
    [string] $duration
}
function New-AzureNativeTypeAlertsmanagementThrottlingInformation
{
    param (
        [parameter(mandatory=$False,HelpMessage='The required duration (in ISO8601 format) to wait before notifying on the alert rule again. The time granularity must be in minutes and minimum value is 0 minutes)')]
        [string]
        $duration
    )

    process
    {
        return $([ThrottlingInformation]$PSBoundParameters)
    }
}
class ActionGroupsInformation
{
    [string] $customWebhookPayload
    [string[]] $groupIds
    [string] $customEmailSubject
}
function New-AzureNativeTypeAlertsmanagementActionGroupsInformation
{
    param (
        [parameter(mandatory=$False,HelpMessage='An optional custom web-hook payload to use in web-hook notifications.)')]
        [string]
        $customWebhookPayload,
        [parameter(mandatory=$False,HelpMessage='The Action Group resource IDs.)')]
        [string[]]
        $groupIds,
        [parameter(mandatory=$False,HelpMessage='An optional custom email subject to use in email notifications.)')]
        [string]
        $customEmailSubject
    )

    process
    {
        return $([ActionGroupsInformation]$PSBoundParameters)
    }
}
class Detector
{
    [string] $id
    [string] $description
    [object] $parameters
    [string[]] $imagePaths
    [string] $name
    [string[]] $supportedResourceTypes
}
function New-AzureNativeTypeAlertsmanagementDetector
{
    param (
        [parameter(mandatory=$False,HelpMessage='The detector id.)')]
        [string]
        $id,
        [parameter(mandatory=$False,HelpMessage='The Smart Detector description. By default this is not populated, unless it''s specified in expandDetector)')]
        [string]
        $description,
        [parameter(mandatory=$False,HelpMessage='The detector''s parameters.'')')]
        [object]
        $parameters,
        [parameter(mandatory=$False,HelpMessage='The Smart Detector image path. By default this is not populated, unless it''s specified in expandDetector)')]
        [string[]]
        $imagePaths,
        [parameter(mandatory=$False,HelpMessage='The Smart Detector name. By default this is not populated, unless it''s specified in expandDetector)')]
        [string]
        $name,
        [parameter(mandatory=$False,HelpMessage='The Smart Detector supported resource types. By default this is not populated, unless it''s specified in expandDetector)')]
        [string[]]
        $supportedResourceTypes
    )

    process
    {
        return $([Detector]$PSBoundParameters)
    }
}
function New-AzureNativeAlertsmanagementSmartDetectorAlertRule
{
    [Alias('azure_native_alertsmanagement_smartdetectoralertrule')]
    param (
        [parameter(mandatory=$False,HelpMessage='The alert rule throttling information.)')]
        [ThrottlingInformation]
        $throttling,
        [parameter(mandatory=$False,HelpMessage='The alert rule state.)')]
        [string]
        [ValidateSet('Enabled', 'Disabled')]
        $state,
        [parameter(mandatory=$False,HelpMessage='The alert rule frequency in ISO8601 format. The time granularity must be in minutes and minimum value is 5 minutes.)')]
        [string]
        $frequency,
        [parameter(mandatory=$False,HelpMessage='The alert rule actions.)')]
        [ActionGroupsInformation]
        $actionGroups,
        [parameter(mandatory=$False,HelpMessage='The resource tags.)')]
        [hashtable]
        $tags,
        [parameter(mandatory=$False,HelpMessage='The alert rule severity.)')]
        [string]
        [ValidateSet('Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4')]
        $severity,
        [parameter(mandatory=$False,HelpMessage='The alert rule resources scope.)')]
        [string[]]
        $scope,
        [parameter(mandatory=$False,HelpMessage='The alert rule''s detector.)')]
        [Detector]
        $detector,
        [parameter(mandatory=$False,HelpMessage='The resource location.)')]
        [string]
        $location,
        [parameter(mandatory=$False,HelpMessage='The name of the alert rule.)')]
        [string]
        $alertRuleName,
        [parameter(mandatory=$False,HelpMessage='The alert rule description.)')]
        [string]
        $description,
        [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:alertsmanagement:SmartDetectorAlertRule")

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

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

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

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

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

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

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