Microsoft Azure SDK for Go

Azure SDK for Go

godoc Build Status

This repository is for active development of the Azure SDK for Go. For consumers of the SDK you can follow the links below to visit the documentation you are interested in

Getting Started

To get started with a library, see the README.md file located in the library's project folder. You can find these library folders grouped by service in the /sdk directory.

Packages available

Each service might have a number of libraries available from each of the following categories:

Client: New Releases

We have a new wave of packages that are being announced as stable and several that are currently released in beta. These libraries allow you to use, consume, and interact with existing resources, for example, uploading a blob. These libraries share a number of core functionalities including retries, logging, transport protocols, authentication protocols, etc. that can be found in the azcore library. You can learn more about these libraries by reading about the Azure SDK Go guidelines.

You can find the most up-to-date list of new packages on our latest page. These new libraries can be identified by locating them under the sdk directory in the repository.

NOTE: If you need to ensure your code is ready for production use one of the stable, non-beta libraries.

Client: Previous Versions

The last stable versions of packages that have been provided for usage with Azure are production-ready. These libraries might not implement the Azure Go SDK guidelines or have the same feature set as the New releases, however they do offer a wider coverage of services.

Previous Go SDK packages are located under /services folder, and you can see the full list on this page.

Management: New Releases

A new set of management libraries that follow the Azure SDK Design Guidelines for Go are available at sdk/resourcemanagement. These new libraries provide a number of core capabilities that are shared amongst all Azure SDKs, including the intuitive Azure Identity library, an HTTP Pipeline with custom policies, error-handling, distributed tracing, and much more.

To get started, please follow the quickstart guide here. To see the benefits of migrating and how to migrate to the new libraries, please visit the migration guide.

You can find the most up to date list of all of the new packages on our page

NOTE: If you need to ensure your code is ready for production use one of the stable, non-beta libraries. Also, if you are experiencing authentication issues with the management libraries after upgrading certain packages, it's possible that you upgraded to the new versions of SDK without changing the authentication code. Please refer to the migration guide for proper instructions.

Management: Previous Versions

For a complete list of management libraries which enable you to provision and manage Azure resources, please check here. They might not have the same feature set as the new releases but they do offer wider coverage of services.

Previous packages are located under /services folder, and you can see the full list on this page.

Other Azure Go Packages

Azure provides several other packages for using services from Go, listed below. These packages do NOT follow the New Release guidelines.

Service Import Path/Repo
Storage - Blobs github.com/Azure/azure-storage-blob-go
Storage - Files github.com/Azure/azure-storage-file-go
Storage - Queues github.com/Azure/azure-storage-queue-go
Event Hubs github.com/Azure/azure-event-hubs-go
Application Insights github.com/Microsoft/ApplicationInsights-go

Samples

More code samples for using the management library for Go SDK can be found in the following locations

Reporting security issues and security bugs

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) [email protected]. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

Need help?

Community

Contribute

See CONTRIBUTING.md.

Owner
Microsoft Azure
APIs, SDKs and open source projects from Microsoft Azure
Microsoft Azure
Comments
  • [Recovery Services] Vague error messages when updating a policy

    [Recovery Services] Vague error messages when updating a policy

    Bug Report

    • import path of package in question, e.g. .../services/compute/mgmt/2018-06-01/compute "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/backup"

    • SDK version e.g. master, latest, 18.1.0

    {
    			"checksumSHA1": "XiQW2U5GBOhOfPTwFlFeM2thDCs=",
    			"path": "github.com/Azure/azure-sdk-for-go/services/recoveryservices/mgmt/2016-06-01/backup",
    			"revision": "2935c0241c74bd8549b843978dd6fc1be6f48b4a",
    			"revisionTime": "2018-08-31T14:25:13Z",
    			"version": "=v20.1.0",
    			"versionExact": "v20.1.0"
    		},
    
    • output of go version go version go1.10.3 darwin/amd64
    • What happened? I am trying to update a recovery service policy retention days via this new terraform resource. Creating the policy works just fine for all configurations, however updating from daily -> weekly, or changing the retention days for monthly or yearly gives a vague error:
    * azurerm_recovery_services_protection_policy_vm.test: Error creating/updating Recovery Service Protection Policy "acctest-7026298197833106544" (Resource Group "acctestRG-7026298197833106544"): backup.ProtectionPoliciesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BMSUserErrorInvalidPolicyInput" Message="Input for create or update policy is not in proper format\r\nPlease check format of parameters like schedule time, schedule days, retention time and retention days "
    

    The error message does not help, and I cannot see why this would create just fine, yet fail to update. Other values will update just fine.

    • What did you expect or want to happen? the policy be updated or a more detailed error message describing what is actually wrong.

    • How can we reproduce it? run the updateDailyToWeekly test in that PR.

    • Anything we should know about your environment.

  • Stateful Client

    Stateful Client

    Further to the discussion #27 this pull request converts the Azure SDK to having a stateful client, allowing multiple subscriptions to be operated on in one process. It also makes the package name compliant with the go standards (removing the need to alias it) and flattens the hierarchy of packages from one-per-client down to just one.

    Given the size of this refactor I fully expect there to be discussion etc around whether this will be accepted into this project or whether the API changes are too vast and it needs to become something different. As far as I can tell the tests all pass, though ultimately Travis will be the arbiter of that!

  • [azservicebus] Use the DefaultAzureCredential.

    [azservicebus] Use the DefaultAzureCredential.

    Make it so we don't need to create and destroy SPs for local dev box testing and it'll work just fine in CI since the environment credential is included.

  • SDK Has redis functionality but there are no docs to support it

    SDK Has redis functionality but there are no docs to support it

    This SDK has Redis functionality - but the docs are no where to be found on the MSDN documentation site

    https://msdn.microsoft.com/en-us/library/mt420159.aspx

    Paul

  • Add support for parameterized SQL queries for CosmosDB

    Add support for parameterized SQL queries for CosmosDB

  • feature req: Auto-generate interface and fake implementation

    feature req: Auto-generate interface and fake implementation

    I've observed two things regarding usages of the azure-sdk-for-go:

    1. Creation of an interface that covers the surface of the various clients exposed. (For testing/mocking purposes)
    2. Implementation of a faked out implementation of those interfaces.

    I'm wondering if those could be auto-generated for the user?

    (If someone can send me a DL for the SDK team I can forward an internal link to a PR that demonstrates the couple of things that could potentially be auto-generated)

  • Refactor all slices to no longer use a pointer...

    Refactor all slices to no longer use a pointer...

    I've tested with this quite a lot to be sure everything still works as expected and I can confirm it does (added and removed multiple VM's, VNET's, subnets, endpoints and NSGs).

    Next to it seeming a bit odd (unless very specific reason to do so) to have a pointer to a referenced type, removing the pointers for slices makes working with the package a lot nicer and more intuitive.

  • [azservicebus] Final API changes for beta.3

    [azservicebus] Final API changes for beta.3

    Lots of renames and changes based on the API reviews:

    Admin API:

    • All Response structs have been broken down into Response+Result
    • QueueName, TopicName, SubscriptionName are no longer present in the Properties structs as that doesn't reflect the API itself.
    • Exists functions have been removed
    • Missing fields have been added (UserMetadata, etc..)

    Sender and Receiver API:

    • SendMessages removed in favor of making SendMessageBatch more intuitive (by simplfying the .AddMessage API)
    • Several renames suggested in review
    • ReceiveMessages has been tuned to match the .NET limits (which has worked well in practice). This is partly addressing #15963, as our default limit was far higher than needed.

    Missing:

    • AuthorizationRules, SubscriptionRules (coming in a future PR but requires a bit more thought)
  • appinsights: support API version

    appinsights: support API version "2020-02-02-preview"

    Feature Request

    Please support API version "2020-02-02-preview" for Application Insights. There's a major new feature supported in this version, the workspace-based Application Insights resource. It allows integrating AI into a Log Analytics workspace, meaning that the Log Analytics workspace is the data back end for Application Insights. I noticed the lack of this feature as I started implementing support for this feature in Terraform.

    Thanks and kind regards.

  • [azservicebus] amqp-common's link.RetryableRPC() retries an entity does not exist

    [azservicebus] amqp-common's link.RetryableRPC() retries an entity does not exist

    This can lead to a series of retries that will not work. It'd be nice to be able to pass in an error handling strategy per RPC call so we can provide better error handling when we know what the context of the call is and just fail early.

    The underlying error is:

    Code: 404 Description: "The messaging entity 'sb://.servicebus.windows.net/samples' could not be found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:888b355f-038e-42e1-ab5d-cf1d0bfa20d1_G53, SystemTracker:riparkdev2.servicebus.windows.net:samples, Timestamp:2021-11-04T17:42:29"

  • PodCidr is required even if

    PodCidr is required even if "azure" networkPlugin is specified in kubernetesClustersClient.CreateOrUpdate method

    NetworkProfile.PodCidr is required even if "azure" network is specified in the NetworkProfile.NetworkPlugin field. As far as I know this is only a mandatory field when kubenet is used.

  • [azeventhubs] Prefetch can't be configured with the Processor

    [azeventhubs] Prefetch can't be configured with the Processor

    We allow configuring Prefetch for PartitionClient instances created from ConsumerClient. We should add this option to the Processor as well since it creates PartitionClient instances on the user's behalf.

  • Cosmos DB - Add support for querying databases and containers

    Cosmos DB - Add support for querying databases and containers

    This PR adds support to list/query databases within an account and containers within a database, including support for parametrized querying:

    queryPager := client.NewQueryDatabasesPager("select * from dbs d", nil)
    
    opt := &azcosmos.QueryDatabasesOptions{
    		QueryParameters: []azcosmos.QueryParameter{
    			{"@id", "the_id"},
    		},
    	}
    
    queryPager := client.NewQueryDatabasesPager("select * from dbs d where d.id = @id", opt)
    
    queryPager := database.NewQueryContainersPager("select * from colls c", nil)
    
    opt := &azcosmos.QueryContainersOptions{
    		QueryParameters: []azcosmos.QueryParameter{
    			{"@id", "the_id"},
    		},
    	}
    
    queryPager := database.NewQueryContainersPager("select * from colls c where c.id = @id", opt)
    

    APIView

    https://apiview.dev/Assemblies/Review/b128254cd7ac437390ea6c0c6ef4a5de/7294484ab73e4677bc962c0137b42104?diffRevisionId=1f3ba5313df24d4c9800d33af3254c9c&doc=False&diffOnly=True

    • [x] The purpose of this PR is explained in this or a referenced issue.
    • [x] The PR does not update generated files.
    • [x] Tests are included and/or updated for code changes.
    • [x] Updates to [CHANGELOG.md][] are included.
    • [x] MIT license headers are included in each file.

    Closes https://github.com/Azure/azure-sdk-for-go/issues/19749

  • Support of Azure workload identity?

    Support of Azure workload identity?

    Hello @gracewilcox,

    Happy new year. Hope you are doing well.

    Does this azure golang sdk support azure workload identity. We are planning to migrate from AAD pod identity to Azure workload identity in Azure kubernetes.

    Any updates on this integration?

    Thank you. Have a nice day.

    Kind Regards, Tanul

Microsoft Graph SDK for Go

Microsoft Graph SDK for Go Get started with the Microsoft Graph SDK for Go by integrating the Microsoft Graph API into your Go application! Note: this

Jan 8, 2023
A go sdk for baidu netdisk open platform 百度网盘开放平台 Go SDK

Pan Go Sdk 该代码库为百度网盘开放平台Go语言的SDK

Nov 22, 2022
Nextengine-sdk-go: the NextEngine SDK for the Go programming language

NextEngine SDK for Go nextengine-sdk-go is the NextEngine SDK for the Go programming language. Getting Started Install go get github.com/takaaki-s/nex

Dec 7, 2021
Commercetools-go-sdk is fork of original commercetools-go-sdk

commercetools-go-sdk The Commercetools Go SDK is automatically generated based on the official API specifications of Commercetools. It should therefor

Dec 13, 2021
Sdk-go - Go version of the Synapse SDK

synapsesdk-go Synapse Protocol's Go SDK. Currently in super duper alpha, do not

Jan 7, 2022
Redash-go-sdk - An SDK for the programmatic management of Redash, in Go
Redash-go-sdk - An SDK for the programmatic management of Redash, in Go

Redash Go SDK An SDK for the programmatic management of Redash. The main compone

Dec 13, 2022
Azure Data Lake Storage Account Share 9p File System

dlfs Azure storage account (data lake) v2 as a 9p file system. Fork of abfs. Written in Go. Created during the 2021 MS hackathon. Build Currently the

Oct 15, 2021
Program to fetch public IP ranges of AWS, Azure and Google

cloudip This program will retrieve a list of all public IP address ranges (v4 or v6) for the three major cloud vendors: Amazon AWS, Microsoft Azure an

Aug 21, 2022
Nov 28, 2022
Fluent JavaScript API for SharePoint and Microsoft Graph REST APIs
Fluent JavaScript API for SharePoint and Microsoft Graph REST APIs

PnPjs is a fluent JavaScript API for consuming SharePoint and Microsoft Graph REST APIs in a type-safe way. You can use it with SharePoint Framework,

Dec 23, 2022
AWS SDK for the Go programming language.

AWS SDK for Go aws-sdk-go is the official AWS SDK for the Go programming language. Checkout our release notes for information about the latest bug fix

Dec 31, 2022
A Facebook Graph API SDK For Go.

A Facebook Graph API SDK In Golang This is a Go package that fully supports the Facebook Graph API with file upload, batch request and marketing API.

Dec 12, 2022
A Golang SDK for Medium's OAuth2 API

Medium SDK for Go This repository contains the open source SDK for integrating Medium's OAuth2 API into your Go app. Install go get github.com/Medium/

Nov 28, 2022
MinIO Client SDK for Go

MinIO Go Client SDK for Amazon S3 Compatible Cloud Storage The MinIO Go Client SDK provides simple APIs to access any Amazon S3 compatible object stor

Dec 29, 2022
Simple no frills AWS S3 Golang Library using REST with V4 Signing (without AWS Go SDK)

simples3 : Simple no frills AWS S3 Library using REST with V4 Signing Overview SimpleS3 is a golang library for uploading and deleting objects on S3 b

Nov 4, 2022
Twilight is an unofficial Golang SDK for Twilio APIs
Twilight is an unofficial Golang SDK for Twilio APIs

Twilight is an unofficial Golang SDK for Twilio APIs. Twilight was born as a result of my inability to spell Twilio correctly. I searched for a Twillio Golang client library and couldn’t find any, I decided to build one. Halfway through building this, I realized I had spelled Twilio as Twillio when searching for a client library on Github.

Jul 2, 2021
Wechat Pay SDK(V3) Write by Go.

WechatPay GO(v3) Introduction Wechat Pay SDK(V3) Write by Go. API V3 of Office document is here. Features Signature/Verify messages Encrypt/Decrypt ce

May 23, 2022
Go Wechaty is a Conversational SDK for Chatbot Makers Written in Go
Go Wechaty is a Conversational SDK for Chatbot Makers Written in Go

go-wechaty Connecting Chatbots Wechaty is a RPA SDK for Wechat Individual Account that can help you create a chatbot in 6 lines of Go. Voice of the De

Dec 30, 2022
An easy-to-use unofficial SDK for Feishu and Lark Open Platform

go-lark go-lark is an easy-to-use unofficial SDK for Feishu and Lark Open Platform. go-lark implements messaging APIs, with full-fledged supports on b

Jan 2, 2023