Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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 - ContainerRegistry")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("4.3.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("4.3.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
19 changes: 9 additions & 10 deletions src/ContainerRegistry/ContainerRegistry.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,17 @@ module-version: 0.1.0
title: ContainerRegistry
subject-prefix: $(service-name)

inlining-threshold: 100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should not be removed.

resourcegroup-append: true
nested-object-to-string: 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:
# Remove cmdlet, Private link related resource should be ignored.
- where:
subject: RegistryPrivateLinkResource
hide: true
# Remove the unexpanded parameter set
- where:
variant: ^Create$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^CreateViaIdentity$|^ImportViaIdentity$|^ImportViaIdentityExpanded$|^CheckViaIdentity$|^CheckViaIdentityExpanded$|^PingViaIdentity$|^Check$|^RegenerateViaIdentity$|^Generate$|^GenerateViaIdentity$
variant: ^(Create|Update|Import|Check|Generate)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
variant: ^CreateViaIdentity$|^CreateViaIdentityExpanded$|^ImportViaIdentityExpanded$|^CheckViaIdentityExpanded$
remove: true
- where:
subject: PrivateEndpointConnection
Expand Down Expand Up @@ -125,7 +120,6 @@ directive:
set:
parameter-name: Sku


- where:
parameter-name: ServiceUri
set:
Expand Down Expand Up @@ -324,3 +318,8 @@ directive:
set:
preview-announcement:
preview-message: This is a preview version of ContainerRegistry. Let us know if you run into any issues.

- model-cmdlet:
- model-name: IPRule
cmdlet-name: New-AzContainerRegistryIPRuleObject
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,6 @@
"url": "https://learn.microsoft.com/powershell/module/az.containerregistry"
},
"commands": [
{
"name": "Import-AzContainerRegistryImage",
"description": "Copies an image to this container registry from the specified container registry.",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.containerregistry/import-azcontainerregistryimage"
},
"parameterSets": [
{
"parameters": [
"-RegistryName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]"
]
}
]
},
"examples": [
{
"description": "Copies an image to this container registry from the specified container registry.",
"parameters": [
{
"name": "-RegistryName",
"value": "[Path.registryName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
}
]
}
]
},
{
"name": "Remove-AzContainerRegistry",
"description": "Deletes a container registry.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

namespace Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview
namespace Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models
{
public class PSContainerRegistryCredential
{
public PSContainerRegistryCredential(RegistryListCredentialsResult credentials)
{
Username = credentials?.Username;
Password = credentials?.Password?.Length > 0 ? credentials.Password[0]?.Value : string.Empty;
Password2 = credentials?.Password?.Length > 1 ? credentials.Password[1]?.Value : string.Empty;
Password = credentials?.Password?.Count > 0 ? credentials.Password[0]?.Value : string.Empty;
Password2 = credentials?.Password?.Count > 1 ? credentials.Password[1]?.Value : string.Empty;
}

public string Username { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Get-AzContainerRegistry
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IContainerRegistryIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IRegistry
Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IRegistry
.Notes
COMPLEX PARAMETER PROPERTIES

Expand Down Expand Up @@ -60,7 +60,7 @@ INPUTOBJECT <IContainerRegistryIdentity>: Identity Parameter
https://learn.microsoft.com/powershell/module/az.containerregistry/get-azcontainerregistry
#>
function Get-AzContainerRegistry {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IRegistry])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IRegistry])]
[CmdletBinding(DefaultParameterSetName='List2', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ Lists the login credentials for the specified container registry.
$Cred.Password

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IRegistryListCredentialsResult
Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IRegistryListCredentialsResult
.Link
https://learn.microsoft.com/powershell/module/az.containerregistry/get-azcontainerregistrycredential
#>
function Get-AzContainerRegistryCredential {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.PSContainerRegistryCredential])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.PSContainerRegistryCredential])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='List', Mandatory)]
Expand All @@ -48,7 +48,7 @@ param(

[Parameter(ParameterSetName='GetByRegistry', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IRegistry]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IRegistry]
# The Registry Object.
${Registry},

Expand Down Expand Up @@ -118,7 +118,7 @@ process {
$null = $PSBoundParameters.Add("ResourceGroupName", $ResourceGroupName)
}
$Credential = Az.ContainerRegistry.internal\Get-AzContainerRegistryCredential @PSBoundParameters
$Result = New-Object Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.PSContainerRegistryCredential($Credential)
$Result = New-Object Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.PSContainerRegistryCredential($Credential)
return $Result
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Get-AzContainerRegistryReplication -ResourceGroupName "MyResourceGroup" -Registr
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IContainerRegistryIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IReplication
Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IReplication
.Notes
COMPLEX PARAMETER PROPERTIES

Expand Down Expand Up @@ -58,7 +58,7 @@ INPUTOBJECT <IContainerRegistryIdentity>: Identity Parameter
https://learn.microsoft.com/powershell/module/az.containerregistry/get-azcontainerregistryreplication
#>
function Get-AzContainerRegistryReplication {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IReplication])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IReplication])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
Expand Down Expand Up @@ -102,7 +102,7 @@ param(

[Parameter(ParameterSetName='GetByRegistry', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IRegistry]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IRegistry]
# The Registry Object.
${Registry},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Get-AzContainerRegistryWebhook -ResourceGroupName "MyResourceGroup" -RegistryNa
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IContainerRegistryIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IWebhook
Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IWebhook
.Notes
COMPLEX PARAMETER PROPERTIES

Expand Down Expand Up @@ -59,7 +59,7 @@ INPUTOBJECT <IContainerRegistryIdentity>: Identity Parameter
https://learn.microsoft.com/powershell/module/az.containerregistry/get-azcontainerregistrywebhook
#>
function Get-AzContainerRegistryWebhook {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IWebhook])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IWebhook])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
Expand Down Expand Up @@ -103,7 +103,7 @@ param(

[Parameter(ParameterSetName='GetByRegistry', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IRegistry]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IRegistry]
# The Registry Object.
${Registry},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ Lists recent events for the specified webhook.
Get-AzContainerRegistryWebhookEvent -ResourceGroupName lnxtest -RegistryName lnxcr -WebhookName webhook001

.Outputs
Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IEvent
Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IEvent
.Link
https://learn.microsoft.com/powershell/module/az.containerregistry/get-azcontainerregistrywebhookevent
#>
function Get-AzContainerRegistryWebhookEvent {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IEvent])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IEvent])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='List', Mandatory)]
Expand Down Expand Up @@ -61,7 +61,7 @@ param(

[Parameter(ParameterSetName='GetByWebhook', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.Api202301Preview.IWebhook]
[Microsoft.Azure.PowerShell.Cmdlets.ContainerRegistry.Models.IWebhook]
# The Webhook Object.
${Webhook},

Expand Down
Loading