Skip to content

Commit 5bc44e4

Browse files
authored
Merge pull request Azure#10594 from kawayiboy/telu/rmsubd
[IotCentral] Remove subdomain check for idempotent
2 parents c9cbaee + 706e05e commit 5bc44e4

File tree

3 files changed

+1
-25
lines changed

3 files changed

+1
-25
lines changed

src/IotCentral/IotCentral/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Remove subdomain and resource name checks for create new IotCentral application, it will be handled by resource provider for idempotent
2122

2223
## Version 0.7.1
2324
* Added subdomain parameter to Set-AzureRmIoTCentralApp for updating subdomain

src/IotCentral/IotCentral/Common/IotCentralUtils.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,5 @@ public static AppPatch CreateAppPatch(App iotCentralApp)
4343
};
4444
return copiedIotCenralApp;
4545
}
46-
47-
public static void EnsureAvailabilityOrThrow(AppAvailabilityInfo availabilityInfo)
48-
{
49-
if (availabilityInfo.NameAvailable != true)
50-
{
51-
throw new PSArgumentException(availabilityInfo.Message);
52-
}
53-
}
5446
}
5547
}

src/IotCentral/IotCentral/IotCentral/NewAzureRmIotCentralApp.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ public override void ExecuteCmdlet()
8484
{
8585
if (ShouldProcess(Name, ResourceProperties.Resources.NewIotCentralApp))
8686
{
87-
this.EnsureNameAvailabilityOrThrow();
88-
this.EnsureSubdomainAvailabilityOrThrow();
89-
9087
var iotCentralApp = new App()
9188
{
9289
DisplayName = this.GetDisplayName(),
@@ -104,20 +101,6 @@ public override void ExecuteCmdlet()
104101

105102
}
106103

107-
private void EnsureNameAvailabilityOrThrow()
108-
{
109-
var checkNameInputs = new OperationInputs(this.Name, resourceType);
110-
var nameAvailabilityInfo = this.IotCentralClient.Apps.CheckNameAvailability(checkNameInputs);
111-
IotCentralUtils.EnsureAvailabilityOrThrow(nameAvailabilityInfo);
112-
}
113-
114-
private void EnsureSubdomainAvailabilityOrThrow()
115-
{
116-
var checkSubdomainInputs = new OperationInputs(this.Subdomain, resourceType);
117-
var subdomainAvailabilityInfo = this.IotCentralClient.Apps.CheckSubdomainAvailability(checkSubdomainInputs);
118-
IotCentralUtils.EnsureAvailabilityOrThrow(subdomainAvailabilityInfo);
119-
}
120-
121104
private IDictionary<string, string> GetTags()
122105
{
123106
if (this.Tag != null)

0 commit comments

Comments
 (0)