Home  >  Article  >  Operation and Maintenance  >  How to add an instance to a specified security group

How to add an instance to a specified security group

坏嘻嘻
坏嘻嘻Original
2018-09-25 13:56:543013browse

This article introduces how to add an instance to a specified security group, and focuses on the specific steps. The content of this article is compact, and I hope you can gain something from it.

JoinSecurityGroup

Join an instance to the specified security group.

Description

When calling this interface, you need to pay attention to:

Before joining the security group, the instance must be stopped (Stopped) or running (Running) status.

An instance can join up to 5 security groups.

Each security group can manage up to 1,000 instances.

Your security group and instance must belong to the same Alibaba Cloud region.

The network type of your security group and instance must be the same. If the network type is VPC, the security group and instance must belong to the same VPC.

Request parameters

How to add an instance to a specified security group

##Return parameters

are all public return parameters. See Public Parameters.

Example

Request example

https://ecs.aliyuncs.com/?Action=JoinSecurityGroup
&InstanceId= i-instance1
&SecurityGroupId=F876FF7BA984
&<公共请求参数>

Return example

XML format

<JoinSecurityGroupResponse>
    <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
</JoinSecurityGroupResponse>

JSON format

{
    "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}

Error code

The following are error codes unique to this interface. For more error codes, please visit the API Error Center.

How to add an instance to a specified security group

The above is the detailed content of How to add an instance to a specified security group. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn