pspulumiyaml.azurenative.scheduler.psm1
using module pspulumiyaml function Invoke-AzureNativeFunctionSchedulerGetJobCollection { param ( [parameter(mandatory=$False,HelpMessage='The resource group name.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The job collection name.)')] [string] $jobCollectionName ) process { $arguments = @{} $arguments["jobCollectionName"] = $jobCollectionName $arguments["resourceGroupName"] = $resourceGroupName $functionObject = Invoke-PulumiFunction -Name azure-native:scheduler:getJobCollection -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionSchedulerGetJob { param ( [parameter(mandatory=$False,HelpMessage='The job collection name.)')] [string] $jobCollectionName, [parameter(mandatory=$False,HelpMessage='The job name.)')] [string] $jobName, [parameter(mandatory=$False,HelpMessage='The resource group name.)')] [string] $resourceGroupName ) process { $arguments = @{} $arguments["jobCollectionName"] = $jobCollectionName $arguments["jobName"] = $jobName $arguments["resourceGroupName"] = $resourceGroupName $functionObject = Invoke-PulumiFunction -Name azure-native:scheduler:getJob -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } class RetryPolicy { [ArgumentCompletions('None', 'Fixed')] [object] $retryType [string] $retryInterval [int] $retryCount } function New-AzureNativeTypeSchedulerRetryPolicy { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the retry strategy to be used.)')] $retryType, [parameter(mandatory=$False,HelpMessage='Gets or sets the retry interval between retries, specify duration in ISO 8601 format.)')] [string] $retryInterval, [parameter(mandatory=$False,HelpMessage='Gets or sets the number of times a retry should be attempted.)')] [int] $retryCount ) process { return $([RetryPolicy]$PSBoundParameters) } } class ServiceBusBrokeredMessageProperties { [string] $label [string] $sessionId [bool] $forcePersistence [string] $replyToSessionId [string] $correlationId [string] $viaPartitionKey [string] $contentType [string] $scheduledEnqueueTimeUtc [string] $timeToLive [string] $partitionKey [string] $messageId [string] $to [string] $replyTo } function New-AzureNativeTypeSchedulerServiceBusBrokeredMessageProperties { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the label.)')] [string] $label, [parameter(mandatory=$False,HelpMessage='Gets or sets the session ID.)')] [string] $sessionId, [parameter(mandatory=$False,HelpMessage='Gets or sets the force persistence.)')] [bool] $forcePersistence, [parameter(mandatory=$False,HelpMessage='Gets or sets the reply to session ID.)')] [string] $replyToSessionId, [parameter(mandatory=$False,HelpMessage='Gets or sets the correlation ID.)')] [string] $correlationId, [parameter(mandatory=$False,HelpMessage='Gets or sets the via partition key.)')] [string] $viaPartitionKey, [parameter(mandatory=$False,HelpMessage='Gets or sets the content type.)')] [string] $contentType, [parameter(mandatory=$False,HelpMessage='Gets or sets the scheduled enqueue time UTC.)')] [string] $scheduledEnqueueTimeUtc, [parameter(mandatory=$False,HelpMessage='Gets or sets the time to live.)')] [string] $timeToLive, [parameter(mandatory=$False,HelpMessage='Gets or sets the partition key.)')] [string] $partitionKey, [parameter(mandatory=$False,HelpMessage='Gets or sets the message ID.)')] [string] $messageId, [parameter(mandatory=$False,HelpMessage='Gets or sets the to.)')] [string] $to, [parameter(mandatory=$False,HelpMessage='Gets or sets the reply to.)')] [string] $replyTo ) process { return $([ServiceBusBrokeredMessageProperties]$PSBoundParameters) } } class ServiceBusAuthentication { [ArgumentCompletions('NotSpecified', 'SharedAccessKey')] [object] $type [string] $sasKeyName [string] $sasKey } function New-AzureNativeTypeSchedulerServiceBusAuthentication { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the authentication type.)')] $type, [parameter(mandatory=$False,HelpMessage='Gets or sets the SAS key name.)')] [string] $sasKeyName, [parameter(mandatory=$False,HelpMessage='Gets or sets the SAS key.)')] [string] $sasKey ) process { return $([ServiceBusAuthentication]$PSBoundParameters) } } class ServiceBusTopicMessage { [ArgumentCompletions('NotSpecified', 'NetMessaging', 'AMQP')] [object] $transportType [string] $message [string] $namespace [ServiceBusBrokeredMessageProperties] $brokeredMessageProperties [string] $topicPath [ServiceBusAuthentication] $authentication [object] $customMessageProperties } function New-AzureNativeTypeSchedulerServiceBusTopicMessage { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the transport type.)')] $transportType, [parameter(mandatory=$False,HelpMessage='Gets or sets the message.)')] [string] $message, [parameter(mandatory=$False,HelpMessage='Gets or sets the namespace.)')] [string] $namespace, [parameter(mandatory=$False,HelpMessage='Gets or sets the brokered message properties.)')] [ServiceBusBrokeredMessageProperties] $brokeredMessageProperties, [parameter(mandatory=$False,HelpMessage='Gets or sets the topic path.)')] [string] $topicPath, [parameter(mandatory=$False,HelpMessage='Gets or sets the Service Bus authentication.)')] [ServiceBusAuthentication] $authentication, [parameter(mandatory=$False,HelpMessage='Gets or sets the custom message properties.)')] [hashtable] $customMessageProperties ) process { return $([ServiceBusTopicMessage]$PSBoundParameters) } } class ServiceBusQueueMessage { [ArgumentCompletions('NotSpecified', 'NetMessaging', 'AMQP')] [object] $transportType [string] $queueName [string] $message [string] $namespace [ServiceBusBrokeredMessageProperties] $brokeredMessageProperties [ServiceBusAuthentication] $authentication [object] $customMessageProperties } function New-AzureNativeTypeSchedulerServiceBusQueueMessage { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the transport type.)')] $transportType, [parameter(mandatory=$False,HelpMessage='Gets or sets the queue name.)')] [string] $queueName, [parameter(mandatory=$False,HelpMessage='Gets or sets the message.)')] [string] $message, [parameter(mandatory=$False,HelpMessage='Gets or sets the namespace.)')] [string] $namespace, [parameter(mandatory=$False,HelpMessage='Gets or sets the brokered message properties.)')] [ServiceBusBrokeredMessageProperties] $brokeredMessageProperties, [parameter(mandatory=$False,HelpMessage='Gets or sets the Service Bus authentication.)')] [ServiceBusAuthentication] $authentication, [parameter(mandatory=$False,HelpMessage='Gets or sets the custom message properties.)')] [hashtable] $customMessageProperties ) process { return $([ServiceBusQueueMessage]$PSBoundParameters) } } class HttpRequest { [object] $headers [string] $uri [string] $method [object] $authentication #todo add class here [string] $body } class OAuthAuthentication { [string] $type [string] $tenant [string] $clientId [string] $secret [string] $audience } function New-AzureNativeTypeSchedulerOAuthAuthentication { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the HTTP authentication type. Expected value is ''ActiveDirectoryOAuth''.)')] [string] $type, [parameter(mandatory=$False,HelpMessage='Gets or sets the tenant.)')] [string] $tenant, [parameter(mandatory=$False,HelpMessage='Gets or sets the client identifier.)')] [string] $clientId, [parameter(mandatory=$False,HelpMessage='Gets or sets the secret, return value will always be empty.)')] [string] $secret, [parameter(mandatory=$False,HelpMessage='Gets or sets the audience.)')] [string] $audience ) process { return $([OAuthAuthentication]$PSBoundParameters) } } function New-AzureNativeTypeSchedulerHttpRequest { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the headers.)')] [hashtable] $headers, [parameter(mandatory=$False,HelpMessage='Gets or sets the URI of the request.)')] [string] $uri, [parameter(mandatory=$False,HelpMessage='Gets or sets the method of the request.)')] [string] $method, [parameter(mandatory=$False,HelpMessage='Gets or sets the authentication method of the request.)')] [OAuthAuthentication] $authentication, [parameter(mandatory=$False,HelpMessage='Gets or sets the request body.)')] [string] $body ) process { return $([HttpRequest]$PSBoundParameters) } } class StorageQueueMessage { [string] $storageAccount [string] $queueName [string] $sasToken [string] $message } function New-AzureNativeTypeSchedulerStorageQueueMessage { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the storage account name.)')] [string] $storageAccount, [parameter(mandatory=$False,HelpMessage='Gets or sets the queue name.)')] [string] $queueName, [parameter(mandatory=$False,HelpMessage='Gets or sets the SAS key.)')] [string] $sasToken, [parameter(mandatory=$False,HelpMessage='Gets or sets the message.)')] [string] $message ) process { return $([StorageQueueMessage]$PSBoundParameters) } } class JobErrorAction { [ArgumentCompletions('Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic')] [object] $type [ServiceBusQueueMessage] $serviceBusQueueMessage [ServiceBusTopicMessage] $serviceBusTopicMessage [HttpRequest] $request [StorageQueueMessage] $queueMessage [RetryPolicy] $retryPolicy } function New-AzureNativeTypeSchedulerJobErrorAction { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the job error action type.)')] $type, [parameter(mandatory=$False,HelpMessage='Gets or sets the service bus queue message.)')] [ServiceBusQueueMessage] $serviceBusQueueMessage, [parameter(mandatory=$False,HelpMessage='Gets or sets the service bus topic message.)')] [ServiceBusTopicMessage] $serviceBusTopicMessage, [parameter(mandatory=$False,HelpMessage='Gets or sets the http requests.)')] [HttpRequest] $request, [parameter(mandatory=$False,HelpMessage='Gets or sets the storage queue message.)')] [StorageQueueMessage] $queueMessage, [parameter(mandatory=$False,HelpMessage='Gets or sets the retry policy.)')] [RetryPolicy] $retryPolicy ) process { return $([JobErrorAction]$PSBoundParameters) } } class JobAction { [ArgumentCompletions('Http', 'Https', 'StorageQueue', 'ServiceBusQueue', 'ServiceBusTopic')] [object] $type [RetryPolicy] $retryPolicy [ServiceBusTopicMessage] $serviceBusTopicMessage [ServiceBusQueueMessage] $serviceBusQueueMessage [HttpRequest] $request [JobErrorAction] $errorAction [StorageQueueMessage] $queueMessage } function New-AzureNativeTypeSchedulerJobAction { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the job action type.)')] $type, [parameter(mandatory=$False,HelpMessage='Gets or sets the retry policy.)')] [RetryPolicy] $retryPolicy, [parameter(mandatory=$False,HelpMessage='Gets or sets the service bus topic message.)')] [ServiceBusTopicMessage] $serviceBusTopicMessage, [parameter(mandatory=$False,HelpMessage='Gets or sets the service bus queue message.)')] [ServiceBusQueueMessage] $serviceBusQueueMessage, [parameter(mandatory=$False,HelpMessage='Gets or sets the http requests.)')] [HttpRequest] $request, [parameter(mandatory=$False,HelpMessage='Gets or sets the error action.)')] [JobErrorAction] $errorAction, [parameter(mandatory=$False,HelpMessage='Gets or sets the storage queue message.)')] [StorageQueueMessage] $queueMessage ) process { return $([JobAction]$PSBoundParameters) } } class JobRecurrenceScheduleMonthlyOccurrence { [ArgumentCompletions('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday')] [object] $day [int] $occurrence } function New-AzureNativeTypeSchedulerJobRecurrenceScheduleMonthlyOccurrence { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the day. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday.)')] $day, [parameter(mandatory=$False,HelpMessage='Gets or sets the occurrence. Must be between -5 and 5.)')] [int] $occurrence ) process { return $([JobRecurrenceScheduleMonthlyOccurrence]$PSBoundParameters) } } class JobRecurrenceSchedule { [JobRecurrenceScheduleMonthlyOccurrence[]] $monthlyOccurrences [int[]] $hours [ArgumentCompletions('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday')] [string] $weekDays [int[]] $minutes [int[]] $monthDays } function New-AzureNativeTypeSchedulerJobRecurrenceSchedule { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the occurrences of days within a month.)')] $monthlyOccurrences, [parameter(mandatory=$False,HelpMessage='Gets or sets the hours of the day that the job should execute at.)')] [int[]] $hours, [parameter(mandatory=$False,HelpMessage='Gets or sets the days of the week that the job should execute on.)')] $weekDays, [parameter(mandatory=$False,HelpMessage='Gets or sets the minutes of the hour that the job should execute at.)')] [int[]] $minutes, [parameter(mandatory=$False,HelpMessage='Gets or sets the days of the month that the job should execute on. Must be between 1 and 31.)')] [int[]] $monthDays ) process { return $([JobRecurrenceSchedule]$PSBoundParameters) } } class JobRecurrence { [int] $interval [JobRecurrenceSchedule] $schedule [string] $endTime [ArgumentCompletions('Minute', 'Hour', 'Day', 'Week', 'Month')] [object] $frequency [int] $count } function New-AzureNativeTypeSchedulerJobRecurrence { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the interval between retries.)')] [int] $interval, [parameter(mandatory=$False,HelpMessage=')')] [JobRecurrenceSchedule] $schedule, [parameter(mandatory=$False,HelpMessage='Gets or sets the time at which the job will complete.)')] [string] $endTime, [parameter(mandatory=$False,HelpMessage='Gets or sets the frequency of recurrence (second, minute, hour, day, week, month).)')] $frequency, [parameter(mandatory=$False,HelpMessage='Gets or sets the maximum number of times that the job should run.)')] [int] $count ) process { return $([JobRecurrence]$PSBoundParameters) } } class JobProperties { [ArgumentCompletions('Enabled', 'Disabled', 'Faulted', 'Completed')] [object] $state [JobAction] $action [string] $startTime [JobRecurrence] $recurrence } function New-AzureNativeTypeSchedulerJobProperties { param ( [parameter(mandatory=$False,HelpMessage='Gets or set the job state.)')] $state, [parameter(mandatory=$False,HelpMessage='Gets or sets the job action.)')] [JobAction] $action, [parameter(mandatory=$False,HelpMessage='Gets or sets the job start time.)')] [string] $startTime, [parameter(mandatory=$False,HelpMessage='Gets or sets the job recurrence.)')] [JobRecurrence] $recurrence ) process { return $([JobProperties]$PSBoundParameters) } } function New-AzureNativeSchedulerJob { [Alias('azure_native_scheduler_job')] param ( [parameter(mandatory=$False,HelpMessage='The job collection name.)')] [string] $jobCollectionName, [parameter(mandatory=$False,HelpMessage='Gets or sets the job properties.)')] [JobProperties] $properties, [parameter(mandatory=$False,HelpMessage='The job name.)')] [string] $jobName, [parameter(mandatory=$False,HelpMessage='The resource group name.)')] [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:scheduler:Job") foreach($Dependency in $DependsOn) { if($Dependency -is [pulumiresource]) { $resource.dependson += $Dependency.Reference() } else { $resource.dependson += $Dependency } } $resource.properties["jobCollectionName"] = $jobCollectionName $resource.properties["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'properties') { $resource.properties["properties"] = $properties } if($PSBoundParameters.Keys -icontains 'jobName') { $resource.properties["jobName"] = $jobName } $global:pulumiresources += $resource return $resource } } class JobMaxRecurrence { [ArgumentCompletions('Minute', 'Hour', 'Day', 'Week', 'Month')] [object] $frequency [int] $interval } function New-AzureNativeTypeSchedulerJobMaxRecurrence { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the frequency of recurrence (second, minute, hour, day, week, month).)')] $frequency, [parameter(mandatory=$False,HelpMessage='Gets or sets the interval between retries.)')] [int] $interval ) process { return $([JobMaxRecurrence]$PSBoundParameters) } } class JobCollectionQuota { [int] $maxJobOccurrence [JobMaxRecurrence] $maxRecurrence [int] $maxJobCount } function New-AzureNativeTypeSchedulerJobCollectionQuota { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the maximum job occurrence.)')] [int] $maxJobOccurrence, [parameter(mandatory=$False,HelpMessage='Gets or set the maximum recurrence.)')] [JobMaxRecurrence] $maxRecurrence, [parameter(mandatory=$False,HelpMessage='Gets or set the maximum job count.)')] [int] $maxJobCount ) process { return $([JobCollectionQuota]$PSBoundParameters) } } class Sku { [ArgumentCompletions('Standard', 'Free', 'P10Premium', 'P20Premium')] [object] $name } function New-AzureNativeTypeSchedulerSku { param ( [parameter(mandatory=$False,HelpMessage='Gets or set the SKU.)')] $name ) process { return $([Sku]$PSBoundParameters) } } class JobCollectionProperties { [JobCollectionQuota] $quota [Sku] $sku [ArgumentCompletions('Enabled', 'Disabled', 'Suspended', 'Deleted')] [object] $state } function New-AzureNativeTypeSchedulerJobCollectionProperties { param ( [parameter(mandatory=$False,HelpMessage='Gets or sets the job collection quota.)')] [JobCollectionQuota] $quota, [parameter(mandatory=$False,HelpMessage='Gets or sets the SKU.)')] [Sku] $sku, [parameter(mandatory=$False,HelpMessage='Gets or sets the state.)')] $state ) process { return $([JobCollectionProperties]$PSBoundParameters) } } function New-AzureNativeSchedulerJobCollection { [Alias('azure_native_scheduler_jobcollection')] param ( [parameter(mandatory=$False,HelpMessage='The resource group name.)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='Gets or sets the tags.)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='Gets or sets the job collection properties.)')] [JobCollectionProperties] $properties, [parameter(mandatory=$False,HelpMessage='Gets or sets the job collection resource name.)')] [string] $name, [parameter(mandatory=$False,HelpMessage='The job collection name.)')] [string] $jobCollectionName, [parameter(mandatory=$False,HelpMessage='Gets or sets the storage account location.)')] [string] $location, [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:scheduler:JobCollection") foreach($Dependency in $DependsOn) { if($Dependency -is [pulumiresource]) { $resource.dependson += $Dependency.Reference() } else { $resource.dependson += $Dependency } } $resource.properties["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } if($PSBoundParameters.Keys -icontains 'properties') { $resource.properties["properties"] = $properties } if($PSBoundParameters.Keys -icontains 'name') { $resource.properties["name"] = $name } if($PSBoundParameters.Keys -icontains 'jobCollectionName') { $resource.properties["jobCollectionName"] = $jobCollectionName } if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } $global:pulumiresources += $resource return $resource } } |