This repository has been archived by the owner on Jul 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
db_security_group.go
67 lines (55 loc) · 2.23 KB
/
db_security_group.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package rds
import "encoding/xml"
type CreateDBSecurityGroup struct {
DBSecurityGroupName string `xml:"DBSecurityGroupName"`
DBSecurityGroupDescription string `xml:"DBSecurityGroupDescription"`
}
type CreateDBSecurityGroupResponse struct {
XMLName xml.Name `xml:"CreateDBSecurityGroupResponse"`
Result *CreateDBSecurityGroupResult `xml:"CreateDBSecurityGroupResult"`
}
type CreateDBSecurityGroupResult struct {
XMLName xml.Name `xml:"CreateDBSecurityGroupResult"`
DBSecurityGroup *DBSecurityGroup `xml:"DBSecurityGroup"`
}
func (action *CreateDBSecurityGroup) Execute(client *Client) (res *CreateDBSecurityGroupResponse, e error) {
v := newAction("CreateDBSecurityGroup")
if e = loadValues(v, action); e != nil {
return nil, e
}
res = &CreateDBSecurityGroupResponse{}
return res, client.loadResource("GET", client.Endpoint()+"?"+v.Encode(), nil, res)
}
type AuthorizeDBSecurityGroupIngress struct {
DBSecurityGroupName string `xml:"DBSecurityGroupName"`
CIDRIP string `xml:"CIDRIP"`
}
type AuthorizeDBSecurityGroupIngressResponse struct {
XMLName xml.Name `xml:"AuthorizeDBSecurityGroupIngressResponse"`
Result *AuthorizeDBSecurityGroupResult `xml:"AuthorizeDBSecurityGroupIngressResult"`
}
type AuthorizeDBSecurityGroupResult struct {
XMLName xml.Name `xml:"AuthorizeDBSecurityGroupIngressResult"`
DBSecurityGroup *DBSecurityGroup `xml:"DBSecurityGroup"`
}
func (action *AuthorizeDBSecurityGroupIngress) Execute(client *Client) (res *AuthorizeDBSecurityGroupIngressResponse, e error) {
v := newAction("AuthorizeDBSecurityGroupIngress")
if e = loadValues(v, action); e != nil {
return nil, e
}
res = &AuthorizeDBSecurityGroupIngressResponse{}
return res, client.loadResource("GET", client.Endpoint()+"?"+v.Encode(), nil, res)
}
type DeleteDBSecurityGroup struct {
DBSecurityGroupName string `xml:"DBSecurityGroupName"`
}
func (action *DeleteDBSecurityGroup) Execute(client *Client) (e error) {
v := newAction("DeleteDBSecurityGroup")
if e = loadValues(v, action); e != nil {
return e
}
res := &struct {
XMLName xml.Name `xml:"DeleteDBSecurityGroupResponse"`
}{}
return client.loadResource("GET", client.Endpoint()+"?"+v.Encode(), nil, res)
}