pspulumiyaml.azurenative.databox.psm1
using module pspulumiyaml function Invoke-AzureNativeFunctionDataboxListJobCredentials { param ( [parameter(mandatory=$False,HelpMessage='The Resource Group Name)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters in length and use any alphanumeric and underscore only)')] [string] $jobName ) process { $arguments = @{} $arguments["jobName"] = $jobName $arguments["resourceGroupName"] = $resourceGroupName $functionObject = Invoke-PulumiFunction -Name azure-native:databox:listJobCredentials -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } function Invoke-AzureNativeFunctionDataboxGetJob { param ( [parameter(mandatory=$False,HelpMessage='The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters in length and use any alphanumeric and underscore only)')] [string] $jobName, [parameter(mandatory=$False,HelpMessage='$expand is supported on details parameter for job, which provides details on the job stages.)')] [string] $expand, [parameter(mandatory=$False,HelpMessage='The Resource Group Name)')] [string] $resourceGroupName ) process { $arguments = @{} $arguments["jobName"] = $jobName $arguments["resourceGroupName"] = $resourceGroupName if($PSBoundParameters.Keys -icontains 'expand') { $arguments["expand"] = $expand } $functionObject = Invoke-PulumiFunction -Name azure-native:databox:getJob -variableName $([guid]::NewGuid().Guid) -Arguments $arguments return $functionObject } } class NotificationPreference { [ValidateSet('DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy')] [string] $stageName [ValidateSet('DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy')] [bool] $sendNotification } function New-AzureNativeTypeDataboxNotificationPreference { param ( [parameter(mandatory=$False,HelpMessage='Name of the stage.)')] [string] [ValidateSet('DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', 'AtAzureDC', 'DataCopy')] $stageName, [parameter(mandatory=$False,HelpMessage='Notification is required or not.)')] [bool] $sendNotification ) process { return $([NotificationPreference]$PSBoundParameters) } } class ContactDetails { [string] $contactName [string] $phoneExtension [string] $phone [string] $mobile [NotificationPreference[]] $notificationPreference [string[]] $emailList } function New-AzureNativeTypeDataboxContactDetails { param ( [parameter(mandatory=$False,HelpMessage='Contact name of the person.)')] [string] $contactName, [parameter(mandatory=$False,HelpMessage='Phone extension number of the contact person.)')] [string] $phoneExtension, [parameter(mandatory=$False,HelpMessage='Phone number of the contact person.)')] [string] $phone, [parameter(mandatory=$False,HelpMessage='Mobile number of the contact person.)')] [string] $mobile, [parameter(mandatory=$False,HelpMessage='Notification preference for a job stage.)')] $notificationPreference, [parameter(mandatory=$False,HelpMessage='List of Email-ids to be notified about job progress.)')] [string[]] $emailList ) process { return $([ContactDetails]$PSBoundParameters) } } class ShippingAddress { [ValidateSet('None', 'Residential', 'Commercial')] [string] $addressType [ValidateSet('None', 'Residential', 'Commercial')] [string] $streetAddress3 [ValidateSet('None', 'Residential', 'Commercial')] [string] $streetAddress1 [ValidateSet('None', 'Residential', 'Commercial')] [string] $streetAddress2 [ValidateSet('None', 'Residential', 'Commercial')] [string] $postalCode [ValidateSet('None', 'Residential', 'Commercial')] [string] $zipExtendedCode [ValidateSet('None', 'Residential', 'Commercial')] [string] $companyName [ValidateSet('None', 'Residential', 'Commercial')] [string] $stateOrProvince [ValidateSet('None', 'Residential', 'Commercial')] [string] $city [ValidateSet('None', 'Residential', 'Commercial')] [string] $country } function New-AzureNativeTypeDataboxShippingAddress { param ( [parameter(mandatory=$False,HelpMessage='Type of address.)')] [string] [ValidateSet('None', 'Residential', 'Commercial')] $addressType, [parameter(mandatory=$False,HelpMessage='Street Address line 3.)')] [string] $streetAddress3, [parameter(mandatory=$False,HelpMessage='Street Address line 1.)')] [string] $streetAddress1, [parameter(mandatory=$False,HelpMessage='Street Address line 2.)')] [string] $streetAddress2, [parameter(mandatory=$False,HelpMessage='Postal code.)')] [string] $postalCode, [parameter(mandatory=$False,HelpMessage='Extended Zip Code.)')] [string] $zipExtendedCode, [parameter(mandatory=$False,HelpMessage='Name of the company.)')] [string] $companyName, [parameter(mandatory=$False,HelpMessage='Name of the State or Province.)')] [string] $stateOrProvince, [parameter(mandatory=$False,HelpMessage='Name of the City.)')] [string] $city, [parameter(mandatory=$False,HelpMessage='Name of the Country.)')] [string] $country ) process { return $([ShippingAddress]$PSBoundParameters) } } class DataImportDetails { [object] $accountDetails #todo add class here } class StorageAccountDetails { [string] $sharePassword [string] $storageAccountId [string] $dataAccountType } function New-AzureNativeTypeDataboxStorageAccountDetails { param ( [parameter(mandatory=$False,HelpMessage='Password for all the shares to be created on the device. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+)')] [string] $sharePassword, [parameter(mandatory=$False,HelpMessage='Storage Account Resource Id.)')] [string] $storageAccountId, [parameter(mandatory=$False,HelpMessage='Account Type of the data to be transferred. Expected value is ''StorageAccount''.)')] [string] $dataAccountType ) process { return $([StorageAccountDetails]$PSBoundParameters) } } function New-AzureNativeTypeDataboxDataImportDetails { param ( [parameter(mandatory=$False,HelpMessage='Account details of the data to be transferred)')] [StorageAccountDetails] $accountDetails ) process { return $([DataImportDetails]$PSBoundParameters) } } class TransferAllDetails { [ValidateSet('TransferAll', 'TransferUsingFilter')] [bool] $transferAllBlobs [ValidateSet('StorageAccount', 'ManagedDisk')] [string] $dataAccountType [ValidateSet('StorageAccount', 'ManagedDisk')] [bool] $transferAllFiles } function New-AzureNativeTypeDataboxTransferAllDetails { param ( [parameter(mandatory=$False,HelpMessage='To indicate if all Azure blobs have to be transferred)')] [bool] $transferAllBlobs, [parameter(mandatory=$False,HelpMessage='Type of the account of data)')] [string] [ValidateSet('StorageAccount', 'ManagedDisk')] $dataAccountType, [parameter(mandatory=$False,HelpMessage='To indicate if all Azure Files have to be transferred)')] [bool] $transferAllFiles ) process { return $([TransferAllDetails]$PSBoundParameters) } } class TransferConfigurationTransferAllDetails { [ValidateSet('TransferAll', 'TransferUsingFilter')] [TransferAllDetails] $include } function New-AzureNativeTypeDataboxTransferConfigurationTransferAllDetails { param ( [parameter(mandatory=$False,HelpMessage='Details to transfer all data.)')] [TransferAllDetails] $include ) process { return $([TransferConfigurationTransferAllDetails]$PSBoundParameters) } } class AzureFileFilterDetails { [ValidateSet('TransferAll', 'TransferUsingFilter')] [string[]] $fileShareList [ValidateSet('TransferAll', 'TransferUsingFilter')] [string[]] $filePathList [ValidateSet('TransferAll', 'TransferUsingFilter')] [string[]] $filePrefixList } function New-AzureNativeTypeDataboxAzureFileFilterDetails { param ( [parameter(mandatory=$False,HelpMessage='List of file shares to be transferred.)')] [string[]] $fileShareList, [parameter(mandatory=$False,HelpMessage='List of full path of the files to be transferred.)')] [string[]] $filePathList, [parameter(mandatory=$False,HelpMessage='Prefix list of the Azure files to be transferred.)')] [string[]] $filePrefixList ) process { return $([AzureFileFilterDetails]$PSBoundParameters) } } class BlobFilterDetails { [ValidateSet('StorageAccount', 'ManagedDisk')] [string[]] $blobPrefixList [ValidateSet('StorageAccount', 'ManagedDisk')] [string[]] $blobPathList [ValidateSet('StorageAccount', 'ManagedDisk')] [string[]] $containerList } function New-AzureNativeTypeDataboxBlobFilterDetails { param ( [parameter(mandatory=$False,HelpMessage='Prefix list of the Azure blobs to be transferred.)')] [string[]] $blobPrefixList, [parameter(mandatory=$False,HelpMessage='List of full path of the blobs to be transferred.)')] [string[]] $blobPathList, [parameter(mandatory=$False,HelpMessage='List of blob containers to be transferred.)')] [string[]] $containerList ) process { return $([BlobFilterDetails]$PSBoundParameters) } } class FilterFileDetails { [ValidateSet('AzureBlob', 'AzureFile')] [string] $filterFileType [ValidateSet('AzureBlob', 'AzureFile')] [string] $filterFilePath } function New-AzureNativeTypeDataboxFilterFileDetails { param ( [parameter(mandatory=$False,HelpMessage='Type of the filter file.)')] [string] [ValidateSet('AzureBlob', 'AzureFile')] $filterFileType, [parameter(mandatory=$False,HelpMessage='Path of the file that contains the details of all items to transfer.)')] [string] $filterFilePath ) process { return $([FilterFileDetails]$PSBoundParameters) } } class TransferFilterDetails { [ValidateSet('TransferAll', 'TransferUsingFilter')] [AzureFileFilterDetails] $azureFileFilterDetails [ValidateSet('StorageAccount', 'ManagedDisk')] [string] $dataAccountType [ValidateSet('StorageAccount', 'ManagedDisk')] [BlobFilterDetails] $blobFilterDetails [ValidateSet('StorageAccount', 'ManagedDisk')] [FilterFileDetails[]] $filterFileDetails } function New-AzureNativeTypeDataboxTransferFilterDetails { param ( [parameter(mandatory=$False,HelpMessage='Filter details to transfer Azure files.)')] [AzureFileFilterDetails] $azureFileFilterDetails, [parameter(mandatory=$False,HelpMessage='Type of the account of data.)')] [string] [ValidateSet('StorageAccount', 'ManagedDisk')] $dataAccountType, [parameter(mandatory=$False,HelpMessage='Filter details to transfer blobs.)')] [BlobFilterDetails] $blobFilterDetails, [parameter(mandatory=$False,HelpMessage='Details of the filter files to be used for data transfer.)')] $filterFileDetails ) process { return $([TransferFilterDetails]$PSBoundParameters) } } class TransferConfigurationTransferFilterDetails { [ValidateSet('TransferAll', 'TransferUsingFilter')] [TransferFilterDetails] $include } function New-AzureNativeTypeDataboxTransferConfigurationTransferFilterDetails { param ( [parameter(mandatory=$False,HelpMessage='Details of the filtering the transfer of data.)')] [TransferFilterDetails] $include ) process { return $([TransferConfigurationTransferFilterDetails]$PSBoundParameters) } } class TransferConfiguration { [ValidateSet('TransferAll', 'TransferUsingFilter')] [string] $transferConfigurationType [ValidateSet('TransferAll', 'TransferUsingFilter')] [TransferConfigurationTransferAllDetails] $transferAllDetails [ValidateSet('TransferAll', 'TransferUsingFilter')] [TransferConfigurationTransferFilterDetails] $transferFilterDetails } function New-AzureNativeTypeDataboxTransferConfiguration { param ( [parameter(mandatory=$False,HelpMessage='Type of the configuration for transfer.)')] [string] [ValidateSet('TransferAll', 'TransferUsingFilter')] $transferConfigurationType, [parameter(mandatory=$False,HelpMessage='Map of filter type and the details to transfer all data. This field is required only if the TransferConfigurationType is given as TransferAll)')] [TransferConfigurationTransferAllDetails] $transferAllDetails, [parameter(mandatory=$False,HelpMessage='Map of filter type and the details to filter. This field is required only if the TransferConfigurationType is given as TransferUsingFilter.)')] [TransferConfigurationTransferFilterDetails] $transferFilterDetails ) process { return $([TransferConfiguration]$PSBoundParameters) } } class DataExportDetails { [ValidateSet('Error', 'Verbose')] [string] $logCollectionLevel [ValidateSet('Error', 'Verbose')] [TransferConfiguration] $transferConfiguration [object] $accountDetails #todo add class here } function New-AzureNativeTypeDataboxDataExportDetails { param ( [parameter(mandatory=$False,HelpMessage='Level of the logs to be collected.)')] [string] [ValidateSet('Error', 'Verbose')] $logCollectionLevel, [parameter(mandatory=$False,HelpMessage='Configuration for the data transfer.)')] [TransferConfiguration] $transferConfiguration, [parameter(mandatory=$False,HelpMessage='Account details of the data to be transferred)')] [StorageAccountDetails] $accountDetails ) process { return $([DataExportDetails]$PSBoundParameters) } } class EncryptionPreferences { [ValidateSet('Enabled', 'Disabled')] [string] $doubleEncryption } function New-AzureNativeTypeDataboxEncryptionPreferences { param ( [parameter(mandatory=$False,HelpMessage='Defines secondary layer of software-based encryption enablement.)')] [string] [ValidateSet('Enabled', 'Disabled')] $doubleEncryption ) process { return $([EncryptionPreferences]$PSBoundParameters) } } class TransportPreferences { [ValidateSet('CustomerManaged', 'MicrosoftManaged')] [string] $preferredShipmentType } function New-AzureNativeTypeDataboxTransportPreferences { param ( [parameter(mandatory=$False,HelpMessage='Indicates Shipment Logistics type that the customer preferred.)')] [string] [ValidateSet('CustomerManaged', 'MicrosoftManaged')] $preferredShipmentType ) process { return $([TransportPreferences]$PSBoundParameters) } } class Preferences { [EncryptionPreferences] $encryptionPreferences [string[]] $preferredDataCenterRegion [TransportPreferences] $transportPreferences } function New-AzureNativeTypeDataboxPreferences { param ( [parameter(mandatory=$False,HelpMessage='Preferences related to the Encryption.)')] [EncryptionPreferences] $encryptionPreferences, [parameter(mandatory=$False,HelpMessage='Preferred data center region.)')] [string[]] $preferredDataCenterRegion, [parameter(mandatory=$False,HelpMessage='Preferences related to the shipment logistics of the sku.)')] [TransportPreferences] $transportPreferences ) process { return $([Preferences]$PSBoundParameters) } } class UserAssignedProperties { [string] $resourceId } function New-AzureNativeTypeDataboxUserAssignedProperties { param ( [parameter(mandatory=$False,HelpMessage='Arm resource id for user assigned identity to be used to fetch MSI token.)')] [string] $resourceId ) process { return $([UserAssignedProperties]$PSBoundParameters) } } class IdentityProperties { [UserAssignedProperties] $userAssigned [string] $type } function New-AzureNativeTypeDataboxIdentityProperties { param ( [parameter(mandatory=$False,HelpMessage='User assigned identity properties.)')] [UserAssignedProperties] $userAssigned, [parameter(mandatory=$False,HelpMessage='Managed service identity type.)')] [string] $type ) process { return $([IdentityProperties]$PSBoundParameters) } } class KeyEncryptionKey { [string] $kekVaultResourceID [IdentityProperties] $identityProperties [string] $kekUrl [ValidateSet('MicrosoftManaged', 'CustomerManaged')] [string] $kekType } function New-AzureNativeTypeDataboxKeyEncryptionKey { param ( [parameter(mandatory=$False,HelpMessage='Kek vault resource id. It is required in case of Customer managed KekType.)')] [string] $kekVaultResourceID, [parameter(mandatory=$False,HelpMessage='Managed identity properties used for key encryption.)')] [IdentityProperties] $identityProperties, [parameter(mandatory=$False,HelpMessage='Key encryption key. It is required in case of Customer managed KekType.)')] [string] $kekUrl, [parameter(mandatory=$False,HelpMessage='Type of encryption key used for key encryption.)')] [string] [ValidateSet('MicrosoftManaged', 'CustomerManaged')] $kekType ) process { return $([KeyEncryptionKey]$PSBoundParameters) } } class DataBoxJobDetails { [ContactDetails] $contactDetails [string] $jobDetailsType [int] $expectedDataSizeInTeraBytes [ShippingAddress] $shippingAddress [string] $devicePassword [DataImportDetails[]] $dataImportDetails [DataExportDetails[]] $dataExportDetails [Preferences] $preferences [KeyEncryptionKey] $keyEncryptionKey } function New-AzureNativeTypeDataboxDataBoxJobDetails { param ( [parameter(mandatory=$False,HelpMessage='Contact details for notification and shipping.)')] [ContactDetails] $contactDetails, [parameter(mandatory=$False,HelpMessage='Indicates the type of job details. Expected value is ''DataBox''.)')] [string] $jobDetailsType, [parameter(mandatory=$False,HelpMessage='The expected size of the data, which needs to be transferred in this job, in terabytes.)')] [int] $expectedDataSizeInTeraBytes, [parameter(mandatory=$False,HelpMessage='Shipping address of the customer.)')] [ShippingAddress] $shippingAddress, [parameter(mandatory=$False,HelpMessage='Set Device password for unlocking Databox. Should not be passed for TransferType:ExportFromAzure jobs. If this is not passed, the service will generate password itself. This will not be returned in Get Call. Password Requirements : Password must be minimum of 12 and maximum of 64 characters. Password must have at least one uppercase alphabet, one number and one special character. Password cannot have the following characters : IilLoO0 Password can have only alphabets, numbers and these characters : @#\-$%^!+=;:_()]+)')] [string] $devicePassword, [parameter(mandatory=$False,HelpMessage='Details of the data to be imported into azure.)')] $dataImportDetails, [parameter(mandatory=$False,HelpMessage='Details of the data to be exported from azure.)')] $dataExportDetails, [parameter(mandatory=$False,HelpMessage='Preferences for the order.)')] [Preferences] $preferences, [parameter(mandatory=$False,HelpMessage='Details about which key encryption type is being used.)')] [KeyEncryptionKey] $keyEncryptionKey ) process { return $([DataBoxJobDetails]$PSBoundParameters) } } class ResourceIdentity { [string] $type [object] $userAssignedIdentities } function New-AzureNativeTypeDataboxResourceIdentity { param ( [parameter(mandatory=$False,HelpMessage='Identity type)')] [string] $type, [parameter(mandatory=$False,HelpMessage='User Assigned Identities)')] [object] $userAssignedIdentities ) process { return $([ResourceIdentity]$PSBoundParameters) } } class JobDeliveryInfo { [string] $scheduledDateTime } function New-AzureNativeTypeDataboxJobDeliveryInfo { param ( [parameter(mandatory=$False,HelpMessage='Scheduled date time.)')] [string] $scheduledDateTime ) process { return $([JobDeliveryInfo]$PSBoundParameters) } } class Sku { [string] $displayName [string] $family [ValidateSet('DataBox', 'DataBoxDisk', 'DataBoxHeavy')] [string] $name } function New-AzureNativeTypeDataboxSku { param ( [parameter(mandatory=$False,HelpMessage='The display name of the sku.)')] [string] $displayName, [parameter(mandatory=$False,HelpMessage='The sku family.)')] [string] $family, [parameter(mandatory=$False,HelpMessage='The sku name.)')] [string] [ValidateSet('DataBox', 'DataBoxDisk', 'DataBoxHeavy')] $name ) process { return $([Sku]$PSBoundParameters) } } function New-AzureNativeDataboxJob { [Alias('azure_native_databox_job')] param ( [parameter(mandatory=$False,HelpMessage='Details of a job run. This field will only be sent for expand details filter.)')] [DataBoxJobDetails] $details, [parameter(mandatory=$False,HelpMessage='The location of the resource. This will be one of the supported and registered Azure Regions (e.g. West US, East US, Southeast Asia, etc.). The region of a resource cannot be changed once it is created, but if an identical region is specified on update the request will succeed.)')] [string] $location, [parameter(mandatory=$False,HelpMessage='Msi identity of the resource)')] [ResourceIdentity] $identity, [parameter(mandatory=$False,HelpMessage='Delivery Info of Job.)')] [JobDeliveryInfo] $deliveryInfo, [parameter(mandatory=$False,HelpMessage='The Resource Group Name)')] [string] $resourceGroupName, [parameter(mandatory=$False,HelpMessage='The sku type.)')] [Sku] $sku, [parameter(mandatory=$False,HelpMessage='The name of the job Resource within the specified resource group. job names must be between 3 and 24 characters in length and use any alphanumeric and underscore only)')] [string] $jobName, [parameter(mandatory=$False,HelpMessage='Type of the data transfer.)')] [string] [ValidateSet('ImportToAzure', 'ExportFromAzure')] $transferType, [parameter(mandatory=$False,HelpMessage='The list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups).)')] [hashtable] $tags, [parameter(mandatory=$False,HelpMessage='Delivery type of Job.)')] [string] [ValidateSet('NonScheduled', 'Scheduled')] $deliveryType, [parameter(mandatory,HelpMessage='The reference to call when you want to make a dependency to another resource')] [string] $pulumiid ) process { $resource = [pulumiresource]::new($pulumiid, "azure-native:databox:Job") $resource.properties["resourceGroupName"] = $resourceGroupName $resource.properties["sku"] = $sku $resource.properties["transferType"] = $transferType if($PSBoundParameters.Keys -icontains 'details') { $resource.properties["details"] = $details } if($PSBoundParameters.Keys -icontains 'location') { $resource.properties["location"] = $location } if($PSBoundParameters.Keys -icontains 'identity') { $resource.properties["identity"] = $identity } if($PSBoundParameters.Keys -icontains 'deliveryInfo') { $resource.properties["deliveryInfo"] = $deliveryInfo } if($PSBoundParameters.Keys -icontains 'jobName') { $resource.properties["jobName"] = $jobName } if($PSBoundParameters.Keys -icontains 'tags') { $resource.properties["tags"] = $tags } if($PSBoundParameters.Keys -icontains 'deliveryType') { $resource.properties["deliveryType"] = $deliveryType } $global:pulumiresources += $resource return $resource } } |