Skip to content

Commit

Permalink
Add idle_timeout to Policy of Managed Load Balancer (#46)
Browse files Browse the repository at this point in the history
* Update comments (Managed Load Balancer)

* Add idle_timeout to Policy of Managed Load Balancer
  • Loading branch information
hico-horiuchi authored Mar 5, 2024
1 parent d244572 commit b5fa8d1
Show file tree
Hide file tree
Showing 44 changed files with 874 additions and 498 deletions.
20 changes: 15 additions & 5 deletions v2/ecl/managed_load_balancer/v1/certificates/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ type ListOpts struct {
ID string `q:"id"`

// - Name of the resource
// - This field accepts single-byte characters only
Name string `q:"name"`

// - Description of the resource
// - This field accepts single-byte characters only
Description string `q:"description"`

// - ID of the owner tenant of the resource
Expand Down Expand Up @@ -77,13 +79,17 @@ Create Certificate
type CreateOpts struct {

// - Name of the certificate
// - This field accepts single-byte characters only
Name string `json:"name,omitempty"`

// - Description of the certificate
// - This field accepts single-byte characters only
Description string `json:"description,omitempty"`

// - Tags of the certificate
// - Must be specified as JSON object
// - Set JSON object up to 32,768 characters
// - Nested structure is permitted
// - This field accepts single-byte characters only
Tags map[string]interface{} `json:"tags,omitempty"`
}

Expand Down Expand Up @@ -134,13 +140,17 @@ Update Certificate
type UpdateOpts struct {

// - Name of the certificate
// - This field accepts single-byte characters only
Name *string `json:"name,omitempty"`

// - Description of the certificate
// - This field accepts single-byte characters only
Description *string `json:"description,omitempty"`

// - Tags of the certificate
// - Must be specified as JSON object
// - Set JSON object up to 32,768 characters
// - Nested structure is permitted
// - This field accepts single-byte characters only
Tags *map[string]interface{} `json:"tags,omitempty"`
}

Expand Down Expand Up @@ -195,9 +205,9 @@ type UploadFileOpts struct {
Type string `json:"type"`

// - Content of the certificate file to be uploaded
// - Size of the file before encoding by Base64 must be less than or equal to 16KB
// - Must be specified the content of the file that encoded by Base64 format
// - Format of the file before encoding by Base64 must be PEM
// - Content must be Base64 encoded
// - The file size before encoding must be less than or equal to 16KB
// - The file format before encoding must be PEM
// - DER can be converted to PEM by using OpenSSL command
Content string `json:"content"`
}
Expand Down
52 changes: 34 additions & 18 deletions v2/ecl/managed_load_balancer/v1/health_monitors/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ type ListOpts struct {
ID string `q:"id"`

// - Name of the resource
// - This field accepts single-byte characters only
Name string `q:"name"`

// - Description of the resource
// - This field accepts single-byte characters only
Description string `q:"description"`

// - Configuration status of the resource
Expand Down Expand Up @@ -100,17 +102,21 @@ Create Health Monitor
type CreateOpts struct {

// - Name of the health monitor
// - This field accepts single-byte characters only
Name string `json:"name,omitempty"`

// - Description of the health monitor
// - This field accepts single-byte characters only
Description string `json:"description,omitempty"`

// - Tags of the health monitor
// - Must be specified as JSON object
// - Set JSON object up to 32,768 characters
// - Nested structure is permitted
// - This field accepts single-byte characters only
Tags map[string]interface{} `json:"tags,omitempty"`

// - Port number of the health monitor for healthchecking
// - Must be specified `0` when `protocol` is `"icmp"`
// - If 'protocol' is 'icmp', value must be set `0`
Port int `json:"port"`

// - Protocol of the health monitor for healthchecking
Expand All @@ -121,20 +127,22 @@ type CreateOpts struct {

// - Retry count of healthchecking
// - Initial monitoring is not included
// - Retry is executed at the interval specified by `interval`
// - Retry is executed at the interval set in `interval`
Retry int `json:"retry,omitempty"`

// - Timeout of healthchecking (in seconds)
// - Must be specified a number less than or equal to `interval`
// - Value must be less than or equal to `interval`
Timeout int `json:"timeout,omitempty"`

// - URL path of healthchecking
// - Can be specified path to monitor when `protocol` is `"http"` or `"https"`
// - If `protocol` is `"http"` or `"https"`, URL path can be set
// - If `protocol` is neither `"http"` nor `"https"`, URL path must not be set
// - Must be started with /
Path string `json:"path,omitempty"`

// - HTTP status codes expected in healthchecking
// - Can be specified HTTP status code (or range) when `protocol` is `"http"` or `"https"`
// - If `protocol` is `"http"` or `"https"`, HTTP status code (or range) can be set
// - If `protocol` is neither `"http"` nor `"https"`, HTTP status code (or range) must not be set
// - Format: `"xxx"` or `"xxx-xxx"` ( `xxx` between [100, 599])
HttpStatusCode string `json:"http_status_code,omitempty"`

Expand Down Expand Up @@ -175,7 +183,7 @@ Show Health Monitor
// ShowOpts represents options used to show a health monitor.
type ShowOpts struct {

// - When `true` is specified, `current` and `staged` are returned in response body
// - If `true` is set, `current` and `staged` are returned in response body
Changes bool `q:"changes"`
}

Expand Down Expand Up @@ -215,13 +223,17 @@ Update Health Monitor Attributes
type UpdateOpts struct {

// - Name of the health monitor
// - This field accepts single-byte characters only
Name *string `json:"name,omitempty"`

// - Description of the health monitor
// - This field accepts single-byte characters only
Description *string `json:"description,omitempty"`

// - Tags of the health monitor
// - Must be specified as JSON object
// - Set JSON object up to 32,768 characters
// - Nested structure is permitted
// - This field accepts single-byte characters only
Tags *map[string]interface{} `json:"tags,omitempty"`
}

Expand Down Expand Up @@ -272,7 +284,7 @@ Create Staged Health Monitor Configurations
type CreateStagedOpts struct {

// - Port number of the health monitor for healthchecking
// - Must be specified `0` when `protocol` is `"icmp"`
// - If 'protocol' is 'icmp', value must be set `0`
Port int `json:"port,omitempty"`

// - Protocol of the health monitor for healthchecking
Expand All @@ -283,20 +295,22 @@ type CreateStagedOpts struct {

// - Retry count of healthchecking
// - Initial monitoring is not included
// - Retry is executed at the interval specified by `interval`
// - Retry is executed at the interval set in `interval`
Retry int `json:"retry,omitempty"`

// - Timeout of healthchecking (in seconds)
// - Must be specified a number less than or equal to `interval`
// - Value must be less than or equal to `interval`
Timeout int `json:"timeout,omitempty"`

// - URL path of healthchecking
// - Can be specified path to monitor when `protocol` is `"http"` or `"https"`
// - If `protocol` is `"http"` or `"https"`, URL path can be set
// - If `protocol` is neither `"http"` nor `"https"`, URL path must not be set
// - Must be started with /
Path string `json:"path,omitempty"`

// - HTTP status codes expected in healthchecking
// - Can be specified HTTP status code (or range) when `protocol` is `"http"` or `"https"`
// - If `protocol` is `"http"` or `"https"`, HTTP status code (or range) can be set
// - If `protocol` is neither `"http"` nor `"https"`, HTTP status code (or range) must not be set
// - Format: `"xxx"` or `"xxx-xxx"` ( `xxx` between [100, 599])
HttpStatusCode string `json:"http_status_code,omitempty"`
}
Expand Down Expand Up @@ -348,7 +362,7 @@ Update Staged Health Monitor Configurations
type UpdateStagedOpts struct {

// - Port number of the health monitor for healthchecking
// - Must be specified `0` when `protocol` is `"icmp"`
// - If 'protocol' is 'icmp', value must be set `0`
Port *int `json:"port,omitempty"`

// - Protocol of the health monitor for healthchecking
Expand All @@ -359,20 +373,22 @@ type UpdateStagedOpts struct {

// - Retry count of healthchecking
// - Initial monitoring is not included
// - Retry is executed at the interval specified by `interval`
// - Retry is executed at the interval set in `interval`
Retry *int `json:"retry,omitempty"`

// - Timeout of healthchecking (in seconds)
// - Must be specified a number less than or equal to `interval`
// - Value must be less than or equal to `interval`
Timeout *int `json:"timeout,omitempty"`

// - URL path of healthchecking
// - Can be specified path to monitor when `protocol` is `"http"` or `"https"`
// - If `protocol` is `"http"` or `"https"`, URL path can be set
// - If `protocol` is neither `"http"` nor `"https"`, URL path must not be set
// - Must be started with /
Path *string `json:"path,omitempty"`

// - HTTP status codes expected in healthchecking
// - Can be specified HTTP status code (or range) when `protocol` is `"http"` or `"https"`
// - If `protocol` is `"http"` or `"https"`, HTTP status code (or range) can be set
// - If `protocol` is neither `"http"` nor `"https"`, HTTP status code (or range) must not be set
// - Format: `"xxx"` or `"xxx-xxx"` ( `xxx` between [100, 599])
HttpStatusCode *string `json:"http_status_code,omitempty"`
}
Expand Down
24 changes: 12 additions & 12 deletions v2/ecl/managed_load_balancer/v1/health_monitors/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type CancelStagedResult struct {
type ConfigurationInResponse struct {

// - Port number of the health monitor for healthchecking
// - Returns `0` when `protocol` is `"icmp"`
// - If `protocol` is `"icmp"`, returns `0`
Port int `json:"port,omitempty"`

// - Protocol of the health monitor for healthchecking
Expand All @@ -75,18 +75,18 @@ type ConfigurationInResponse struct {

// - Retry count of healthchecking
// - Initial monitoring is not included
// - Retry is executed at the interval specified by `interval`
// - Retry is executed at the interval set in `interval`
Retry int `json:"retry,omitempty"`

// - Timeout of healthchecking (in seconds)
Timeout int `json:"timeout,omitempty"`

// - URL path of healthchecking
// - Used when `protocol` is `"http"` or `"https"`
// - If `protocol` is `"http"` or `"https"`, uses this parameter
Path string `json:"path,omitempty"`

// - HTTP status codes expected in healthchecking
// - Used when `protocol` is `"http"` or `"https"`
// - If `protocol` is `"http"` or `"https"`, uses this parameter
// - Format: `"xxx"` or `"xxx-xxx"` ( `xxx` between [100, 599])
HttpStatusCode string `json:"http_status_code,omitempty"`
}
Expand Down Expand Up @@ -144,7 +144,7 @@ type HealthMonitor struct {
TenantID string `json:"tenant_id"`

// - Port number of the health monitor for healthchecking
// - Returns `0` when `protocol` is `"icmp"`
// - If `protocol` is `"icmp"`, returns `0`
Port int `json:"port,omitempty"`

// - Protocol of the health monitor for healthchecking
Expand All @@ -155,29 +155,29 @@ type HealthMonitor struct {

// - Retry count of healthchecking
// - Initial monitoring is not included
// - Retry is executed at the interval specified by `interval`
// - Retry is executed at the interval set in `interval`
Retry int `json:"retry,omitempty"`

// - Timeout of healthchecking (in seconds)
Timeout int `json:"timeout,omitempty"`

// - URL path of healthchecking
// - Used when `protocol` is `"http"` or `"https"`
// - If `protocol` is `"http"` or `"https"`, uses this parameter
Path string `json:"path,omitempty"`

// - HTTP status codes expected in healthchecking
// - Used when `protocol` is `"http"` or `"https"`
// - If `protocol` is `"http"` or `"https"`, uses this parameter
// - Format: `"xxx"` or `"xxx-xxx"` ( `xxx` between [100, 599])
HttpStatusCode string `json:"http_status_code,omitempty"`

// - Running configurations of the health monitor
// - Return object when `changes` is `true`
// - Return `null` when current configuration does not exist
// - If `changes` is `true`, return object
// - If current configuration does not exist, return `null`
Current ConfigurationInResponse `json:"current,omitempty"`

// - Added or changed configurations of the health monitor that waiting to be applied
// - Return object when `changes` is `true`
// - Return `null` when staged configuration does not exist
// - If `changes` is `true`, return object
// - If staged configuration does not exist, return `null`
Staged ConfigurationInResponse `json:"staged,omitempty"`
}

Expand Down
Loading

0 comments on commit b5fa8d1

Please sign in to comment.