Azure:MissingRegistrationForLocation:未在位置“YYYY”中为资源类型“XXXX”注册订阅 [英] Azure: MissingRegistrationForLocation: The subscription is not registered for the resource type 'XXXX' in the location 'YYYY'
问题描述
这开始了作为一个 SubscriptionNotFound 错误。
VAR dnsClient =新DnsManagementClient(新Microsoft.Azure.TokenCloudCredentials(result.AccessToken));
变种区= dnsClient.Zones.CreateOrUpdate(someresourcegroup,mydomain.com,新Microsoft.Azure.Management.Dns.Models.ZoneCreateOrUpdateParameters {
IfNoneMatch =*,
区=新Microsoft.Azure.Management.Dns.Models.Zone {
NAME =mydomain.com,
位置=northeurope
}
} );
现在我已经固定的,由于原始问题的答复。它仍然是相同的代码,我也重新注册该功能/提供商与后续的PowerShell命令:
注册-AzurermresourceProvider -ProviderNamespace Microsoft.Network
但是,这并不需要一个位置参数,并且错误是关于资源中的一个位置。是什么赋予了?
和我与北欧,而不是northeurope,同样的结果尝试了。
所以我缺少什么? 。似乎无法找到任何关于此问题的数据,而不是这里,而不是在谷歌
完整的错误信息是:
MissingRegistrationForLocation:订阅未注册的资源类型dnszones中的位置northeurope。请重新注册此提供程序,以便能够访问这个位置。
块引用>
解决方案天青DNS是一个全球性的服务。请试着从
northeurope
更改位置全球
。这应该修正这个错误。VAR区= dnsClient.Zones.CreateOrUpdate(someresourcegroup,mydomain.com,新Microsoft.Azure.Management.Dns.Models.ZoneCreateOrUpdateParameters {
IfNoneMatch =*,
区=新Microsoft.Azure.Management.Dns.Models.Zone {
NAME =MYDOMAIN。 COM,
位置=全局
}
});
This started out as a SubscriptionNotFound error.
var dnsClient = new DnsManagementClient(new Microsoft.Azure.TokenCloudCredentials(result.AccessToken)); var zone = dnsClient.Zones.CreateOrUpdate("someresourcegroup", "mydomain.com", new Microsoft.Azure.Management.Dns.Models.ZoneCreateOrUpdateParameters { IfNoneMatch = "*", Zone = new Microsoft.Azure.Management.Dns.Models.Zone { Name = "mydomain.com", Location = "northeurope" } });
Now I've fixed that, thanks to the reply on the original question. It's still the same code, and I have re-registered for the feature/provider with the follow powershell command:
Register-AzurermresourceProvider -ProviderNamespace Microsoft.Network
But that doesn't take an location parameter, and the error is about a resource in a location. What gives? And I have tried with "North Europe" instead of "northeurope", same result.
So what am I missing? Can't seem to find any data on this issue, not here and not on Google.
The complete error message is:
MissingRegistrationForLocation: The subscription is not registered for the resource type 'dnszones' in the location 'northeurope'. Please re-register for this provider in order to have access to this location.
解决方案Azure DNS is a global service. Please try changing your location from
northeurope
toglobal
. That should fix the error.var zone = dnsClient.Zones.CreateOrUpdate("someresourcegroup", "mydomain.com", new Microsoft.Azure.Management.Dns.Models.ZoneCreateOrUpdateParameters { IfNoneMatch = "*", Zone = new Microsoft.Azure.Management.Dns.Models.Zone { Name = "mydomain.com", Location = "global" } });
这篇关于Azure:MissingRegistrationForLocation:未在位置“YYYY”中为资源类型“XXXX”注册订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!