Documentation
¶
Index ¶
- func CreateURL(c *golangsdk.ServiceClient) string
- func DeleteURL(c *golangsdk.ServiceClient, securityGroupId string) string
- func GetURL(c *golangsdk.ServiceClient, securityGroupId string) string
- func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
- func ListURL(c *golangsdk.ServiceClient) string
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type ListResult
- type SecurityGroup
- type SecurityGroupPage
- type SecurityGroupRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateURL ¶
func CreateURL(c *golangsdk.ServiceClient) string
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager
func ListURL ¶
func ListURL(c *golangsdk.ServiceClient) string
Types ¶
type CreateOpts ¶
type CreateOpts struct {
// Specifies the security group name.
Name string `json:"name" required:"true"`
// Specifies the enterprise project ID. This field can be used to
// filter out the VPCs associated with a specified enterprise project.
EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
// Specifies the resource ID of the VPC to which the security
// group belongs.
VpcId string `json:"vpc_id,omitempty"`
Description string `json:"description,omitempty"`
}
func (CreateOpts) ToSecuritygroupsCreateMap ¶
func (opts CreateOpts) ToSecuritygroupsCreateMap() (map[string]interface{}, error)
type CreateOptsBuilder ¶
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*SecurityGroup, error)
type DeleteResult ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, securityGroupId string) (r DeleteResult)
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
func (GetResult) Extract ¶
func (r GetResult) Extract() (*SecurityGroup, error)
type ListOpts ¶
type ListOpts struct {
// Specifies the resource ID of pagination query. If the parameter
// is left blank, only resources on the first page are queried.
Marker string `q:"marker"`
// Specifies the number of records returned on each page.
Limit int `q:"limit"`
// Specifies the VPC ID used as the query filter.
VpcId string `q:"vpc_id"`
// enterprise_project_id
// Specifies the enterprise_project_id used as the query filter.
EnterpriseProjectId string `q:"enterprise_project_id"`
}
func (ListOpts) ToListQuery ¶
type ListOptsBuilder ¶
type ListResult ¶
type ListResult struct {
// contains filtered or unexported fields
}
func (ListResult) Extract ¶
func (r ListResult) Extract() (*[]SecurityGroup, error)
type SecurityGroup ¶
type SecurityGroup struct {
// Specifies the security group name.
Name string `json:"name"`
// Provides supplementary information about the security group.
Description string `json:"description"`
// Specifies the security group ID, which uniquely identifies the
// security group.
ID string `json:"id"`
// Specifies the resource ID of the VPC to which the security
// group belongs.
VpcId string `json:"vpc_id"`
// Specifies the default security group rule, which ensures that
// hosts in the security group can communicate with one another.
SecurityGroupRules []SecurityGroupRule `json:"security_group_rules"`
EnterpriseProjectId string `json:"enterprise_project_id,omitempty"`
}
func ExtractSecurityGroups ¶
func ExtractSecurityGroups(r pagination.Page) ([]SecurityGroup, error)
type SecurityGroupPage ¶
type SecurityGroupPage struct {
pagination.LinkedPageBase
}
func (SecurityGroupPage) IsEmpty ¶
func (r SecurityGroupPage) IsEmpty() (bool, error)
func (SecurityGroupPage) NextPageURL ¶
func (r SecurityGroupPage) NextPageURL() (string, error)
type SecurityGroupRule ¶
type SecurityGroupRule struct {
// Specifies the security group rule ID.
ID string `json:"id,omitempty"`
// Specifies the description.
Description string `json:"description,omitempty"`
// Specifies the security group ID.
SecurityGroupId string `json:"security_group_id,omitempty"`
// Specifies the direction of access control. The value can
// be?egress?or?ingress.
Direction string `json:"direction,omitempty"`
// Specifies the version of the Internet Protocol. The value can
// be?IPv4?or?IPv6.
Ethertype string `json:"ethertype,omitempty"`
// Specifies the protocol type. If the parameter is left blank,
// the security group supports all types of protocols. The value can be?icmp,?tcp,
// or?udp.
Protocol string `json:"protocol,omitempty"`
// Specifies the start port. The value ranges from 1 to 65,535.
// The value must be less than or equal to the value of?port_range_max. An empty value
// indicates all ports. If?protocol?is?icmp, the value range is determined by the
// ICMP-port range relationship table provided in Appendix A.2.
PortRangeMin *int `json:"port_range_min,omitempty"`
// Specifies the end port. The value ranges from 1 to 65,535. The
// value must be greater than or equal to the value of?port_range_min. An empty value
// indicates all ports. If?protocol?is?icmp, the value range is determined by the
// ICMP-port range relationship table provided in Appendix A.2.
PortRangeMax *int `json:"port_range_max,omitempty"`
// Specifies the remote IP address. If the access control
// direction is set to?egress, the parameter specifies the source IP address. If the
// access control direction is set to?ingress, the parameter specifies the destination
// IP address. The parameter is exclusive with parameter?remote_group_id. The value can
// be in the CIDR format or IP addresses.
RemoteIpPrefix string `json:"remote_ip_prefix,omitempty"`
// Specifies the ID of the peer security group. The value is
// exclusive with parameter?remote_ip_prefix.
RemoteGroupId string `json:"remote_group_id,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.