Update-AzReservation
Uppdaterar de tillämpade omfången för Reservation
.
Syntax
Update-AzReservation
-Id <String>
-OrderId <String>
[-AppliedScope <String[]>]
[-AppliedScopePropertyDisplayName <String>]
[-AppliedScopePropertyManagementGroupId <String>]
[-AppliedScopePropertyResourceGroupId <String>]
[-AppliedScopePropertySubscriptionId <String>]
[-AppliedScopePropertyTenantId <String>]
[-AppliedScopeType <AppliedScopeType>]
[-InstanceFlexibility <InstanceFlexibility>]
[-Name <String>]
[-Renew]
[-RenewProperty <IPatchPropertiesRenewProperties>]
[-ReviewDateTime <DateTime>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzReservation
-Id <String>
-OrderId <String>
-Reservation <IPatch>
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzReservation
-InputObject <IReservationsIdentity>
[-AppliedScope <String[]>]
[-AppliedScopePropertyDisplayName <String>]
[-AppliedScopePropertyManagementGroupId <String>]
[-AppliedScopePropertyResourceGroupId <String>]
[-AppliedScopePropertySubscriptionId <String>]
[-AppliedScopePropertyTenantId <String>]
[-AppliedScopeType <AppliedScopeType>]
[-InstanceFlexibility <InstanceFlexibility>]
[-Name <String>]
[-Renew]
[-RenewProperty <IPatchPropertiesRenewProperties>]
[-ReviewDateTime <DateTime>]
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzReservation
-InputObject <IReservationsIdentity>
-Reservation <IPatch>
[-DefaultProfile <PSObject>]
[-AsJob]
[-NoWait]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Uppdaterar de tillämpade omfången för Reservation
.
Exempel
Exempel 1: Uppdatera reservationens egenskaper
Update-AzReservation -ReservationOrderId "30000000-aaaa-bbbb-cccc-200000000013" -ReservationId "10000000-aaaa-bbbb-cccc-200000000007" -Name "testName"
Location ReservationOrderId/ReservationId Sku State BenefitStartTime ExpiryDate LastUpdatedDateTime SkuDescription
-------- -------------------------------- --- ----- ---------------- ---------- ------------------- --------------
westeurope 30000000-aaaa-bbbb-cccc-200000000013/10000000-aaaa-bbbb-cccc-200000000007/16 Standard_B4ms Succeeded 6/14/2022 9:41:17 PM 6/14/2025 12:00:00 AM 7/7/2022 11:37:58 PM Reserved VM In…
Uppdatera reservationens egenskaper, inklusive namn, förnya, appliedScopeType, appliedScope
Exempel 2: Uppdatera reservationens AppliedScopeType
# Shared scope:
Update-AzReservation -ReservationOrderId "30000000-aaaa-bbbb-cccc-200000000013" -ReservationId "10000000-aaaa-bbbb-cccc-200000000007" -AppliedScopeType "Shared"
# Single scope:
Update-AzReservation -ReservationOrderId "30000000-aaaa-bbbb-cccc-200000000013" -ReservationId "10000000-aaaa-bbbb-cccc-200000000007" -AppliedScopeType "Single" -AppliedScope "/subscriptions/30000000-aaaa-bbbb-cccc-200000000018"
# Single scope with resource group:
Update-AzReservation -ReservationOrderId "30000000-aaaa-bbbb-cccc-200000000013" -ReservationId "10000000-aaaa-bbbb-cccc-200000000007" -AppliedScopeType "Single" -AppliedScope "/subscriptions/30000000-aaaa-bbbb-cccc-200000000018/resourcegroups/{your resource group name}"
Similar to example 1
Uppdatera reservationens tillämpade omfångstyp. För Delat omfång ska du inte skicka in något tillämpat omfångs-ID. För Enskilt omfång skickar du i tillämpat omfångs-ID och för Enskilt omfång med resursgrupp, och skickar även in resursgruppsnamn i det tillämpade omfångs-ID:t
Parametrar
-AppliedScope
Lista över de prenumerationer som förmånen ska tillämpas på. Ange inte om AppliedScopeType är Delat. Den här egenskapen kommer att bli inaktuell och ersättas av appliedScopeProperties i stället för Single AppliedScopeType.
Typ: | String[] |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-AppliedScopePropertyDisplayName
Visningsnamn
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-AppliedScopePropertyManagementGroupId
Fullständigt kvalificerad identifierare för den hanteringsgrupp där förmånen måste tillämpas.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-AppliedScopePropertyResourceGroupId
Fullständigt kvalificerad identifierare för resursgruppen.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-AppliedScopePropertySubscriptionId
Fullständigt kvalificerad identifierare för prenumerationen.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-AppliedScopePropertyTenantId
Klientorganisations-ID där sparplanen ska tillämpa förmånen.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-AppliedScopeType
Typ av tillämpat omfång.
Typ: | AppliedScopeType |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-AsJob
Kör kommandot som ett jobb
Typ: | SwitchParameter |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Confirm
Uppmanar dig att bekräfta innan du kör cmdleten.
Typ: | SwitchParameter |
Alias: | cf |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-DefaultProfile
Parametern DefaultProfile fungerar inte. Använd parametern SubscriptionId när den är tillgänglig om du kör cmdleten mot en annan prenumeration.
Typ: | PSObject |
Alias: | AzureRMContext, AzureCredential |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Id
ID för reservationsobjektet
Typ: | String |
Alias: | ReservationId |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-InputObject
Identitetsparameter För att skapa, se AVSNITTET ANTECKNINGAR för INPUTOBJECT-egenskaper och skapa en hash-tabell.
Typ: | IReservationsIdentity |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-InstanceFlexibility
Om du aktiverar detta tillämpas reservationsrabatten på andra virtuella datorer i samma vm-storleksgrupp. Ange endast reserverad resurstyp för VirtualMachines.
Typ: | InstanceFlexibility |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Name
Visningsnamn för reservationen
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-NoWait
Kör kommandot asynkront
Typ: | SwitchParameter |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-OrderId
Beställnings-ID för reservationen
Typ: | String |
Alias: | ReservationOrderId |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Renew
Om du anger värdet true köps automatiskt en ny reservation på förfallodatumtiden.
Typ: | SwitchParameter |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-RenewProperty
. Information om hur du skapar finns i AVSNITTET ANTECKNINGAR för EGENSKAPERNA RENEWPROPERTY och skapa en hash-tabell.
Typ: | IPatchPropertiesRenewProperties |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Reservation
Begäran om reservationskorrigering Om du vill skapa, se AVSNITTET ANTECKNINGAR för RESERVATIONSegenskaper och skapa en hash-tabell.
Typ: | IPatch |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-ReviewDateTime
Det här är den tidpunkt då Azure-hybridförmånen måste granskas.
Typ: | DateTime |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-WhatIf
Visar vad som skulle hända om cmdleten körs. Cmdleten körs inte.
Typ: | SwitchParameter |
Alias: | wi |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
Indata
Utdata
Azure PowerShell