Attach Security Group
POST
/api/v1/security_group/{vm_id}/attach/Path parameters
vm_idPathstringrequiredPath parameter
vm_id.
Query parameters
project_idQuerystringoptionalIdentifier 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}}apikeyQuerystringoptionalAPI key used for authentication
- required
- non-empty string
example{{api_key}}locationQuerystringoptionalSpecifies 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
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
HTTP status code indicating the result of the attach operation
example
200- must be a valid HTTP status code
- typically 200 for success
Human-readable status message indicating the result of the attach operation
example
Security Group Attached Successfully- must be a non-empty string
- should not exceed 256 characters