dcloud ec2 instances set-security-groups

Replace the security groups attached to an instance

IAM ec2:ModifyInstanceAttributeChanges stateAsks before it deletes (-y skips)

Synopsis

dcloud ec2 instances set-security-groups id --security-group-ids securityGroupIds

Arguments

  • <id>Required

    string

    Also accepted as --id. Constraints: /^i-[0-9a-f]{6,32}$/

Flags

  • --security-group-idsRequired

    array of string

    The complete new set of groups; an empty list detaches them all

    Constraints: uuid

Example

dcloud ec2 instances set-security-groups id --security-group-ids '["example"]'

Generated from the API description, the same one the API checks requests against and the CLI is built from.