jjzjj

azure-virtual-machine

全部标签

azure - 如何从应用程序(客户端)ID 和目录(租户)ID 获取对象 ID?

使用azuregosdk,是否可以使用Application(client)ID、Directory(tenant)ID和有效的Clientsecret获取AzureActiveDirectory应用程序的ObjectID?怎么办?这是Azure门户的屏幕截图,可帮助阐明这三个字段。我尝试使用以下functionfromgraphrbac,但*result.Value与上面屏幕截图中的ObjectID不匹配。func(clientApplicationsClient)GetServicePrincipalsIDByAppID(ctxcontext.Context,application

Azure Monitor 事件日志未到达事件中心

我已经创建了一个免费套餐Azure帐户。我的AzureMonitor事件日志中有事件(获取命名空间列表键等),单击这些事件可以查看它们的JSON。我选择了“导出到事件中心”,选择了“所有区域”,选中了“导出到事件中心”并设置了命名空间和策略名称。该策略是根共享策略,已选中管理、发送、监听。这会自动创建“insights-operational-logs”事件中心。我正在使用azuregolang客户端(https://github.com/Azure/azure-event-hubs-go)查询此事件中心,但我没有在客户端中看到ActivityLog事件。我确实收到了类别为“操作”和“

戈朗 : How to find disk attached to a virtual machine using govmomi?

我想使用govmomi查找附加到虚拟机的vmdk文件。我可以找到它管理的对象存储,但无法以编程方式这样做。 最佳答案 假设你有vm的托管对象vmMovmdks:=[]string{}for_,device:=rangevmMo.Config.Hardware.Device{switchdisk:=device.(type){case*types.VirtualDisk:fileName:=disk.GetVirtualDevice().Backing.(types.BaseVirtualDeviceFileBackingInfo).

azure - 去 + azure : Calling a method return undefined

我正在尝试使用GoAzureSDK调用通知中心api我已经安装了SDK并导入到GO文件中:packagehubimport("fmt""github.com/Azure/azure-sdk-for-go/arm/notificationhubs")funcGetHub(){ifresourceType,err:=notificationhubs.Get("sourceGroupName","NameSpaceValue","NameOfTheHub");err!=nil{fmt.Println("Erroroccured")return}fmt.Println("Success")}然

docker - 无法从docker-machine(Virtual Box)上的docker图像运行Go(lang)应用程序

我有一个非常简单的应用程序。这是代码:packagemainimport("fmt""math/rand""time""net/http""encoding/base64""encoding/json")typeMessagestruct{Textstring`json:"text"`}varcookieQuotes=[]string{//Skippedallthestuff}constCOOKIE_NAME="your_cookie"funcmain(){http.HandleFunc("/set_cookie",setCookie)http.HandleFunc("/get_coo

go - 如何通过 AMQP 1.0 在 Azure Event Hub 中批量接收多条消息

我使用QpidProton的ApacheQpidElectronGo包装器设置了一个仅包含路径和过滤器的AMQP1.0链接,如下所示:amqpConnection.Receiver(//thepathcontainingtheconsumergroup//andthepartitionIdelectron.Source(""),//thefiltermapcontainssomeannotationsfilters//fortheEventHuboffsetelectron.Filter(filterMap),)我按照此文档设置了AMQP链接选项:https://godoc.org/q

azure - 在 Azure 存储元数据中使用国际字符?

当我使用thisazurelibrary运行此请求时:blobURL.PutBlob(ctx,strings.NewReader("Sometext"),azblob.BlobHTTPHeaders{},azblob.Metadata{"Foo":"/爱知県/bar"},azblob.BlobAccessConditions{})我收到这个错误:=====RESPONSEERROR(ServiceCode=AuthenticationFailed)=====Description=Serverfailedtoauthenticatetherequest.Makesurethevalue

azure - 更新 azure-sdk-for-go 库依赖项

执行此任务的最佳做法是什么?到目前为止我尝试过的,只需运行命令depensure-updategithub.com/Azure/azure-sdk-for-go引发了以下错误:Warning:thefollowingproject(s)have[[constraint]]stanzasinGopkg.toml:✗github.com/gravitational/trace.....depensure给我与dep-update命令类似的错误。depcheck给出以下输出:#Gopkg.lockisoutofsync:github.com/Azure/azure-sdk-for-go/ar

azure - 从服务总线队列检索消息时出错

我尝试使用Go从Azure服务总线队列中提取消息,但在运行代码时出现错误。这是我的代码。funcExample_queue_receive(){ctx,cancel:=context.WithTimeout(context.Background(),10*time.Second)defercancel()connectionString:="Endpoint=sb://{my_service_name}.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey={my_sh

azure - 如何从 Azure Web App 上的 go app 跟踪日志

我正在尝试找到如何让我的go应用程序中的fmt.Printf或log.Printf像我们能够为.NET或Node应用程序添加到应用程序日志。基于此article(archivelink)通过从门户启用应用程序日志记录,应该记录所有标准输出。但由于某些原因,我的日志输出在使用azureCLI或下载日志时都没有打印出来。diagnostics.zip的LogFiles目录中没有Application目录。azuresitelogtailsitename或azuresitelogdownloadsitename在Node中,我使用IISNode.yml文件告诉我将console.log记录到