From ed325b42e957a717b9866a08af92582ac60a0812 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 1 Oct 2018 22:03:22 +0000 Subject: [PATCH] Generated from 7d58dd0e73fb2740d7ebe8e534a973e959395d68 allow specifying credentials for source registry on import image --- .../mgmt/containerregistry/models.go | 1 + .../mgmt/containerregistry/models.go | 1 + .../mgmt/containerregistry/models.go | 1 + .../mgmt/2017-10-01/containerregistry/models.go | 12 +++++++++++- .../mgmt/2017-10-01/containerregistry/registries.go | 5 ++++- .../mgmt/2018-09-01/containerregistry/models.go | 12 +++++++++++- .../mgmt/2018-09-01/containerregistry/registries.go | 5 ++++- .../mgmt/2018-02-01/containerregistry/models.go | 12 +++++++++++- .../mgmt/2018-02-01/containerregistry/registries.go | 5 ++++- 9 files changed, 48 insertions(+), 6 deletions(-) diff --git a/profiles/latest/containerregistry/mgmt/containerregistry/models.go b/profiles/latest/containerregistry/mgmt/containerregistry/models.go index 4c6f504d6f5e..71f018ea5399 100644 --- a/profiles/latest/containerregistry/mgmt/containerregistry/models.go +++ b/profiles/latest/containerregistry/mgmt/containerregistry/models.go @@ -116,6 +116,7 @@ type EventRequestMessage = original.EventRequestMessage type EventResponseMessage = original.EventResponseMessage type ImportImageParameters = original.ImportImageParameters type ImportSource = original.ImportSource +type ImportSourceCredentials = original.ImportSourceCredentials type OperationDefinition = original.OperationDefinition type OperationDisplayDefinition = original.OperationDisplayDefinition type OperationListResult = original.OperationListResult diff --git a/profiles/preview/containerregistry/mgmt/containerregistry/models.go b/profiles/preview/containerregistry/mgmt/containerregistry/models.go index 78b4f5d86eec..19d3a4a40781 100644 --- a/profiles/preview/containerregistry/mgmt/containerregistry/models.go +++ b/profiles/preview/containerregistry/mgmt/containerregistry/models.go @@ -256,6 +256,7 @@ type ImageDescriptor = original.ImageDescriptor type ImageUpdateTrigger = original.ImageUpdateTrigger type ImportImageParameters = original.ImportImageParameters type ImportSource = original.ImportSource +type ImportSourceCredentials = original.ImportSourceCredentials type OperationDefinition = original.OperationDefinition type OperationDisplayDefinition = original.OperationDisplayDefinition type OperationListResult = original.OperationListResult diff --git a/profiles/preview/preview/containerregistry/mgmt/containerregistry/models.go b/profiles/preview/preview/containerregistry/mgmt/containerregistry/models.go index 4ea07de84b49..948052e179bf 100644 --- a/profiles/preview/preview/containerregistry/mgmt/containerregistry/models.go +++ b/profiles/preview/preview/containerregistry/mgmt/containerregistry/models.go @@ -249,6 +249,7 @@ type ImageDescriptor = original.ImageDescriptor type ImageUpdateTrigger = original.ImageUpdateTrigger type ImportImageParameters = original.ImportImageParameters type ImportSource = original.ImportSource +type ImportSourceCredentials = original.ImportSourceCredentials type OperationDefinition = original.OperationDefinition type OperationDisplayDefinition = original.OperationDisplayDefinition type OperationListResult = original.OperationListResult diff --git a/services/containerregistry/mgmt/2017-10-01/containerregistry/models.go b/services/containerregistry/mgmt/2017-10-01/containerregistry/models.go index 19c6fb28d78c..9ff587300985 100644 --- a/services/containerregistry/mgmt/2017-10-01/containerregistry/models.go +++ b/services/containerregistry/mgmt/2017-10-01/containerregistry/models.go @@ -443,8 +443,10 @@ type ImportImageParameters struct { type ImportSource struct { // ResourceID - The resource identifier of the source Azure Container Registry. ResourceID *string `json:"resourceId,omitempty"` - // RegistryURI - The address of the source registry. + // RegistryURI - The address of the source registry (e.g. 'mcr.microsoft.com'). RegistryURI *string `json:"registryUri,omitempty"` + // Credentials - Credentials used when importing from a registry uri. + Credentials *ImportSourceCredentials `json:"credentials,omitempty"` // SourceImage - Repository name of the source image. // Specify an image by repository ('hello-world'). This will use the 'latest' tag. // Specify an image by tag ('hello-world:latest'). @@ -452,6 +454,14 @@ type ImportSource struct { SourceImage *string `json:"sourceImage,omitempty"` } +// ImportSourceCredentials ... +type ImportSourceCredentials struct { + // Username - The username to authenticate with the source registry. + Username *string `json:"username,omitempty"` + // Password - The password used to authenticate with the source registry. + Password *string `json:"password,omitempty"` +} + // OperationDefinition the definition of a container registry operation. type OperationDefinition struct { // Origin - The origin information of the container registry operation. diff --git a/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go b/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go index 4fce43c74d0a..b02ca13b2ea2 100644 --- a/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go +++ b/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go @@ -372,7 +372,10 @@ func (client RegistriesClient) ImportImage(ctx context.Context, resourceGroupNam {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Source", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Source.SourceImage", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.Source.Credentials", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Source.Credentials.Password", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Source.SourceImage", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { return result, validation.NewError("containerregistry.RegistriesClient", "ImportImage", err.Error()) } diff --git a/services/containerregistry/mgmt/2018-09-01/containerregistry/models.go b/services/containerregistry/mgmt/2018-09-01/containerregistry/models.go index 5ecbefe7e5eb..a7756a32e7a0 100644 --- a/services/containerregistry/mgmt/2018-09-01/containerregistry/models.go +++ b/services/containerregistry/mgmt/2018-09-01/containerregistry/models.go @@ -1474,8 +1474,10 @@ type ImportImageParameters struct { type ImportSource struct { // ResourceID - The resource identifier of the source Azure Container Registry. ResourceID *string `json:"resourceId,omitempty"` - // RegistryURI - The address of the source registry. + // RegistryURI - The address of the source registry (e.g. 'mcr.microsoft.com'). RegistryURI *string `json:"registryUri,omitempty"` + // Credentials - Credentials used when importing from a registry uri. + Credentials *ImportSourceCredentials `json:"credentials,omitempty"` // SourceImage - Repository name of the source image. // Specify an image by repository ('hello-world'). This will use the 'latest' tag. // Specify an image by tag ('hello-world:latest'). @@ -1483,6 +1485,14 @@ type ImportSource struct { SourceImage *string `json:"sourceImage,omitempty"` } +// ImportSourceCredentials ... +type ImportSourceCredentials struct { + // Username - The username to authenticate with the source registry. + Username *string `json:"username,omitempty"` + // Password - The password used to authenticate with the source registry. + Password *string `json:"password,omitempty"` +} + // OperationDefinition the definition of a container registry operation. type OperationDefinition struct { // Origin - The origin information of the container registry operation. diff --git a/services/containerregistry/mgmt/2018-09-01/containerregistry/registries.go b/services/containerregistry/mgmt/2018-09-01/containerregistry/registries.go index 8097b11a75bf..a933aabb1897 100644 --- a/services/containerregistry/mgmt/2018-09-01/containerregistry/registries.go +++ b/services/containerregistry/mgmt/2018-09-01/containerregistry/registries.go @@ -447,7 +447,10 @@ func (client RegistriesClient) ImportImage(ctx context.Context, resourceGroupNam {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Source", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Source.SourceImage", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.Source.Credentials", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Source.Credentials.Password", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Source.SourceImage", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { return result, validation.NewError("containerregistry.RegistriesClient", "ImportImage", err.Error()) } diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/models.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/models.go index db1ce2fa926c..968e09a8bbcd 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/models.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/models.go @@ -2109,8 +2109,10 @@ type ImportImageParameters struct { type ImportSource struct { // ResourceID - The resource identifier of the source Azure Container Registry. ResourceID *string `json:"resourceId,omitempty"` - // RegistryURI - The address of the source registry. + // RegistryURI - The address of the source registry (e.g. 'mcr.microsoft.com'). RegistryURI *string `json:"registryUri,omitempty"` + // Credentials - Credentials used when importing from a registry uri. + Credentials *ImportSourceCredentials `json:"credentials,omitempty"` // SourceImage - Repository name of the source image. // Specify an image by repository ('hello-world'). This will use the 'latest' tag. // Specify an image by tag ('hello-world:latest'). @@ -2118,6 +2120,14 @@ type ImportSource struct { SourceImage *string `json:"sourceImage,omitempty"` } +// ImportSourceCredentials ... +type ImportSourceCredentials struct { + // Username - The username to authenticate with the source registry. + Username *string `json:"username,omitempty"` + // Password - The password used to authenticate with the source registry. + Password *string `json:"password,omitempty"` +} + // OperationDefinition the definition of a container registry operation. type OperationDefinition struct { // Origin - The origin information of the container registry operation. diff --git a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go index 60dea4f8b109..1f42871ecc85 100644 --- a/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go +++ b/services/preview/containerregistry/mgmt/2018-02-01/containerregistry/registries.go @@ -447,7 +447,10 @@ func (client RegistriesClient) ImportImage(ctx context.Context, resourceGroupNam {Target: "registryName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9]*$`, Chain: nil}}}, {TargetValue: parameters, Constraints: []validation.Constraint{{Target: "parameters.Source", Name: validation.Null, Rule: true, - Chain: []validation.Constraint{{Target: "parameters.Source.SourceImage", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil { + Chain: []validation.Constraint{{Target: "parameters.Source.Credentials", Name: validation.Null, Rule: false, + Chain: []validation.Constraint{{Target: "parameters.Source.Credentials.Password", Name: validation.Null, Rule: true, Chain: nil}}}, + {Target: "parameters.Source.SourceImage", Name: validation.Null, Rule: true, Chain: nil}, + }}}}}); err != nil { return result, validation.NewError("containerregistry.RegistriesClient", "ImportImage", err.Error()) }