Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generated/VMware/VMware.Autorest/Az.VMware.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.VMware.private.dll'
FormatsToProcess = './Az.VMware.format.ps1xml'
FunctionsToExport = 'Get-AzVMwareAddon', 'Get-AzVMwareAuthorization', 'Get-AzVMwareCloudLink', 'Get-AzVMwareCluster', 'Get-AzVMwareClusterZone', 'Get-AzVMwareDatastore', 'Get-AzVMwareGlobalReachConnection', 'Get-AzVMwareHost', 'Get-AzVMwareIscsiPath', 'Get-AzVMwareLicense', 'Get-AzVMwareLicenseProperty', 'Get-AzVMwareMaintenance', 'Get-AzVMwarePlacementPolicy', 'Get-AzVMwarePrivateCloud', 'Get-AzVMwarePrivateCloudAdminCredential', 'Get-AzVMwarePrivateCloudVcfLicense', 'Get-AzVMwareProvisionedNetwork', 'Get-AzVMwarePureStoragePolicy', 'Get-AzVMwareSku', 'Get-AzVMwareVirtualMachine', 'Invoke-AzVMwareInitiateMaintenanceCheck', 'Invoke-AzVMwareRescheduleMaintenance', 'Invoke-AzVMwareScheduleMaintenance', 'New-AzVMwareAddon', 'New-AzVMwareAddonSrmPropertyObject', 'New-AzVMwareAddonVrPropertyObject', 'New-AzVMwareAuthorization', 'New-AzVMwareCloudLink', 'New-AzVMwareCluster', 'New-AzVMwareDatastore', 'New-AzVMwareGlobalReachConnection', 'New-AzVMwareIscsiPath', 'New-AzVMwareLicense', 'New-AzVMwarePlacementPolicy', 'New-AzVMwarePrivateCloud', 'New-AzVMwarePrivateCloudNsxtPassword', 'New-AzVMwarePrivateCloudVcenterPassword', 'New-AzVMwarePSCredentialExecutionParameterObject', 'New-AzVMwarePureStoragePolicy', 'New-AzVMwareScriptSecureStringExecutionParameterObject', 'New-AzVMwareScriptStringExecutionParameterObject', 'New-AzVMwareVmHostPlacementPolicyPropertyObject', 'New-AzVMwareVMPlacementPolicyPropertyObject', 'Remove-AzVMwareAddon', 'Remove-AzVMwareAuthorization', 'Remove-AzVMwareCloudLink', 'Remove-AzVMwareCluster', 'Remove-AzVMwareDatastore', 'Remove-AzVMwareGlobalReachConnection', 'Remove-AzVMwareIscsiPath', 'Remove-AzVMwareLicense', 'Remove-AzVMwarePlacementPolicy', 'Remove-AzVMwarePrivateCloud', 'Remove-AzVMwarePureStoragePolicy', 'Test-AzVMwareLocationQuotaAvailability', 'Test-AzVMwareLocationTrialAvailability', 'Test-AzVMwareServiceComponentAvailability', 'Update-AzVMwareAuthorization', 'Update-AzVMwareCloudLink', 'Update-AzVMwareCluster', 'Update-AzVMwareDatastore', 'Update-AzVMwareGlobalReachConnection', 'Update-AzVMwareIscsiPath', 'Update-AzVMwareLicense', 'Update-AzVMwarePlacementPolicy', 'Update-AzVMwarePrivateCloud', 'Update-AzVMwarePureStoragePolicy'
FunctionsToExport = 'Get-AzVMwareAddon', 'Get-AzVMwareAuthorization', 'Get-AzVMwareCloudLink', 'Get-AzVMwareCluster', 'Get-AzVMwareClusterZone', 'Get-AzVMwareDatastore', 'Get-AzVMwareGlobalReachConnection', 'Get-AzVMwareHost', 'Get-AzVMwareIscsiPath', 'Get-AzVMwareLicense', 'Get-AzVMwareLicenseProperty', 'Get-AzVMwareMaintenance', 'Get-AzVMwarePlacementPolicy', 'Get-AzVMwarePrivateCloud', 'Get-AzVMwarePrivateCloudAdminCredential', 'Get-AzVMwarePrivateCloudVcfLicense', 'Get-AzVMwareProvisionedNetwork', 'Get-AzVMwarePureStoragePolicy', 'Get-AzVMwareSku', 'Get-AzVMwareVirtualMachine', 'Invoke-AzVMwareInitiateMaintenanceCheck', 'Invoke-AzVMwareRescheduleMaintenance', 'Invoke-AzVMwareScheduleMaintenance', 'New-AzVMwareAddon', 'New-AzVMwareAddonSrmPropertyObject', 'New-AzVMwareAddonVrPropertyObject', 'New-AzVMwareAuthorization', 'New-AzVMwareCloudLink', 'New-AzVMwareCluster', 'New-AzVMwareDatastore', 'New-AzVMwareGlobalReachConnection', 'New-AzVMwareIscsiPath', 'New-AzVMwareLicense', 'New-AzVMwarePlacementPolicy', 'New-AzVMwarePrivateCloud', 'New-AzVMwarePrivateCloudNsxtPassword', 'New-AzVMwarePrivateCloudVcenterPassword', 'New-AzVMwarePSCredentialExecutionParameterObject', 'New-AzVMwarePureStoragePolicy', 'New-AzVMwareScriptSecureStringExecutionParameterObject', 'New-AzVMwareScriptStringExecutionParameterObject', 'New-AzVMwareVcf5LicenseObject', 'New-AzVMwareVmHostPlacementPolicyPropertyObject', 'New-AzVMwareVMPlacementPolicyPropertyObject', 'Remove-AzVMwareAddon', 'Remove-AzVMwareAuthorization', 'Remove-AzVMwareCloudLink', 'Remove-AzVMwareCluster', 'Remove-AzVMwareDatastore', 'Remove-AzVMwareGlobalReachConnection', 'Remove-AzVMwareIscsiPath', 'Remove-AzVMwareLicense', 'Remove-AzVMwarePlacementPolicy', 'Remove-AzVMwarePrivateCloud', 'Remove-AzVMwarePureStoragePolicy', 'Test-AzVMwareLocationQuotaAvailability', 'Test-AzVMwareLocationTrialAvailability', 'Test-AzVMwareServiceComponentAvailability', 'Update-AzVMwareAuthorization', 'Update-AzVMwareCloudLink', 'Update-AzVMwareCluster', 'Update-AzVMwareDatastore', 'Update-AzVMwareGlobalReachConnection', 'Update-AzVMwareIscsiPath', 'Update-AzVMwareLicense', 'Update-AzVMwarePlacementPolicy', 'Update-AzVMwarePrivateCloud', 'Update-AzVMwarePureStoragePolicy'
PrivateData = @{
PSData = @{
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'VMware'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ param(
# Optionally, set the vCenter admin password when the private cloud is created
${VcenterPassword},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.IVcfLicense]
# The VMware Cloud Foundation (VCF) license for the private cloud.
# To construct, see NOTES section for VCFLICENSE properties and create a hash table,
# or use New-AzVMwareVcf5LicenseObject to create a Vcf5License object.
${VcfLicense},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')]
[System.Management.Automation.SwitchParameter]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@

# ----------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
# is regenerated.
# ----------------------------------------------------------------------------------

<#
.Synopsis
Create an in-memory object for Vcf5License.
.Description
Create an in-memory object for Vcf5License.
.Example
New-AzVMwareVcf5LicenseObject -Core 16 -EndDate (Get-Date "2027-01-01") -LicenseKey (ConvertTo-SecureString "YOUR-LICENSE-KEY" -AsPlainText -Force) -BroadcomSiteId "site123" -BroadcomContractNumber "contract123"

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Vcf5License
.Notes
COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

LABEL <ILabel[]>: Additional labels passed through for license reporting.
Key <String>: The key of the label.
Value <String>: The value of the label.
.Link
https://learn.microsoft.com/powershell/module/Az.VMware/new-azvmwarevcf5licenseobject
#>
function New-AzVMwareVcf5LicenseObject {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.Vcf5License])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')]
[System.Int32]
# Number of cores included in the license.
${Core},

[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')]
[System.DateTime]
# UTC datetime when the license expires.
${EndDate},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')]
[System.String]
# The Broadcom contract number associated with the license.
${BroadcomContractNumber},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')]
[System.String]
# The Broadcom site ID associated with the license.
${BroadcomSiteId},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Models.ILabel[]]
# Additional labels passed through for license reporting.
${Label},

[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Category('Body')]
[System.Security.SecureString]
# License key.
${LicenseKey}
)

begin {
try {
$outBuffer = $null
if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
$PSBoundParameters['OutBuffer'] = 1
}
$parameterSet = $PSCmdlet.ParameterSetName

$testPlayback = $false
$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } }

if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
}
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
if ($preTelemetryId -eq '') {
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
[Microsoft.Azure.PowerShell.Cmdlets.VMware.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
} else {
$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
if ($internalCalledCmdlets -eq '') {
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
} else {
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
}
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
}

$mapping = @{
__AllParameterSets = 'Az.VMware.custom\New-AzVMwareVcf5LicenseObject';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
[Microsoft.Azure.PowerShell.Cmdlets.VMware.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
if ($wrappedCmd -eq $null) {
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function)
}
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
} catch {
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
throw
}
}

process {
try {
$steppablePipeline.Process($_)
} catch {
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
throw
}

finally {
$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
}

}
end {
try {
$steppablePipeline.End()

[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
if ($preTelemetryId -eq '') {
[Microsoft.Azure.PowerShell.Cmdlets.VMware.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
}
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId

} catch {
[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
throw
}
}
}
Loading