Skip to main content

Attach Security Group

POST/api/v1/security_group/{vm_id}/attach/

Path parameters

  • vm_idPathstringrequired

    Path parameter vm_id.

Query parameters

  • project_idQuerystringoptional

    Identifier of the project to scope the request to. Optional; if omitted, the account's default project is used.

    • optional
    • if omitted, the request is applied to the default project
    example{{project_id}}
  • apikeyQuerystringoptional

    API key used for authentication

    • required
    • non-empty string
    example{{api_key}}
  • locationQuerystringoptional

    Specifies the target location for attaching the security group.

    • must be a non-empty string
    • should be a valid region identifier (e.g., us-east-1)
    example{{location}}

Request body

application/json

string

JSON string specifying security group IDs to attach

example{ "security_group_ids": [ {{security_group_id}} ] }
  • must be valid JSON
  • must contain a "security_group_ids" array
  • each ID should be a non-empty string

Responses

200Successful response
object
codeinteger

HTTP status code indicating the result of the attach operation

example200
  • must be a valid HTTP status code
  • typically 200 for success
dataobject
errorsobject
messagestring

Human-readable status message indicating the result of the attach operation

exampleSecurity Group Attached Successfully
  • must be a non-empty string
  • should not exceed 256 characters