Documentation ¶
Overview ¶
Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb
Package policies contains functionality for working with ECL Managed Load Balancer resources.
Example to list policies
listOpts := policies.ListOpts{} allPages, err := policies.List(managedLoadBalancerClient, listOpts).AllPages() if err != nil { panic(err) } allPolicies, err := policies.ExtractPolicies(allPages) if err != nil { panic(err) } for _, policy := range allPolicies { fmt.Printf("%+v\n", policy) }
Example to create a policy
createOpts := policies.CreateOpts{ Name: "policy", Description: "description", Tags: map[string]string{"key": "value"}, Algorithm: "round-robin", Persistence: "cookie", SorryPageUrl: "https://example.com/sorry", SourceNat: "enable", CertificateID: "f57a98fe-d63e-4048-93a0-51fe163f30d7", HealthMonitorID: "dd7a96d6-4e66-4666-baca-a8555f0c472c", ListenerID: "68633f4f-f52a-402f-8572-b8173418904f", DefaultTargetGroupID: "a44c4072-ed90-4b50-a33a-6b38fb10c7db", TLSPolicyID: "4ba79662-f2a1-41a4-a3d9-595799bbcd86", LoadBalancerID: "67fea379-cff0-4191-9175-de7d6941a040", } policy, err := policies.Create(managedLoadBalancerClient, createOpts).Extract() if err != nil { panic(err) } fmt.Printf("%+v\n", policy)
Example to show a policy
showOpts := policies.ShowOpts{} id := "497f6eca-6276-4993-bfeb-53cbbbba6f08" policy, err := policies.Show(managedLoadBalancerClient, id, showOpts).Extract() if err != nil { panic(err) } fmt.Printf("%+v\n", policy)
Example to update a policy
name := "policy" description := "description" updateOpts := policies.UpdateOpts{ Name: &name, Description: &description, Tags: &map[string]string{"key": "value"}, } id := "497f6eca-6276-4993-bfeb-53cbbbba6f08" policy, err := policies.Update(managedLoadBalancerClient, updateOpts).Extract() if err != nil { panic(err) } fmt.Printf("%+v\n", policy)
Example to delete a policy
id := "497f6eca-6276-4993-bfeb-53cbbbba6f08" err := policies.Delete(managedLoadBalancerClient, id).ExtractErr() if err != nil { panic(err) }
Example to create staged policy configurations
createStagedOpts := policies.CreateStagedOpts{ Algorithm: "round-robin", Persistence: "cookie", SorryPageUrl: "https://example.com/sorry", SourceNat: "enable", CertificateID: "f57a98fe-d63e-4048-93a0-51fe163f30d7", HealthMonitorID: "dd7a96d6-4e66-4666-baca-a8555f0c472c", ListenerID: "68633f4f-f52a-402f-8572-b8173418904f", DefaultTargetGroupID: "a44c4072-ed90-4b50-a33a-6b38fb10c7db", TLSPolicyID: "4ba79662-f2a1-41a4-a3d9-595799bbcd86", } id := "497f6eca-6276-4993-bfeb-53cbbbba6f08" policyConfigurations, err := policies.CreateStaged(managedLoadBalancerClient, id, createStagedOpts).Extract() if err != nil { panic(err) } fmt.Printf("%+v\n", policyConfigurations)
Example to show staged policy configurations
id := "497f6eca-6276-4993-bfeb-53cbbbba6f08" policyConfigurations, err := policies.ShowStaged(managedLoadBalancerClient, id).Extract() if err != nil { panic(err) } fmt.Printf("%+v\n", policyConfigurations)
Example to update staged policy configurations
algorithm := "round-robin" persistence := "cookie" sorryPageUrl := "https://example.com/sorry" sourceNat := "enable" certificateID := "f57a98fe-d63e-4048-93a0-51fe163f30d7" healthMonitorID := "dd7a96d6-4e66-4666-baca-a8555f0c472c" listenerID := "68633f4f-f52a-402f-8572-b8173418904f" defaultTargetGroupID := "a44c4072-ed90-4b50-a33a-6b38fb10c7db" tlsPolicyID := "4ba79662-f2a1-41a4-a3d9-595799bbcd86" updateStagedOpts := policies.UpdateStagedOpts{ Algorithm: &algorithm, Persistence: &persistence, SorryPageUrl: &sorryPageUrl, SourceNat: &sourceNat, CertificateID: &certificateID, HealthMonitorID: &healthMonitorID, ListenerID: &listenerID, DefaultTargetGroupID: &defaultTargetGroupID, TLSPolicyID: &tlsPolicyID, } id := "497f6eca-6276-4993-bfeb-53cbbbba6f08" policyConfigurations, err := policies.UpdateStaged(managedLoadBalancerClient, updateStagedOpts).Extract() if err != nil { panic(err) } fmt.Printf("%+v\n", policyConfigurations)
Example to cancel staged policy configurations
id := "497f6eca-6276-4993-bfeb-53cbbbba6f08" err := policies.CancelStaged(managedLoadBalancerClient, id).ExtractErr() if err != nil { panic(err) }
Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb
Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb
Generated by https://github.com/tamac-io/openapi-to-eclcloud-rb
Index ¶
- func ExtractPoliciesInto(r pagination.Page, v interface{}) error
- func List(c *eclcloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type CancelStagedResult
- type ConfigurationInResponse
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type CreateStagedOpts
- type CreateStagedOptsBuilder
- type CreateStagedResult
- type DeleteResult
- type ListOpts
- type ListOptsBuilder
- type Policy
- type PolicyPage
- type ShowOpts
- type ShowOptsBuilder
- type ShowResult
- type ShowStagedResult
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
- type UpdateStagedOpts
- type UpdateStagedOptsBuilder
- type UpdateStagedResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractPoliciesInto ¶
func ExtractPoliciesInto(r pagination.Page, v interface{}) error
ExtractPoliciesInto interprets the results of a single page from a List() call, producing a slice of policy entities.
func List ¶
func List(c *eclcloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns a Pager which allows you to iterate over a collection of policies. It accepts a ListOpts struct, which allows you to filter and sort the returned collection for greater efficiency.
Types ¶
type CancelStagedResult ¶
type CancelStagedResult struct {
eclcloud.ErrResult
}
CancelStagedResult represents the result of a CancelStaged operation. Call its ExtractErr method to determine if the request succeeded or failed.
func CancelStaged ¶
func CancelStaged(c *eclcloud.ServiceClient, id string) (r CancelStagedResult)
CancelStaged accepts a unique ID and deletes policy configurations associated with it.
type ConfigurationInResponse ¶
type ConfigurationInResponse struct { // - Load balancing algorithm (method) of the policy Algorithm string `json:"algorithm,omitempty"` // - Persistence setting of the policy // - `"cookie"` is used when `listener.protocol` is `"http"` or `"https"` Persistence string `json:"persistence,omitempty"` // - URL of the sorry page to which accesses are redirected when all members in the target group are down // - Returns `""` when protocol is not `"http"` or `"https"` SorryPageUrl string `json:"sorry_page_url,omitempty"` // - Source NAT setting of the policy // - When `source_nat` is `"enable"` and `listener.protocol` is `"http"` or `"https"` , // - The source IP address of the request is replaced with `virtual_ip_address` which is assigned to the interface from which the request was sent // - `X-Forwarded-For` header with the IP address of the client is added SourceNat string `json:"source_nat,omitempty"` // - ID of the certificate that assigned to the policy // - Returns `""` when protocol is not `"https"` CertificateID string `json:"certificate_id,omitempty"` // - ID of the health monitor that assigned to the policy HealthMonitorID string `json:"health_monitor_id,omitempty"` // - ID of the listener that assigned to the policy ListenerID string `json:"listener_id,omitempty"` // - ID of the default target group that assigned to the policy DefaultTargetGroupID string `json:"default_target_group_id,omitempty"` // - ID of the TLS policy that assigned to the policy // - Returns `""` when protocol is not `"https"` TLSPolicyID string `json:"tls_policy_id,omitempty"` }
ConfigurationInResponse represents a configuration in a policy.
type CreateOpts ¶
type CreateOpts struct { // - Name of the policy Name string `json:"name,omitempty"` // - Description of the policy Description string `json:"description,omitempty"` // - Tags of the policy // - Must be specified as JSON object Tags map[string]string `json:"tags,omitempty"` // - Load balancing algorithm (method) of the policy Algorithm string `json:"algorithm,omitempty"` // - Persistence setting of the policy // - `"cookie"` is used when `listener.protocol` is `"http"` or `"https"` Persistence string `json:"persistence,omitempty"` // - URL of the sorry page to which accesses are redirected when all members in the target group are down // - Can be specified when `listener.protocol` is `"http"` or `"https"` // - Must be specified as URL format // - Must not be specified or be specified as `""` when `listener.protocol` is neither `"http"` nor `"https"` SorryPageUrl string `json:"sorry_page_url,omitempty"` // - Source NAT setting of the policy // - When `source_nat` is `"enable"` and `listener.protocol` is `"http"` or `"https"` , // - The source IP address of the request is replaced with `virtual_ip_address` which is assigned to the interface from which the request was sent // - `X-Forwarded-For` header with the IP address of the client is added SourceNat string `json:"source_nat,omitempty"` // - ID of the certificate that assigned to the policy // - Can be specified the certificate which `ca_cert.status` , `ssl_cert.status` and `ssl_key.status` is `"UPLOADED"` // - Must be specified `certificate.id` when `listener.protocol` is `"https"` // - Must not be specified or be specified as `""` when `listener.protocol` is not `"https"` CertificateID string `json:"certificate_id,omitempty"` // - ID of the health monitor that assigned to the policy // - Must not be specified the ID of the health monitor that `configuration_status` is `"DELETE_STAGED"` HealthMonitorID string `json:"health_monitor_id"` // - ID of the listener that assigned to the policy // - Must not be specified the ID of the listener that `configuration_status` is `"DELETE_STAGED"` // - Must not be specified the ID of the listener that already assigned to the other policy ListenerID string `json:"listener_id"` // - ID of the default target group that assigned to the policy // - Must not be specified the ID of the target group that `configuration_status` is `"DELETE_STAGED"` DefaultTargetGroupID string `json:"default_target_group_id"` // - ID of the TLS policy that assigned to the policy // - Can be specified or will be set `tls_policy.id` which `default` is `true` when `listener.protocol` is `"https"` // - Must not be specified or be specified as `""` when `listener.protocol` is not `"https"` TLSPolicyID string `json:"tls_policy_id,omitempty"` // - ID of the load balancer which the policy belongs to LoadBalancerID string `json:"load_balancer_id"` }
CreateOpts represents options used to create a new policy.
func (CreateOpts) ToPolicyCreateMap ¶
func (opts CreateOpts) ToPolicyCreateMap() (map[string]interface{}, error)
ToPolicyCreateMap builds a request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of a Create operation. Call its Extract method to interpret it as a Policy.
func Create ¶
func Create(c *eclcloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create accepts a CreateOpts struct and creates a new policy using the values provided.
func (CreateResult) Extract ¶
Extract is a function that accepts a result and extracts a Policy resource.
func (CreateResult) ExtractInto ¶
func (r CreateResult) ExtractInto(v interface{}) error
ExtractInto interprets any commonResult as a policy, if possible.
type CreateStagedOpts ¶
type CreateStagedOpts struct { // - Load balancing algorithm (method) of the policy Algorithm string `json:"algorithm,omitempty"` // - Persistence setting of the policy // - `"cookie"` is used when `listener.protocol` is `"http"` or `"https"` Persistence string `json:"persistence,omitempty"` // - URL of the sorry page to which accesses are redirected when all members in the target group are down // - Can be specified when `listener.protocol` is `"http"` or `"https"` // - Must be specified as URL format // - Must not be specified or be specified as `""` when `listener.protocol` is neither `"http"` nor `"https"` // - Must be specified as `""` when changing `listener.protocol` from `"http"` or `"https"` to others SorryPageUrl string `json:"sorry_page_url,omitempty"` // - Source NAT setting of the policy // - When `source_nat` is `"enable"` and `listener.protocol` is `"http"` or `"https"` , // - The source IP address of the request is replaced with `virtual_ip_address` which is assigned to the interface from which the request was sent // - `X-Forwarded-For` header with the IP address of the client is added SourceNat string `json:"source_nat,omitempty"` // - ID of the certificate that assigned to the policy // - Can be specified the certificate which `ca_cert.status` , `ssl_cert.status` and `ssl_key.status` is `"UPLOADED"` // - Must be specified `certificate.id` when `listener.protocol` is `"https"` // - Must not be specified or be specified as `""` when `listener.protocol` is not `"https"` // - Must be specified as `""` when changing `listener.protocol` from `"https"` to others CertificateID string `json:"certificate_id,omitempty"` // - ID of the health monitor that assigned to the policy // - Must not be specified the ID of the health monitor that `configuration_status` is `"DELETE_STAGED"` HealthMonitorID string `json:"health_monitor_id,omitempty"` // - ID of the listener that assigned to the policy // - Must not be specified the ID of the listener that `configuration_status` is `"DELETE_STAGED"` // - Must not be specified the ID of the listener that already assigned to the other policy ListenerID string `json:"listener_id,omitempty"` // - ID of the default target group that assigned to the policy // - Must not be specified the ID of the target group that `configuration_status` is `"DELETE_STAGED"` DefaultTargetGroupID string `json:"default_target_group_id,omitempty"` // - ID of the TLS policy that assigned to the policy // - Can be specified or will be set `tls_policy.id` which `default` is `true` when `listener.protocol` is `"https"` // - Must not be specified or be specified as `""` when `listener.protocol` is not `"https"` // - Must be specified as `""` when changing `listener.protocol` from `"https"` to others TLSPolicyID string `json:"tls_policy_id,omitempty"` }
CreateStagedOpts represents options used to create new policy configurations.
func (CreateStagedOpts) ToPolicyCreateStagedMap ¶
func (opts CreateStagedOpts) ToPolicyCreateStagedMap() (map[string]interface{}, error)
ToPolicyCreateStagedMap builds a request body from CreateStagedOpts.
type CreateStagedOptsBuilder ¶
type CreateStagedOptsBuilder interface {
ToPolicyCreateStagedMap() (map[string]interface{}, error)
}
CreateStagedOptsBuilder allows extensions to add additional parameters to the CreateStaged request.
type CreateStagedResult ¶
type CreateStagedResult struct {
// contains filtered or unexported fields
}
CreateStagedResult represents the result of a CreateStaged operation. Call its Extract method to interpret it as a Policy.
func CreateStaged ¶
func CreateStaged(c *eclcloud.ServiceClient, id string, opts CreateStagedOptsBuilder) (r CreateStagedResult)
CreateStaged accepts a CreateStagedOpts struct and creates new policy configurations using the values provided.
func (CreateStagedResult) Extract ¶
Extract is a function that accepts a result and extracts a Policy resource.
func (CreateStagedResult) ExtractInto ¶
func (r CreateStagedResult) ExtractInto(v interface{}) error
ExtractInto interprets any commonResult as a policy, if possible.
type DeleteResult ¶
type DeleteResult struct {
eclcloud.ErrResult
}
DeleteResult represents the result of a Delete operation. Call its ExtractErr method to determine if the request succeeded or failed.
func Delete ¶
func Delete(c *eclcloud.ServiceClient, id string) (r DeleteResult)
Delete accepts a unique ID and deletes the policy associated with it.
type ListOpts ¶
type ListOpts struct { // - ID of the resource ID string `q:"id"` // - Name of the resource Name string `q:"name"` // - Description of the resource Description string `q:"description"` // - Configuration status of the resource ConfigurationStatus string `q:"configuration_status"` // - Operation status of the resource OperationStatus string `q:"operation_status"` // - Load balancing algorithm (method) of the policy Algorithm string `q:"algorithm"` // - Persistence setting of the policy Persistence string `q:"persistence"` // - URL of the sorry page to which accesses are redirected when all members in the target group are down // - Must be specified as URL format SorryPageUrl string `q:"sorry_page_url"` // - Source NAT setting of the policy SourceNat string `q:"source_nat"` // - ID of the certificate that assigned to the policy CertificateID string `q:"certificate_id"` // - ID of the health monitor that assigned to the policy HealthMonitorID string `q:"health_monitor_id"` // - ID of the listener that assigned to the policy ListenerID string `q:"listener_id"` // - ID of the default target group that assigned to the policy DefaultTargetGroupID string `q:"default_target_group_id"` // - ID of the TLS policy that assigned to the policy TLSPolicyID string `q:"tls_policy_id"` // - ID of the load balancer which the resource belongs to LoadBalancerID string `q:"load_balancer_id"` // - ID of the owner tenant of the resource TenantID string `q:"tenant_id"` }
ListOpts allows the filtering and sorting of paginated collections through the API. Filtering is achieved by passing in struct field values that map to the policy attributes you want to see returned.
func (ListOpts) ToPolicyListQuery ¶
ToPolicyListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type Policy ¶
type Policy struct { // - ID of the policy ID string `json:"id"` // - Name of the policy Name string `json:"name"` // - Description of the policy Description string `json:"description"` // - Tags of the policy (JSON object format) Tags map[string]string `json:"tags"` // - Configuration status of the policy // - `"ACTIVE"` // - There are no configurations of the policy that waiting to be applied // - `"CREATE_STAGED"` // - The policy has been added and waiting to be applied // - `"UPDATE_STAGED"` // - Changed configurations of the policy exists that waiting to be applied // - `"DELETE_STAGED"` // - The policy has been removed and waiting to be applied ConfigurationStatus string `json:"configuration_status"` // - Operation status of the load balancer which the policy belongs to // - `"NONE"` : // - There are no operations of the load balancer // - The load balancer and related resources can be operated // - `"PROCESSING"` // - The latest operation of the load balancer is processing // - The load balancer and related resources cannot be operated // - `"COMPLETE"` // - The latest operation of the load balancer has been succeeded // - The load balancer and related resources can be operated // - `"STUCK"` // - The latest operation of the load balancer has been stopped // - Operators of NTT Communications will investigate the operation // - The load balancer and related resources cannot be operated // - `"ERROR"` // - The latest operation of the load balancer has been failed // - The operation was roll backed normally // - The load balancer and related resources can be operated OperationStatus string `json:"operation_status"` // - ID of the load balancer which the policy belongs to LoadBalancerID string `json:"load_balancer_id"` // - ID of the owner tenant of the policy TenantID string `json:"tenant_id"` // - Load balancing algorithm (method) of the policy Algorithm string `json:"algorithm,omitempty"` // - Persistence setting of the policy // - `"cookie"` is used when `listener.protocol` is `"http"` or `"https"` Persistence string `json:"persistence,omitempty"` // - URL of the sorry page to which accesses are redirected when all members in the target group are down // - Returns `""` when protocol is not `"http"` or `"https"` SorryPageUrl string `json:"sorry_page_url,omitempty"` // - Source NAT setting of the policy // - When `source_nat` is `"enable"` and `listener.protocol` is `"http"` or `"https"` , // - The source IP address of the request is replaced with `virtual_ip_address` which is assigned to the interface from which the request was sent // - `X-Forwarded-For` header with the IP address of the client is added SourceNat string `json:"source_nat,omitempty"` // - ID of the certificate that assigned to the policy // - Returns `""` when protocol is not `"https"` CertificateID string `json:"certificate_id,omitempty"` // - ID of the health monitor that assigned to the policy HealthMonitorID string `json:"health_monitor_id,omitempty"` // - ID of the listener that assigned to the policy ListenerID string `json:"listener_id,omitempty"` // - ID of the default target group that assigned to the policy DefaultTargetGroupID string `json:"default_target_group_id,omitempty"` // - ID of the TLS policy that assigned to the policy // - Returns `""` when protocol is not `"https"` TLSPolicyID string `json:"tls_policy_id,omitempty"` // - Running configurations of the policy // - Return object when `changes` is `true` // - Return `null` when current configuration does not exist Current ConfigurationInResponse `json:"current"` // - Added or changed configurations of the policy that waiting to be applied // - Return object when `changes` is `true` // - Return `null` when staged configuration does not exist Staged ConfigurationInResponse `json:"staged"` }
Policy represents a policy.
func ExtractPolicies ¶
func ExtractPolicies(r pagination.Page) ([]Policy, error)
ExtractPolicies accepts a Page struct, specifically a NetworkPage struct, and extracts the elements into a slice of Policy structs. In other words, a generic collection is mapped into a relevant slice.
type PolicyPage ¶
type PolicyPage struct {
pagination.LinkedPageBase
}
PolicyPage is the page returned by a pager when traversing over a collection of policy.
func (PolicyPage) IsEmpty ¶
func (r PolicyPage) IsEmpty() (bool, error)
IsEmpty checks whether a PolicyPage struct is empty.
type ShowOpts ¶
type ShowOpts struct { // - When `true` is specified, `current` and `staged` are returned in response body Changes bool `q:"changes"` }
ShowOpts represents options used to show a policy.
func (ShowOpts) ToPolicyShowQuery ¶
ToPolicyShowQuery formats a ShowOpts into a query string.
type ShowOptsBuilder ¶
ShowOptsBuilder allows extensions to add additional parameters to the Show request.
type ShowResult ¶
type ShowResult struct {
// contains filtered or unexported fields
}
ShowResult represents the result of a Show operation. Call its Extract method to interpret it as a Policy.
func Show ¶
func Show(c *eclcloud.ServiceClient, id string, opts ShowOptsBuilder) (r ShowResult)
Show retrieves a specific policy based on its unique ID.
func (ShowResult) Extract ¶
Extract is a function that accepts a result and extracts a Policy resource.
func (ShowResult) ExtractInto ¶
func (r ShowResult) ExtractInto(v interface{}) error
ExtractInto interprets any commonResult as a policy, if possible.
type ShowStagedResult ¶
type ShowStagedResult struct {
// contains filtered or unexported fields
}
ShowStagedResult represents the result of a ShowStaged operation. Call its Extract method to interpret it as a Policy.
func ShowStaged ¶
func ShowStaged(c *eclcloud.ServiceClient, id string) (r ShowStagedResult)
ShowStaged retrieves specific policy configurations based on its unique ID.
func (ShowStagedResult) Extract ¶
Extract is a function that accepts a result and extracts a Policy resource.
func (ShowStagedResult) ExtractInto ¶
func (r ShowStagedResult) ExtractInto(v interface{}) error
ExtractInto interprets any commonResult as a policy, if possible.
type UpdateOpts ¶
type UpdateOpts struct { // - Name of the policy Name *string `json:"name,omitempty"` // - Description of the policy Description *string `json:"description,omitempty"` // - Tags of the policy // - Must be specified as JSON object Tags *map[string]string `json:"tags,omitempty"` }
UpdateOpts represents options used to update a existing policy.
func (UpdateOpts) ToPolicyUpdateMap ¶
func (opts UpdateOpts) ToPolicyUpdateMap() (map[string]interface{}, error)
ToPolicyUpdateMap builds a request body from UpdateOpts.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional parameters to the Update request.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult represents the result of a Update operation. Call its Extract method to interpret it as a Policy.
func Update ¶
func Update(c *eclcloud.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update accepts a UpdateOpts struct and updates a existing policy using the values provided.
func (UpdateResult) Extract ¶
Extract is a function that accepts a result and extracts a Policy resource.
func (UpdateResult) ExtractInto ¶
func (r UpdateResult) ExtractInto(v interface{}) error
ExtractInto interprets any commonResult as a policy, if possible.
type UpdateStagedOpts ¶
type UpdateStagedOpts struct { // - Load balancing algorithm (method) of the policy Algorithm *string `json:"algorithm,omitempty"` // - Persistence setting of the policy // - `"cookie"` is used when `listener.protocol` is `"http"` or `"https"` Persistence *string `json:"persistence,omitempty"` // - URL of the sorry page to which accesses are redirected when all members in the target group are down // - Can be specified when `listener.protocol` is `"http"` or `"https"` // - Must be specified as URL format // - Must not be specified or be specified as `""` when `listener.protocol` is neither `"http"` nor `"https"` // - Must be specified as `""` when changing `listener.protocol` from `"http"` or `"https"` to others SorryPageUrl *string `json:"sorry_page_url,omitempty"` // - Source NAT setting of the policy // - When `source_nat` is `"enable"` and `listener.protocol` is `"http"` or `"https"` , // - The source IP address of the request is replaced with `virtual_ip_address` which is assigned to the interface from which the request was sent // - `X-Forwarded-For` header with the IP address of the client is added SourceNat *string `json:"source_nat,omitempty"` // - ID of the certificate that assigned to the policy // - Can be specified the certificate which `ca_cert.status` , `ssl_cert.status` and `ssl_key.status` is `"UPLOADED"` // - Must be specified `certificate.id` when `listener.protocol` is `"https"` // - Must not be specified or be specified as `""` when `listener.protocol` is not `"https"` // - Must be specified as `""` when changing `listener.protocol` from `"https"` to others CertificateID *string `json:"certificate_id,omitempty"` // - ID of the health monitor that assigned to the policy // - Must not be specified the ID of the health monitor that `configuration_status` is `"DELETE_STAGED"` HealthMonitorID *string `json:"health_monitor_id,omitempty"` // - ID of the listener that assigned to the policy // - Must not be specified the ID of the listener that `configuration_status` is `"DELETE_STAGED"` // - Must not be specified the ID of the listener that already assigned to the other policy ListenerID *string `json:"listener_id,omitempty"` // - ID of the default target group that assigned to the policy // - Must not be specified the ID of the target group that `configuration_status` is `"DELETE_STAGED"` DefaultTargetGroupID *string `json:"default_target_group_id,omitempty"` // - ID of the TLS policy that assigned to the policy // - Can be specified or will be set `tls_policy.id` which `default` is `true` when `listener.protocol` is `"https"` // - Must not be specified or be specified as `""` when `listener.protocol` is not `"https"` // - Must be specified as `""` when changing `listener.protocol` from `"https"` to others TLSPolicyID *string `json:"tls_policy_id,omitempty"` }
UpdateStagedOpts represents options used to update existing Policy configurations.
func (UpdateStagedOpts) ToPolicyUpdateStagedMap ¶
func (opts UpdateStagedOpts) ToPolicyUpdateStagedMap() (map[string]interface{}, error)
ToPolicyUpdateStagedMap builds a request body from UpdateStagedOpts.
type UpdateStagedOptsBuilder ¶
type UpdateStagedOptsBuilder interface {
ToPolicyUpdateStagedMap() (map[string]interface{}, error)
}
UpdateStagedOptsBuilder allows extensions to add additional parameters to the UpdateStaged request.
type UpdateStagedResult ¶
type UpdateStagedResult struct {
// contains filtered or unexported fields
}
UpdateStagedResult represents the result of a UpdateStaged operation. Call its Extract method to interpret it as a Policy.
func UpdateStaged ¶
func UpdateStaged(c *eclcloud.ServiceClient, id string, opts UpdateStagedOptsBuilder) (r UpdateStagedResult)
UpdateStaged accepts a UpdateStagedOpts struct and updates existing Policy configurations using the values provided.
func (UpdateStagedResult) Extract ¶
Extract is a function that accepts a result and extracts a Policy resource.
func (UpdateStagedResult) ExtractInto ¶
func (r UpdateStagedResult) ExtractInto(v interface{}) error
ExtractInto interprets any commonResult as a policy, if possible.