Skip to content

Commit b7dc131

Browse files
committed
Add documentation about image in compute doc
1 parent 06bdeb2 commit b7dc131

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

lib/fog/azurerm/docs/compute.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,5 +501,47 @@ Destroy the given extension from the virtual machine
501501
vm_extension.destroy
502502
```
503503

504+
## Create Image
505+
506+
Create a new Image from a Virtual Machine
507+
508+
```ruby
509+
fog_compute_service.images.create(
510+
name: '<Image Name>',
511+
location: '<Location>',
512+
resource_group_name: '<Resource Group Name>',
513+
source_server_id: '<Virtual Machine Id>'
514+
)
515+
```
516+
517+
Create a new Image from a Managed Disk
518+
519+
```ruby
520+
fog_compute_service.images.create(
521+
name: '<Image Name>',
522+
location: '<Location>',
523+
resource_group_name: '<Resource Group Name>',
524+
managed_disk_id: '<Managed Disk Id>',
525+
os_disk_type: '<Plateform>'
526+
)
527+
```
528+
529+
## Get Image
530+
531+
Retrieves the given image
532+
533+
```ruby
534+
image = fog_compute_service.images.get('<Resource Group Name>', '<Image Name>')
535+
```
536+
537+
## Destroy Image
538+
539+
Destroy the given image
540+
541+
```ruby
542+
image = fog_compute_service.images.get('<Resource Group Name>', '<Image Name>')
543+
image.destroy
544+
```
545+
504546
## Support and Feedback
505547
Your feedback is appreciated! If you have specific issues with the fog ARM, you should file an issue via Github.

0 commit comments

Comments
 (0)