Skip to content

Commit bb5b551

Browse files
fix NewGalleryImage instead of update, add md files, update changelog
1 parent 54291b6 commit bb5b551

File tree

6 files changed

+83
-17
lines changed

6 files changed

+83
-17
lines changed

src/Compute/Compute/ChangeLog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
-->
2222
## Upcoming Release
2323
* Edited `New-AzVm` cmdlet internal logic to use the `PlatformFaultDomain` value in the `PSVirtualMachine` object passed to it in the new virtual machine.
24+
* Added `-Architecture` parameter to the following cmdlets:
25+
- New-AzDiskConfig``
26+
- New-AzDiskUpdateConfig
27+
- New-AzSnapshotConfig
28+
- New-AzSnapshotUpdateConfig
29+
- New-AzGalleryImageDefinition
2430

2531
## Version 4.26.0
2632
* Added `-ImageReferenceId` parameter to following cmdlets: `New-AzVm`, `New-AzVmConfig`, `New-AzVmss`, `Set-AzVmssStorageProfile`

src/Compute/Compute/Generated/GalleryImage/GalleryImageCreateOrUpdateMethod.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ public override void ExecuteCmdlet()
8383
galleryImage.EndOfLifeDate = this.EndOfLifeDate;
8484
}
8585

86+
if (this.IsParameterBound(c => c.Architecture))
87+
{
88+
galleryImage.Architecture = this.Architecture;
89+
}
90+
8691
if (this.IsParameterBound(c => c.Tag))
8792
{
8893
galleryImage.Tags = this.Tag.Cast<DictionaryEntry>().ToDictionary(ht => (string)ht.Key, ht => (string)ht.Value);
@@ -327,6 +332,13 @@ public override void ExecuteCmdlet()
327332
Mandatory = false,
328333
ValueFromPipelineByPropertyName = true)]
329334
public GalleryImageFeature[] Feature { get; set; }
335+
336+
[Parameter(
337+
Mandatory = false,
338+
ValueFromPipelineByPropertyName = true,
339+
HelpMessage = "CPU architecture supported by an OS disk. Possible values are \"X64\" and \"Arm64\".")]
340+
[PSArgumentCompleter("X64", "Arm64")]
341+
public string Architecture { get; set; }
330342
}
331343

332344
[Cmdlet(VerbsData.Update, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "GalleryImageDefinition", DefaultParameterSetName = "DefaultParameter", SupportsShouldProcess = true)]
@@ -403,11 +415,6 @@ public override void ExecuteCmdlet()
403415
galleryImage.Tags = this.Tag.Cast<DictionaryEntry>().ToDictionary(ht => (string)ht.Key, ht => (string)ht.Value);
404416
}
405417

406-
if (this.IsParameterBound(c => c.Architecture))
407-
{
408-
galleryImage.Architecture = this.Architecture;
409-
}
410-
411418
if (this.IsParameterBound(c => c.MinimumVCPU))
412419
{
413420
if (galleryImage.Recommended == null)
@@ -610,13 +617,6 @@ public override void ExecuteCmdlet()
610617
ValueFromPipelineByPropertyName = true)]
611618
public string ReleaseNoteUri { get; set; }
612619

613-
[Parameter(
614-
Mandatory = false,
615-
ValueFromPipelineByPropertyName = true,
616-
HelpMessage = "CPU architecture supported by an OS disk. Possible values are \"X64\" and \"Arm64\".")]
617-
[PSArgumentCompleter("X64", "Arm64")]
618-
public string Architecture { get; set; }
619-
620620
[Parameter(
621621
Mandatory = false,
622622
ValueFromPipelineByPropertyName = true)]

src/Compute/Compute/help/New-AzDiskConfig.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ New-AzDiskConfig [[-SkuName] <String>] [-Tier <String>] [-LogicalSectorSize <Int
2424
[-DiskEncryptionKey <KeyVaultAndSecretReference>] [-KeyEncryptionKey <KeyVaultAndKeyReference>]
2525
[-DiskEncryptionSetId <String>] [-EncryptionType <String>] [-DiskAccessId <String>]
2626
[-NetworkAccessPolicy <String>] [-BurstingEnabled <Boolean>] [-PublicNetworkAccess <String>]
27-
[-AcceleratedNetwork <Boolean>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
28-
[<CommonParameters>]
27+
[-AcceleratedNetwork <Boolean>] [-Architecture <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
28+
[-Confirm] [<CommonParameters>]
2929
```
3030

3131
## DESCRIPTION
@@ -97,6 +97,21 @@ Accept pipeline input: True (ByPropertyName)
9797
Accept wildcard characters: False
9898
```
9999
100+
### -Architecture
101+
CPU architecture supported by an OS disk. Possible values are "X64" and "Arm64".
102+
103+
```yaml
104+
Type: System.String
105+
Parameter Sets: (All)
106+
Aliases:
107+
108+
Required: False
109+
Position: Named
110+
Default value: None
111+
Accept pipeline input: True (ByPropertyName)
112+
Accept wildcard characters: False
113+
```
114+
100115
### -BurstingEnabled
101116
Enables bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
102117

src/Compute/Compute/help/New-AzDiskUpdateConfig.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ New-AzDiskUpdateConfig [[-SkuName] <String>] [-Tier <String>] [-DiskIOPSReadOnly
2020
[-EncryptionSettingsEnabled <Boolean>] [-DiskEncryptionKey <KeyVaultAndSecretReference>]
2121
[-KeyEncryptionKey <KeyVaultAndKeyReference>] [-DiskEncryptionSetId <String>] [-EncryptionType <String>]
2222
[-BurstingEnabled <Boolean>] [-PublicNetworkAccess <String>] [-AcceleratedNetwork <Boolean>]
23-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
23+
[-Architecture <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2424
```
2525

2626
## DESCRIPTION
@@ -70,6 +70,21 @@ Accept pipeline input: True (ByPropertyName)
7070
Accept wildcard characters: False
7171
```
7272
73+
### -Architecture
74+
CPU architecture supported by an OS disk. Possible values are "X64" and "Arm64".
75+
76+
```yaml
77+
Type: System.String
78+
Parameter Sets: (All)
79+
Aliases:
80+
81+
Required: False
82+
Position: Named
83+
Default value: None
84+
Accept pipeline input: True (ByPropertyName)
85+
Accept wildcard characters: False
86+
```
87+
7388
### -BurstingEnabled
7489
Enables bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.
7590

src/Compute/Compute/help/New-AzSnapshotConfig.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ New-AzSnapshotConfig [[-SkuName] <String>] [[-OsType] <OperatingSystemTypes>] [[
2121
[-DiskEncryptionKey <KeyVaultAndSecretReference>] [-KeyEncryptionKey <KeyVaultAndKeyReference>]
2222
[-DiskEncryptionSetId <String>] [-EncryptionType <String>] [-DiskAccessId <String>]
2323
[-NetworkAccessPolicy <String>] [-PublicNetworkAccess <String>] [-AcceleratedNetwork <Boolean>]
24-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
24+
[-Architecture <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2525
```
2626

2727
## DESCRIPTION
@@ -71,6 +71,21 @@ Accept pipeline input: True (ByPropertyName)
7171
Accept wildcard characters: False
7272
```
7373
74+
### -Architecture
75+
CPU architecture supported by an OS disk. Possible values are "X64" and "Arm64".
76+
77+
```yaml
78+
Type: System.String
79+
Parameter Sets: (All)
80+
Aliases:
81+
82+
Required: False
83+
Position: Named
84+
Default value: None
85+
Accept pipeline input: True (ByPropertyName)
86+
Accept wildcard characters: False
87+
```
88+
7489
### -CreateOption
7590
Specifies whether this cmdlet creates a disk in the virtual machine from a platform or user image, creates an empty disk, or attaches an existing disk.
7691

src/Compute/Compute/help/New-AzSnapshotUpdateConfig.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ New-AzSnapshotUpdateConfig [[-SkuName] <String>] [[-OsType] <OperatingSystemType
1717
[[-Tag] <Hashtable>] [-SupportsHibernation <Boolean>] [-EncryptionSettingsEnabled <Boolean>]
1818
[-DiskEncryptionKey <KeyVaultAndSecretReference>] [-KeyEncryptionKey <KeyVaultAndKeyReference>]
1919
[-DiskEncryptionSetId <String>] [-EncryptionType <String>] [-PublicNetworkAccess <String>]
20-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
20+
[-Architecture <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2121
```
2222

2323
## DESCRIPTION
@@ -53,6 +53,21 @@ This command updates an existing snapshot with name 'Snapshot01' in resource gro
5353

5454
## PARAMETERS
5555

56+
### -Architecture
57+
CPU architecture supported by an OS disk. Possible values are "X64" and "Arm64".
58+
59+
```yaml
60+
Type: System.String
61+
Parameter Sets: (All)
62+
Aliases:
63+
64+
Required: False
65+
Position: Named
66+
Default value: None
67+
Accept pipeline input: True (ByPropertyName)
68+
Accept wildcard characters: False
69+
```
70+
5671
### -DefaultProfile
5772
The credentials, account, tenant, and subscription used for communication with azure.
5873

0 commit comments

Comments
 (0)