Giter Club home page Giter Club logo

azure-armrest's Introduction

Description

Join the chat at https://gitter.im/ManageIQ/azure-armrest

A Ruby interface for Azure using the new REST API.

Gem Version Build Status Code Climate Test Coverage Dependency Status Security

Synopsis

require 'azure/armrest'

# Create a configuration object. All service objects will then use the
# information you set here.
#
# A token will be retrieved based on the information you provided

conf = Azure::Armrest::Configuration.new(
  :client_id       => 'XXXXX',
  :client_key      => 'YYYYY',
  :tenant_id       => 'ZZZZZ',
  :subscription_id => 'ABCDEFG'
)

# This will then use the configuration info set above.
vms = Azure::Armrest::VirtualMachineService.new(conf)

# You can add other options specific to the service to be created,
# such as the provider.

options = {:provider => 'Microsoft.ClassicCompute'}
vms = Azure::Armrest::VirtualMachineService.new(conf, options)

# List all virtual machines for a given resource group:
vms.list(some_group).each do |vm|
  puts vm.name
  puts vm.resource_group
  puts vm.location
  puts vm.properties.hardware_profile.vm_size
end

Subscriptions

As of version 0.4.0 you a subscription ID is not longer strictly necessary in the Configuration constructor, but almost all service classes require it in their own constructor. Only the SubscriptionService class does not.

In version 0.3.x the subscription ID was mandatory. Prior to 0.3.x, if you did not provide a subscription ID in your configuration object, then the first subscription ID returned from a REST call would be used.

Notes

Currently only the client credentials strategy is supported. Support for other strategies may be added over time.

License

The gem is available as open source under the terms of the Apache License 2.0.

Authors

  • Daniel Berger
  • Bronagh Sorota
  • Bill Wei

azure-armrest's People

Contributors

01100010011001010110010101110000 avatar bdunne avatar blomquisg avatar bzwei avatar chessbyte avatar djberg96 avatar fryguy avatar gitter-badger avatar jerryk55 avatar jrafanie avatar nicklamuro avatar robbmanes avatar roliveri avatar sutrix-tai-nguyen avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.