Merge pull request #10594 from kawayiboy/telu/rmsubd
[IotCentral] Remove subdomain check for idempotent
This commit is contained in:
Коммит
5bc44e4bed
|
@ -18,6 +18,7 @@
|
|||
- Additional information about change #1
|
||||
-->
|
||||
## Upcoming Release
|
||||
* Remove subdomain and resource name checks for create new IotCentral application, it will be handled by resource provider for idempotent
|
||||
|
||||
## Version 0.7.1
|
||||
* Added subdomain parameter to Set-AzureRmIoTCentralApp for updating subdomain
|
||||
|
|
|
@ -43,13 +43,5 @@ namespace Microsoft.Azure.Commands.IotCentral.Common
|
|||
};
|
||||
return copiedIotCenralApp;
|
||||
}
|
||||
|
||||
public static void EnsureAvailabilityOrThrow(AppAvailabilityInfo availabilityInfo)
|
||||
{
|
||||
if (availabilityInfo.NameAvailable != true)
|
||||
{
|
||||
throw new PSArgumentException(availabilityInfo.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -84,9 +84,6 @@ namespace Microsoft.Azure.Commands.Management.IotCentral
|
|||
{
|
||||
if (ShouldProcess(Name, ResourceProperties.Resources.NewIotCentralApp))
|
||||
{
|
||||
this.EnsureNameAvailabilityOrThrow();
|
||||
this.EnsureSubdomainAvailabilityOrThrow();
|
||||
|
||||
var iotCentralApp = new App()
|
||||
{
|
||||
DisplayName = this.GetDisplayName(),
|
||||
|
@ -104,20 +101,6 @@ namespace Microsoft.Azure.Commands.Management.IotCentral
|
|||
|
||||
}
|
||||
|
||||
private void EnsureNameAvailabilityOrThrow()
|
||||
{
|
||||
var checkNameInputs = new OperationInputs(this.Name, resourceType);
|
||||
var nameAvailabilityInfo = this.IotCentralClient.Apps.CheckNameAvailability(checkNameInputs);
|
||||
IotCentralUtils.EnsureAvailabilityOrThrow(nameAvailabilityInfo);
|
||||
}
|
||||
|
||||
private void EnsureSubdomainAvailabilityOrThrow()
|
||||
{
|
||||
var checkSubdomainInputs = new OperationInputs(this.Subdomain, resourceType);
|
||||
var subdomainAvailabilityInfo = this.IotCentralClient.Apps.CheckSubdomainAvailability(checkSubdomainInputs);
|
||||
IotCentralUtils.EnsureAvailabilityOrThrow(subdomainAvailabilityInfo);
|
||||
}
|
||||
|
||||
private IDictionary<string, string> GetTags()
|
||||
{
|
||||
if (this.Tag != null)
|
||||
|
|
Загрузка…
Ссылка в новой задаче