Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex.Cloud API concepts
  • Basic principles
  • Resources
    • Resource identification
    • Standard fields
  • API methods
    • Overview
    • API endpoints
    • Standard methods
    • Additional methods
    • Pagination
    • Handling errors
  • Working with operations
    • Overview
    • Asynchronous operations
    • Operation object
    • Idempotence
  1. API methods
  2. Additional methods

Additional methods

    Additional API methods allow you to perform operations that cannot be performed using standard methods. For example, start or stop a VM.

    Each service has its own set of additional methods available. The methods are listed in the corresponding API references.

    Note

    The gRPC API references are under development.

    The POST HTTP method is mapped to additional methods. The signature of additional methods differs from the standard signature of HTTP methods. The name of an additional method is specified in the resource URL after a colon (:).

    Sample gRPC description of the AttachDisk method:

     rpc AttachDisk (AttachInstanceDiskRequest) returns (operation.Operation) {
       option (google.api.http) = {
         post: "/compute/v1/instances/{instance_id}:attachDisk" body: "*"
       };
       // In the `metadata` field of the Operation object
       // there is an `AttachInstanceDiskMetadata` view.
       // If the operation is successful,
       // the `response` field of the Operation object
       // contains a view of the updated VM.
       option (yandex.api.operation) = {
         metadata: "AttachInstanceDiskMetadata"
         response: "Instance"
       };
     }
     message AttachInstanceDiskRequest {
       // ID of the VM to which
       // the disk should be attached.
       string instance_id = 1;
    
       // Attached disk.
       AttachedDiskSpec attached_disk_spec = 2;
     }
    
     message AttachInstanceDiskMetadata {
       // ID of the VM
       // the disk is attached to.
       string instance_id = 1;
    
       // ID of the attached disk.
       string disk_id = 2;
     }
    

    Example of attaching a disk in the REST API:

    POST https://compute.api.cloud.yandex.net/compute/v1/instances/e0m97h0gbq0foeuis03:attachDisk
    
     {
       "attachedDiskSpec": {
         ...
       }
     }
    
    Language / Region
    Careers
    Privacy policy
    Terms of use
    Brandbook
    © 2021 Yandex.Cloud LLC