Skip to content
Draft
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
27 changes: 27 additions & 0 deletions src/DnsResolver/DnsResolver.Autorest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// 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.

using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")]
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - DnsResolver")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.1.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.1.1")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]

9 changes: 4 additions & 5 deletions src/DnsResolver/DnsResolver.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,6 @@ inlining-threshold: 50
# uncomment following line to support viaIdentity for these post APIs
# identity-correction-for-post: true

# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"

directive:
- where:
subject: DnsResolverPolicyVirtualNetworkLink
Expand Down Expand Up @@ -117,10 +113,13 @@ directive:
# 1. Remove the unexpanded parameter set
# 2. For New-* cmdlets, ViaIdentity is not required, so CreateViaIdentityExpanded is removed as well
- where:
variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
variant: ^(Create|Update)(?!.*?(Expanded|JsonFilePath|JsonString))|^CreateViaIdentityExpanded$
remove: true
# Remove the set-* cmdlet
- where:
verb: Set
remove: true
# - model-cmdlet: # autorest v4 use for verification
# - model-name: IPConfiguration
# - model-name: TargetDnsServer
```
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the \"License\");
# 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,
# 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.
# ----------------------------------------------------------------------------------

<#
Expand All @@ -20,28 +21,30 @@ Create a in-memory object for IPConfiguration
Create a in-memory object for IPConfiguration

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview.IPConfiguration
Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.IPConfiguration
.Link
https://learn.microsoft.com/powershell/module/az.dnsresolver/new-azdnsresolveripconfigurationobject
https://learn.microsoft.com/powershell/module/Az.DnsResolver/new-azdnsresolveripconfigurationobject
#>
function New-AzDnsResolverIPConfigurationObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview.IPConfiguration')]
[Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.ModelCmdletAttribute()]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.IPConfiguration')]
[CmdletBinding(PositionalBinding=$false)]
Param(

[Parameter(HelpMessage="Private IP address of the IP configuration.")]
[string]
$PrivateIPAddress,
[Parameter(HelpMessage="Private IP address allocation method.")]
[Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Support.IPAllocationMethod]
[Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.PSArgumentCompleterAttribute("Static", "Dynamic")]
[string]
$PrivateIPAllocationMethod,
[Parameter(HelpMessage="Resource ID.")]
[string]
$SubnetId
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview.IPConfiguration]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.IPConfiguration]::New()

$Object.PrivateIPAddress = $PrivateIPAddress
$Object.PrivateIPAllocationMethod = $PrivateIPAllocationMethod
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@

# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the \"License\");
# 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,
# 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.
# ----------------------------------------------------------------------------------

<#
Expand All @@ -20,12 +21,13 @@ Create a in-memory object for Target DNS server
Create a in-memory object for Target DNS server

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview.TargetDnsServer
Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.TargetDnsServer
.Link
https://learn.microsoft.com/powershell/module/az.dnsresolver/new-azdnsresolvertargetdnsserverobject
https://learn.microsoft.com/powershell/module/Az.DnsResolver/new-azdnsresolvertargetdnsserverobject
#>
function New-AzDnsResolverTargetDnsServerObject {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview.TargetDnsServer')]
[Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.ModelCmdletAttribute()]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.TargetDnsServer')]
[CmdletBinding(PositionalBinding=$false)]
Param(

Expand All @@ -38,7 +40,7 @@ function New-AzDnsResolverTargetDnsServerObject {
)

process {
$Object = [Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview.TargetDnsServer]::New()
$Object = [Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.TargetDnsServer]::New()

$Object.IPAddress = $IPAddress
$Object.Port = $Port
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
public partial class GetAzDnsForwardingRulesetForwardingRule_GetViaIdentityDnsForwardingRuleset
{
partial void overrideOnDefault(HttpResponseMessage responseMessage, Task<ICloudError> errorResponseTask, ref Task<bool> returnNow)
{
this.WriteError(responseMessage, errorResponseTask, ref returnNow);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
public partial class GetAzDnsForwardingRulesetVirtualNetworkLink_GetViaIdentityDnsForwardingRuleset
{
partial void overrideOnDefault(HttpResponseMessage responseMessage, Task<ICloudError> errorResponseTask, ref Task<bool> returnNow)
{
this.WriteError(responseMessage, errorResponseTask, ref returnNow);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
public partial class GetAzDnsResolverInboundEndpoint_GetViaIdentityDnsResolver
{
partial void overrideOnDefault(HttpResponseMessage responseMessage, Task<ICloudError> errorResponseTask, ref Task<bool> returnNow)
{
this.WriteError(responseMessage, errorResponseTask, ref returnNow);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
public partial class GetAzDnsResolverOutboundEndpoint_GetViaIdentityDnsResolver
{
partial void overrideOnDefault(HttpResponseMessage responseMessage, Task<ICloudError> errorResponseTask, ref Task<bool> returnNow)
{
this.WriteError(responseMessage, errorResponseTask, ref returnNow);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models.Api20230701Preview;
using Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Models;

namespace Microsoft.Azure.PowerShell.Cmdlets.DnsResolver.Cmdlets
{
Expand Down
Loading