Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AssociatedTransitIp ¶
type CreateOpts ¶
type CreateOpts struct { // The ID of the gateway to which the private SNAT rule belongs. GatewayId string `json:"gateway_id" required:"true"` // The ID list of the transit IPs for private NAT. TransitIpIds []string `json:"transit_ip_ids" required:"true"` // The CIDR block of the match rule. // Exactly one of cidr and virsubnet_id must be set. Cidr string `json:"cidr,omitempty"` // The subnet ID of the match rule. // Exactly one of cidr and virsubnet_id must be set. SubnetId string `json:"virsubnet_id,omitempty"` // The description of the private SNAT rule, which contain maximum of `255` characters, and angle brackets (< and >) // are not allowed. Description string `json:"description,omitempty"` }
CreateOpts is the structure used to create a new private SNAT rule.
type Rule ¶
type Rule struct { // The ID of the SNAT rule. ID string `json:"id"` // The project ID. ProjectId string `json:"project_id"` // The ID of the gateway to which the private SNAT rule belongs. GatewayId string `json:"gateway_id"` // The CIDR block of the match rule. // Exactly one of cidr and virsubnet_id must be set. Cidr string `json:"cidr"` // The subnet ID of the match rule. // Exactly one of cidr and virsubnet_id must be set. SubnetId string `json:"virsubnet_id"` // The description of the SNAT rule, which contain maximum of `255` characters, and angle brackets (< and >) are // not allowed. Description string `json:"description"` // The ID of the transit IP. TransitIpAssociations []AssociatedTransitIp `json:"transit_ip_associations"` // The ID of the enterprise project to which the private SNAT rule belongs. EnterpriseProjectId string `json:"enterprise_project_id"` // The creation time of the private SNAT rule. CreatedAt string `json:"created_at"` // The latest update time of the private SNAT rule. UpdatedAt string `json:"updated_at"` }
Rule is a struct that represents the private SNAT rule detail.
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*Rule, error)
Create is a method used to create a private SNAT rule using given parameters.
func Get ¶
func Get(c *golangsdk.ServiceClient, ruleId string) (*Rule, error)
Get is a method used to obtain the private SNAT rule detail by its ID.
func Update ¶
func Update(c *golangsdk.ServiceClient, ruleId string, opts UpdateOpts) (*Rule, error)
Update is a method used to modify an existing SNAT rule using given parameters.
type UpdateOpts ¶
type UpdateOpts struct { // The ID list of the transit IPs for private NAT. TransitIpIds []string `json:"transit_ip_ids,omitempty"` // The description of the private SNAT rule, which contain maximum of `255` characters, and angle brackets (< and >) // are not allowed. Description *string `json:"description,omitempty"` }
UpdateOpts is the structure used to modify an existing private SNAT rule.
Click to show internal directories.
Click to hide internal directories.