创建安全组

最近更新时间:2018-01-30 16:12:00

CreateSecurityGroup( 创建安全组)

安全组默认有出站规则(out),协议类型IP,网段0.0.0.0/0。

Request Parameters(请求参数)

VpcId

  • Vpc的ID
  • 类型: String
  • 是否可缺省: 否

SecurityGroupName

  • 安全组的名称
  • 类型:String
  • 是否可缺省: 是
  • 缺省值: Ksc_SecurityGroup

Response Elements(返回值)

RequestId

  • 请求ID
  • 类型: String

SecurityGroup

Examples(例子)

Sample Request(请求)
http://vpc.region.api.ksyun.com/?Action=CreateSecurityGroup
&Version=2016-03-04
&VpcId=4e8d1f11-264a-468b-ae37-09b465477415
Sample Response(返回)
<CreateSecurityGroupResponse xmlns="http://vpc.api.ksyun.com/doc/2016-03-04/">
    <CreateTime>2016-05-06 17:25:07.400144</CreateTime>
    <VpcId>4e8d1f11-264a-468b-ae37-09b465477415</VpcId>
    <SecurityGroupName>Ksc_SecurityGroup</SecurityGroupName>
    <RequestId>969f426b-8c4a-4b06-a954-992995df0976</RequestId>
    <SecurityGroupEntrySet>
        <item>
            <CidrBlock>0.0.0.0/0</CidrBlock>
            <Direction>out</Direction>
            <Protocol>ip</Protocol>
            <SecurityGroupEntryId>61c9fcbb-1947-4468-8b27-71af26e4b265</SecurityGroupEntryId>
        </item>
    </SecurityGroupEntrySet>
    <SecurityGroupType>other</SecurityGroupType>
    <SecurityGroupId>01fb8f0c-1b87-487a-b982-6b3f61df49cc</SecurityGroupId>
</CreateSecurityGroupResponse>

金山云,开启您的云计算之旅

注册有礼