arm

package
v0.0.0-...-cf46bd9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package arm is designed to provide examples of the Azure/azure-sdk-for go "track 2" packages.

This begins with azidentity, azcore and armresources, and will be expanded to cover others soon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListResources

func ListResources(subscriptionID string) error

ListResources lists all the resources in the subscription and prints them to the standard output in JSON format.

func ListResourcesWithPolicy

func ListResourcesWithPolicy(subscriptionID string) error

ListResourcesWithPolicy lists all the resources in a subscription and prints them to the standard output in JSON format. It also demonstrates how to use a custom policy, MyPolicy, which logs data to standard error.

Types

type MyPolicy

type MyPolicy struct {
	LogPrefix string
}

MyPolicy is an example of a custom policy that logs the request URL and duration with an optional LogPrefix. This is an example only and not designed to be used in a production scenario as-is.

func (*MyPolicy) Do

func (m *MyPolicy) Do(req *policy.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL