pspulumiyaml.azurenative.alertsmanagement.psm1
using module @{ ModuleName = "PSPulumiYaml"; ModuleVersion = "0.0.3"; GUID = "909344e0-a08f-45f6-8177-80e36bb2ba58" } 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='The name of action rule that needs to be fetched)')] [string] $actionRuleName, [parameter(mandatory=$False,HelpMessage='Resource group name where the resource is created.)')] [string] $resourceGroupName ) 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 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] $description [string] $id [string[]] $imagePaths [string[]] $supportedResourceTypes [string] $name [object] $parameters } function New-AzureNativeTypeAlertsmanagementDetector { param ( [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 id.)')] [string] $id, [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 supported resource types. By default this is not populated, unless it''s specified in expandDetector)')] [string[]] $supportedResourceTypes, [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 detector''s parameters.'')')] [object] $parameters ) process { return $([Detector]$PSBoundParameters) } } function New-AzureNativeAlertsmanagementSmartDetectorAlertRule { [Alias('azure_native_alertsmanagement_smartdetectoralertrule')] param ( [parameter(mandatory=$False,HelpMessage='The alert rule resources scope.)')] [string[]] $scope, [parameter(mandatory=$False,HelpMessage='The alert rule severity.)')] [string] [ArgumentCompletions('Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4')] $severity, [parameter(mandatory=$False,HelpMessage='The resource tags.)')] [hashtable] $tags, [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 description.)')] [string] $description, [parameter(mandatory=$False,HelpMessage='The alert rule throttling information.)')] [ThrottlingInformation] $throttling, [parameter(mandatory=$False,HelpMessage='The name of the resource group.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The alert rule state.)')] [string] [ArgumentCompletions('Enabled', 'Disabled')] $state, [parameter(mandatory=$False,HelpMessage='The alert rule actions.)')] [ActionGroupsInformation] $actionGroups, [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,HelpMessage='The reference to call when you want to make a dependency to another resource')] [string] $pulumiid, [parameter(HelpMessage='Specifies a list of named output properties that should be treated as secrets, which means they will be encrypted. It augments the list of values that Pulumi detects, based on secret inputs to the resource.')] [string[]] $PulumiSecretOutputs, [parameter(HelpMessage='The aliases parameter provides a list of aliases for a resource or component resource. If youre changing the name, type, or parent path of a resource or component resource, you can add the old name to the list of aliases for a resource to ensure that existing resources will be migrated to the new name instead of being deleted and replaced with the new named resource.')] [string[]] $PulumiAliases, [parameter(HelpMessage='The customTimeouts parameter provides a set of custom timeouts for create, update, and delete operations on a resource. These timeouts are specified using a duration string such as 5m (5 minutes), 40s (40 seconds), or 1d (1 day). Supported duration units are ns, us (or µs), ms, s, m, and h (nanoseconds, microseconds, milliseconds, seconds, minutes, and hours, respectively).')] [pulumicustomtimeouts] $PulumiCustomTimeouts, [parameter(HelpMessage='Setting the PulumiDeleteBeforeReplace parameter to true means that Pulumi will delete the existing resource before creating its replacement. Be aware that this behavior has a cascading impact on dependencies so more resources may be replaced, which can lead to downtime. However, this option may be necessary for some resources that manage scarce resources behind the scenes, and/or resources that cannot exist side-by-side.')] [bool] $PulumiDeleteBeforeReplace, [parameter(HelpMessage='Creates a list of explicit dependencies between resources.The DependsOn parameter ensures that resource creation, update, and deletion operations are done in the correct order.')] [object[]] $PulumiDependsOn, [parameter(HelpMessage='Specifies a list of properties that Pulumi will ignore when it updates existing resources. Any properties specified in this list that are also specified in the resources arguments will only be used when creating the resource.')] [string[]] $PulumiIgnoreChanges, [parameter(HelpMessage='Imports an existing cloud resource so that Pulumi can manage it. To import a resource, first specify the PulumiImport parameter with the resources ID')] [string] $PulumiImport = [NullString]::Value, [parameter(HelpMessage='Specifies a parent for a resource. It is used to associate children with the parents that encapsulate or are responsible for them.')] [object] $PulumiParent = [NullString]::Value, [parameter(HelpMessage='Marks a resource as protected. A protected resource cannot be deleted directly, and it will be an error to do a Pulumi deployment which tries to delete a protected resource for any reason.')] [bool] $PulumiProtect, [parameter(HelpMessage='Sets a provider for the resource. The default is to inherit this value from the parent resource, and to use the ambient provider specified by Pulumi configuration for resources without a parent.')] [object] $PulumiProvider = [NullString]::Value, [parameter(HelpMessage='Sets a list of providers for the resource and its children. This list is combined with resource parents providers lists. If no value is provided, the providers list is identical to the parent. When determining which provider to use for a resource, the providers list is used if provider is not supplied.')] [object[]] $PulumiProviders, [parameter(HelpMessage='Used to indicate that changes to certain properties on a resource should force a replacement of the resource instead of an in-place update. Typically users rely on the resource provider to make this decision based on whether the input property is one that the provider knows how to update in place, or if not, requires a replacement to modify. However, there are cases where users want to replace a resource on a change to an input property even if the resource provider itself doesnt believe it has to replace the resource.')] [string[]] $PulumiReplaceOnChanges, [parameter(HelpMessage='Marks a resource to be retained. If this option is set then Pulumi will not call through to the resource providers Delete method when deleting or replacing the resource during pulumi up or pulumi destroy. As a result, the resource will not be deleted from the backing cloud provider, but will be removed from the Pulumi state.')] [bool] $PulumiRetainOnDelete, [parameter(HelpMessage='Specifies a provider version to use when operating on a resource. This version overrides the version information inferred from the current package. This option should be used rarely.')] [string] $PulumiProviderVersion = [NullString]::Value ) process { $resource = [pulumiresource]::new($pulumiid, "azure-native:alertsmanagement:SmartDetectorAlertRule") $resource.options.additionalSecretOutputs = $PulumiSecretOutputs $resource.options.aliases = $PulumiAliases $resource.options.customTimeouts = $PulumiCustomTimeouts $resource.options.deleteBeforeReplace = $PulumiDeleteBeforeReplace $resource.options.ignoreChanges = $PulumiIgnoreChanges $resource.options.import = if([string]::IsNullOrEmpty($PulumiImport)) { [NullString]::Value } else { $PulumiImport } $resource.options.protect = $PulumiProtect $resource.options.replaceOnChanges = $PulumiReplaceOnChanges $resource.options.retainOnDelete = $PulumiRetainOnDelete $resource.options.version = if([string]::IsNullOrEmpty($PulumiProviderVersion)) { [NullString]::Value } else { $PulumiProviderVersion } foreach($Dependency in $DependsOn) { if($Dependency -is [pulumiresource]) { $resource.options.dependson += $Dependency.Reference() } else { $resource.options.dependson += $Dependency } } if($PulumiParent -is [pulumiresource]) { $resource.options.parent = $PulumiParent.Reference() } else { $resource.options.parent = $PulumiParent } foreach($provider in $PulumiProviders) { if($provider -is [pulumiprovider]) { $resource.options.providers += $provider.Reference() } else { $resource.options.providers += $provider } } if($PulumiProvider -is [pulumiprovider]) { $resource.options.provider = $PulumiProvider.Reference() } else { $resource.options.provider = $PulumiProvider } $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 'tags') { $resource.properties["tags"] = $tags } if($PSBoundParameters.Keys -icontains 'description') { $resource.properties["description"] = $description } if($PSBoundParameters.Keys -icontains 'throttling') { $resource.properties["throttling"] = $throttling } if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } if($PSBoundParameters.Keys -icontains 'alertRuleName') { $resource.properties["alertRuleName"] = $alertRuleName } $global:pulumiresources += $resource return $resource } } 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] [ArgumentCompletions('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] $description [Condition] $alertRuleId [Condition] $alertContext [Condition] $monitorCondition [Condition] $targetResourceType [Condition] $monitorService [Condition] $severity } function New-AzureNativeTypeAlertsmanagementConditions { param ( [parameter(mandatory=$False,HelpMessage='filter alerts by alert rule description)')] [Condition] $description, [parameter(mandatory=$False,HelpMessage='filter alerts by alert rule id)')] [Condition] $alertRuleId, [parameter(mandatory=$False,HelpMessage='filter alerts by alert context (payload))')] [Condition] $alertContext, [parameter(mandatory=$False,HelpMessage='filter alerts by monitor condition)')] [Condition] $monitorCondition, [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 { [string] $endDate [string] $startTime [int[]] $recurrenceValues [string] $startDate [string] $endTime } function New-AzureNativeTypeAlertsmanagementSuppressionSchedule { param ( [parameter(mandatory=$False,HelpMessage='End date for suppression)')] [string] $endDate, [parameter(mandatory=$False,HelpMessage='Start time for suppression)')] [string] $startTime, [parameter(mandatory=$False,HelpMessage='Specifies the values for recurrence pattern)')] [int[]] $recurrenceValues, [parameter(mandatory=$False,HelpMessage='Start date for suppression)')] [string] $startDate, [parameter(mandatory=$False,HelpMessage='End date for suppression)')] [string] $endTime ) process { return $([SuppressionSchedule]$PSBoundParameters) } } class SuppressionConfig { [SuppressionSchedule] $schedule [ArgumentCompletions('Always', 'Once', 'Daily', 'Weekly', 'Monthly')] [string] $recurrenceType } function New-AzureNativeTypeAlertsmanagementSuppressionConfig { param ( [parameter(mandatory=$False,HelpMessage='suppression schedule configuration)')] [SuppressionSchedule] $schedule, [parameter(mandatory=$False,HelpMessage='Specifies when the suppression should be applied)')] [string] [ArgumentCompletions('Always', 'Once', 'Daily', 'Weekly', 'Monthly')] $recurrenceType ) process { return $([SuppressionConfig]$PSBoundParameters) } } class Scope { [ArgumentCompletions('ResourceGroup', 'Resource', 'Subscription')] [string] $scopeType [string[]] $values } function New-AzureNativeTypeAlertsmanagementScope { param ( [parameter(mandatory=$False,HelpMessage='type of target scope)')] [string] [ArgumentCompletions('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 Suppression { [Conditions] $conditions [string] $description [ArgumentCompletions('Enabled', 'Disabled')] [string] $status [string] $type [SuppressionConfig] $suppressionConfig [Scope] $scope } function New-AzureNativeTypeAlertsmanagementSuppression { param ( [parameter(mandatory=$False,HelpMessage='conditions on which alerts will be filtered)')] [Conditions] $conditions, [parameter(mandatory=$False,HelpMessage='Description of action rule)')] [string] $description, [parameter(mandatory=$False,HelpMessage='Indicates if the given action rule is enabled or disabled)')] [string] [ArgumentCompletions('Enabled', 'Disabled')] $status, [parameter(mandatory=$False,HelpMessage='Indicates type of action rule Expected value is ''Suppression''.)')] [string] $type, [parameter(mandatory=$False,HelpMessage='suppression configuration for the action rule)')] [SuppressionConfig] $suppressionConfig, [parameter(mandatory=$False,HelpMessage='scope on which action rule will apply)')] [Scope] $scope ) 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 group name where the resource is created.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='Resource location)')] [string] $location, [parameter(mandatory=$False,HelpMessage='Resource tags)')] [hashtable] $tags, [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')] [string] $pulumiid, [parameter(HelpMessage='Specifies a list of named output properties that should be treated as secrets, which means they will be encrypted. It augments the list of values that Pulumi detects, based on secret inputs to the resource.')] [string[]] $PulumiSecretOutputs, [parameter(HelpMessage='The aliases parameter provides a list of aliases for a resource or component resource. If youre changing the name, type, or parent path of a resource or component resource, you can add the old name to the list of aliases for a resource to ensure that existing resources will be migrated to the new name instead of being deleted and replaced with the new named resource.')] [string[]] $PulumiAliases, [parameter(HelpMessage='The customTimeouts parameter provides a set of custom timeouts for create, update, and delete operations on a resource. These timeouts are specified using a duration string such as 5m (5 minutes), 40s (40 seconds), or 1d (1 day). Supported duration units are ns, us (or µs), ms, s, m, and h (nanoseconds, microseconds, milliseconds, seconds, minutes, and hours, respectively).')] [pulumicustomtimeouts] $PulumiCustomTimeouts, [parameter(HelpMessage='Setting the PulumiDeleteBeforeReplace parameter to true means that Pulumi will delete the existing resource before creating its replacement. Be aware that this behavior has a cascading impact on dependencies so more resources may be replaced, which can lead to downtime. However, this option may be necessary for some resources that manage scarce resources behind the scenes, and/or resources that cannot exist side-by-side.')] [bool] $PulumiDeleteBeforeReplace, [parameter(HelpMessage='Creates a list of explicit dependencies between resources.The DependsOn parameter ensures that resource creation, update, and deletion operations are done in the correct order.')] [object[]] $PulumiDependsOn, [parameter(HelpMessage='Specifies a list of properties that Pulumi will ignore when it updates existing resources. Any properties specified in this list that are also specified in the resources arguments will only be used when creating the resource.')] [string[]] $PulumiIgnoreChanges, [parameter(HelpMessage='Imports an existing cloud resource so that Pulumi can manage it. To import a resource, first specify the PulumiImport parameter with the resources ID')] [string] $PulumiImport = [NullString]::Value, [parameter(HelpMessage='Specifies a parent for a resource. It is used to associate children with the parents that encapsulate or are responsible for them.')] [object] $PulumiParent = [NullString]::Value, [parameter(HelpMessage='Marks a resource as protected. A protected resource cannot be deleted directly, and it will be an error to do a Pulumi deployment which tries to delete a protected resource for any reason.')] [bool] $PulumiProtect, [parameter(HelpMessage='Sets a provider for the resource. The default is to inherit this value from the parent resource, and to use the ambient provider specified by Pulumi configuration for resources without a parent.')] [object] $PulumiProvider = [NullString]::Value, [parameter(HelpMessage='Sets a list of providers for the resource and its children. This list is combined with resource parents providers lists. If no value is provided, the providers list is identical to the parent. When determining which provider to use for a resource, the providers list is used if provider is not supplied.')] [object[]] $PulumiProviders, [parameter(HelpMessage='Used to indicate that changes to certain properties on a resource should force a replacement of the resource instead of an in-place update. Typically users rely on the resource provider to make this decision based on whether the input property is one that the provider knows how to update in place, or if not, requires a replacement to modify. However, there are cases where users want to replace a resource on a change to an input property even if the resource provider itself doesnt believe it has to replace the resource.')] [string[]] $PulumiReplaceOnChanges, [parameter(HelpMessage='Marks a resource to be retained. If this option is set then Pulumi will not call through to the resource providers Delete method when deleting or replacing the resource during pulumi up or pulumi destroy. As a result, the resource will not be deleted from the backing cloud provider, but will be removed from the Pulumi state.')] [bool] $PulumiRetainOnDelete, [parameter(HelpMessage='Specifies a provider version to use when operating on a resource. This version overrides the version information inferred from the current package. This option should be used rarely.')] [string] $PulumiProviderVersion = [NullString]::Value ) process { $resource = [pulumiresource]::new($pulumiid, "azure-native:alertsmanagement:ActionRuleByName") $resource.options.additionalSecretOutputs = $PulumiSecretOutputs $resource.options.aliases = $PulumiAliases $resource.options.customTimeouts = $PulumiCustomTimeouts $resource.options.deleteBeforeReplace = $PulumiDeleteBeforeReplace $resource.options.ignoreChanges = $PulumiIgnoreChanges $resource.options.import = if([string]::IsNullOrEmpty($PulumiImport)) { [NullString]::Value } else { $PulumiImport } $resource.options.protect = $PulumiProtect $resource.options.replaceOnChanges = $PulumiReplaceOnChanges $resource.options.retainOnDelete = $PulumiRetainOnDelete $resource.options.version = if([string]::IsNullOrEmpty($PulumiProviderVersion)) { [NullString]::Value } else { $PulumiProviderVersion } foreach($Dependency in $DependsOn) { if($Dependency -is [pulumiresource]) { $resource.options.dependson += $Dependency.Reference() } else { $resource.options.dependson += $Dependency } } if($PulumiParent -is [pulumiresource]) { $resource.options.parent = $PulumiParent.Reference() } else { $resource.options.parent = $PulumiParent } foreach($provider in $PulumiProviders) { if($provider -is [pulumiprovider]) { $resource.options.providers += $provider.Reference() } else { $resource.options.providers += $provider } } if($PulumiProvider -is [pulumiprovider]) { $resource.options.provider = $PulumiProvider.Reference() } else { $resource.options.provider = $PulumiProvider } $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 } } |