Skip to content

Commit 092ab1c

Browse files
authored
Regen using new binary data (Azure#27572)
* regen using new binary data * update autorest version
1 parent 6494cc9 commit 092ab1c

File tree

124 files changed

+2467
-559
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+2467
-559
lines changed

eng/Packages.Data.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
All should have PrivateAssets="All" set so they don't become package dependencies
153153
-->
154154
<ItemGroup>
155-
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20220315.1" PrivateAssets="All" />
155+
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20220315.2" PrivateAssets="All" />
156156
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20220111.2" PrivateAssets="All" />
157157
<PackageReference Update="coverlet.collector" Version="1.3.0" PrivateAssets="All" />
158158
<PackageReference Update="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.1" PrivateAssets="All" />

sdk/azurestackhci/Azure.ResourceManager.Hci/api/Azure.ResourceManager.Hci.netstandard2.0.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ public ArcExtensionData() { }
4444
public string LastModifiedBy { get { throw null; } set { } }
4545
public Azure.ResourceManager.Hci.Models.CreatedByType? LastModifiedByType { get { throw null; } set { } }
4646
public System.Collections.Generic.IReadOnlyList<Azure.ResourceManager.Hci.Models.PerNodeExtensionState> PerNodeExtensionDetails { get { throw null; } }
47-
public object ProtectedSettings { get { throw null; } set { } }
47+
public System.BinaryData ProtectedSettings { get { throw null; } set { } }
4848
public Azure.ResourceManager.Hci.Models.ProvisioningState? ProvisioningState { get { throw null; } }
4949
public string Publisher { get { throw null; } set { } }
50-
public object Settings { get { throw null; } set { } }
50+
public System.BinaryData Settings { get { throw null; } set { } }
5151
public string TypeHandlerVersion { get { throw null; } set { } }
5252
public string TypePropertiesExtensionParametersType { get { throw null; } set { } }
5353
}

sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/ArcExtensionData.cs

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/Models/ArcExtensionData.Serialization.cs

Lines changed: 14 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/compute/Azure.ResourceManager.Compute/CHANGELOG.md

Lines changed: 88 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -197,94 +197,95 @@ await computeClient.VirtualMachines.BeginCreateOrUpdateAsync(resourceGroupName,
197197

198198
After upgrade:
199199
```C# Snippet:Changelog_New
200-
using Azure.Identity;
201-
using Azure.ResourceManager;
202-
using Azure.ResourceManager.Compute.Models;
203-
using Azure.ResourceManager.Network;
204-
using Azure.ResourceManager.Network.Models;
205-
using Azure.ResourceManager.Resources;
206-
using Azure.ResourceManager.Resources.Models;
207-
using System.Linq;
208-
using Azure.Core;
209-
210-
var armClient = new ArmClient(new DefaultAzureCredential());
211-
212-
var location = AzureLocation.WestUS;
213-
// Create ResourceGroup
214-
Subscription subscription = await armClient.GetDefaultSubscriptionAsync();
215-
ArmOperation<ResourceGroup> rgOperation = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, "myResourceGroup", new ResourceGroupData(location));
216-
ResourceGroup resourceGroup = rgOperation.Value;
217-
218-
// Create AvailabilitySet
219-
var availabilitySetData = new AvailabilitySetData(location)
220-
{
221-
PlatformUpdateDomainCount = 5,
222-
PlatformFaultDomainCount = 2,
223-
Sku = new ComputeSku() { Name = "Aligned" }
224-
};
225-
ArmOperation<AvailabilitySet> asetOperation = await resourceGroup.GetAvailabilitySets().CreateOrUpdateAsync(WaitUntil.Completed, "myAvailabilitySet", availabilitySetData);
226-
AvailabilitySet availabilitySet = asetOperation.Value;
200+
using Azure.Identity;
201+
using Azure.ResourceManager;
202+
using Azure.ResourceManager.Compute.Models;
203+
using Azure.ResourceManager.Network;
204+
using Azure.ResourceManager.Network.Models;
205+
using Azure.ResourceManager.Resources;
206+
using Azure.ResourceManager.Resources.Models;
207+
using System.Linq;
208+
using Azure.Core;
209+
using System;
210+
211+
var armClient = new ArmClient(new DefaultAzureCredential());
212+
213+
var location = AzureLocation.WestUS;
214+
// Create ResourceGroup
215+
Subscription subscription = await armClient.GetDefaultSubscriptionAsync();
216+
ArmOperation<ResourceGroup> rgOperation = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, "myResourceGroup", new ResourceGroupData(location));
217+
ResourceGroup resourceGroup = rgOperation.Value;
218+
219+
// Create AvailabilitySet
220+
var availabilitySetData = new AvailabilitySetData(location)
221+
{
222+
PlatformUpdateDomainCount = 5,
223+
PlatformFaultDomainCount = 2,
224+
Sku = new ComputeSku() { Name = "Aligned" }
225+
};
226+
ArmOperation<AvailabilitySet> asetOperation = await resourceGroup.GetAvailabilitySets().CreateOrUpdateAsync(WaitUntil.Completed, "myAvailabilitySet", availabilitySetData);
227+
AvailabilitySet availabilitySet = asetOperation.Value;
227228

228-
// Create VNet
229-
var vnetData = new VirtualNetworkData()
230-
{
231-
Location = location,
232-
Subnets =
233-
{
234-
new SubnetData()
235-
{
236-
Name = "mySubnet",
237-
AddressPrefix = "10.0.0.0/24",
238-
}
239-
},
240-
};
241-
vnetData.AddressPrefixes.Add("10.0.0.0/16");
242-
ArmOperation<VirtualNetwork> vnetOperation = await resourceGroup.GetVirtualNetworks().CreateOrUpdateAsync(WaitUntil.Completed, "myVirtualNetwork", vnetData);
243-
VirtualNetwork vnet = vnetOperation.Value;
229+
// Create VNet
230+
var vnetData = new VirtualNetworkData()
231+
{
232+
Location = location,
233+
Subnets =
234+
{
235+
new SubnetData()
236+
{
237+
Name = "mySubnet",
238+
AddressPrefix = "10.0.0.0/24",
239+
}
240+
},
241+
};
242+
vnetData.AddressPrefixes.Add("10.0.0.0/16");
243+
ArmOperation<VirtualNetwork> vnetOperation = await resourceGroup.GetVirtualNetworks().CreateOrUpdateAsync(WaitUntil.Completed, "myVirtualNetwork", vnetData);
244+
VirtualNetwork vnet = vnetOperation.Value;
244245

245-
// Create Network interface
246-
var nicData = new NetworkInterfaceData()
247-
{
248-
Location = location,
249-
IPConfigurations =
250-
{
251-
new NetworkInterfaceIPConfigurationData()
252-
{
253-
Name = "Primary",
254-
Primary = true,
255-
Subnet = new SubnetData() { Id = vnet.Data.Subnets.First().Id },
256-
PrivateIPAllocationMethod = IPAllocationMethod.Dynamic,
257-
}
258-
}
259-
};
260-
ArmOperation<NetworkInterface> nicOperation = await resourceGroup.GetNetworkInterfaces().CreateOrUpdateAsync(WaitUntil.Completed, "myNetworkInterface", nicData);
261-
NetworkInterface nic = nicOperation.Value;
246+
// Create Network interface
247+
var nicData = new NetworkInterfaceData()
248+
{
249+
Location = location,
250+
IPConfigurations =
251+
{
252+
new NetworkInterfaceIPConfigurationData()
253+
{
254+
Name = "Primary",
255+
Primary = true,
256+
Subnet = new SubnetData() { Id = vnet.Data.Subnets.First().Id },
257+
PrivateIPAllocationMethod = IPAllocationMethod.Dynamic,
258+
}
259+
}
260+
};
261+
ArmOperation<NetworkInterface> nicOperation = await resourceGroup.GetNetworkInterfaces().CreateOrUpdateAsync(WaitUntil.Completed, "myNetworkInterface", nicData);
262+
NetworkInterface nic = nicOperation.Value;
262263

263-
var vmData = new VirtualMachineData(location)
264-
{
265-
AvailabilitySet = new WritableSubResource() { Id = availabilitySet.Id },
266-
NetworkProfile = new Compute.Models.NetworkProfile { NetworkInterfaces = { new NetworkInterfaceReference() { Id = nic.Id } } },
267-
OSProfile = new OSProfile
268-
{
269-
ComputerName = "testVM",
270-
AdminUsername = "username",
271-
AdminPassword = "(YourPassword)",
272-
LinuxConfiguration = new LinuxConfiguration { DisablePasswordAuthentication = false, ProvisionVmAgent = true }
273-
},
274-
StorageProfile = new StorageProfile()
275-
{
276-
ImageReference = new ImageReference()
277-
{
278-
Offer = "UbuntuServer",
279-
Publisher = "Canonical",
280-
Sku = "18.04-LTS",
281-
Version = "latest"
282-
}
283-
},
284-
HardwareProfile = new HardwareProfile() { VmSize = VirtualMachineSizeTypes.StandardB1Ms },
285-
};
286-
ArmOperation<VirtualMachine> vmOperation = await resourceGroup.GetVirtualMachines().CreateOrUpdateAsync(WaitUntil.Completed, "myVirtualMachine", vmData);
287-
VirtualMachine vm = vmOperation.Value;
264+
var vmData = new VirtualMachineData(location)
265+
{
266+
AvailabilitySet = new WritableSubResource() { Id = availabilitySet.Id },
267+
NetworkProfile = new Compute.Models.NetworkProfile { NetworkInterfaces = { new NetworkInterfaceReference() { Id = nic.Id } } },
268+
OSProfile = new OSProfile
269+
{
270+
ComputerName = "testVM",
271+
AdminUsername = "username",
272+
AdminPassword = "(YourPassword)",
273+
LinuxConfiguration = new LinuxConfiguration { DisablePasswordAuthentication = false, ProvisionVmAgent = true }
274+
},
275+
StorageProfile = new StorageProfile()
276+
{
277+
ImageReference = new ImageReference()
278+
{
279+
Offer = "UbuntuServer",
280+
Publisher = "Canonical",
281+
Sku = "18.04-LTS",
282+
Version = "latest"
283+
}
284+
},
285+
HardwareProfile = new HardwareProfile() { VmSize = VirtualMachineSizeTypes.StandardB1Ms },
286+
};
287+
ArmOperation<VirtualMachine> vmOperation = await resourceGroup.GetVirtualMachines().CreateOrUpdateAsync(WaitUntil.Completed, "myVirtualMachine", vmData);
288+
VirtualMachine vm = vmOperation.Value;
288289
```
289290

290291
#### Object Model Changes
@@ -319,7 +320,7 @@ var vmExtension = new VirtualMachineExtensionData(AzureLocation.WestUS)
319320
TypeHandlerVersion = "2.0",
320321
AutoUpgradeMinorVersion = true,
321322
ForceUpdateTag = "RerunExtension",
322-
Settings = "{}",
323-
ProtectedSettings = "{}"
323+
Settings = BinaryData.FromObjectAsJson(new { }),
324+
ProtectedSettings = BinaryData.FromObjectAsJson(new { })
324325
};
325326
```

0 commit comments

Comments
 (0)